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]

click to hide/show revision 1
initial version

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

Dump Flows

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

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

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....

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

Dump FlowsTopology 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 successfully.

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

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....

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 successfully.host2.

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

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....

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 s1 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 s1 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 route using OpenFlow refer link https://github.com/mininet/openflow-tutorial/wiki/Router-Exercise, but is not very clear for me.

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, 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 s1 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 s1 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 route using OpenFlow refer link https://github.com/mininet/openflow-tutorial/wiki/Router-Exercise, but is not very clear for me.

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 s1 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 s1 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 route using OpenFlow refer link https://github.com/mininet/openflow-tutorial/wiki/Router-Exercise, but is not very clear for me.