Ask Your Question
0

Routing Openflow13 in Opendaylight

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

krlosg7 gravatar image

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

Hello,

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) 192.168.2.0/24
                          Switch1            Switch2
                            / (tap1)               \(tap2)
                            /                           \
                       Host1                          Host2

Switch1: 192.168.1.0/24 OVS1:192.168.1.254 host1: 192.168.1.1

Switch2:192.168.2.0/24 OVS2:192.168.2.254 host2: 192.168.2.2

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

Controller(ODL Helium SR4):192.168.0.100 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. 192.168.2.254/24, 192.168.2.254/24. I try static routes.

  • name: net1 network/mask: 192.168.1.0/24 netxhop:192.168.2.254
  • name: net2 network/mask: 192.168.2.0/24 netxhop:192.168.1.254

I'm not able to ping the two PCs.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

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 192.168.2.0 netmask 255.255.0.0 gw 192.168.1.1
$ sudp arp -s 192.168.12.1 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=192.168.2.1,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

UPDATE....

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:

OVS1
table=0,icmp,nw_dst=192.168.2.1,actions=mod_dl_dst=B2:EF:C1:3B:EA:59,output:2
table=0,icmp,nw_dst=192.168.1.1,actions=mod_dl_dst=8E:FD:43:62:CA:48,output:1

OVS2
table=0,icmp,nw_dst=192.168.1.1,actions=mod_dl_dst=C6:99:2C:EF:4C:9E,output:2
table=0,icmp,nw_dst=192.168.2.1,actions=mod_dl_dst=D2:4D:EA:46:3F:20,output:1

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

(more)
edit flag offensive delete publish link more
0

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 192.168.2.0 netmask 255.255.0.0 gw 192.168.1.1
sudo arp -s 192.168.12.1 00:00:00:00:00:01 #the first time i have network unrecheable so i change
sudo route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1 #arp works

Flows

ovs-ofctl -O OpenFlow13  add-flow OVS_1 table=0,ip,nw_dst=192.168.2.1,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=192.168.1.1,actions=mod_dl_dst=8E:FD:43:62:CA:48,output:1

ovs-ofctl dump-flows command :

Topology image full: http://hpics.li/2d7ce0b

Dump Flows: http://hpics.li/d25ec35

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=192.168.1.0/24,nw_dst=192.168.2.0/24,actions=output:1
ovs-ofctl add-flow OVS_2 priority=500,dl_type=0x800,nw_src=192.168.2.0/24,nw_dst=192.168.1.0/24,actions=output:1

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

UPDATE

You are right, Topology, http://hpics.li/c6ca00e , PC2 connects to OVS2 on Port1...

I tried the following modification:

PC1 route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1
PC2 route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.2.1

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 192.168.12.1 00:00:00:00:00:01
h2 arp -s 192.168.12.2 00:00:00:00:00:02

OVS1

sudo ovs-ofctl -O OpenFlow13 add-flow OVS1 table=0,ip,nw_dst=192.168.1.1,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=192.168.2.1,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=192.168.1.1,actions=mod_dl_dst=8E:FD:43:62:CA:48,output:1

OVS2

sudo ovs-ofctl -O OpenFlow13 add-flow OVS2 table=0,ip,nw_dst=192.168.1.1,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=192.168.1.1,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=192.168.2.1,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

Comments

See updates to my answer above.

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

Stats

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

Seen: 641 times

Last updated: Dec 11 '15