Bridge with netctl

From ArchWiki
Revision as of 02:23, 16 December 2012 by Chrisl (Talk | contribs) (Forgot to add the category)

Jump to: navigation, search

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


Install the netcfg package from the official repositories.


  • Enable the bridge module:
# modprobe bridge

And to make it permanent, add it to your /etc/modules-load.d:

echo bridge>/etc/modules-load.d/bridge.conf
  • Create a bridge called br0 to have, at least, your real Ethernet adapter (assuming eth0):

#Uncomment this fields as necessary if you are using a static ip instead

# Add your network adapter(s) here, separated by spaces.
If you are using an static ip, also edit /etc/resolv.conf as necessary.
  • If eth0 had dhcpcd enabled, disable and stop it:
# systemctl stop dhcpcd@eth0.service
# systemctl disable dhcpcd@eth0.service
  • Then enable and start your br0 bridge:
# systemctl start netcfg@bridge.service
# systemctl enable netcfg@bridge.service

Tips and Tricks

Manually adding/removing network devices

Install the bridge-utils package from the official repositories.

It provides brctl, to manipulate bridges. You can use it to add a device, like this:

# brctl addif br0 eth1

Read the manual for more info: man brctl