You are not logged in.

#1 2020-06-12 17:09:45

linda.cicadawasp
Member
Registered: 2019-09-07
Posts: 4

systemd-networkd - switching between settings depending on Eth status

I currently use systemd-networkd to setup a wifi access point and share internet (obtained via ethernet) with a bridge

I'm looking for a way to automatically switch to another setup when Ethernet is not available.
In clear, if the Ethernet cable is not plugged in, I want the computer to connect to some wifi network instead.

Is there a configuration option for the [Match] section that takes the status of Ethernet into account. I didn't find anything similar in the wiki

The files in my /etc/systemd/network are as follows

02-br0.netdev
----------
[NetDev]
Name=br0
Kind=bridge
04-br0_add-eth0.network
----------
[Match]
Name=eth0
[Network]
Bridge=br0
04-eth0.network
----------
[Match]
Name=eth0
[Network]
DHCP=yes
08-wlan0.network
----------
[Match]
Name=wlan0
[Network]
DHCP=yes
12-br0_up.network
----------
[Match]
Name=br0
[Network]
MulticastDNS=yes
DHCP=yes
99-default.link
----------

Offline

Board footer

Powered by FluxBB