All of lore.kernel.org
 help / color / mirror / Atom feed
* Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment
@ 2025-03-16 10:07 Jingwei LI
  2025-03-16 12:17 ` Sven Eckelmann
  2025-03-16 12:30 ` Sven Eckelmann
  0 siblings, 2 replies; 5+ messages in thread
From: Jingwei LI @ 2025-03-16 10:07 UTC (permalink / raw)
  To: b.a.t.m.a.n@lists.open-mesh.org

Hi all, 

I want to build a mesh network that uses both wired and wireless backhaul with Batman-adv like this:
```
   Router A             Router B                Router C
_____________     ___________________       ________________
|    br-lan    |      |         br-lan        |      |     br-lan         |
|____________|     |__________________|      |________________|
|AP|   bat0  |     |AP|      bat0          |      |AP|     bat0      |
|___|________|     |___|_______________|      |___|____________|
   |lan|BHAP|         |STA| lan | BHAP|           |STA| BHAP |
   |___|______|         |____|_____|______|           |____|_______|
     ^     ^----WiFi--^     ^      ^-----WiFi---^
      |______Eth_Cable_____|  
```

Router A and Router B are connected together by both wireless link (upstream router runs an AP mode interface while the downstream router runs an STA associating to the AP) and an ethernet cable. Router B and Router C are only connected by Wi-Fi.

According to the document (https://www.open-mesh.org/projects/batman-adv/wiki/Quick-start-guide#Mixing-non-BATMAN-systems-with-batman-adv) and figures in (https://www.open-mesh.org/projects/batman-adv/wiki/Wiki#Layer-2-), I think this would be a common configuration, however it doesn't work correctly in my setup. 

-----------------------------------

Problem description:

Router A (192.168.6.1) and Router B (192.168.6.2) can ping each other. The client (192.168.6.192) associating with Router B cannot ping Router A and its associating client.
I also wrote some simple rules to trace the data frames in each router, below is the output for a ping from client associating with Router B (192.168.6.2) to Router A (192.168.6.1):

```
# Trace info on Router B (192.168.6.2)
root@ImmortalWrt:~# dmesg -c
[ 8633.614104] PREROUTING_ICMP: IN=ra1 OUT= MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3060 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=1
[ 8633.632366] FORWARD_ICMP: IN=ra1 OUT=bat0 MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3060 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=1
[ 8633.650709] POSTROUTING_ICMP: IN= OUT=bat0 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3060 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=1
[ 8633.729794] PREROUTING_ICMP: IN=bat0 OUT= MAC=90:de:80:07:24:7b:90:15:64:00:0b:ff:08:00 SRC=192.168.6.1 DST=192.168.6.192 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39290 PROTO=ICMP TYPE=0 CODE=0 ID=58728 SEQ=1

##============= HERE the problem happens, not forwarding the ICMP reply to ra1

[ 8634.644973] PREROUTING_ICMP: IN=ra1 OUT= MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3171 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=2
[ 8634.663238] FORWARD_ICMP: IN=ra1 OUT=bat0 MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3171 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=2
[ 8634.681573] POSTROUTING_ICMP: IN= OUT=bat0 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3171 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=2
[ 8634.760652] PREROUTING_ICMP: IN=bat0 OUT= MAC=90:de:80:07:24:7b:90:15:64:00:0b:ff:08:00 SRC=192.168.6.1 DST=192.168.6.192 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39376 PROTO=ICMP TYPE=0 CODE=0 ID=58728 SEQ=2

===================================
# Trace info on Router A (192.168.6.1)
root@ImmortalWrt:~# dmesg -c
[ 8636.392669] PREROUTING_ICMP: IN=bat0 OUT= MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3060 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=1
[ 8636.411042] INPUT_ICMP: IN=bat0 OUT= MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3060 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=1
[ 8636.429048] OUTPUT_ICMP: IN= OUT=bat0 SRC=192.168.6.1 DST=192.168.6.192 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39290 PROTO=ICMP TYPE=0 CODE=0 ID=58728 SEQ=1
[ 8636.442859] POSTROUTING_ICMP: IN= OUT=bat0 SRC=192.168.6.1 DST=192.168.6.192 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39290 PROTO=ICMP TYPE=0 CODE=0 ID=58728 SEQ=1
[ 8637.423525] PREROUTING_ICMP: IN=bat0 OUT= MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3171 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=2
[ 8637.441904] INPUT_ICMP: IN=bat0 OUT= MAC=90:15:64:00:0b:ff:90:de:80:07:24:7b:08:00 SRC=192.168.6.192 DST=192.168.6.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3171 DF PROTO=ICMP TYPE=8 CODE=0 ID=58728 SEQ=2
[ 8637.459891] OUTPUT_ICMP: IN= OUT=bat0 SRC=192.168.6.1 DST=192.168.6.192 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39376 PROTO=ICMP TYPE=0 CODE=0 ID=58728 SEQ=2
[ 8637.473708] POSTROUTING_ICMP: IN= OUT=bat0 SRC=192.168.6.1 DST=192.168.6.192 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=39376 PROTO=ICMP TYPE=0 CODE=0 ID=58728 SEQ=2
```

-----------------------------------
Other related information:

On Router A:
```
root@ImmortalWrt:~# ./batctl n
[B.A.T.M.A.N. adv 2025.0-dirty, MainIF/MAC: rax0/90:15:64:00:0b:ee (bat0/22:b8:04:c2:f2:f8 BATMAN_V)]
IF             Neighbor              last-seen
90:15:64:00:0b:f7    0.140s (     1000.0) [      lan4]
9a:15:64:00:0b:f8    0.172s (        1.0) [      rax0]

root@ImmortalWrt:~# ip neigh
192.168.6.2 dev br-lan lladdr 90:15:64:00:0b:f1 ref 1 used 0/0/0 probes 1 REACHABLE
192.168.6.3 dev br-lan lladdr 90:15:64:00:0b:b8 used 0/0/0 probes 4 STALE
192.168.6.4 dev br-lan lladdr 90:15:64:00:0b:f6 used 0/0/0 probes 1 STALE
192.168.6.112 dev br-lan  used 0/0/0 probes 3 FAILED
192.168.6.193 dev br-lan  used 0/0/0 probes 6 FAILED
192.168.6.192 dev br-lan lladdr 90:de:80:07:24:7b ref 1 used 0/0/0 probes 1 DELAY

root@ImmortalWrt:~# brctl showstp br-lan
br-lan
bridge id              7fff.901564000bff
designated root        7fff.901564000bff
root port                 0                    path cost                  0
max age                  10.00                 bridge max age            10.00
hello time                1.00                 bridge hello time          1.00
forward delay             8.00                 bridge forward delay       8.00
ageing time             300.00
hello timer               0.00                 tcn timer                  0.00
topology change timer     0.00                 gc timer                  55.93
flags

bat0 (7)
port id                8007                    state                forwarding
designated root        7fff.901564000bff       path cost                100
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8007                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags

rax2 (5)
port id                8005                    state                forwarding
designated root        7fff.901564000bff       path cost                100
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8005                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

lan2 (2)
port id                8002                    state                  disabled
designated root        7fff.901564000bff       path cost                100
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8002                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags

rax1 (4)
port id                8004                    state                forwarding
designated root        7fff.901564000bff       path cost                100
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8004                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

ra0 (3)
port id                8003                    state                forwarding
designated root        7fff.901564000bff       path cost                100
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8003                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

lan3 (6)
port id                8006                    state                  disabled
designated root        7fff.901564000bff       path cost                100
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8006                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags

lan1 (1)
port id                8001                    state                forwarding
designated root        7fff.901564000bff       path cost                  4
designated bridge      7fff.901564000bff       message age timer          0.00
designated port        8001                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
```


On Router B:
```
root@ImmortalWrt:~# ./batctl n
[B.A.T.M.A.N. adv 2025.0-dirty, MainIF/MAC: apclix0/9a:15:64:00:0b:f8 (bat0/be:45:5c:1c:71:8f BATMAN_V)]
IF             Neighbor              last-seen
90:15:64:a0:0b:ec    0.424s (     1000.0) [      lan3]
9a:15:64:00:0b:b9    0.272s (        1.0) [      rax0]
90:15:64:00:0b:ee    0.456s (        1.0) [   apclix0]

root@ImmortalWrt:~# ip neigh
192.168.6.3 dev br-lan  used 0/0/0 probes 6 FAILED
192.168.6.4 dev br-lan lladdr 90:15:64:00:0b:f6 used 0/0/0 probes 1 STALE
192.168.6.1 dev br-lan lladdr 90:15:64:00:0b:ff used 0/0/0 probes 1 STALE
192.168.6.193 dev br-lan  used 0/0/0 probes 6 FAILED
192.168.6.192 dev br-lan lladdr 90:de:80:07:24:7b ref 1 used 0/0/0 probes 1 DELAY

root@ImmortalWrt:~# brctl showstp br-lan
br-lan
bridge id              7fff.901564000bf1
designated root        7fff.901564000bf1
root port                 0                    path cost                  0
max age                  10.00                 bridge max age            10.00
hello time                1.00                 bridge hello time          1.00
forward delay             8.00                 bridge forward delay       8.00
ageing time             300.00
hello timer               0.00                 tcn timer                  0.00
topology change timer     0.00                 gc timer                  54.47
flags

bat0 (4)
port id                8004                    state                forwarding
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8004                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags

rax2 (8)
port id                8008                    state                forwarding
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8008                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

ra1 (6)
port id                8006                    state                forwarding
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8006                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

lan2 (2)
port id                8002                    state                  disabled
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8002                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags

rax1 (7)
port id                8007                    state                forwarding
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8007                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

ra0 (5)
port id                8005                    state                forwarding
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8005                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
hairpin mode              1

lan1 (1)
port id                8001                    state                  disabled
designated root        7fff.901564000bf1       path cost                100
designated bridge      7fff.901564000bf1       message age timer          0.00
designated port        8001                    forward delay timer        0.00
designated cost           0                    hold timer                 0.00
flags
```

Thank you so much in advance!

Best regards,
Jingwei 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment
  2025-03-16 10:07 Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment Jingwei LI
@ 2025-03-16 12:17 ` Sven Eckelmann
  2025-03-16 12:30 ` Sven Eckelmann
  1 sibling, 0 replies; 5+ messages in thread
From: Sven Eckelmann @ 2025-03-16 12:17 UTC (permalink / raw)
  To: b.a.t.m.a.n@lists.open-mesh.org; +Cc: Jingwei LI

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

On Sunday, 16 March 2025 11:07:17 GMT+1 Jingwei LI wrote:
> 9a:15:64:00:0b:f8    0.172s (        1.0) [      rax0]

Either use B.A.T.M.A.N. IV with its loss metric or fix the throughput
(incorrectly set to 1.0 MBit/s in most of your links) when you want to use 
B.A.T.M.A.N. V.

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment
  2025-03-16 10:07 Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment Jingwei LI
  2025-03-16 12:17 ` Sven Eckelmann
@ 2025-03-16 12:30 ` Sven Eckelmann
  2025-03-16 13:21   ` Jingwei LI
  2025-03-16 13:27   ` marscatcn
  1 sibling, 2 replies; 5+ messages in thread
From: Sven Eckelmann @ 2025-03-16 12:30 UTC (permalink / raw)
  To: b.a.t.m.a.n@lists.open-mesh.org; +Cc: Jingwei LI

[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]

On Sunday, 16 March 2025 11:07:17 GMT+1 Jingwei LI wrote:
> ```
>    Router A             Router B                Router C
> _____________     ___________________       ________________
> |    br-lan    |      |         br-lan        |      |     br-lan         |
> |____________|     |__________________|      |________________|
> |AP|   bat0  |     |AP|      bat0          |      |AP|     bat0      |
> |___|________|     |___|_______________|      |___|____________|
>    |lan|BHAP|         |STA| lan | BHAP|           |STA| BHAP |
>    |___|______|         |____|_____|______|           |____|_______|
>      ^     ^----WiFi--^     ^      ^-----WiFi---^
>       |______Eth_Cable_____|  
> ```

This is completely distorted in a fixed width character (editor). Is router C 
required to see the problem? Because only router A and B are mentioned in the 
problem description.

Is the ethernet cable connection required to trigger the problem?

> Problem description:
> 
> Router A (192.168.6.1) and Router B (192.168.6.2) can ping each other. The client (192.168.6.192) associating with Router B cannot ping Router A and its associating client.
> I also wrote some simple rules to trace the data frames in each router, below is the output for a ping from client associating with Router B (192.168.6.2) to Router A (192.168.6.1):

At which point are the packets dropped from client to client? The "trace" you 
showed me looks like output from iptables (or actually its kernel part 
"netfilter") - which is above bat0 (and therefore not in control of batman-
adv). If you want to figure out something on layer 2, please use tcpdump to 
capture packets on the various interfaces involved here (bridge, ap, bat0, 
lan, BHAP, ...) and then check what happens. You can analyze pcaps recorded by 
tcpdump using a somewhat recent wireshark version

How does you bridge loop avoidance configuration look like and what is the 
backbone and claim (table) state?

What is the content of the translation tables?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment
  2025-03-16 12:30 ` Sven Eckelmann
@ 2025-03-16 13:21   ` Jingwei LI
  2025-03-16 13:27   ` marscatcn
  1 sibling, 0 replies; 5+ messages in thread
From: Jingwei LI @ 2025-03-16 13:21 UTC (permalink / raw)
  To: Sven Eckelmann, b.a.t.m.a.n@lists.open-mesh.org

Hi Sven,

Thank you for your kind reply! I hope this looks good in your editor:

   Router A             Router B            Router C
_____________     _________________     _____________
|  br-lan   |     |    br-lan     |     |  br-lan   |
|___________|     |_______________|     |___________|
|AP|  bat0  |     |AP|    bat0    |     |AP|  bat0  |
|__|________|     |__|____________|     |__|________|
   |lan|BHAP|        |STA|lan|BHAP|        |STA|BHAP|
   |___|____|        |___|___|____|        |___|____|
      ^   ^----WiFi----^   ^   ^-----WiFi----^
      |______Eth_Cable_____|  

> Is router C required to see the problem? Because only router A and B are 
> mentioned in the problem description.

C is not involved in this problem, I'm putting it here to show a mixed deployment.

> Is the ethernet cable connection required to trigger the problem?

Yes, everything runs great until I plug the cable.

I'm new to this cool project and not familiar with what information I need to 
provide, it may take some time for me to collect everything you mentioned, 
I will put them here later. 

Best regards,
Jingwei

________________________________________
From: Sven Eckelmann
Sent: Sunday, March 16, 2025 8:30 PM
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Jingwei LI
Subject: Re: Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment


On Sunday, 16 March 2025 11:07:17 GMT+1 Jingwei LI wrote:

> ```

>    Router A             Router B                Router C

> _____________     ___________________       ________________

> |    br-lan    |      |         br-lan        |      |     br-lan         |

> |____________|     |__________________|      |________________|

> |AP|   bat0  |     |AP|      bat0          |      |AP|     bat0      |

> |___|________|     |___|_______________|      |___|____________|

>    |lan|BHAP|         |STA| lan | BHAP|           |STA| BHAP |

>    |___|______|         |____|_____|______|           |____|_______|

>      ^     ^----WiFi--^     ^      ^-----WiFi---^

>       |______Eth_Cable_____| 

> ```



This is completely distorted in a fixed width character (editor). Is router C

required to see the problem? Because only router A and B are mentioned in the

problem description.



Is the ethernet cable connection required to trigger the problem?



> Problem description:

>

> Router A (192.168.6.1) and Router B (192.168.6.2) can ping each other. The client (192.168.6.192) associating with Router B cannot ping Router A and its associating client.

> I also wrote some simple rules to trace the data frames in each router, below is the output for a ping from client associating with Router B (192.168.6.2) to Router A (192.168.6.1):



At which point are the packets dropped from client to client? The "trace" you

showed me looks like output from iptables (or actually its kernel part

"netfilter") - which is above bat0 (and therefore not in control of batman-

adv). If you want to figure out something on layer 2, please use tcpdump to

capture packets on the various interfaces involved here (bridge, ap, bat0,

lan, BHAP, ...) and then check what happens. You can analyze pcaps recorded by

tcpdump using a somewhat recent wireshark version



How does you bridge loop avoidance configuration look like and what is the

backbone and claim (table) state?



What is the content of the translation tables?



Kind regards,

        Sven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment
  2025-03-16 12:30 ` Sven Eckelmann
  2025-03-16 13:21   ` Jingwei LI
@ 2025-03-16 13:27   ` marscatcn
  1 sibling, 0 replies; 5+ messages in thread
From: marscatcn @ 2025-03-16 13:27 UTC (permalink / raw)
  To: b.a.t.m.a.n

Sorry for the format, I'm not familiar with using plain text mode of the outlook web app.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-16 13:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-16 10:07 Limited Connectivity in Mixed Wired & Wireless Backhaul Deployment Jingwei LI
2025-03-16 12:17 ` Sven Eckelmann
2025-03-16 12:30 ` Sven Eckelmann
2025-03-16 13:21   ` Jingwei LI
2025-03-16 13:27   ` marscatcn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.