The creation of network bridge among two PC's networking cards in linux consist from a few following steps:

Prepare your interfaces:

ifconfig eth0 down
ifconfig eth1 down
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up

Create a bridge

brctl addbr br0

Connect network interface cards to the bridge

brctl addif br0 eth0
brctl addif br0 eth1

Turn on IPv4 routing

echo "1" > /proc/sys/net/ipv4/ip_forward

Turn off Spanning Tree protocol

brctl stp off

and finally start the bridge

ifconfig br0 up

Pridaj komentár

Vaša e-mailová adresa nebude zverejnená. Vyžadované polia sú označené *