bridge eth1 to eth0?

Felipe Alfaro Solana felipe.alfaro at gmail.com
Fri Dec 29 22:20:18 UTC 2006


On 12/29/06, Matt Price <matt.price at utoronto.ca> wrote:
> hi,
>
> for stupid reasons I need to install via netboot on a compaq tablet
> (hoping this will work, it's my last shot!).  I have an ubuntu desktop
> with two ethernet cards, eth0 & eth1, and have set up dhcp & tftp on
> eth1 as documented in various places on the web, e.g. here:
>
> http://www.debian-administration.org/articles/478
>
>
> this works fine to a point.  I have the ubuntu edgy netboot images
> in /var/lib/tftpboot, my tablet starts up with pxe, finding the images,
> and is ready to install but cannot find the broader internet -- it
> doesn't seem to see past the eth1 subnet.  So, probably a simple
> question:  how  do I enable the eth1 traffic to bridge across to eth0
> and thus access the whole internet?  I guess it has something to do with
> ip forwarding or ip masquarading or one of those very scary and arcane
> pieces of dark magic.

I think you're talking about routing and not bridging. Bridging works
at layer 2 by connecting together two network segments (like a switch
or hub does). Routing works at layer 3 and thus, different layer 3
networks have different broadcast domains at layer 2.

If you want to enable routing:

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

If you want to enable bridging, you need to create a bridging
interface (br0, for example) and add the network interfaces you want
to it. To bridge together eth0 and eth1:

# brctl addbr br0
# brctl addif br0 eth0
# brctl addif br0 eth1




More information about the ubuntu-users mailing list