created: 2026-08-03
I moved away from Debian’s network interface configuration and to systemd-networkd.
Using standard systemd-networkd config in Debian 13, on a router I’ve
been able to:
Network diagram below details the final setup. The router running debian
13 has eth0 which is connected to LAN and eth1 connected to WAN. The
ISP provides a dynamic /40 prefix. LAN has 3 VLANs with clients in
each VLAN. The switch trunk port that eth0 is connected to is tagging
all 3 VLANs.
┌───────────┐
│ router │
└─────┬─────┘
│
┌───────────────────────┴───────────────────────┐
│ │
[ WAN Interface ] [ LAN Interface ]
eth1 eth0
│ │
│ ▼
│ ┌───────────┐
│ │ br0 │
│ │ (Bridge) │
│ └─────┬─────┘
│ │
│ ┌─────────────────────────────────┴─────────────────────────────────┐
│ │ │ │
▼ ▼ ▼ ▼
┌───────────┐ ┌───────────────┐ ┌───────────────┐ ┌────────────────┐
│ ISP │ │ vlan1 │ │ vlan10 │ │ vlan20 │
│ Gateway │ │ 192.168.1.1 │ │ 192.168.10.1 │ │ 192.168.20.1 │
│ │ │ 2001:db8:1::1 │ │ 2001:db8:10::1│ │ 2001:db8:20::1 │
└───────────┘ └───────────────┘ └───────────────┘ └────────────────┘
│ │ │
▼ ▼ ▼
[ VLAN 1 ] [ VLAN 10 ] [ VLAN 20 ]
(Clients) (Clients) (Clients)
Setup the virtual network device for br0 as a bridge.
/etc/systemd/network/br0.netdev
[NetDev]
Name=br0
Kind=bridge
Each VLAN will also need it’s own virtual network device.
/etc/systemd/network/20-vlan1.netdev
[NetDev]
Name=vlan1
Kind=vlan
[VLAN]
Id=1
/etc/systemd/network/20-vlan10.netdev
[NetDev]
Name=vlan10
Kind=vlan
[VLAN]
Id=10
/etc/systemd/network/20-vlan20.netdev
[NetDev]
Name=vlan20
Kind=vlan
[VLAN]
Id=20
eth0 needs to be setup as an enslaved interface to br0
/etc/systemd/network/10-eth0.network
[Match]
Name=eth0
[Network]
Bridge=br0
br0 network configuration needs to list the VLANs that it bridges.
/etc/systemd/network/20-br0.network:
[Match]
Name=br0
[Network]
VLAN=vlan1
VLAN=vlan10
VLAN=vlan20
LinkLocalAddressing=no
eth1 network configuration will obtain IPv4 and IPv6 addresses via DHCP.
/etc/systemd/network/eth1.network:
[Match]
Name=eth1
[Network]
DHCP=yes
IPv6AcceptRA=yes
DHCPPrefixDelegation=yes
[DHCPv6]
PrefixDelegationHint=::/64
UseDelegatedPrefix=yes
Each VLAN interface will need its own network configuration file. /etc/systemd/network/40-vlan1.network
[Match]
Name=vlan1
[Network]
Address=192.168.1.1/24
IPv6SendRA=yes
IPv6AcceptRA=no
DHCPPrefixDelegation=yes
[DHCPPrefixDelegation]
SubnetId=0x1
Assign=yes
Token=::1
/etc/systemd/network/40-vlan10.network
[Match]
Name=vlan10
[Network]
Address=192.168.10.1/24
IPv6SendRA=yes
IPv6AcceptRA=no
DHCPPrefixDelegation=yes
[DHCPPrefixDelegation]
SubnetId=0x10
Assign=yes
Token=::1
/etc/systemd/network/40-vlan20.network
[Match]
Name=vlan20
[Network]
Address=192.168.20.1/24
IPv6SendRA=yes
IPv6AcceptRA=no
DHCPPrefixDelegation=yes
[DHCPPrefixDelegation]
SubnetId=0x20
Assign=yes
Token=::1
Once systemd-networkd has been restarted, networkctl should present
the following:
# networkctl list
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eth0 ether enslaved configured
3 br0 bridge carrier configured
4 vlan20 vlan routable configured
5 vlan10 vlan routable configured
6 vlan1 vlan routable configured
7 eth1 ether routable configured