Skip to content

Bridging

James Swineson edited this page Nov 13, 2017 · 8 revisions

Assume you have eth0 now, which is configured by DHCPv4 and IPv6 SLAAC, and want to create bridge br0.

Do not do this on machines that you only have remote access if you don't know what you are doing. You might lose access to it until there is someone to reconfigure it physically.

Using /etc/network/interfaces

Create /etc/network/interfaces.d/br0, fill in:

auto br0
allow-hotplug br0
iface br0 inet dhcp
    bridge_ports eth0
    bridge_waitport 60
iface br0 inet6 auto

Then ifup br0.

If it fails to create the bridge, install bridge-utils using package manager and try again.

Using systemd-networkd

Create 3 files under /etc/systemd/network:

br0.netdev

[NetDev]
Name=br0
Kind=bridge
br0.network

br0.network

[Match]
Name=br0

[Network]
DHCP=ipv4
eth0.network

eth0.network

[Match]
Name=eth0

[Network]
Bridge=br0

Then systemctl reload systemd-networkd.

Clone this wiki locally