当前位置: 技术问答>linux和unix
服务器不能上网了!
来源: 互联网 发布时间:2016-01-07
本文导语: linux主机,外网可以访问主机,但是主机ping不通dns,不能上外网!,210.22.70.3这个是dns! #ifconfig eth0 Link encap:Ethernet HWaddr 00:E0:4C:E8:4B:22 inet addr:192.168.5.252 Bcast:192.168.5.255 Mask:255.255.255.0 ...
linux主机,外网可以访问主机,但是主机ping不通dns,不能上外网!,210.22.70.3这个是dns!
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:4C:E8:4B:22
inet addr:192.168.5.252 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fee8:4b22/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1070414 errors:0 dropped:0 overruns:0 frame:0
TX packets:31158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103934686 (99.1 MiB) TX bytes:13716514 (13.0 MiB)
Interrupt:169 Base address:0x6800
eth1 Link encap:Ethernet HWaddr 00:16:EC:A4:59:86
inet addr:144.233.32.252 Bcast:144.233.32.255 Mask:255.255.255.0
inet6 addr: fe80::216:ecff:fea4:5986/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2932911 errors:0 dropped:0 overruns:0 frame:0
TX packets:896137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:336551608 (320.9 MiB) TX bytes:422038626 (402.4 MiB)
Interrupt:217 Base address:0x6400
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:22394 errors:0 dropped:0 overruns:0 frame:0
TX packets:22394 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9218428 (8.7 MiB) TX bytes:9218428 (8.7 MiB)
#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.5.0 * 255.255.255.0 U 0 0 0 eth0
144.233.32.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 144.233.32.70 0.0.0.0 UG 0 0 0 eth1
# traceroute 210.22.70.3
traceroute to 210.22.70.3 (210.22.70.3), 30 hops max, 38 byte packets
1 144.233.32.70 (144.233.32.70) 0.951 ms 0.918 ms 0.921 ms
2 * * *
3 * * *
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:4C:E8:4B:22
inet addr:192.168.5.252 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fee8:4b22/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1070414 errors:0 dropped:0 overruns:0 frame:0
TX packets:31158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103934686 (99.1 MiB) TX bytes:13716514 (13.0 MiB)
Interrupt:169 Base address:0x6800
eth1 Link encap:Ethernet HWaddr 00:16:EC:A4:59:86
inet addr:144.233.32.252 Bcast:144.233.32.255 Mask:255.255.255.0
inet6 addr: fe80::216:ecff:fea4:5986/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2932911 errors:0 dropped:0 overruns:0 frame:0
TX packets:896137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:336551608 (320.9 MiB) TX bytes:422038626 (402.4 MiB)
Interrupt:217 Base address:0x6400
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:22394 errors:0 dropped:0 overruns:0 frame:0
TX packets:22394 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9218428 (8.7 MiB) TX bytes:9218428 (8.7 MiB)
#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.5.0 * 255.255.255.0 U 0 0 0 eth0
144.233.32.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 144.233.32.70 0.0.0.0 UG 0 0 0 eth1
# traceroute 210.22.70.3
traceroute to 210.22.70.3 (210.22.70.3), 30 hops max, 38 byte packets
1 144.233.32.70 (144.233.32.70) 0.951 ms 0.918 ms 0.921 ms
2 * * *
3 * * *
|
你的默认网关有问题了