Wireless access point

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 02:41, 20 March 2007 (edit)
Ogiller (Talk | contribs)

← Previous diff
Revision as of 17:23, 25 March 2007 (edit) (undo)
Ogiller (Talk | contribs)
m
Next diff →
Line 23: Line 23:
To complete the link between the two routers connect a LAN port on the first router, to a LAN port on the second router. You may need a crossover cable. To complete the link between the two routers connect a LAN port on the first router, to a LAN port on the second router. You may need a crossover cable.
-Modern routers have an automatic polarity sensing. To test this connect an normal ethernet cable between the two routers. If the LAN light comes on then the router has automatically switch the polarity, and a crossover cable is not required.+Modern routers have an automatic polarity sensing. To test this connect an normal ethernet cable between the two routers. If the LAN light comes on then the router has automatically switched the polarity, and a crossover cable is not required.
==LAN uplink through WAN port== ==LAN uplink through WAN port==

Revision as of 17:23, 25 March 2007

If you have a large 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.

Contents

Installation

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 instructions 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 192.168.1.2 and 255.255.255.0 respectively. You should then be able to point your browser at 192.168.1.1.

LAN uplink through LAN port

To complete the link between the two routers connect a LAN port on the first router, to a LAN port on the second router. You may need a crossover cable.

Modern routers have an automatic polarity sensing. To test this connect an normal ethernet cable between the two routers. If the LAN light comes on then the router has automatically switched the polarity, and a crossover cable is not required.

LAN uplink through WAN port

If you use your DD-WRT router as AP only, you may use your DD-WRT router's WAN port to connect it to your existing LAN. To do this, you need to disable the Internet Connection and "assign WAN Port to Switch".

Normally, your router does layer 3 IP routing. By "assigning WAN Port to Switch", your DD-WRT 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.

Alternatively, if you have a router that supports assigning the WAN port to the switch:
Setup -> Basic Setup -> Internet Connection Type -> Connection Type = Disabled
Setup -> Basic Setup -> Network Setup -> WAN Port -> Assign WAN Port to Switch
you can connect the WAN port as your uplink to your main router. All this really buys you is an extra port (4 available instead of 3), but why not?

The WRT54GL, WHR-G54S and Siemens SE505 (only with 10 MBit/s) support this.

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.

It seems that in some cases, the /tmp/udhcpc link doesn't exist. in that case, prepend:
ln -s /sbin/rc /tmp/udhcpc
to your startup script.

Related Forum links

jasonwc documented this well with additional info