All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Wunderlich <sw@simonwunderlich.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: martinvdberg@gmail.com
Subject: Re: Gateway shut down detection takes too time from other nodes
Date: Wed, 15 Apr 2026 17:10:23 +0200	[thread overview]
Message-ID: <13667793.EVyyLHbfrO@prime> (raw)
In-Reply-To: <177556961939.1631.5621807886524407791@diktynna.open-mesh.org>

Hi Martin,

On Tuesday, April 7, 2026 3:46:59 PM Central European Summer Time 
martinvdberg@gmail.com wrote:
> I think I have a similar use-case as the original poster and ran into the
> same problem.
> 
> Let me try to explain:
> 
> - Given a mesh network where each node is assigned a *static IP*.
> - In the mesh network there are some nodes acting as a Gateway.
> - The other nodes in the mesh are clients.
> - Using BATMAN-V
> 
> Each client node has a script running, when it detects "batctl gwl" to elect
> another gateway, the script will set the gateway's IP-address as default
> route: "ip route replace default via $gateway_ip dev bat0".
> 
> Now whenever a mesh-gateway is turned off, it will take 200 seconds before
> it is removed from the originators and only then "batctl gwl" will elect
> another gateway. This results in some client nodes have no internet for 200
> seconds.
> 
> So far, I haven't been able to get batman-adv (using batctl) to switch to
> another gateway sooner, e.g. after 10 or 20 seconds.
> 
> 
> Using DHCP is not an option in my use-case.
> 
> Is there somehow a way to reduce the 200 seconds? Possibly by switching to
> BATMAN-IV?
> 
> Regards, Martin

that's an interesting use case, although I would like to make clear that the 
gateway feature was designed for DHCP in mind, yet you use it with static IPs. 
The main purpose was to re-route DHCP packets to the selected gateway. 
Nethertheless, you could still use this mechanism for "signaling".

The gateway selection can be based on TQ or on bandwidth parameters, but there 
is no option to speed up the "dead marking" from the 200s of the originator 
timeout. you can decrease that number in the source code, but I would actually 
advise to use a completely different method independent of batman-adv - for 
example by using a layer 3 routing daemon, or another application which 
regularly signals their availability as a gateway. For DHCP (which it was 
originally designed for), lease times are typically 5 minutes minmum, so the 
200s timeout are not really a problem there ... but I acknowledge that it's 
not really useful for "fast" switching.

Cheers,
       Simon



  reply	other threads:[~2026-04-15 15:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 21:37 Gateway shut down detection takes too time from other nodes mbiglari4
2025-10-15  8:05 ` Simon Wunderlich
2025-10-23 12:28   ` mbiglari4
2025-10-24 10:03     ` Simon Wunderlich
2026-04-07 13:46       ` martinvdberg
2026-04-15 15:10         ` Simon Wunderlich [this message]
2026-04-16  5:46           ` Simon Wunderlich
2026-04-17  7:49             ` Martin
2026-04-20 12:06               ` Simon Wunderlich
     [not found]                 ` <T9GBvsX7uc7S-GxsAnHMFg5oj-euOauWkNTXi2SouU2ow1oX1yogmMCi6FW7mXlFuZ3D9zMBiIGARWa2UDobQ2S0OrY8To4neWUtWArNXzw=@protonmail.com>
2026-04-22 14:21                   ` Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13667793.EVyyLHbfrO@prime \
    --to=sw@simonwunderlich.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=martinvdberg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.