You have to remove the IP address from eth0, e.g. "ifconfig eth0 0.0.0.0".
On Thu, Mar 17, 2011 at 12:23:25AM -0500, Hugo wrote: > Hi, > > I redo the experiment 1 based on your suggestion. My eth0 has an IP address > assigned to it. After I attach eth0 to the bridge, i.e br0, the MAC of br0 > and eth0 become the same. And I try to assign the same IP address or > different IP address to br0, in both situation, eth0 still has its IP > address and in the "up" status. Even I try to use ifconfig to shutdown eth0 > and reboot eth0, it still has its own IP address. Of course, I could not > access the network in this situation. Is there anything wrong on this > setup? > > Best, > Hugo > > On Wed, Mar 16, 2011 at 6:37 PM, Ben Pfaff <[email protected]> wrote: > > > On Wed, Mar 16, 2011 at 06:33:42PM -0500, Hugo wrote: > > > Experiment 1. > > > There is no VM in this experiment. I just install OVS in a debian host > > > machine. I follow the instruction in INSTALL.Linux. And I start up > > > "ovsdb-server" and "ovs-vswitchd" by executing the commands from > > > INSTALL.Linux too. There is no problem at this point. Then I run > > > > > > % ovs-vsctl add-br br0 > > > % ovs-vsctl add-port br0 eth0 > > > > > > eth0 is the only physical NIC in my host machine, it has the IP address > > > assigned, I can access the network from this NIC before. After doing > > this, > > > my host machine will not be able to access the network. My understanding > > is > > > that this actually emulating the real situation that connecting port from > > a > > > physical switch to a physical NIC by a ethernet cable. Then of course, > > the > > > machine could not access the internet. > > > However, in the real situation, usually a port from a physical switch can > > be > > > connected to the network through a ethernet cable. And we can go into the > > > switch's console to configure the physical switch (such as setup DNS) to > > > make it access to the network. I just wondering how can I configure the > > Open > > > vSwitch in any similar way to let it be able to access network? > > > > You can put your IP address on the br0 interface, e.g.: > > ifconfig br0 192.168.0.123 > > This is the same as what you would have to do with the Linux bridge. > > > > > Experiment 2 > > > I install a VM in a VirtualBox. Instead of NAT, I choose the Network > > adapter > > > as "Host-Only", and in this way, the Guest VM will connect through a > > > interface named "vboxnet0". This "vboxnet0" is network interface from > > > VirtualBox. It is visible from ifconfig in my HOST debian machine. I > > still > > > start up "ovsdb-server" and "ovs-vswitchd" by executing the commands from > > > INSTALL.Linux. I run (of course, I delete eth0 from br0) > > > > > > % ovs-vsctl add-br br0 > > > % ovs-vsctl add-port br0 vboxnet0 > > > > > > After doing this, the Virtual VM is not able to access the network. I am > > > just wondering what should I do in order to make the VM to be able to > > access > > > the network. Do I have to do some configuration in Guest VM as well as > > Open > > > vSwitch? I think these two experiments are simple, I hope from your > > answer, > > > I can better understand how Open vSwitch works and then I can try > > scenarioes > > > in cookbook. > > > > An Ethernet switch with only one port is not very useful. If you add > > a physical port to the switch, with "ovs-vsctl add-port br0 eth0", > > then the VM will be able to access the network through that physical > > port. > > _______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
