Documentation Wiki


Command line method works on most distros

Bring down network

dhclient -r eth0

Create bridge interface and add ethernet interfaces to it

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1

Bring up ethernet interfaces

ifconfig eth0 up
ifconfig eth1 up

Bring up bridge.

dhclient -v br0

Optionally you can statically assign the MAC address of the bridge before bringing up the interface because it will change each time it comes up

ifconfig br0 hwaddr [mac]

Debian method (interfaces file)


auto br0
iface br0 inet static
  pre-up ifconfig eth0 down
  pre-up ifconfig wlan0 down
  pre-up brctl addbr br0
  pre-up brctl addif br0 eth0
  pre-up brctl addif br0 wlan0
  pre-up ifconfig eth0
  pre-up ifconfig wlan0
  pre-up ifconfig eth0 up
  pre-up ifconfig wlan0 up
  post-down ifconfig eth0 down
  post-down ifconfig wlan0 down
  post-down brctl delbr br0