[SLL] Bridging two networks

Ralph Sims ralph at sims.cc
Fri May 30 11:46:03 PDT 2008


I've never used bridging before and have now have a need for it:

I have a Linux machine connected via eth0 to a DSL line and eth1 to a LAN
that's accessible from the Internet with public IP addresses (1.2.3.0/20).
No filtering in place.  I can currently log in to the DSL link and access
the Linux box.  Now I want to be able to access the devices on the other
network.  The Linux machine's address before bridging is 10.0.0.2 and its
gateway is 10.0.0.1.

First I took down the interfaces.  Then ifconfig eth0 0.0.0.0, and the same
with eth1.

> brctl addbr br0
> brctl addif br0 eth0
> brctl addif br0 eth1
> ifconfig br0 10.0.0.2 (so I can still get in to the box from the 
> outside) route add default gw 10.0.0.1

So far, so good and I can ping the world.  This is where I lose it.  All
traffic goes through the DSL link on eth0.  But I can't get to anything on
the LAN via eth1.   There has to be something simple that I'm missing and
Google while helpful didn't yield any solutions.  IP forwarding is on.  I
tried assigning IP addresses to each NIC and still got no joy.  I would have
thought that the bridge would forward packets in and out of each discrete
network transparently.   

Ideas?



More information about the linux-list mailing list