Centos互联网不工作

我们的testing服务器configuration了CentOS安装。 但是,当我们把机器放在dynamicIP上时,互联网就可以正常工作。

但是我们需要使用静态IP来configuration互联网(具有讽刺意味的是)并使机器可以访问。 但是,静态IP互联网不起作用。

可能是什么问题呢?

PS:在静态IP,机器可以从互联网访问(传入stream量正常工作)。

编辑:这里是所有的信息。 http://paste2.org/p/1741156

只需检查默认网关

 #route Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.61.0 * 255.255.255.192 U 1 0 0 eth0 192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0 link-local * 255.255.0.0 U 1000 0 0 eth0 #check the following line default 192.168.61.62 0.0.0.0 UG 0 0 0 eth0 

如果没有,你需要设置默认网关

 route add default gw 10.0.0.2 
 [root@192 ~]# nslookup google.com ;; connection timed out; no servers could be reached 

您没有设置DNS。 运行以下命令:

 echo "nameserver 8.8.8.8" > /etc/resolv.conf echo "nameserver 8.8.4.4" >> /etc/resolv.conf 

然后再试一次。