Skip to contentSkip to conversation

Does batman choose DHCP server by random?

DISCUSSION MK 3 participants 8 messages Sep 17, 2020 – Oct 2, 2020

lore
Share & tools
lore

MK

author
#0 lore raw

Hi meshing list.

We are running a batman 2020.2 based mesh network.

Clients connect to one gateway but pull IPv4 addresses from _another_ gateway. This leads to packets flowing between gateways instead of leaving the mesh on the shortest route possible.

Is this intended behaviour? Is it random? Is there a config option to alter this packet flow?

gw_mode is set to "server" on all gateways, bandwith announcement is the same on all gateways (10/10 MBit). So no imbalance here.

Regards,
Martin

#1 lore raw
Quoted 6 lines · On Thursday, 17 September 2020 22:23:24 CEST MK wrote:

Clients connect to one gateway but pull IPv4 addresses from _another_ gateway. This leads to packets flowing between gateways instead of leaving the mesh on the shortest route possible.

Is this intended behaviour? Is it random? Is there a config option to alter this packet flow?

See https://www.open-mesh.org/projects/batman-adv/wiki/Gateways

Kind regards,
Sven

author
#2 lore raw

Hi Sven.

Quoted 1 line

See https://www.open-mesh.org/projects/batman-adv/wiki/Gateways

We did set up all batctl values according to the manual, but still get IPs/Leases from other gateway's ranges and therefore cross-traffic...

Any hint on what we did wrong?

Server:

$ batctl gwl
[B.A.T.M.A.N. adv 2020.2, MainIF/MAC: fastd_mesh/ (bat0/ BATMAN_V)]
  Router            ( throughput) Next Hop          [outgoingIf]  Bandwidth
   (        7.7)  [fastd_mesh]: 10.0/10.0 MBit
   (        7.7)  [fastd_mesh]: 10.0/10.0 MBit
   (       10.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        8.8)  [fastd_mesh]: 10.0/10.0 MBit
   (        7.7)  [fastd_mesh]: 10.0/10.0 MBit
   (        8.8)  [fastd_mesh]: 10.0/10.0 MBit
$ batctl gw_mode
server (announced bw: 10.0/10.0 MBit)
$ batctl -v
batctl 2020.2 [batman-adv: 2020.2]

Client:
https://github.com/ffulm/firmware/blob/ec1d061e20557662dd8c7fc75dc603fee9bf77e0/files/etc/uci-defaults/50_freifunk-setup#L207

Regards,
Martin

#3 lore raw
Quoted 4 lines · On Tuesday, 29 September 2020 22:04:58 CEST MK wrote:
Quoted 1 line

See https://www.open-mesh.org/projects/batman-adv/wiki/Gateways

We did set up all batctl values according to the manual, but still get IPs/Leases from other gateway's ranges and therefore cross-traffic...

Have you also taken care of the gateway client settings ? If so, feel free to share your config.

Kind regards,
Marek Lindner

author
#5 lore raw

Hi Sven & Marek!

Thanks for your help. Find the client side config down below:

$ batctl -v
batctl openwrt-2019.2-3 [batman-adv: openwrt-2019.2-4]
$ batctl gwl
[B.A.T.M.A.N. adv openwrt-2019.2-4, MainIF/MAC: fastd_mesh/ (bat0/
BATMAN_V)]
  Router            ( throughput) Next Hop          [outgoingIf]  Bandwidth
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
*  (        1.0)  [fastd_mesh]: 10.0/10.0 MBit

Star means choosen gateway?

$ batctl gw_mode
client (selection class: 5.0 MBit)

Regards,
Martin

#6 lore raw

On Friday, 2 October 2020 10:29:16 CEST MK wrote:
[...]

Quoted 11 lines
$ batctl gwl
[B.A.T.M.A.N. adv openwrt-2019.2-4, MainIF/MAC: fastd_mesh/ (bat0/
BATMAN_V)]
  Router            ( throughput) Next Hop          [outgoingIf]  Bandwidth
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
   (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
*  (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
Quoted 1 line

Star means choosen gateway?

Yes, this is the chosen gateway. And the "1.0" here means most likely that the throughput to this gateway is for some reason always the same - so it has no good way to figure out the best gateway.

Please make sure that you either only use links that provide an expected throughput for its peers - OR use the throughput_override [1] on interfaces which cannot provide an automated expected throughput for its peers. Also make sure that you don't forget this setting on one side of the connection.

And can you please explain how you were able to get this output without the router mac address? Because this is a bug and I cannot reproduce it at the moment.

Kind regards,
Sven

[1] https://www.open-mesh.org/projects/batman-adv/wiki/Tweaking#throughput_override

author
#7 lore raw

Hi Sven.

Thanks for the hints!
I deleted MACs manually. So this is not a bug ;)

Regards
Martin

02.10.2020 11:25:43 Sven Eckelmann <[email protected]>:

Quoted 33 lines · On Friday, 2 October 2020 10:29:16 CEST MK wrote:

[...]

Quoted 11 lines
$ batctl gwl
[B.A.T.M.A.N. adv openwrt-2019.2-4, MainIF/MAC: fastd_mesh/ (bat0/
BATMAN_V)]
Router            ( throughput) Next Hop          [outgoingIf]  Bandwidth
(        1.0)  [fastd_mesh]: 10.0/10.0 MBit
(        1.0)  [fastd_mesh]: 10.0/10.0 MBit
(        1.0)  [fastd_mesh]: 10.0/10.0 MBit
(        1.0)  [fastd_mesh]: 10.0/10.0 MBit
(        1.0)  [fastd_mesh]: 10.0/10.0 MBit
*  (        1.0)  [fastd_mesh]: 10.0/10.0 MBit
Quoted 1 line

Star means choosen gateway?

Yes, this is the chosen gateway. And the "1.0" here means most likely that the throughput to this gateway is for some reason always the same - so it has no good way to figure out the best gateway.

Please make sure that you either only use links that provide an expected throughput for its peers - OR use the throughput_override [1] on interfaces which cannot provide an automated expected throughput for its peers. Also make sure that you don't forget this setting on one side of the connection.

And can you please explain how you were able to get this output without the router mac address? Because this is a bug and I cannot reproduce it at the moment.

Kind regards,
Sven

[1] https://www.open-mesh.org/projects/batman-adv/wiki/Tweaking#throughput_override