Wireless access point

From DD-WRT Wiki

Revision as of 19:03, 9 July 2006 by BrainSlayer (Talk | contribs)
Jump to: navigation, search


Summary -- why would you want to do this

If you have a larger network, for which dd-wrt is not a suitable core router you will probably want to have wireless clients be a part of the larger network. In this case, clients would get DHCP configuration from some other DHCP server, and could be accessed by other clients on the network.

Some colleges that still allow students to have their own wireless access points require that they not hand out private DHCP addresses (as dhcp does by default) because it makes it difficult to track down which wireless client is causing problems (eg. has a virus.)

Typically vendors such as Linksys charge more for devices which work as access points rather than routers because routers are typically used by home users and APs by businesses. With dd-wrt you can buy a device marketed as a router and use it as an AP.

How to set up dd-wrt as an access point

There are three basic configuration changes required to set up your router as an access point.

Turn off DHCP

If you do not turn off DHCP, when you plug your router into the network (later) you will give other clients on the wired network ip addresses which are inappropriate for that network. This will make your network administrator VERY unhappy. (This is true even if you are your network administrator, as it will make you unhappy.)

Because its so important I'll repeat myself. Turn off DHCP before you continue.

Set the IP address of the LAN Interface

Preferably immediately after turning off DHCP, while you still have the ip address the AP gave you, set the ip address of the LAN interface to the ip address you want the AP to use. Alternatively you can use the instuctions below to set the APs ip address via DHCP.

If you can't connect to the AP to set the ip address, it is probably because your computer no longer has an IP address on the same subnet. Simply set your computer's ip address and subnet to and respectivly. You should then be able to point your browser at

Plug in your router to one of the LAN ports

Plug the LAN port of your router to the network port on your existing wired network. Yes, I meant the LAN port.

Normally, your router does layer 3 IP routing. By plugging into the lan port, your router will bypass that functionality and just pass on the layer 2 ethernet packets from your wired network to the wireless network and vice versa.

How to use DHCP to set the AP's IP Address

It is not possible to set the lan interface to get its IP address via DHCP using the web interface. You can, however, set your startup script to obtain an ip address.

Simply set your IP Address to:

udhcpc -i br0 -p /var/run/udhcpc.pid -s /tmp/udhcpc -H test-wrt-wireless
hostname `nslookup \`ifconfig br0 | grep 'inet addr' |cut -f 2 -d ':'\` | grep 'Name:' | awk '{print $2;}' | cut -f 1 -d '.'`
if test `hostname` != `nvram get wan_hostname`; then nvram set wan_hostname=`hostname`; nvram set router_name=`hostname`; nvram commit; fi

Only the first line is required if you don't want your AP to set its name based on the ip address it gets. However if you want to save a configuration file which will apply to several APs, that can be a handy feature.