Gateway support #15

Closed
opened 2021-08-23 08:48:40 +02:00 by pranav · 5 comments
Owner

B.A.T.M.A.N. has a feature called gateway mode which is useful when there are two or more nodes having internet access. This mode allows other nodes to connect to the internet via the fastest node, while also preventing multiple DHCP replies.

B.A.T.M.A.N. has a feature called [gateway mode](https://www.open-mesh.org/projects/batman-adv/wiki/Gateways) which is useful when there are two or more nodes having internet access. This mode allows other nodes to connect to the internet via the fastest node, while also preventing multiple DHCP replies.
pranav added the
enhancement
label 2021-08-23 08:48:40 +02:00
pranav added this to the Convert into daemon milestone 2021-08-23 09:01:54 +02:00
pranav removed this from the Convert into daemon milestone 2021-09-07 08:45:27 +02:00
Author
Owner

We could use naxalnet.conf to configure it

[gateway]
mode=client
# bandwidth
upstream=20M
downstream=40M
We could use naxalnet.conf to configure it ```ini [gateway] mode=client # bandwidth upstream=20M downstream=40M ```
Author
Owner

How about we add mode=auto in naxalnet.conf which will check for internet access without bat0, and if there is internet access, set mode to server, or to client otherwise.

If we implement this, we have to think of some way to find out if any of the ethernet ports is bridged to a DHCP server.

How about we add `mode=auto` in `naxalnet.conf` which will check for internet access without bat0, and if there is internet access, set mode to `server`, or to `client` otherwise. If we implement this, we have to think of some way to find out if any of the ethernet ports is bridged to a DHCP server.
Author
Owner

I'm working on this on a branch gateway.

My idea is to use a temporary networkd *.network based on the bridge0 config file and replace Name=bridge0 in [Match] with en* and eth*. Then reload networkd and then check if any of them is routable. If any of them is routable, set gateway mode in batman-adv to server; else set it to client.

I'm working on this on a branch `gateway`. My idea is to use a temporary networkd `*.network` based on [the bridge0 config file](src/branch/master/systemd-networkd/mesh.07-bridge.network) and replace `Name=bridge0` in `[Match]` with `en*` and `eth*`. Then reload networkd and then check if any of them is `routable`. If any of them is routable, set gateway mode in batman-adv to server; else set it to client.
pranav added this to the Version 0.5.0 milestone 2021-09-28 07:40:19 +02:00
Author
Owner

Implemented auto gateway mode. This is now the default. This can be configured with

[gateway]
mode=auto|server|client|off
Implemented auto gateway mode. This is now the default. This can be configured with ```ini [gateway] mode=auto|server|client|off ```
pranav added a new dependency 2021-10-03 07:17:44 +02:00
Author
Owner

Pull request #18 was merged. Closing this issue.

Pull request #18 was merged. Closing this issue.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
Reference: pranav/pybatmesh#15
No description provided.