当前位置: 技术问答>linux和unix
【求助】我的linux在局域网中上不了网?
来源: 互联网 发布时间:2015-10-04
本文导语: redhat 9.0和windows xp 系统并存,再windows下就可以上网,而linux却不行!why????我在linux下的设置和windows一样啊。而且能够ping通127.0.0.1但是ping不通网关,而且同一局域网内另一台同样版本的linux确能正常上网。我甚至把...
redhat 9.0和windows xp 系统并存,再windows下就可以上网,而linux却不行!why????我在linux下的设置和windows一样啊。而且能够ping通127.0.0.1但是ping不通网关,而且同一局域网内另一台同样版本的linux确能正常上网。我甚至把他的网络配置抄过来都不行啊
ifconfig 结果如下:
eth0 Link encap:Ethernet HWaddr 000:F8:0A:FC:80
inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:1080 (1.0 Kb)
Interrupt:10 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:475 errors:0 dropped:0 overruns:0 frame:0
TX packets:475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32006 (31.2 Kb) TX bytes:32006 (31.2 Kb)
[root@zss root]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
[root@zss root]# traceroute 192.168.1.1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 38 byte packets
1 192.168.1.15 (192.168.1.15) 2994.443 ms !H 2999.941 ms !H 2999.933 ms !H
ifconfig 结果如下:
eth0 Link encap:Ethernet HWaddr 000:F8:0A:FC:80
inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:1080 (1.0 Kb)
Interrupt:10 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:475 errors:0 dropped:0 overruns:0 frame:0
TX packets:475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32006 (31.2 Kb) TX bytes:32006 (31.2 Kb)
[root@zss root]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
[root@zss root]# traceroute 192.168.1.1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 38 byte packets
1 192.168.1.15 (192.168.1.15) 2994.443 ms !H 2999.941 ms !H 2999.933 ms !H
|
用netconfig设置一下
|
你有可能没有设置有效的DNS
你在/etc/resolv.conf里加上这行试试
nameserver 202.99.96.68
你在/etc/resolv.conf里加上这行试试
nameserver 202.99.96.68
|
可能eth0没有启用,系统可不是每次都默认启动的哦
|
setup里面设一下。