Unix & Linux Asked by norritt on November 11, 2021
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 dhcpcd@lan_bridge
After those steps I’m able to login into the guest via SSH. Trying to make the changes persistent using:
systemctl enable dhcpcd@lan_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.
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
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP