[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bridge or nat for multiple lan interfaces?



Hello,

I am in the process of making my Debian based router (connects my adsl
modem and my home lan computers) into a wireless access point also.

I am experimenting with DWL-G520 (dlink) wireless PCI card. It is
working in master mode in Debian Etch and 2.6.17 kernel.

Before the wireless card, I had eth1 and eth0 network devices in the
router machine. eth1 was connected to the adsl modem and eth0 to a
switch to which my home computers were connected with network cables.

Now I also have ath0, the wireless device, in the router machine. I have
modified my iptables script to do nat so that clients connecting via
ath0 also get internet connectivity just like the clients connecting via
eth0 do.

But while researching on google about wireless access points in linux,
we discovered another option is to make a bridge. We are thinking this
could be done by bridging the eth0 and ath0 and giving the bridge
device, br0, an ip address that other lan computers may look for as a
gateway (the same way they look to the router machine's eth0 as a
gateway at present).

So, that was the story. Now the question. What is the comparison between
the two methods: using nat or making a bridge  to share internet
connection with wireless and wired computers. If somebody can discuss
the ups and downs of nat v/s bridging approaches it would be great.

BTW, we also tried to make a bridge and it seemed to be working.

One thing I am sure about. If we use nat, then the wireless lan network
device will have different subnet. If we use bridging, the whole lan
will share the same subnet.

Comments are welcome.

thanks,
->HS




Reply to: