centos7-32网络配置问题的解决方法,centos7-32解决方法


刚刚给一台很老的笔记本电脑(lenovo z61t)装了个centos7,系统好像没有这么古老的无线网卡驱动,所以新系统连不上网,但是可以插网线连接,如果是经过自己设置好的路由器的网线,一般不需要过多设置,插上网线,在显示网络连接那的地方点两下网卡名字一般就能自动连上,但是如果是pppoe拨号的话就麻烦一点了。(下面命令可能需要管理员权限或在sudo)

先 rpm -q rp-pppoe看看有没有装拨号软件,如果没有显示版本信息的话就是没装,那么既然没有网络,就要用别的方法装了,一般安装时用的cd里有相关软件

把安装时用的光盘插进光驱,然后mount /dev/cdrom /mnt 挂载好,find /mnt -name 'rp-pppoe*' 找到文件路径xxxxxxxxxxxx,然后
rpm -ivh /mnt/xxxxxxxxxxxxxx 安装就可以了

然后就可以配置pppoe拨号连接了,一般安装之后就可以直接使用,显示早不到路径的话,可以whereis找到设置一下路径,设置好之后pppoe-setup开始设置

Enter your Login Name填拨号连接的帐号,

Enter the Ethernet interface connected to the PPPoE modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.

这里填网卡名字,不要随便填,ifconfig 查看后填写,一般第一个就是

然后两次DNS最好都自己设定,具体设置成哪中比较安全,我也不太懂,最好百度一下再设置

Please enter your Password:填写拨号连接的密码

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2):
这个设置防火墙,一般选0就可以

Do you want to start this connection at boot time?
Please enter no or yes (default no):

询问是否开机启动,这个可以设置为开机启动,但是需要注意一点,当再次换到过路由器的网线登陆时,一定要pppoe-stop,否则即使连接成功也无法访问网页

最后y,回车,然后pppoe-start就可以了。

相关内容