一、#安装拨号软件:
[root@song ~]# yum install rp-pppoe -y
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink | 9.2 kB 00:00:00
* base: mirrors.bfsu.edu.cn
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/3): epel/x86_64/primary_db | 7.0 MB 00:00:00
(3/3): updates/7/x86_64/primary_db | 13 MB 00:00:01
Resolving Dependencies
--> Running transaction check
····························································································································································································································
Installed:
rp-pppoe.x86_64 0:3.11-7.el7Dependency Installed:
libpcap.x86_64 14:1.5.3-12.el7 ppp.x86_64 0:2.4.5-34.el7_7Complete!
二、#使用pppoe-setup进行交互式配置:
[root@song ~]# pppoe-setup
Welcome to the PPPoE client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
三、启动 | 状态 | 使用
通过以下命令查看状态:
[root@song ~]# pppoe-status
通过以下命令即可启动:
成功拨号后即可上网,默认路由就是ppp0接口。
[root@song ~]# pppoe-start
[root@song ~]# /sbin/ifup ppp0
/sbin/adsl-start: line 217: 2602 Terminated $CONNECT "$@" > /dev/null 2>&1
[root@song ~]#/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0
pppoe-status: Link is down (can't read pppoe PID file /var/run/pppoe-adsl.pid.pppoe)
#通过ifconfig查看,出现如下ppp0:flags的信息之后,就是正常拨号了。
[root@song /]# ifconfig
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1492
inet ***略 netmask 255.255.255.255 destination ***略
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 29059 bytes 2989089 (2.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28391 bytes 4055059 (3.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
以上为实际测试结果。