Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

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

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 OVS2 on Port1, not Port2:

image description

Also, don't forget to add the gateway and dummy ARP to PC2, in the same manner you added these to PC1.