You are on page 1of 7

Copyrighted material

HowTo: Connect Two Wireless Router Wirelessly ( Bridge )


With Open Source Software
Posted By nixCraft <webmaster@cyberciti.biz> On August 31, 2012 @ 5:45 am [ 13 Comments ]

Y ou can setup a wireless connection between two routers only so that it will link a wireless network to a wired
network allowing you to bridge two networks with different infrastructure. You can find wireless access points
products that offer either a "bridge" mode or a "repeater" mode. In this post I'm going to explain three popular open
source choices that can be used for setting up a wireless bridge.

Sample setup
Consider the following network diagram:

[1]

Fig.01: Wireless client setup

You connect to the Internet using standalone ADSL2 modem with 202.54.1.1 public IP address.
SSID set to nixcraft on wireless # 1 and an IP address set to 192.168.1.2. This router is located in downstairs and
connected to ADSL2 modem.
SSID set to nixcraft on wireless # 2 and an IP address set to 192.168.1.1. This router works in client bridge mode
and located in upstairs.
All computers and devices connected to wireless router #1 and #2 can share files and other resources with each
other.

[2]

nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 1 of 7


Fig.02: Access point as a wireless bridge

Where,

This setup saves electricity and resources by removing standalone ADSL 2 modem.
You connect to the Internet using combo ADSL2 modem plus wireless router (AP) with 202.54.1.1 public IP
address. This router is called wireless #1 and SSID is set to nixcraft. This device has two IP address and it is
located in downstairs.
SSID set to nixcraft on wireless # 2 and an IP address set to 192.168.1.1. This router works in client bridge mode
and located in upstairs.
All computers and devices connected to wireless router #1 and #2 can share files and other resources with each
other.

Software (3rd party firmware)


You can use the following software / firemware to get the addition features which are not typically included in a
manufacturer's router firmware such as client mode wireless bridge. You can either setup a full WAP or just bridge your
LAN so that wireless devices can get access to all LAN resources transparently.

1. DD-WRT : Linux-based alternative OpenSource firmware for wireless routers. It works for several routers, most
notably the Linksys. It works great with variety of wireless routers and embedded systems. This is recommend for
new users as it comes with easy to use web-gui.
2. Tomato : Another simple and easy to use replacement firmware for Linksys' WRT54G/GL/GS, Buffalo WHR-
G54S/WHR-HP-G54, Asus and other Broadcom-based routers. It features a new easy to use GUI, a new
bandwidth usage monitor, more advanced QOS and access restrictions, enables new wireless features such as
WDS and wireless client modes, raises the limits on maximum connections for P2P, allows you to run your custom
scripts or telnet/ssh in and do all sorts of things like re-program the SES/AOSS button, adds wireless site survey to
see your wifi neighbors, and more. This is recommend for new users as it comes with easy to use web-gui.
3. OpenWrt : OpenWrt is not just firmware but it is often described as a complete Linux distribution for embedded
devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with
package management. This frees you from the application selection and configuration provided by the vendor and
allows you to customize the device through the use of packages to suit any application. This firmware is
recommend for advanced users only.
4. DIY option - You can install Linux or FreeBSD/OpenBSD based operating systems and create a full WAP or just a
bridge. This option requires good understanding of Unix, networks and embedded devices.

I strongly recommend DD-wrt for new users and openwrt for advanced Linux users.

Hardware
I've used the following devices in last couple of years for personal usage:

1. Linksys WRT 54 with DD-WRT firmware.


2. Dlink DIR-615 with DD-WRT firmware.
3. Asus RT 16 with Tomato firmware.
4. Soekris net4801 with DIY option. You can use Debian/Ubuntu/CentOS Linux and FreeBSD/OpeNBSD. This option
is only recommended for advanced hardcore unix users.

You can find list of supported router hardware by visiting the following pages:

Search dd-wrt [3] hardware database.


Search openwrt [4] hardware database.
Search tomato [5] hardware database or read README file.

Example: Configuring Asus RT-16 as a wireless bridge


Let us see how to configure a wireless connection between two routers only as discussed earlier with tomato firmware.

Wireless # 1: ADSL2+router configuration

This is my ADSL 2 modem + wireless router (netgear N600) [6] that connects to my ISP. This is my primary router and it is
called wireless #1. Open a browser and type:
http://192.168.1.2

Make sure LAN setup is as follows:


nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 2 of 7
[7]

Fig.03: Netgear N600 (DGND3700) Static Lan IP Configuration For Wireless Bridge

1. Set the IP address of your router in dotted decimal notation to 192.168.1.2 (factory default: 192.168.0.1).
2. Also set IP subnet mask to 255.255.255.0. Your router will automatically calculate the subnet mask based on the
IP address that you assign. Unless you are implementing subnetting, use 255.255.255.0 as the subnet mask
(computed by the router).

Setup wireless as follows:

[8]

Fig.04: Prepare Netgear N600 / DGND3700 For Wireless Client Bridge Mode

1. Set SSID to nixcraft.


2. Setup mode as per your requirements. I set it to 300Mbps performance mode, with a maximum Wireless-N speed.
3. Set security options to WPA2-PSK standard encryption with the AES encryption type.
4. Finally, set the WPA passphrase (network key) as per your requirements. For demonstration purpose I set it to
"Neil_Armstrong".

Wireless # 2: Router client bridge configuration

I'm assuming that you've already replaced your default firmware with DD-WRT/Tomato/Open-
WRT. In this example, I'm going to use tomato firmware.

How do I use Tomato firmware as wireless ethernet bridge?

Fire a web browser and type the following url:


nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 3 of 7
http://192.168.1.1

Click on Basic > Networking. Make sure LAN is setup as follows:

[9]

Fig.05: Totmato USB firmware LAN setup for wireless bridge

1. Make sure router IP address is set to 192.168.1.1.


2. Make sure subnet is set to 255.255.255.0.
3. Make sure default gateway is set to 192.168.1.2 (IP address of wireless # 1).
4. Make sure static DNS is set to 192.168.1.2 (IP address of wireless # 1). However, you can set it to OpenDNS or
Google DNS.

Scroll down to the Wireless section and set it as follows:

[10]

Fig.06: Tomato wireless settings for br0

1. Set wireless mode to "Wireless Ethernet Bridge".


2. Set wireless network mode to "N only" or as per your requirements.
3. set SSID to "nixcraft".
4. Set security to "WPA-2 Personal" and encryption to "TKIP/AES".
5. Set shared key to WPA passphrase (see Fig.04: Prepare Netgear N600 / DGND3700 For Wireless Client Bridge
Mode [8]). In this example set it to "Neil_Armstrong".

Click on Advanced > Routing:

nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 4 of 7


[11]

Fig.07: Setup tomato in gateway mode

1. Set mode to "Gateway"


2. Make sure RIP1 & v2 set in "Disabled" mode.
3. Turn on "DHCP routes" for dhcp relays i.e. send all dhcp requests to DHCP server located at 192.168.1.2 (or any
other server on LAN)

Click on Advanced > Firewall. Set it as follows:

[12]

Fig.08: Firewall settings for br0

You are done. Configure any other settings you wish at this point. To see current router status click on Status >
Overview:

nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 5 of 7


[13]

Fig.09: Tomato status page - running in a bridge mode

Have any advice for better 3rd party firmware or software? Let's hear them in the comments.

Article printed from www.cyberciti.biz

URL to article: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-


source-software/

URLs in this post:

nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 6 of 7


[1] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/wireless-bridge-with-modem-two-aps/
[2] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/wireless-bridge-with-modem_plus_ap_router-and-access-point/
[3] Search dd-wrt: http://www.dd-wrt.com/site/support/router-database
[4] Search openwrt: http://wiki.openwrt.org/toh/start
[5] Search tomato: http://www.polarcloud.com/tomato
[6] ADSL 2 modem + wireless router (netgear N600): http://www.cyberciti.biz/faq/enable-telnet-access-for-netgear-n600-
adsl-router/
[7] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/netgear-n600-static-lan-ip/
[8] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/netgear-n600-wirless-n-config/
[9] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/tomato-firmware-lan-setup/
[10] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/tomato-wireless-client-bridge-setup/
[11] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/tomato-firmware-client-wireless-bridge-gateway/
[12] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/tomatop-wireless-ethernet-bridge-firewall-settings/
[13] Image: http://www.cyberciti.biz/networking/howto-connect-two-wireless-router-wirelessly-bridge-with-open-source-
software/attachment/tomato-status/

Copyrighted material

Copyright 2004-2014 nixCraft. All rights reserved. This print / pdf version is for personal non-commercial use only. Unless otherwise indicated, the
documents and graphics stored on this Web server, www.cyberciti.biz, are copyrighted. Links to these documents are permitted and encouraged. No
copies may be made without permission. More details - http://www.cyberciti.biz/tips/copyright

nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d- Page 7 of 7

You might also like