Configuring a LinkSys WRT54G as a Wireless Ethernet Bridge
I found myself wanting a wireless Ethernet bridge to simplify locating an Axis 2100 video camera. I had an existing LinkSys WRT51ab in the area, so I went looking for an 802.11b bridge device.
The first thing I tried was the LinkSys WGA54G Wireless-G Game Adapter ($100) which it turned out was definitely NOT a bridge device, despite the assurances of Best Buy sales staff.
It turns out that there’s an active community hacking the WRT54G 802.11gb wireless broadband/router. LinkSys released source code for the firmware some time ago under GPL license which has been enhanced in many ways; one of which is to enable wireless Ethernet bridging. Since the WRT54G can currently be had for $40 after $30 of rebates from Best Buy, it’s also a much cheaper solution using much more flexible (though somewhat larger) hardware.
Having saved $60 on hardware, I didn’t feel too bad subscribing to http://www.sveasoft.com for $20 for one year of code access, but have so far not gotten any value from their software, more below on why not…
The instructions below are from here and worked like a charm. Some notes:
1. Tried sveasoft’s TalismanBasic_V1.0.1_wrt54gv3.bin first. It wouldn’t let me change its configuration (possibly a MAC address typo before the download) and the forums indicated that client mode support doesn’t work due to a known bug (so it should be fixed soon…).
2. The need to telnet to it after every power failure to enter the “echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp” is a drag and the main reason to hope for a sveasoft fix.
3. sveasoft’s in a fight with the GPL crowd over their modifications to the “Alchemy” firmware code which came from a GPL release by LinkSys.
4. The LinkSys wrt51ab is a bit unreliable and has no available firmware upgrades. I don’t recommend it for new installations. It has to be rebooted frequently to connect to its configuration web. The 801.11a activity light is blinking furiously even though there’s nobody there (I hope).
Topic Title HOWTO: Use Linksys WRT54G as a wireless ethernet bridge
Date Posted: 02/07/2005 02:00 PM Posted By: user1234(Platinum Member)
This howto is intended to help people who currently use a
wireless router in their house, and also have additional PCs or devices without
wifi cards which cannot be connected to the wireless router using a cable
because they're too far from it (like in another room).
This howto will explain how to use the wrt54g a to connect these remote PCs to
the internet and your home network, without using wifi cards. This is possible
using 3rd party firmware (sveasoft) which allows the wrt54g to operate in
"client" mode, where it forwards packets from its connected devices
to the main wireless router, using a wireless link.
I got my wrt54g running in client mode - that is, it serves as a bridge between
a PC attached to it and the main wireless router. Here's my complete setup,
starting with the wired connections (markeded by "<===>"):
Room 1: Cable Modem <===> D-Link DI-624 Wireless Router <===> PC-1
Room 2: WRT54G <===> PC-2
The DI-624 and the WRT54G connect to each other wirelessly. I also have a
mobile laptop which connects wirelessly to the DI-624.
So in this case, the WRT54G let me use PC-2 without having a wifi card in that
PC. In fact, I could connect up to 4 PCs to the wrt54g, and save the price of 4
wifi-54g pci cards, plus I don't have to install drivers for wifi cards (a pain
in Linux). The wrt54g acts like a "wireless ethernet bridge", which
in fact is another product sold by linksys (WET54G) for around $150. This is
also useful when you have devices (in a room which doesn't have ethernet
connections) which can only connect using a ethernet cable, but cannot connect
wirelessly - like XBOX !
So how do you do it ? Here's the list of steps - you should be doing these
steps (except step 1) from a PC attached to the wrt54g (e.g. PC-2 in my setup).
Physically attaching a PC to the wrt54g is required only for this initial set
up phase, because we need to login and set up the various options. Note that
this doesn't require any changes to your main router's configuration, so it's
quite safe with regard to not messing up your current networks' setup.
1. Download the "wrt54g alchemy firmware" (google this, or go here) version 6rc5 from the internet (it is the only one
compatible with the new models wrt54g V2.2 & wrt54gs V1.1).
2. Upload the firmware to the wrt54g via the "Administration->Firmware
Upgrade" option in the router's web interface.
3. Reset the device (press reset button until power led flashes - this could
take 20 seconds or more). In the following steps, leave all settings which are
not mentioned in the description at their default (only change the ones
specifically mentioned in the step).
Note: We will use addresses that end in 128-255 for the wrt54g router and it's
attached PCs. To make sure there is no overlap in the addresses assigned by the
two routers, we have to make sure that your main router doesn't assign
addresses to its own clients in that range. For example, if your main router
address is 192.168.0.1, its DHCP address range could be 192.168.0.50 - 192.168.0.120.
4a. In "Setup::Basic setup" screen, set Internet Connection Type to
"Auotomatic Configuration - DHCP".
4b. Set the local IP to 192.168.0.129, assuming your main router is 192.168.0.x
(in general, if your main router is a.b.c.d set the wrt54g to a.b.c.129).
4c. Set the Subnet Mask to 255.255.255.128.
4d. Set the "Gateway" to the IP address of your main router (e.g.
192.168.0.1).
4e. Set the DHCP Server to Enabled, and starting IP Address to something above
129 (e.g. 140).
4f. Save the settings on this page. You may need to reboot the attached PC,
since the subnet mask has changed.
5. In "Setup::Advanced Routing" screen, make sure operating mode is
"Gateway".
6. In "Wireless::Basic Settings" screen, set Wireless mode to
"Client", wireless network mode to "mixed", and SSID to
your main wireless router's SSID.
7. In "Wireless::Security" screen, set yor WEP/WPA settings which
match the main wireless router. You should now be connected to the main
wireless router. Note: if you have MAC filtering set up on the main router
(which allows only specific clients to connect), then obviously you have to add
the client router to the list of allowed clients.
To verify that you've established a connection to the main router, you can
check the "Status::Router" screen, which should show an IP Address
assigned by the main router (which would end with a number below 128), and the
"Status::Wireless" page should show the AP Signal strength together
with the mac address of the main router. Also you should now be able to ping
the main router and even log in to it (using h ttp://192.168.0.1) from the PC
attached to the client router (the wrt54g).
8. In "Security::Firewall" screen, disable firewall protection, as
this subnet is already behind your main router's firewall. Also make sure that
"Block Anonymous Internet Requests" is unchecked.
9. In "Administration::Management" screen, you can leave all settings
at their default. You may want to enable remote management and Telnet or SSHD,
especially if you want to be able to log in to the wrt54g from a computer which
is not directly attached to it.
10. To enable PCs attached to the main router to be able connect to PCs
attached to the wrt54g: Login into the wrt54g using telnel or ssh by running
the command "telnet 192.168.0.129", login as “root” and the same
password as for the web interface. Then type this command:
# echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp
The following command confirms the current contents of the proxy_arp file, “0” on power up, “1” after the command above:
# cat /proc/sys/net/ipv4/conf/eth1/proxy_arp
Now you should be able to ping/telnet to any PC attached to the wrt54g from any
PC attached to the main router. Btw, this assumes that the subnet mask of the
main router is the default 255.255.255.0.
Important note about the last step : The last step (which is an optional
step) allows PCs attached to the main router to be able to connect to PCs
attached to the client router, by specifying the IP of the destination PC, for
example "telnet 192.168.0.150". But they are still on two different
subnets which do not share their broadcast messages, therefore when browsing
PCs on the local network you will not automatically see the PCs attached to the
other router. But you can always connect to them by explicitly specifying the
IP. Btw, this step was added after the initial posting of this HOWTO and solves
a lot of the issues people discussed later in this thread, so don't worry if
you read posts in this thread about problems with communicating between PCs
attached to different routers. Also note that this proxy_arp setting is not
saved in the WRT54G non-volatile memory like all the other settings, so when
the router is rebooted (like after a power outage), it will be cleared and you
will need to repeat step 10 to set the proxy_arp back on.
Done !!! That's it !!!!
So in summary, you don't need two wrt54g routers, nor do you need WDS capable
routers. A single wrt54g (with the right firmware) can operate as a
"client" of any other wireless router, and create a bridge so any
device connected to it will be able to access your network and the internet.
The above works great for me, even with 3-4 PCs attached to the wrt54g
(verified that it works).