步骤概述:
1、搜寻PPPoE相关软件,本人使用的是rp-pppoe
yum search pppoe
2、使用yum安装rp-pppoe
yum install rp-pppoe -y
3、开始配置PPPoE连接
pppoe-setup
4、输入ISP提供的账户
5、输入以太网卡代号,默认是eth0(注:CentOS 7已不是默认eth0,自行使用ifconfig命令即可找到)
6、配置:若长时间连线,连线会被自动中断(我不干,选no)
7、配置主DNS服务器
8、配置次DNS服务器
9、两次输入账户密码以确认
10、配置普通账户是否有网络连接权限
11、配置防火墙(没有特殊需求选0就OK)
12、配置是否开机自动拨号连接
13、确认刚填写的配置信息
14、连接网络尽情享受吧!
相关命令@ 连接网络:/sbin/ifup ppp0,断开连接:/sbin/ifdown ppp0,查看网络状态:/sbin/pppoe-status
………………………………… 这是华丽丽的分割线 ………………………………… 获取以太网卡代号
复制代码 1 [dsp@dsp Desktop]$ ifconfig 2 enp9s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 # 有线网卡 3 ether 20:1b:06:3d:22:05 txqueuelen 1000 (Ethernet) 4 RX packets 0 bytes 0 (0.0 B) 5 RX errors 0 dropped 2297 overruns 0 frame 0 6 TX packets 0 bytes 0 (0.0 B) 7 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 8 device interrupt 18
9 10 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 11 inet 127.0.0.1 netmask 255.0.0.0 12 inet6 ::1 prefixlen 128 scopeid 0x10 13 loop txqueuelen 0 (Local Loopback) 14 RX packets 2 bytes 110 (110.0 B) 15 RX errors 0 dropped 0 overruns 0 frame 0 16 TX packets 2 bytes 110 (110.0 B) 17 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 18 19 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 20 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 21 ether 52:54:00:36:45:23 txqueuelen 0 (Ethernet) 22 RX packets 0 bytes 0 (0.0 B) 23 RX errors 0 dropped 0 overruns 0 frame 0 24 TX packets 0 bytes 0 (0.0 B) 25 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 26 27 wlp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 # 无线网卡 28 inet 192.168.0.151 netmask 255.255.255.0 broadcast 192.168.0.255 29 inet6 fe80::4ad2:24ff:fee8:f962 prefixlen 64 scopeid 0x20 30 ether 48:d2:24:e8:f9:62 txqueuelen 1000 (Ethernet) 31 RX packets 20017 bytes 16100210 (15.3 MiB) 32 RX errors 0 dropped 0 overruns 0 frame 0 33 TX packets 18263 bytes 2641746 (2.5 MiB) 34 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 复制代码 配置rp-pppoe客户端
...