水准测量的基本原理:linux Dns问题 | Asterisk中国技术社区

来源:百度文库 编辑:偶看新闻 时间:2024/07/06 19:09:38

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