Geeks Lunch - Intensive Version -HowTo's





Linux Bridge

Ever want to use a Linux box as just
an Ethernet switch- its easy- use
bridge control- "brctl".

Why would you want to?

Maybe you want to monitor (sniff)
traffic in between other equipment.
Perhaps you want to rate shape.
Maybe you want to use multiple
interfaces and STP (Spanning tree Protocol)
so that your precious traffic doesn't end
up in the bit bucket if you loose an Ethernet
interface.

With brctl you can join any
number of interfaces on the bridge.
Turn on or off Spanning Tree.
It works from a Knoppix (live linux CD) too.

GLIVH: (Geeks Lunch Intense Version Howto:)

brctl addbr new_bridge
brctl addif new_bridge eth0
brctl addif new_bridge eth1
ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0
ifconfig new_bridge up

Thats all you need.
more info at
http://bridge.sourceforge.net/howto.html


Warning: its processor intensive.
In my tests 100Mbs full duplex cards would
only pass about 15Mbs on a 1 Ghz processor.
(out of about 50Mbs of traffic there).
Other tasks became painfully slowwwww.

On another computer I could pass about 40Mbs
with a 550Mhz machine- and a third test
only 10Mbs on a 2.3 Ghz laptop (yes
both cards were in 100Mbs full duplex mode)
so I suspect there is some ethernet-card-driver
component as well.




The most recent copy of this document is here.

http://www.geekslunch.com/gliv/linux_bridge.html
written by: Monta Elkins


Back to GLIVH's [Geeks Lunch Intensive HowTo's]

email Monta @ [this domain]