首页 > 其他 > 详细

配置 host only 后 nat不能上网了

时间:2016-08-23 22:04:18      阅读:258      评论:0      收藏:0      [点我收藏+]

如果只有nat 网关为nat 中设置的网关  eth0

启动第二块网卡host_only 网关就变成了 host_only中的网关  eth1

解决放法 

route -n 看启用的是哪个网关

[root@localhost ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window irtt Iface
172.16.44.0     0.0.0.0          255.255.255.0    U         0      0          0 vmnet8
172.16.10.0     0.0.0.0          255.255.255.0        U         0      0          0 vmnet1
172.16.0.0       0.0.0.0          255.255.252.0        U         0      0          0 eth0
169.254.0.0     0.0.0.0          255.255.0.0           U         0      0          0 eth0
0.0.0.0         172.16.0.254(网关)    0.0.0.0           UG        0      0          0 eth0

查看你的网关

在nat 的eth0 中配置GATEWAY 即可

取消 host_only 的 eth1 中取消配置GATEWAY

service network restart

 

配置 host only 后 nat不能上网了

原文:http://www.cnblogs.com/zhaoyang-1989/p/5800850.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!