How to set up a netbook to act as a bridge

2

I have a netbook that I want to set up as a bridge (that's the only thing I want it to do, I don't use it for anything else anymore). I want to bridge wlan0 to eth0 (see picture below)

Ethernet Cable: ===>

Wireless: ) ) )

internet ===> modem ===> router ) ) ) netbook ===> switch ===> LAN

Right now I have Lubuntu 12.04 installed on my netbook with the wlan0 connection set to Shared so that my LAN has internet access through the wireless connection (which is what I want). The problem however is that Ubuntu does this by making its own network (with a different DHCP) so that the IP address of my netbook is in the 10.0.1.1 (from wlan0) range but any computer on my LAN gets an IP address in the 10.42.0.1 (from eth0) range.

So my question is:
Is there an OS that I can install on my netbook that can easily set up a bridge?

I tried Untangle but it doesn't currently support bridging a wireless connection to a wired connection.

Rapture

Posted 2012-09-21T05:08:43.940

Reputation: 123

Answers

1

The ability to bridge interfaces is inherent with the Linux 2.4 and 2.6 kernel series. Ubuntu and Lubuntu both include the requisite code.

You want the "brctl" command. Ubuntu man page here.

Essentially, you will:

  • Create the bridge via: brctl addbr (name)
  • Add interfaces to the bridge via: brctl addif (brname) (ifname)

If you have other bridges on your LAN/network, be mindful of bridging loops and possible spanning tree issues.

John

Posted 2012-09-21T05:08:43.940

Reputation: 1 869

I was hoping for a router OS that i could install on my netbook since i dont need a full fledged desktop OS – Rapture – 2012-09-21T20:34:57.640

As I mention, any Linux distribution using either the 2.4 or 2.6 kernel will have the ability to use the 'brctl' command. There are many Linux "router OS" distributions. This link will give you a starting point: http://en.wikipedia.org/wiki/List_of_router_or_firewall_distributions

– John – 2012-09-23T06:38:49.360