[Solved] ICMP communication between two OVS of two different routers

Recent Update: The following communication is successful using WDS (4 MAC address frame) mode.

I have two different OVS Bridges on two different routers (TP-Link A7 v2). Each bridge have two ports. One is WiFi 2.4Ghz and another is Wifi 5GHz. Both routers have same configuration.

root@NODE_4:~# ovs-vsctl show
e2464771-cea9-44f1-b9d5-40417f4b534d
    Bridge br-int
        Port br-int
            Interface br-int
                type: internal
        Port br-int
        Port "wlan0"
            Interface "wlan0"
                options: {remote_ip="192.168.100.3"}
        Port "wlan1"
            Interface "wlan1"
    ovs_version: "2.8.1"

Two bridges are connected through ADHOC network over 5GHz interfaces. 2.4GHZ interfaces are access points. Two Laptops are connected to 2.4GHz APs.

I can ping to the one bridge (192.168.100.3) from the Laptop (192.168.100.200). I can Ping from another Laptop (192.168.100.210) to another bridge (192.168.100.4). I can also ping from one router (192.168.100.3) to another (192.168.100.4) and vice versa.

192.168.100.200          *.* .100.3                 *.*.100.4             *.*.100.210
LAPTOP 1 :::2.4Ghz::: OVS in Router1 ===5GHz=== OVS in Router2 :::2.4GHz::: LAPTOP 2
                                       ADHOC

But the problem is I can not ping from Laptop1 to Router2 or Laptop 2 and vice versa.
The port forwarding rules on both router's OVS are by default same.

root@NODE_3:~# ovs-ofctl dump-flows br-int
 cookie=0x0, duration=4688.844s, table=0, n_packets=8530, n_bytes=765240, priority=0 actions=NORMAL

The OVS Route table are also same on both routers.

root@NODE_3:~# ovs-appctl ovs/route/show
Route Table:
Cached: 127.0.0.1/32 dev lo SRC 127.0.0.1
Cached: 192.168.3.1/32 dev br-lan SRC 192.168.3.1
Cached: 192.168.100.3/32 dev br-int SRC 192.168.100.3
Cached: ::1/128 dev lo SRC ::1
Cached: 192.168.3.0/24 dev br-lan SRC 192.168.3.1
Cached: 192.168.100.0/24 dev br-int SRC 192.168.100.3
Cached: 127.0.0.0/8 dev lo SRC 127.0.0.1
Cached: fd4f:cbbe:ded0::/64 dev br-lan SRC fd4f:cbbe:ded0::1
Cached: fe80::/64 dev wlan0 SRC fe80::a62b:b0ff:fedd:ff3c

:::
:::
root@NODE_4:~# ovs-appctl ovs/route/show
Route Table:
Cached: 127.0.0.1/32 dev lo SRC 127.0.0.1
Cached: 192.168.4.1/32 dev br-lan SRC 192.168.4.1
Cached: 192.168.100.4/32 dev br-int SRC 192.168.100.4
Cached: ::1/128 dev lo SRC ::1
Cached: 192.168.4.0/24 dev br-lan SRC 192.168.4.1
Cached: 192.168.100.0/24 dev br-int SRC 192.168.100.4
Cached: 127.0.0.0/8 dev lo SRC 127.0.0.1
Cached: fd21:fce0:8ab1::/64 dev br-lan SRC fd21:fce0:8ab1::1
Cached: fe80::/64 dev br-int SRC fe80::a62b:b0ff:fedd:fdcb

Can anyone help on this? I have tried several rules on the OVS for port forwarding. But still no positive result.

I'm not sure what remote_ip means in this context when you don't seem to use gre or vxlan, does it create a tunnel? Because I think you may need a tunnel unless you use WDS or an alternative that allows wireless bridging. An alternative is a vxlan or gre tunnel which supports VLAN. You can't use VLAN with plain wifi.

Thank you @mikma for your reply. You have metioned WDS for wireless bridging. For WDS the interface will act as AP and connect to the other AP at the same time. However, for my college research I need a mesh network on 5 GHz and APs on 2.4 GHz. The mesh network is may be working good over 5GHz radio. I can ping from one router to another.

The problem is the clients, connected to the APs, do not see other routers over mesh network.

I am novice on tunnel or wireless bridging (learning now). I think I have to do something on OVS for routing. I am using only one network 192.168.100.0/24 for both mesh and AP clients.

Using routing on the ad-hoc network is probably a good idea. You may want to use a dynamic routing protocol.

But I think you still need tunnels if you want to make a bridge for clients on 192.168.100.0/24 since ad-hoc mode is only meant for peer-to-peer communication which can be used for routing, but not for bridging.

1 Like

Thank you for the tipps. I am trying the tunnel. I will let you know if it works. I will also write if I face problems.

Hi @mikma. I have tried the tunnel and thank you, it works fine. :+1:
::::
::::

But Without the Tunnel....

I was researching the tcpdump and captured packets (ovs-dpctl) on the interfaces. What I have seen that the ARP request from notebook (connected to node 1) to the node 2 can reach to Node 2. Node 2 also send back the ARP reply to the Node 1 through the connected WiFi interface. But I can not see the ARP reply packet on the Node 1. It seems like the ARP reply packet somehow vanishes on the WiFi medium. Or Node 1 can not see the reply packet. Please see the tcpdump and packet captures for both nodes bellow.

tcpdump of Node 1:

root@NODE_4:~# tcpdump arp -i wlan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
14:31:22.094672 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
14:31:23.093117 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
14:31:24.092471 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
14:31:27.095289 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
14:31:28.092829 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28

tcpdump of Node 2:

root@NODE_3:~# tcpdump arp -i wlan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
04:54:56.974866 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
04:54:56.975009 ARP, Reply 192.168.100.3 is-at a4:2b:b0:dd:ff:3c (oui Unknown), length 28
04:54:57.975882 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
04:54:57.976178 ARP, Reply 192.168.100.3 is-at a4:2b:b0:dd:ff:3c (oui Unknown), length 28
04:55:00.981026 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
04:55:00.981167 ARP, Reply 192.168.100.3 is-at a4:2b:b0:dd:ff:3c (oui Unknown), length 28
04:55:01.975265 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28
04:55:01.975558 ARP, Reply 192.168.100.3 is-at a4:2b:b0:dd:ff:3c (oui Unknown), length 28
04:55:02.475352 ARP, Request who-has 192.168.0.1 tell 192.168.100.210, length 28
04:55:02.975288 ARP, Request who-has 192.168.100.3 tell 192.168.100.210, length 28

ARP packet capture from Node 1:

root@NODE_4:~# ovs-dpctl show
system@ovs-system:
	lookups: hit:147118 missed:5537 lost:0
	flows: 1
	masks: hit:636158 total:1 hit/pkt:4.17
	port 0: ovs-system (internal)
	port 1: wlan1
	port 2: br-int (internal)
	port 3: wlan0
root@NODE_4:~# ovs-dpctl dump-flows
recirc_id(0),in_port(1),eth(src=a0:a8:cd:12:50:cf,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.100.210,tip=192.168.100.3,op=1/0xff), packets:1107, bytes:46494, used:1.460s, actions:2,3

ARP Packet Capture on Node 2:

root@NODE_3:~# ovs-dpctl show
system@ovs-system:
	lookups: hit:467339 missed:10371 lost:0
	flows: 4
	masks: hit:915276 total:4 hit/pkt:1.92
	port 0: ovs-system (internal)
	port 1: br-int (internal)
	port 2: wlan0
	port 3: wlan1
	port 4: br0 (internal)
root@NODE_3:~# ovs-dpctl dump-flows
recirc_id(0),in_port(1),eth(src=a4:2b:b0:dd:ff:3c,dst=a0:a8:cd:12:50:cf),eth_type(0x0806), packets:287, bytes:12054, used:2.601s, actions:2
recirc_id(0),in_port(2),eth(src=a0:a8:cd:12:50:cf,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.100.210,tip=192.168.0.1,op=1/0xff), packets:0, bytes:0, used:never, actions:1,3
recirc_id(0),in_port(4),eth(src=3e:8b:ef:99:88:d4,dst=01:80:c2:00:00:00),eth_type(0/0xffff), packets:302700, bytes:15740400, used:0.112s, actions:drop
recirc_id(0),in_port(2),eth(src=a0:a8:cd:12:50:cf,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.100.210,tip=192.168.100.3,op=1/0xff), packets:287, bytes:12054, used:2.603s, actions:1,3
recirc_id(0),in_port(2),eth(src=a4:2b:b0:dd:fd:cb,dst=01:80:c2:00:00:00),eth_type(0/0xffff), packets:1197, bytes:62244, used:0.413s, actions:userspace(pid=2719292219,slow_path(stp))

:::::::
:::::::
From the very first packet you can see that the ARP Reply (in_port(1)) from port(1) (virtual bridge of Node 2) out through the port wlan0 (which is expected) with the destination MAC of the notebook. But Node1 on the other side does not sees this packet.

This ARP Reply packet is may be something to observe carefully. This packet only have the destination MAC address (of the Notebook) and source mac of the Node 1 bridge. But there is no source IP and destination IP.

Should I do something with tthe OVS packet forwarding rules?

What are you trying to do? Wifi doesn't support bridging without WDS (or similar).

Hi @hossain, could you please post here how did you manage to create the tunnel between two OVSs? I have similar problem, trying to create a tunnel between two routers with OVS managed by one SDN controller.

1 Like

Hi @mizolotu,
Set any IP to the OVS of both routers.

Router 1:
root@Node_1:~# ifconfig br0 192.168.100.3

Router 2:

root@Node_2:~# ifconfig br0 192.168.100.4

Create a gre port in each routers and connect it to the OVS bridge. Remote IP must be the opposite OVS.

Router 1:

`root@Node_1:~# ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre \
options:remote_ip=192.168.100.4

Router 2:

`root@Node_2:~# ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre \
options:remote_ip=192.168.100.3

I also set the wireless interfaces as AD Hoc mode.

Finally the OVS looks like this.

root@Node_2:~# ovs-vsctl show
    41268e02-3996-4caa-b941-e4fe9c718e35
    Bridge "br0"
       Port "br0"
          Interface "br0"
              type: internal
       Port "wlan0"
            Interface "wlan0"
       Port "wlan1"
            Interface "wlan1"
       Port "gre0"
          Interface "gre0"
              type: gre
              options: {remote_ip="192.168.1.100"}
     ovs_version: "2.8.1"

Also same output in Router 1 rather than remote_ip.

However, later I am using WDS mode for the above point to point communication instead of tunnels.

Thank you @hossain. Unfortunately does not work in my case :frowning: Will try to use newer version of OVS or another router.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.