感谢支持
我们一直在努力

RedHat Enterprise Linux 5.X无法上网的解决办法

环境:RedHat Enterprise Linux 5.X


现象:


使用ifconfig命令查看网卡信息,发现有virbr0、xenbr0等多余的信息,如下:


[root@EXFO ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:64:C4:80
          inet addr:XXX.XX.XX.XX  Bcast:XXX.XX.XX.XX  Mask:255.255.255.192
          inet6 addr: fe80::20c:29ff:fe64:c480/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4510 errors:0 dropped:0 overruns:0 frame:0
          TX packets:300 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:281040 (274.4 KiB)  TX bytes:26056 (25.4 KiB)


eth1      Link encap:Ethernet  HWaddr 00:0C:29:64:C4:8A
          inet addr:192.216.6.78  Bcast:192.216.6.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe64:c48a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1201 errors:0 dropped:0 overruns:0 frame:0
          TX packets:421 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:80721 (78.8 KiB)  TX bytes:93549 (91.3 KiB)
          Base address:0x1078 Memory:f4840000-f4860000


lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1664 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1664 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2460982 (2.3 MiB)  TX bytes:2460982 (2.3 MiB)


peth0     Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:6152 errors:0 dropped:0 overruns:0 frame:0
          TX packets:376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:384572 (375.5 KiB)  TX bytes:44157 (43.1 KiB)
          Base address:0x1070 Memory:f4820000-f4840000


vif0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:332 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5989 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36048 (35.2 KiB)  TX bytes:372384 (363.6 KiB)


virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:10188 (9.9 KiB)


xenbr0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:6158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:311095 (303.8 KiB)  TX bytes:0 (0.0 b)


解决办法:


怀疑这些多余的配置冲突导致了该服务无法连接网络,尝试删除virbr0、xenbr0等多余的信息,即vi /boot/grub/grub.conf把其中的default=0改为default=1后,保存退出,reboot服务器即可解决问题。


 


再使用ifconfig查看到的信息如下:


[root@EXFO ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:64:C4:80
          inet addr:XXX.XX.XX.XX  Bcast:XXX.XX.XX.XX  Mask:255.255.255.192
          inet6 addr: fe80::20c:29ff:fe64:c480/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1172206 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75628 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:93410582 (89.0 MiB)  TX bytes:28185193 (26.8 MiB)
          Base address:0x1070 Memory:f4820000-f4840000


eth1      Link encap:Ethernet  HWaddr 00:0C:29:64:C4:8A
          inet addr:192.216.6.78  Bcast:192.216.6.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe64:c48a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5172160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2407634 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4108624765 (3.8 GiB)  TX bytes:139136852 (132.6 MiB)
          Base address:0x1078 Memory:f4840000-f4860000


lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1182 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1182 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1823252 (1.7 MiB)  TX bytes:1823252 (1.7 MiB)


[root@EXFO ~]#
virbr0、xenbr0等多余的信息已消失,此服务器可上网。

赞(0) 打赏
转载请注明出处:服务器评测 » RedHat Enterprise Linux 5.X无法上网的解决办法
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏