I love Free Software!

Pages

Funny Quotes to Think

When you say "I wrote a program that crashed Windows", people just stare at You blankly and say "Hey, I got those with the system, for free"

-Torvalds, Linus(1995-03-08)-

Wednesday, December 30, 2009

How to configure bridge in Debian

A bridge connects two or more different physical ethernets together to form one large (logical) ethernet.
The physical ethernets being connected together correspond to network interfaces in your linux box. The bigger (logical) ethernet corresponds to a virtual network interface in linux


Install package bridge-utils in your linux box
#     aptitude install bridge-utils

Here my physical ethernets are `eth0` and `eth1` to form a logical ethernet `br0`

create an instance of the bridge.
#     brctl addbr br0

Now enslave eth0 and eth1 to this bridge
#    brctl addif br0 eth0
#    brctl addif br0 eth1

We only need one IP address for the bridge. This address we assign to br0.
eth0 and eth1 should not have IP addresses allocated to them.
# ifconfig eth0 0.0.0.0
# ifconfig eth1 0.0.0.0
# ifconfig br0 my.ip.address.here

This will bridge `eth0` and `eth1` to form a logical ethernet `br0`

No comments:

Post a Comment