1. how to access Internet via OVS
What I did? 1. I added eth0 (NAT) of ovs to the bridge. 2. I removed IP for the eth0. 3. I assigned IP for bridge (br0) using DHCP. 4. Made the Host-Only with out any IP. (I mean, I changed vmnet 0 settings as DHCP) 5. Added eth1 to br0 6. Got the IP address on eth0 of Host 1 via DHCP. *In OVS:* *----------* *ovs-vsctl add br br0* *ovs-vsctl add-port br0 eth0* *ifconfig eth0 0 * //取消eth0的IP地址 *dhclient br0 (eth0 should not have any IP while br0 should get an IP now)* *now if we ping www.google.com <http://www.google.com> it works* *next* *ovs-vsctl add-port br0 eth1* *in Host:* *dhclient eth0 (It should fetch an IP from DHCP).* *Then I am able to ping google from here.* *I got this idea from this video * https://www.youtube.com/watch?v=rYW7kQRyUvA
注:默认网关只能有一个,虽然上面显示有许多条defualt, 但是只使用第一条的defatult条目
原文:http://www.cnblogs.com/zxqstrong/p/4897433.html