Create a bridge interface with systemd-networkd
ip -l
# 2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
/etc/systemd/network/bind.network
[Match]
Name=enp0s31f6
[Network]
Bridge=br0
/etc/systemd/network/br0.netdev
[NetDev]
Name=br0
Kind=bridge
/etc/systemd/network/br0.network
this example assigns a static ipv6 address and a dynamic ipv6 address, which assumes there is a DHCPv6 server on the network
use DNS server addresses from your network provider or others like 1.1.1.1 or 8.8.8.8 (there are others)
[Match]
Name = br0
[Network]
Address = 192.168.0.10/24
Gateway = 192.168.0.1
DNS = 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
DHCP = ipv6
Switch to systemd-networkd and systemd-resolved
NetworkManager can coexist with systemd-networkd (for example to manage wifi connections)
but should remove other network managers like ifupdown, netplan, connman
# run these commands as superuser
apt install systemd-resolved
systemctl enable systemd-networkd
systemctl enable systemd-resolved
chown root:systemd-network /etc/systemd/network/*
# remove existing network manager like ifupdown, connman, netplan.io, etc.
apt purge ifupdown
systemctl start systemd-networkd
systemctl start systemd-resolved
cd /etc/
ln -sf ../run/systemd/resolve/resolv.conf .