Universal Wireless Repeater

From DD-WRT Wiki

Revision as of 17:39, 3 December 2006 by Marcjohnson (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

This How-To provides step-by-step instructions for creating a Universal Wireless Repeater appliance: a device that you can place anywhere and it will wirelessly repeat the strongest signal, onto another wireless network (with or without security). This functionality is also known as Wireless Client Bridge, or Range Expander. Unlike WDS, once you have this appliance setup, it will work with any open network. I wanted to create a very simple appliance my friends could use to improve their wireless network connection.

Prerequisites

  • Know how to use and access Web Interface
  • Know how to flash your device.

It takes me just a couple minutes to follow these instructions (but I've done this before).

Instructions


1. Install DD-WRT v24 or newer (v23 will not work). (Temporarily keep ethernet cable connected to setup router across wireless network changes).

2. Go to tab "Setup", sub-tab "Basic Setup":

  • Change "local IP address" to a unique subnet (different than device you wish to repeat), such as 192.168.69.1.
  • Save settings.

Image:Uwr_screen1.JPG

3. Go to tab "Security", sub-tab "Firewall":

  • Disable all check boxes and set firewall to "disable".
  • Save settings.

Image:Uwr_screen2.JPG

4. Go to tab "Wireless", sub-tabe "Basic Settings":

  • Set Wireless Mode to "Repeater"
  • Click on "Add" under Virtual Interfaces, and enter an SSID (such as "repeater") and set "Wireless Network Name (SSID)" to the network you wish to repeat (and AP Isolation is "disabled" and Network Configuration is "Bridged"). If you want the source network (the one your repeating) to be dynamically acquired, see step 5 or 6 below.
  • Optional: Set Wireless Channel to "Auto" (or your preferred channel), and set Sensitivy Range to "0" for performance enhancements.
  • Click "Save Settings".

Image:Uwr_screen3.JPG

5. To repeat any network dynamically (make this a universal wireless repeater), the following will make the repeater connect to the first available SSID:

  • Go to tab "Administration", subtab "Command".
  • Copy and paste the following into the edit box:
nvram set wl_ssid=""
nvram commit
  • Click the Save Startup.
  • Note: this will not automatically repeat secure/encrypted networks. If your source network uses WEP or WPK, enter this info in step 4 instead.

Image:Uwr_screen5.JPG

  • UPDATE: In the current version of dd-wrt v24beta, sometimes repeater mode drops the client. Created a workaround script ("dhcp_kick.sh") that improves reliability by pinging the gateway and sending a signal to udhcpc (on the router) to force renew. In repeater mode testing the script decreases dropped packets from >10% to <1%, and almost completely eliminates client disconnects. To use this script ("dhcp_kick.sh), use a startup like as follows:
  • Copy and paste the following into the edit box:
nvram set wl_ssid=""
nvram commit
`cd /tmp; until [ 2 = 1 ];do /bin/sleep 30;
/usr/bin/wget http://www.marcjohnson.com/code/dhcp_kick.sh;
chmod 777 ./dhcp_kick.sh;./dhcp_kick.sh;done` & 
  • Click the Save Startup.


6. If you wish to dynamically repeat the STRONGEST signal (a more sophisticated version of #5):

  • Go to tab "Administration", subtab "Command".
  • Copy and paste the following into the edit box (make sure to get the "&" at the end):
nvram set wl_ssid=""
nvram commit
`cd /tmp;mkdir www;ln -s /tmp/autoap.log /tmp/www/repeater.html;
until [ 2 = 1 ];do /bin/sleep 30;
/usr/bin/wget http://www.marcjohnson.com/code/autoap_kick.sh;
chmod 777 ./autoap_kick.sh;./autoap_kick.sh;done` & 
  • Click the Save Startup.

Image:Uwr_screen6.jpg
(The above startup script does this: clearing wl_ssid causes router to dynamically connect to any open AP. Every 30 seconds, router tries to download script. Once downloaded, a webpage link is created to the log, and the script runs in the background which connects based on strongest signal and kicks dhcp.)

  • The startup script also creates a web link to the status. After rebooting the router, repeater status will then be available at http://YourRouterIP/user/repeater.html which will look like this:
Image:Uwr weblog.JPG
  • Note: Modified the original autoap.sh script to keep the log files to 100 lines, use dhcp_kick (per #5 UPDATE above), check for duplicate instance, and correct weblog linking. These custom mods are in the example and here: http://www.marcjohnson.com/code/autoap_kick.sh
  • This "autoap" functionality may be built into future releases of dd-wrt. If, autoap is built into the image or you use JFFS2 or Samba, the wget example above won't be necessary (you'll be able to directly call autoap) - but it works for now in memory strapped Buffalo. More info about autoap project: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=6575&postdays=0&postorder=asc&start=0


7. If you want your repeated network to be private (for your use only):

  • Go to tab "Wireless", sub-tab "Wireless Security".
  • Setup WEP (or other security) as you normally do.
  • Configure your client/computer to use the same security.

Image:Uwr_screen4.JPG

  • Notice in the screenshot above you may also configure security for the physical interface (source) network if you wish to repeat a secure network. In the example this is disabled. If you enable this, the dynamic repeating functionality described in #5 and #6 above may not work (since you're hard configuring the source network).


8. For repeater performance enhancements (OPTIONAL and at your OWN RISK):

  • Go to tab "Administration", subtab "Management". Enter the following values under 'IP Filter Settings':
  TCP Timeout (s): 90
  UDP Timeout (s): 90
  • Go to administration tab, subtab "Command": Edit the existing command text and paste the following into the edit box before the existing commands (created in #5 and #6 above):
  echo '600 1800 120 60 120 120 10 60 30 120' > /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts
  • Go to tab "Wireless", subtab "Advanced Settings". Set "Beacon Interval" to a lower value (like 50 or 75).
  • Go to tab "Administration" and subtab "Management" and set overclocking frequency to a higher value than default.
  • Go to tab "Wireless" and subtab "Advanced" and boost xmit power to higher than default.

9. The first time you connect to the repeater (wirelessly), or after disconnect, you may need to perform a "repair wireless network connection". For example, in XP, right click on the wireless icon and select "Repair".

Todo

The reliability of repeater mode could be improved slightly (as of dd-wrt 24beta). Currently there are workarounds documented in #5 and #6 above. Your testing results and enhancements are appreciated.

Please reply to this thread with your contributions to UWR: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=42375#42375

For contributions to autoap: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=6575&postdays=0&postorder=asc&start=0