Ubuntu PPPoE拨号上网指定网卡

时间:2021-10-24 15:48:25

Just follow these steps:

  1. Check that the ethernet cable is properly connected
  2. Open Terminal
  3. Run sudo pppoeconf
  4. Enter root password
  5. Answer all the question that will be asked with an answer "Yes"
  6. Finally type pon dsl-provider 开始拨号

To stop connection run poff dsl-provider

指定拨号网卡
sudo vi /etc/ppp/peers/dsl-provider
plugin rp-pppoe.so eth2

pon命令详解
1.pon命令不带参数,首先检测运行/etc/ppp/ppp_on_boot文件,如果不存在就会去 /etc/ppp/peers/文件夹下寻找启动文件。
2.pon命令带参数,pon myisp;就会使用/etc/ppp/peers/myisp文件

sudo plog查看拨号日志
Sep 28 16:14:30 brian pppd[18211]: CHAP authentication succeeded: Access granted
Sep 28 16:14:30 brian pppd[18211]: CHAP authentication succeeded

ifconfig ppp0 查看连接信息
ps -aux | grep ppp 查看运行的进程
sudo kill -9 2121 杀掉相应进程

参考:
https://askubuntu.com/questions/406300/how-to-connect-to-internet-using-wired-pppoe-connection
https://blog.csdn.net/selous/article/details/55520765