知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

CentOSlinuxadsl配置网卡配置

发布时间:2014-09-05 17:41:06作者:知识屋

1、查看网卡状态:ifconfig

查看网线是否插好: ethtool em1(em1默认为内网),看 Speed那一行,如果为Unknown,则网线没插好,如果为 1000Mb/s,则网线插好

2、检查系统是否已经安装ppp:rpm -qa|grep pppoe,或者在 /usr/sbin/pppd, 看一下是否有pppd文件,如果没有:

(1)有网情况下:

(使用和配置内网网关:

修改 vi /etc/sysconfig/network-scripts/ifcfg-em1(em1默认为内网) 中加入 GATEWAY=192.168.0.10或将其注释打开,

此时服务器将会在自身没有adsl的情况下,通过内网访问外网,当配置完adsl时,将GATEWAY=192.168.0.10注销或删除

使用yum进行安装: sudo yum install pppoe 或者sudo yum install rp-pppoe.

(2)在没网的情况下:

先下载:rp-pppoe

ftp://ftp.muug.mb.ca/mirror/centos/5.10/os/x86_64/CentOS/rp-pppoe-3.5-33.el5.x86_64.rpm

使用rpm -ivh安装时报错:找不到ppp

然后,下载:依赖包ppp

ftp://ftp.muug.mb.ca/mirror/centos/5.10/os/x86_64/CentOS/ppp-2.4.4-2.el5.x86_64.rpm

使用rpm -ivh安装时报错:找不到ppp

然后,下载:依赖包libpcap

ftp://ftp.muug.mb.ca/mirror/centZhttp://www.zhishiwu.com/kf/ware/vc/"%20target="_blank"%20class="keylink">vcy81LjEwL29zL3g4Nl82NC9DZW50T1MvbGlicGNhcC0wLjkuNC0xNS5lbDUueDg2XzY0LnJwbSAKyrnTw3JwbSAtaXZosLLXsKGjCjOhosXk1sMvZXRjL3N5c2NvbmZpZy9uZXR3b3JrLXNjcmlwdHMvaWZjZmctZW0xIM7EvP6jugo8cD4KICAgIMiltfRHQVRFV0FZxeTWw8/uo6zIw7KmusXX1Lavu/HIoc34udg8L3A+CjxwPgogICAgyLu688Xk1sN2aSAvZXRjL3Jlc29sdi5jb25mPC9wPgo8cD4KvNPJz0ROU6O6IyBNQURFLUJZLVJQLVBQUE9FPGJyPgpuYW1lc2VydmVyIDIwMi4xMDYuMTk1LjY4o6jU2mFkc2zG9Lav1q6687vh19S2r7vxyKFETlOjqTxicj4KbmFtZXNlcnZlciAyMDIuMTA2LjQ2LjE1MTwvcD4KCgo8cD4KNKGixeTWw3BwcG9lLmNvbmYgICAvZXRjL3BwcC9wcHBvZS5jb25mPC9wPgo8cD4KICAgv8nS1Mq508PD/MHuo7pwcHBvZS1zZXR1cCC9+NDQxeTWw6O6PC9wPgo8cD4KICDM4cq+yuTI66O6IEVudGVyIHlvdXIgUFBQb0UgdXNlciBuYW1lIDogIMrkyOthZHNs08O7p8P7o6jVy7rFo6k8L3A+CjxwPgogICDM4cq+yuTI66O6RW50ZXIgdGhlIEV0aGVybmV0IGludGVyZmFjZSBjb25uZWN0ZWQgdG8gdGhlIEFEU0wgbW9kZW0gRm9yIFNvbGFyaXMsIHRoaXMgaXMgbGlrZWx5IHRvIGJlIHNvbWV0aGluZyBsaWtlIC9kZXYvaG1lMC4gRm9yIExpbnV4LCBpdCB3aWxsIGJlICAgZXRobiwgd2hlcmUg"n'%20is%20a%20number.%20(default%20em1):%20%20输入adsl网卡名称,默认em1(内网网卡),最好从em2开始

%20%20%20提示输入:Enter%20the%20demand%20value%20(default%20no):%20输入no

%20%20%20提示输入:Enter%20the%20DNS%20information%20here:%20输入%20server%20,这表示使用ADSL拨号自动获得的DNS服务器IP地址%20

%20%20%20提示输入:Please%20enter%20your%20PPPoE%20password:%20输入ADSL帐号的密码%20

%20%20%20提示输入:Choose%20a%20type%20of%20firewall%20(0-2):%20输入%200(0是不使用防火墙)

%20%20%20提示输入:Accept%20these%20settings%20and%20adjust%20configuration%20files%20(y/n)?%20如果输入的信息正确,输入%20y%20,完成配置,否则,输入%20n%20重新输%20入。

5、启动ADSL

%20%20%20pppoe-connect%20启动PPPOE%20%20如果连接成功会提示Connected,如果失败,请检查网线、ADSL%20MODEM等物理设备,并查看%20/var/log/messages中的信息%20.

%20%20%20pppoe-stop%20关闭和ISP的连接%20

%20%20%20pppoe-status%20查看当前连接的状态

如果想开机启动ADSL:chkconfig%20--add%20adsl%20







(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜