2

I'm playing with sdn things, my test configuration is : openwswitch in a VM with 2 other VMs connected to it(all running Ubuntu 14.04 in VirtualBox):

vagrant@ovs:~$ sudo ovs-vsctl show
8c1ee033-7bf1-4640-9019-67dd3482f96c
    Bridge "ovsbr0"
        Controller "tcp:192.168.100.200:6633"
        Port "eth4"
            Interface "eth4"
        Port "ovsbr0"
            Interface "ovsbr0"
                type: internal
        Port "eth3"
            Interface "eth3"

    VM1: openvswitch
         eth3    eth4
         /         \       
        /           \
       /             \
 VM2:client       VM3:server

And recently I've stumbled upon a strange OVS behavior. So, once ovs starts, it works in 'dumb-bridge' mode, that is, it has one flow configured:

vagrant@ovs:~$ sudo ovs-ofctl dump-flows ovsbr0
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=4.676s, table=0, n_packets=10, n_bytes=904, idle_age=1, priority=0 actions=NORMAL

And client can reach server and vice versa, since all packets are passed to every port on ovs, and I can see that packets are going througg port1 and port2 in ovs, watching the output of:

watch sudo ovs-ofctl dump-ports ovsbr0

Then I delete flows:

vagrant@ovs:~$ sudo ovs-ofctl del-flows ovsbr0
vagrant@ovs:~$ sudo ovs-ofctl dump-flows ovsbr0
NXST_FLOW reply (xid=0x4):

And that breaks connectivity between client and server, as expected and now I only see packets in rx queue of one port(the one where client is connected, and from where pings are being sent) then I connect a controller:

vagrant@ovs:~$ sudo ovs-vsctl set-controller ovsbr0 tcp:192.168.100.200
vagrant@ovs:~$ sudo ovs-vsctl get-controller ovsbr0
tcp:192.168.100.200

It provides new flows and the connectivity restores:

vagrant@ovs:~$ sudo ovs-ofctl dump-flows ovsbr0
NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=0.032s, table=0, n_packets=1, n_bytes=98, idle_timeout=10, hard_timeout=30, idle_age=0, priority=65535,icmp,in_port=2,vlan_tci=0x0000,dl_src=08:00:27:f7:10:9a,dl_dst=08:00:27:14:2a:ea,nw_src=192.168.101.151,nw_dst=192.168.102.152,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1
 cookie=0x0, duration=0.026s, table=0, n_packets=1, n_bytes=98, idle_timeout=10, hard_timeout=30, idle_age=0, priority=65535,icmp,in_port=1,vlan_tci=0x0000,dl_src=08:00:27:14:2a:ea,dl_dst=08:00:27:f7:10:9a,nw_src=192.168.102.152,nw_dst=192.168.101.151,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:2

So, the fact is that if I try to connect a controller with wrong IP or port, the connectivity is restored as well...despite there's no controller by the given address:

vagrant@ovs:~$ sudo ovs-vsctl set-controller ovsbr0 tcp:192.168.100.500
vagrant@ovs:~$ sudo ovs-vsctl get-controller ovsbr0
tcp:192.168.100.500
vagrant@ovs:~$ sudo ovs-ofctl dump-flows ovsbr0
NXST_FLOW reply (xid=0x4):

Moreover, there's no flows none...but I see packets(looking at dump-ports again) on both eth3 and eth4 interfaces which are the ports on ovs... Whats the trick? And of cause, the:

sudo ovs-ofctl snoop ovsbr0

Only shows the openflow packets between ovs and the real controller, but keeps the silence in case of 'fake' controller.

Then i finally look into 'hidden' flows:

sudo ovs-appctl bridge/dump-flows ovsbr0                                                                           Wed Aug 24 12:46:31 2016

duration=79s, priority=180008, n_packets=0, n_bytes=0, priority=180008,tcp,nw_src=192.168.100.208,tp_src=6633,actions=NORMAL
duration=79s, priority=180000, n_packets=0, n_bytes=0, priority=180000,udp,in_port=LOCAL,dl_src=08:00:27:16:78:8c,tp_src=68,tp_dst=67,actions=NORMAL
duration=79s, priority=180006, n_packets=0, n_bytes=0, priority=180006,arp,arp_spa=192.168.100.208,arp_op=1,actions=NORMAL
duration=79s, priority=180002, n_packets=0, n_bytes=0, priority=180002,arp,dl_src=08:00:27:16:78:8c,arp_op=1,actions=NORMAL
duration=79s, priority=180004, n_packets=0, n_bytes=0, priority=180004,arp,dl_src=52:54:00:12:35:02,arp_op=1,actions=NORMAL
duration=79s, priority=180003, n_packets=0, n_bytes=0, priority=180003,arp,dl_dst=52:54:00:12:35:02,arp_op=2,actions=NORMAL
duration=79s, priority=180001, n_packets=0, n_bytes=0, priority=180001,arp,dl_dst=08:00:27:16:78:8c,arp_op=2,actions=NORMAL
duration=79s, priority=15790320, n_packets=162, n_bytes=15648, priority=15790320,actions=NORMAL
duration=79s, priority=180005, n_packets=0, n_bytes=0, priority=180005,arp,arp_tpa=192.168.100.208,arp_op=2,actions=NORMAL
duration=79s, priority=180007, n_packets=0, n_bytes=0, priority=180007,tcp,nw_dst=192.168.100.208,tp_dst=6633,actions=NORMAL
table_id=254, duration=5442s, priority=0, n_packets=0, n_bytes=0, priority=0,reg0=0x3,actions=drop
table_id=254, duration=5442s, priority=0, n_packets=773, n_bytes=57528, priority=0,reg0=0x1,actions=controller(reason=no_match)
table_id=254, duration=5442s, priority=0, n_packets=0, n_bytes=0, priority=0,reg0=0x2,actions=drop

And I see the flow: priority=15790320, n_packets=162, n_bytes=15648, priority=15790320,actions=NORMAL which is the reason of all the mess.

The question is - is it a normal behavior for ovs? e.g. - when the controller brakes or is unreachable - the ovs goes to the dumb-bridge mode? And why hidden flow, not the ordinary one?

1
  • it turned out that if ovs is started with controller in 'in-bound mode'(probably my case) it always has those hidden flows...its just the way it is. But now i try to understand why, and the first question is - what does it mean - 'in-bound' ? Read the article in wiki, it says that its when control data goes through the same channels that the payload does...so what? Can anyone explain me the difference between the in- and out-bound modes in terms of SDN(router+controller) ?
    – Alter_so
    Commented Aug 30, 2016 at 7:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.