当前位置: 技术问答>linux和unix
Linux不能访问公网(急)
来源: 互联网 发布时间:2015-07-22
本文导语: 操作系统是Red Hat Linux7.3,我使用别的机器可以Ping到这台机器,但是我在Red Hat Linux7.3这台机器上Ping公网的机器却Ping不到,比如: [root@www root]# ping www.sina.com.cn ping: unknown host www.sina.com.cn 然后我Ping网关,结果如...
操作系统是Red Hat Linux7.3,我使用别的机器可以Ping到这台机器,但是我在Red Hat Linux7.3这台机器上Ping公网的机器却Ping不到,比如:
[root@www root]# ping www.sina.com.cn
ping: unknown host www.sina.com.cn
然后我Ping网关,结果如下:
[root@www root]# ping 210.xx.xx.xx
PING 210.xx.xx.xx (21210.xx.xx.xx) from 210.xx.xx.xx : 56(84) bytes of data.
From 210.xx.xx.xx icmp_seq=1 Packet filtered
From 210.xx.xx.xx icmp_seq=2 Packet filtered
From 210.xx.xx.xx icmp_seq=3 Packet filtered
From 210.xx.xx.xx icmp_seq=4 Packet filtered
From 210.xx.xx.xx icmp_seq=5 Packet filtered
--- 210.xx.xx.xx ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% loss, time 4012ms
然后我PingDNS服务器,结果如下:
[root@www root]# ping 210.x.x.x
connect: Network is unreachable
我在Windows操作下配置成上面的IP地址、网关和DNS是可以Ping的,比如:
C:Documents and SettingsAdministrator>ping www.sina.com.cn
Pinging pavo.sina.com.cn [210.51.179.88] with 32 bytes of data:
Reply from 210.51.179.88: bytes=32 time=80ms TTL=55
Reply from 210.51.179.88: bytes=32 time=81ms TTL=55
Reply from 210.51.179.88: bytes=32 time=80ms TTL=55
Reply from 210.51.179.88: bytes=32 time=70ms TTL=55
Ping statistics for 210.51.179.88:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 70ms, Maximum = 81ms, Average = 77ms
请问如何配置Linux才能访问外网?请给出具体的操作步骤和命令,谢谢!
[root@www root]# ping www.sina.com.cn
ping: unknown host www.sina.com.cn
然后我Ping网关,结果如下:
[root@www root]# ping 210.xx.xx.xx
PING 210.xx.xx.xx (21210.xx.xx.xx) from 210.xx.xx.xx : 56(84) bytes of data.
From 210.xx.xx.xx icmp_seq=1 Packet filtered
From 210.xx.xx.xx icmp_seq=2 Packet filtered
From 210.xx.xx.xx icmp_seq=3 Packet filtered
From 210.xx.xx.xx icmp_seq=4 Packet filtered
From 210.xx.xx.xx icmp_seq=5 Packet filtered
--- 210.xx.xx.xx ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% loss, time 4012ms
然后我PingDNS服务器,结果如下:
[root@www root]# ping 210.x.x.x
connect: Network is unreachable
我在Windows操作下配置成上面的IP地址、网关和DNS是可以Ping的,比如:
C:Documents and SettingsAdministrator>ping www.sina.com.cn
Pinging pavo.sina.com.cn [210.51.179.88] with 32 bytes of data:
Reply from 210.51.179.88: bytes=32 time=80ms TTL=55
Reply from 210.51.179.88: bytes=32 time=81ms TTL=55
Reply from 210.51.179.88: bytes=32 time=80ms TTL=55
Reply from 210.51.179.88: bytes=32 time=70ms TTL=55
Ping statistics for 210.51.179.88:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 70ms, Maximum = 81ms, Average = 77ms
请问如何配置Linux才能访问外网?请给出具体的操作步骤和命令,谢谢!
|
网卡的设置都没错吧?
还有,会不会是在10M局域网内?这样的话你要用mii-tool改变你的速率
还有,会不会是在10M局域网内?这样的话你要用mii-tool改变你的速率
|
听老猫的试试
|
跟我的情况差不多,,,关注!
|
close firewall and try again