DD-WRT as a Wireless Access Point and DHCP Client

This ‘HowTo’ describes how to to set up DD-WRT to be a stand alone access point and use DHCP to get it’s LAN address.  (For those that don’t know, DD-WRT is an operating system that can be put on many popular over the counter routers to replace the default OS.  The basic purpose is to enhance the capabilities of that hardware – make it do something it may not normally be able to do.  We have also used the technique to ‘standardize’ the interfaces of dissimilar hardware.)  The topic has been discussed elsewhere and those discussions usually finish with ‘Why would you want to do that’?  In our environment, we need the device to be a DHCP client because of our highly sub-netted network.  No matter where the device is plugged in, it will pull an address and allow remote management.

For the purposes of this discussion, we are using a Cisco LinkSYS E2000 with DD-WRT version v24-SP2.  Regardless of the hardware, the instructions should work on the same DD-WRT version.  These are basic instructions and may not take in to account specific environmental needs.

  1. First do a ‘hard reset’ (look up 30/30/30 on the DD-WRT site)
  2. Connect to the ‘dd-wrt’ device, then connect to the router through a web browser (  The built in DHCP server will work for now.
  3. Disable the WAN connection (Setup->Basic Setup->WAN Connection Type:  Disabled)
  4. Change the Router Name (Setup->Basic Setup->Router Name: <whatever> – this is helpful later)
  5. Assign WAN port to Switch (Setup->Basic Setup->Assign WAN Port to Switch: Check – Optional, but I like to do this to gain the extra port)
  6. Disable DHCP Server (Setup->Basic Setup->DHCP Server:  Disable)
  7. Optionally set up NTP
  8. Change Operating Mode to ‘Router’ (Setup->Advanced Routing->Operating Mode:  Router)
  9. Set Wireless SSID (Wireless->Basic Settings->Wireless Network Name:  <your SSID>)
  10. Set Wireless Security (Wireless->Wireless Security [It’s optional, but just do it.])
    1. Recommend WPA2, AES, Complex key
  11. Disable DNSMasq (Services->Services->DNSMasq: Disable)
  12. Disable Firewall (Security->Firewall->SPI Firewall:  Disable)
  13. Disable Routing (Administration->Management->Routing:  Disable)
  14. Set Wireless Power (Wireless->Advanced Settings->TX Power:  50mW)
    1. This may be specific to this model of hardware, but it’s not a bad idea anyway
  15. Save & Apply

That was easy – now the tricky bit:

You can’t set DD-WRT to use DHCP for the LAN interface from the web.  You can, however, configure a start-up script to accomplish the same thing.  This is done from Administration->Commands – Copy in the following code and save it as the startup script.

ln -s /sbin/rc /tmp/udhcpc
/usr/sbin/udhcpc -i br0 -p /var/run/udhcpc.pid -s /tmp/udhcpc -H `nvram get router_name`
route add default gw `nvram get wan_gateway`
nvram set wds_watchdog_ips="`nvram get wan_gateway`"

# Config DNS
/bin/cat /etc/resolv.conf | /bin/grep -v nameserver > /tmp/resolv.conf
/bin/echo nameserver `nvram get wan_get_dns` >> /tmp/resolv.conf
/bin/cp /tmp/resolv.conf /etc/resolv.conf

This is where setting the router name helps (step 4): This is now the name that will show up in the DHCP logs, if that’s what you are looking at.

4 comments to DD-WRT as a Wireless Access Point and DHCP Client

  • Hey, really like the blog, wordpress?

  • admin

    Yes, this is wordpress. I have used a bunch of different CMS products, and while they all have pros & cons, I find WP is the best for what I need.

  • WildDave

    Just wanted to say thanks! I came across this in a search when I was inserting a pass-thru router with a long-range antenna to connect an existing router (that was previously connected directly to an ISP) to another router (currently connected to an ISP.) It saved me a lot of time and it worked perfectly.

  • Jim

    Thanks man! I followed your guide and it solved my problem, I was having trouble of DHCP getting through from my modem/router to my wireless devices going through my dd-wrt router. Thanks again.