ifcfg-eth0 和resove.conf都配置成功了.ping 外网IP说 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
|