redhat提示: connect: network is unreachable
這條命令就可以搞定:
route add default gw 192.168.1.1
後面那是你的閘道器。
現在 route 一下
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default my.router 0.0.0.0 UG 0 0 0 eth0
之前如果沒有新增 的話, 只有上面的第一條。 第二條是新加進去的。
如果還訪問不了, 哪你的情況可能有點特殊哦。
這樣重啟以後 就不能 用了。
修改
編輯 /etc/network/interfaces
新增 gateway 192.168.1.1 [你自己的閘道器地址]