Ask Your Question

Routing Openflow13 in Opendaylight

asked 2015-11-26 01:45:15 -0700

krlosg7 gravatar image

updated 2015-11-26 04:26:23 -0700


I want to establish a network using openflow13 and ODL SR4, each switch are used to work with a network. How should I configure subnet with ODL.

The topology is following:

                                    Controller ODL
                                /                    \
                              / (OVS1)_______\ (OVS2)
                          Switch1            Switch2
                            / (tap1)               \(tap2)
                            /                           \
                       Host1                          Host2

Switch1: OVS1: host1:

Switch2: OVS2: host2:

Connections between OVS switch: Patch1-2 to Patch2-1

Controller(ODL Helium SR4): I install:

feature:install odl-dlux-all odl-l2switch-switch-ui install odl-openflowplugin-all install odl-adsal-northbound

the communication between switch work properly but, when i start ODL the communication is down.

I push the flow In the same table

Also, i add an entry into the Subnets Gateway configuration under the GUI's Devices tab NETWORK., I try static routes.

  • name: net1 network/mask: netxhop:
  • name: net2 network/mask: netxhop:

I'm not able to ping the two PCs.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-12-07 07:08:28 -0700

runamuck gravatar image

updated 2015-12-08 07:08:38 -0700

For starters, I recommend you run a ./karaf clean and then only install the following module:

opendaylight-user@root>feature:install odl-l2switch-switch-ui

Now, do you have gateways defined anywhere in the switch? Do they map to an interface on the switch? If, not you will need to either (1) enter the gateways into the switches or (2) write some OpenFlow rules to intercept and modify the Ethernet frame headers.

For example, let's say you're on Host1 and want to ping Host2. You will need to enter the default gateway (and its dummy MAC) into your host even if the gateway doesn't exist anywhere. When you ping, your host sends the frame to Switch1. Switch1 then sees the frame with the dummy IP and dummy destination MAC, intercepts it and then modifies the destination MAC address to the MAC address of the port it connects two on switch 2 and sends it out.

On host 1:

$ sudo route add -net netmask gw
$ sudp arp -s 2c:c2:60:87:22:f4 #This is a dummy MAC to prevent arp requests

Then on switch 1 and two, add the following flows:

table=0,ip,nw_dst=,actions=mod_dl_dst=<MAC address of destination port on switch2>,output:<port number of wire that connects to switch two>

You will need to create a reverse flow for the ping reply.

Some helpful troubleshooting commands follow. This command shows any flows in the switch, if you do not have any, then your switch will not pass frames.

# sudo ovs-ofctl -O OpenFlow13 dump-flows <switch name>

If you see a "broken pipe" error, then explicitly set your switch to OF13

sudo ovs-vsctl set bridge <switch name> protocols=OpenFlow13

Also, run this command to show details of your switch, make sure that you connected to the ODL controller:

sudo ovs-ofctl -O OpenFlow13 show <switch name>

If you did not, then connect your switches to the controller:

sudo ovs-vsctl set-controller <switch name> tcp:<controller IP>:6633
sudo  ovs-vsctl set controller <switch name> connection-mode=out-of-band


Wow! Great work! Try one single modification. When you ping PC1 to PC2 you should egress OVS1 out of OVS1 Port2 into OVS2 Port2. So, in that direction, change the output port to Port2 and the destination MAC to the MAC of Switch2 port 2. (And then similar logic for the reverse flows).

So, you will inject these rules:



NOTE: The rules I created above assume that PC2 connects to ...

edit flag offensive delete publish link more

answered 2015-12-08 02:10:33 -0700

krlosg7 gravatar image

updated 2015-12-11 06:57:10 -0700

Hi runamuck,

very intesting your guide. I tried to do the same steps but i think there is a little problem with the flows.

In host 1

sudo route add -net netmask gw
sudo arp -s 00:00:00:00:00:01 #the first time i have network unrecheable so i change
sudo route add -net netmask gw #arp works


ovs-ofctl -O OpenFlow13  add-flow OVS_1 table=0,ip,nw_dst=,actions=mod_dl_dst=D2:4D:EA:46:3F:20,output:1
ovs-ofctl -O OpenFlow13  add-flow OVS_2 table=0,ip,nw_dst=,actions=mod_dl_dst=8E:FD:43:62:CA:48,output:1

ovs-ofctl dump-flows command :

Topology image full:

Dump Flows:

With the above 2 flows added, host1 is not able to ping host2.

Also i tried to add flows for the network with Net/netmask:

 ovs-ofctl add-flow OVS_1 priority=500,dl_type=0x800,nw_src=,nw_dst=,actions=output:1
ovs-ofctl add-flow OVS_2 priority=500,dl_type=0x800,nw_src=,nw_dst=,actions=output:1

Second flow does the similar operation matching with network but Unfortunately, the ping did not work....


You are right, Topology, , PC2 connects to OVS2 on Port1...

I tried the following modification:

PC1 route add -net netmask gw
PC2 route add -net netmask gw

I have ping reply icmp successful.

later i add the gateway and dummy ARP to PC1 and PC2 and inject these rules: ARP

h1 arp -s 00:00:00:00:00:01
h2 arp -s 00:00:00:00:00:02


sudo ovs-ofctl -O OpenFlow13 add-flow OVS1 table=0,ip,nw_dst=,actions=mod_dl_dst=8E:FD:43:62:CA:48,output:1
sudo ovs-ofctl -O OpenFlow13 add-flow OVS1 table=0,icmp,nw_dst=,actions=mod_dl_dst=B2:EF:C1:3B:EA:59,output:2
sudo ovs-ofctl -O OpenFlow13 add-flow OVS1 table=0,icmp,nw_dst=,actions=mod_dl_dst=8E:FD:43:62:CA:48,output:1


sudo ovs-ofctl -O OpenFlow13 add-flow OVS2 table=0,ip,nw_dst=,actions=mod_dl_dst=D2:4D:EA:46:3F:20,output:1
sudo ovs-ofctl -O OpenFlow13 add-flow OVS2 table=0,icmp,nw_dst=,actions=mod_dl_dst=C6:99:2C:EF:4C:9E,output:2
     sudo ovs-ofctl -O OpenFlow13 add-flow OVS2 table=0,icmp,nw_dst=,actions=mod_dl_dst=D2:4D:EA:46:3F:20,output:1

the reply is always icmp_seq=1 Destination Host Unreachable

The ideal is configure ... (more)

edit flag offensive delete publish link more


See updates to my answer above.

runamuck ( 2015-12-08 07:08:55 -0700 )edit
Login/Signup to Answer


Asked: 2015-11-26 01:45:15 -0700

Seen: 604 times

Last updated: Dec 11 '15