似梦似醒

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

如果只有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

 

posted on 2016-08-23 21:08  人生如梦,梦如人生  阅读(368)  评论(0编辑  收藏  举报