5

I'm building an SDN testbed consists of an OpenvSwitch switch installed on Linux Ubuntu 18.04 and 5 VMs (Linux Ubuntu 16.04 server) running on VirtualBox. The OVS is managed by OpenDaylight Boron.

  • When I use ip tuntap add mode tap tapN to create taps to link the VMs to OVS, everything works just fine and I can ping between VMs "within the same subnet". however when I try: ovs-ofctl -O OpenFlow13 dump-ports br0, statistics such as (rx pkts and tx pkts) show only Zeros on all ports except the LOCAL port. enter image description here
  • But when I use ovs-vsctl add-port br0 vnet0 -- set Interface tapN type=internal to create the taps, I can see statistics on all ports even if only one device pings another one. enter image description here My questions:

    1. Why (dump-ports) doesn't show statistics in the first case?

    2. Is it Ok to continue use (ovs internal taps) in my testbed as described in the second case?


Here is the complete OVS configuration case 1:

ovs-vsctl add-br br0

ip tuntap add mode tap vnet0
ip tuntap add mode tap vnet1
ip tuntap add mode tap vnet2
ip tuntap add mode tap vnet3
ip tuntap add mode tap vnet4
ip tuntap add mode tap vnet5

ip link set vnet0 up 
ip link set vnet1 up
ip link set vnet2 up
ip link set vnet3 up 
ip link set vnet4 up
ip link set vnet5 up 


ovs-vsctl add-port br0 vnet0
ovs-vsctl add-port br0 vnet1
ovs-vsctl add-port br0 vnet2
ovs-vsctl add-port br0 vnet3
ovs-vsctl add-port br0 vnet4
ovs-vsctl add-port br0 vnet5

ifconfig br0 up
ovs-vsctl set bridge br0 protocols=OpenFlow13

ovs-vsctl set-controller br0 tcp:10.10.80.50:6633
Ahmed Sallam
  • 51
  • 1
  • 5
  • What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands? – pchaigno Nov 23 '18 at 18:37
  • I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating. – Ahmed Sallam Nov 28 '18 at 00:45
  • Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run `ifconfig` or `ip a` inside one VM? – pchaigno Nov 28 '18 at 09:18
  • Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case – Ahmed Sallam Nov 28 '18 at 20:28
  • Thanks for sharing. Have you tried host in VM communicate host in host machine (outside of VM)? – Cloud Cho Aug 09 '23 at 18:19

0 Answers0