今天把一臺機器放到外網網絡上去安裝gcc
能ping能內網的機器和IP,但是ping不能網關以外的其他地址,如baidu.com
一起報上述錯誤:
connect: network is unreachable
試了好多方式:
1、把ipv6的關掉:
http://www.linuxidc.com/Linux/2012-06/63642.htm
2、修改/etc/resove.conf
3、換網段
4、換網卡
5、把em1 改成eth0
上述都沒有解決問題
到最後終於找到了一個方法,問題才得以解決,就是一條命令:
route add default gw 192.168.101.245(網關)
http://www.xobm.com/php/id-276.html
特把過程貼出,以存底。