Bridge with netctl

From ArchWiki
Revision as of 08:08, 11 June 2013 by Siot (talk | contribs) (Manually adding/removing network devices: Move brctl package to Installation section)
Jump to: navigation, search

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.


Install the netctl package from the official repositories.


  • Copy /etc/netctl/examples/bridge to /etc/netctl/bridge.
  • Create a bridge called br0 to have, at least, your real Ethernet adapter (assuming eth0) and optionally a tap device (assuming tap0):
Description="Example Bridge connection"
BindsToInterfaces=(eth0 tap0)
## sets forward delay time
## sets max age of hello message

If you are using an static ip see man pages of netctl, also edit /etc/resolv.conf as necessary.

  • 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 dhcpcd@eth0.service daemon. Or set IP=no to the netctl profiles.
  • Finally, enable and start your /etc/netctl/bridge.

Tips and Tricks

Manually adding/removing network devices

The bridge-utils package 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