1

I am trying to create a simple SDN network using virtual machines. The network setup is with 2 hosts and OpenDaylight controller. The 3 virtual machines are created in Virtualbox. I installed openvswitch in my host machine (Ubuntu 18.04 LTS desktop version with 4.15.0-36-generic kernel version). All the virtual machines have Ubuntu 16.04 LTS server running. Then I created a bridge in openvswitch (i.e in my host machine) as

sudo ovs-vsctl add-br br_test
ifconfig br_test up

Then I added the physical interface of my host machine eth0 to the bridge as follows.

ovs-vsctl add-port mybridge eth0

Then I set the IP address of the physical interface to the bridge I created in openvswitch.

ifconfig eth0 0
dhclient mybridge

And I was able to ping google from the host machine. Then to connect my ODL controller and 2 hosts, I created ports and add them to the the bridge.

ip tuntap add mode tap vport1
ip tuntap add mode tap vport2
ip tuntap add mode tap vport3
ifconfig vport1 up
ifconfig vport2 up
ifconfig vport3 up
ovs-vsctl add-port br_test vport1 -- add-port br_test vport2 -- add-port 
br_test vport3

Then all the 3 virtual machines were connected to the openvswitch bridge using vport1,vport2 and vport3. I was able to ping google from the virtual machines too. The problem comes after this. When I try to connect the ODL controller to the openvswitch as

sudo ovs-vsctl set-controller mybridge tcp:ip_of_the_host:6633

When I execute this command and check for the status of the controller in openvswitch it shows that the controller is connected, but soon the whole network fails. When I checked, the eth0 of the physical host has also got an IP address and it is the same as the IP of the bridge in openvswitch.

I couldn't find why it fails or any another possible way to connect the virtual machines. Is there any other way to do this? Instead of creating the openvswitch in the physical machine, can I create it on a virtual machine and connect other virtual machines to that?

Any help is much appreciated. Thanks in advance.

gowther
  • 11
  • 3

0 Answers0