Bridge with netctl
A bridge is a piece of software used to unite two or more network segments. A bridge behaves like a virtual network switch, working transparently (the other machines don't need to know or care about its existance). Real devices (like eth ones) and virtual devices (like tap ones) can be connected to it.
This article explains how to create a bridge that contains at least a ethernet device. This is useful for things like the bridge mode of qemu, setting a software based access point, etc.
- Create a bridge called
br0to have, at least, your real Ethernet adapter (assuming
eth0) and optionally a tap device (assuming
Description="Example Bridge connection" Interface=br0 Connection=bridge BindsToInterfaces=(eth0 tap0) IP=dhcp ## sets forward delay time #FwdDelay=0 ## sets max age of hello message #MaxAge=10If you are using an static ip see man pages of netctl, also edit
- You can bridge any combination of network devices editing "BindsToInterfaces" option.
- If any of the bridged devices (eth0,tap0,...) had dhcpcd enabled, disable and stop the
email@example.com. Or set
IP=noto the netctl profiles.
- Finally, enable and start your
Tips and Tricks
Manually adding/removing network devices
brctl, to manipulate bridges. You can use it to add a device, like this:
# brctl addif br0 eth1
Read the manual for more info:
Wireless interface on a bridge
To add a wireless interface to a bridge, you first have to assign the wireless interface to an access point or start an access point with hostapd. Else the wireless interface won't be added to the bridge.