Opendaylight simple Version and Openvswitch

Openvswitch configuration

After starting the Opendaylight controller we need a Openflow network device. Linux has one – the Openvswitch. So we use the Openvswitch.

After these to commands, executed as root, the controller has detected a new device. Tab device –> Node Name. Insert here the node name of the created Openvswitch bridge=switch. We use here Openflow-OVS. Do not change other parameters.

Network namespaces (VRFs)

Now we need interfaces on the switch. We use the Linux network namespaces (this is a VRF in Linux) — you may read the article  Linux Network Namespaces .

We create two network namespaces, two openvswitch ports on our openflow bridge and connect each network namespace to one port. Set the ports in the namespaces to up including the loopback interface.

Now the Opendaylight controller should see two ports on the Openvswitch.

Now go ahead and open two console windows. Connect to a network namespace in each window and set the prompt to avoid confusion.

Now we configure ip addresses on port* in the network namespaces.

Now ping from ns2 to ns1 using the command ping, when you are connected with one console to the namespace ns2 (–> Console Sessions). Or use ip netns exec ns2 ping when you are connected to the default namespace .

The ping does not work – the flow entries are missing.

In the test setup, port1 has the mac address ce:8d:86:69:01:6e and port2 has the mac address 8e:9b:7d:f4:d7:79

Create Flow Entries

The switch does not forward a paket without flow entries. We need to create them using Flows –> Flow entries –> Add Flow Entry

MAC Learning

How to learn the MAC addresses of connected machines. There is no learning without modules.


Create arp packet forwarding entries. We create several of them. One for ARP broadcasts and one for unicasts.

Name=ARPBcast , Node=Openflow-OVS , EthernetType=0x806 , Destination MAC Address=ff:ff:ff:ff:ff:ff , Actions=Flood
Name=ARPUcastp1 , Node=Openflow-OVS , EthernetType=0x806 , Destination MAC Address=ce:8d:86:69:01:6e , Actions=Add Output ports port1(1)
Name=ARPUcastp2 , Node=Openflow-OVS , EthernetType=0x806 , Destination MAC Address=8e:9b:7d:f4:d7:79 , Actions=Add Output ports port2(2)


And allow ICMP flows. We add two flows

Name=ICMPp1 , Node=Openflow-OVS , EthernetType=0x800 , Destination MAC Address=ce:8d:86:69:01:6e , Protocol=icmp , Actions=Add Output ports port1(1)
Name=ICMPp2 , Node=Openflow-OVS , EthernetType=0x800 , Destination MAC Address=8e:9b:7d:f4:d7:79 , Protocol=icmp , Actions=Add Output ports port2(2)


Now ping between the network namespaces works. In Opendaylight the flow statistics can be seen in the Tab Troubleshoot –> Switchname –> Flows or Ports

Openvswitch Openflow entries

The Openflow entries created, are pushed down to the Openvswitch. We can show them using the openvswitch command ovs-ofctl.


A MAC leaning mechanism is quite helpful – such helpers are available in Opendaylight. But we do not use them in this example here.


Updated: 24/10/2014 — 20:39