Menu Close

Creating a network bridge in linux

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 up
ifconfig eth1 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
Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.