How to make an iproute2 bridge setup permanent?

I’ve set up an archlinux inside a Oracle Virtual Box. To be able to reach the VM from the LAN I have added a bridge adapter and configured the guest system following the instructions from the Arch Linux Wiki: Network bridge | With iproute2.

I used the following commands to successfully set up the network:

ip link add name lan_bridge type bridge
ip link set lan_bridge up
ip link enp0s8 up
ip link set enp0s8 master lan_bridge
systemctl start [email protected]_bridge

After those steps I’m able to login into the guest via SSH. Trying to make the changes persistent using:

systemctl enable [email protected]_bridge

does not work, though. I’d like systemd to create the exact same setup on startup automatically. Of course I could just paste those commands into a shell script and run it at startup, but I think there should be a proper way to do so. Help is greatly appreciated.

Unix & Linux Asked by norritt on November 11, 2021

1 Answers

One Answer

The easiest way is to use netctl in arch. First of all you need to:

cp /etc/netctl/examples/bridge /etc/netctl

Set your desired slaves in the line which says:

BindsToInterfaces=(eth0 eth1 tap0)

Last you want to enable [email protected] like this:

systemctl enable [email protected]

Note: the name after the @ should match to your file name in /etc/netctl

Answered by inchw0rm on November 11, 2021

Add your own answers!

Related Questions

Kali Linux 2020.2 Wifi Not Working (Realtek)

0  Asked on August 18, 2020 by harriet


Base64 encoded ignition file gets messed up

1  Asked on August 15, 2020 by michael-stbich


Weird textures on KDE Plasma 5.0

0  Asked on August 11, 2020 by rushisrinivas-k


How do I syntax check a Zsh script?

1  Asked on August 9, 2020 by akhil-jalagam


How can I swap my two screens, left to right?

5  Asked on August 4, 2020 by ripper234


Adding suffix to filename during for loop in bash

1  Asked on August 3, 2020 by mishal-ahmed


Why are aliases skipped if escaped?

2  Asked on August 2, 2020


Why can’t I type a g̃ the same way I type ñ?

1  Asked on July 29, 2020 by mmaluff


Custom logrotate with hostnames

0  Asked on July 29, 2020 by gwynn


Ask a Question

Get help from others!

© 2021 All rights reserved.