/bridge-utils
Instalacja pakietu:
apt-get install bridge-utils
Utworzenie bridge br0:
brctl addbr br0
Sprawdzenie konfiguracji bridge:
brctl show
Dodanie interfejsu eth0 do bridge:
brctl addif br0 eth0
Dodanie interfejsu eth1 do bridge:
brctl addif br0 eth1
Utworzenie bridge na stałe w /etc/network/interfaces.
Adresacja dynamiczna (DHCP):
auto br0 iface br0 inet dhcp bridge_ports eth0 eth1
Bridge w /etc/network/interfaces.
Adresacja statyczna:
auto br0 iface br0 inet static address 192.168.12.1 netmask 255.255.255.0 bridge_ports eth0 eth1
Włączenie IP forwarding w /etc/sysctl.conf:
net.ipv4.ip_forward=1
Usunięcie bridge:
brctl delbr br0