Bridging setup on bootup on Debian/Ubuntu
The following should pretty much work on any Debian based systems. It also requires the bridge module and bridge-utils packages.
/etc/network/interfaces
auto lo iface lo inet loopback
auto eth0 iface eth0 inet dhcp
auto br0 iface br0 inet static address 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 pre-up ifconfig eth1 down pre-up ifconfig eth2 down pre-up brctl addbr br0 pre-up brctl addif br0 eth1 eth2 pre-up ifconfig eth1 0.0.0.0 up pre-up ifconfig eth2 0.0.0.0 up post-down ifconfig eth1 down post-down ifconfig eth2 down post-down brctl delif br0 eth1 eth2 post-down brctl delbr br0
|