时间:2015-01-21 14:12:25 作者:qipeng 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150121/35461.html 手机查看 评论 反馈
3、网卡eth0被删除后,新加的网卡成了eth1,如何让从eth0开始
[root@rac01 ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:50:56:95:09:76
inet addr:10.10.10.110 Bcast:10.10.10.111 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe95:976/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:830 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63700 (62.2 KiB) TX bytes:6259 (6.1 KiB)
eth2 Link encap:Ethernet HWaddr 00:0C:29:1E:F6:B7
inet addr:10.10.10.120 Bcast:10.10.10.111Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1e:f6b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:777 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:54938 (53.6 KiB) TX bytes:746 (746.0 b)
解决方法:
同2问题类似,即可以手动的修改70-persistent-net.rules文件,将对应的MAC地址与网卡序号改成想要的,也可以直接删除该文件,重启系统后,RedHat会自动的创建该文件,并从0开始计数。
删除文件,重启系统
[root@rac01 ~]# mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/7
0-persistent-net.rules.bak
[root@rac01 ~]# reboot
再次查看,会发现已经从eht0开始
[root@rac01 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:95:09:76
inet addr:10.109.67.81 Bcast:10.109.67.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe95:976/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:206 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19282 (18.8 KiB) TX bytes:7215 (7.0 KiB)
eth1 Link encap:Ethernet HWaddr 00:0C:29:1E:F6:B7
inet addr:10.109.67.83 Bcast:10.109.67.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1e:f6b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:131 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8736 (8.5 KiB) TX bytes:746 (746.0 b)
4、每次重启网卡,总是提示
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/9
此时网卡也可以正常通信,这个是因为RedHat自己开发的NetworkManager管理工具和/etc/sysconfig/network-scripts/ifcfg-ethx配置不同步造成的。
解决方法:
要消除这个提示,请关闭NetworkManager服务即可:
[root@rac01 ~]# service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2 [ OK ]
Bringing up interface eth1: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/3 [ OK ]
关闭NetworkManager服务
[root@rac01 ~]# service NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
再次重启网卡
[root@rac01 ~]# service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
5、重启网卡出现提示:
Bringing up interface eth0: Determining if ip address 10.109.67.81 is already in use for device eth0.。。
[ OK ]
Bringing up interface eth1: Determining if ip address 10.109.67.83 is already in use for device eth1.。。
[ OK ]
该警告一般是由于网卡解析arp协议导致的,可在网卡的配置文件中加入ARPCHECK=NO参数来屏蔽该检查
[root@rac01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.109.67.81
PREFIX=24
GATEWAY=10.109.67.254
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
UUID=86d44060-4579-48cc-b85b-219a206ca37c
ONBOOT=yes
HWADDR=00:50:56:95:09:76
LAST_CONNECT=1411004329
ARPCHECK=no
再次启动网卡,一切正常
[root@rac01 ~]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
上面就是RedHat6.5网卡常见问题及解决方法的介绍了,如果你在联网的时候出现连接不上的情况,可以看看是不是网卡出现了问题,可用本文介绍的相关方法进行处理。
发表评论
共0条
评论就这些咯,让大家也知道你的独特见解
立即评论以上留言仅代表用户个人观点,不代表系统之家立场