Station Mode

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 09:29, 27 December 2010 (edit)
Conjur (Talk | contribs)
(Client Mode Setup)
← Previous diff
Revision as of 00:10, 31 December 2019 (edit) (undo)
Jeremywh7 (Talk | contribs)
m
Next diff →
Line 1: Line 1:
-You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[Linking_Routers|Linking Routers]] / Client Mode'''+'''''Wiki Path''''': [[Main_Page|DD-WRT Wiki Main]] / [[Tutorials]] / [[Linking Routers]] / '''Client Mode'''
---- ----
 +[[image:Client_Bridge.jpg|660px]]<br>
 +The secondary (client) router is unbridged in a different subnet (with NAT), while a [[Client_Bridged|Client Bridge]] is the same subnet as the host.
==Introduction== ==Introduction==
-A router in Client Mode connects to another wireless Access Point (the host router). It uses its wireless connection as the WAN interface, and shares the internet connection only to the LAN ports. It is not seen as an access point by laptops or other computers scanning for AP's and does not accept wireless connections from client devices. The AP is not required to be running DD-WRT firmware. +This mode is NOT for WIRED connections between two routers, like an Access Point. It is a wireless connection between two routers only, usually to the primary gateway router. A Client Mode router connects to a Wireless Access Point (WAP) wireless connection as the WAN interface, and shares the internet connection only to the LAN ports, or a separate WAP for multi-radio routers. It is not seen as a WAP, nor accepts wireless connections by other client devices.
-The main router and secondary router (DD-WRT client mode) are on separate subnets. NAT is used between the routers. Thus, when port forwarding is needed it must be configured at both routers not just on the main (host) router.+The primary (host) router is not required to be running DD-WRT firmware. The primary and secondary (DD-WRT Client Mode) routers must be on separate subnets, and NAT is used between them. Thus, when port forwarding is needed it must be configured at both routers - not just on the host router.
-The router in Client Mode must use its own DHCP server to give out IP numbers, Gateway and DNS server to the devices connected to its LAN ports. +A Client Mode router uses its own DHCP server for IP Address, Gateway, and DNS server to connected devices. To have computers connected to both routers (main and secondary) and co-exist in the same subnet, set up DD-WRT as a [[Client Bridged|Client Bridge]], [[Repeater Bridge]] or use [[WDS_Linked_router_network|WDS]]. Further explanation of bridging modes is at [[Linking_Routers|Linking Routers]].
- +
-To have computers connected to both routers (main and secondary) and co-exist in the same subnet, set up DD-WRT as a [[Client Bridged|Client Bridge]], [[Repeater Bridge]] or use [[WDS_Linked_router_network|WDS]]. Further explanation of bridging modes is in the [[Glossary]].+
 +*'''<font color=darkred>If using a multi-band router, do not set more than one band to CB.</font>''' The other radio(s) would normally be set as ''AP''. For example, the 2.4GHz radio can a CB while the 5GHz is an AP, or vice versa.
==Client Mode Setup== ==Client Mode Setup==
 +Ensure the secondary client router is on a different subnet than the primary host router. Thus, if the primary router IP address is 192.168.'''A'''.x, you need to set the client router to an IP of 192.168.'''B'''.x. For example, if the host router uses 192.168.1.1, configure your client router to e.g. 192.168.2.x.
 +*Broadcom routers: read the [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486 Peacock thread]
 +#Recommended: reset the router
 +#Connect a cable from your computer to the LAN port on your router.
 +#Set your computer to a static IP address (e.g. 192.168.1.7 subnet 255.255.255.0)
 +#Open a web browser and connect to 192.168.1.1 to view the DD-WRT GUI.
 +#Set a username and password, if not asked for this, do a proper reset
 +#Go to ''Wireless->Wireless Security'' and enter the ''Security Mode'' and other information same as Primary
 +#Hit SAVE (not apply)
 +#Go to the ''Wireless->Basic Settings'' and change the ''Wireless Mode'' to "Client"
 +#Set the ''Wireless Network Name (SSID)'' to exactly match the primary router. '''Check spelling and case!'''
 +#*''If multiple routers broadcast the same SSID, to connect to a specific one (i.e. the primary router, instead of a repeater), enable MAC Filtering on the Wireless Tab, and add the specific device's MAC Address.
 +#*MAC Address can be found on the "Site Survey" page, linked from the ''Wireless'' tab in ''Status''
 +#''(Optional)'' If available, in ''Wireless'' tab (or under ''Advanced''), set (or disable) the Ack Timing in meters
 +#Hit SAVE (not apply)
 +#Go to ''Setup->Basic Setup'' and change ''Connection Type'' to ''Static IP'' or "Automatic Configuration - DHCP"
 +#*Static IP allows easier access remote GUI, SSH, or telnet access is enabled under ''Administration''
 +#*If the client router is externally managed (e.g. in a college dorm), go to ''Setup->Basic Setup'', set the WAN port protocol as needed for the AP (usually Static, DHCP, or PPPoE), and enter info provided by your ISP. This is the setting that is bonded to the wireless interface.
 +#*This is what a computer (wired or wireless) connected to the ROUTER would use to gain access to the network, not to be confused with the settings required to gain access to the WAN by the ROUTER.
 +#*The device should be in GATEWAY mode (not ROUTER), otherwise Masquerade/NAT does not happen.
 +#In ''Network Setup'' set the Local IP Address '''to a different subnet''' from the Primary (e.g. 192.168.2.1)
 +#''(Optional)'' Set your gateway to the IP address of your client router (same as the previous step)
 +#''(Optional)'' Set Static DNS servers in the Network Address Server Settings section if your WAN type does not provide them or you want to use different ones than the AP provides.
 +#''(Recommended)'' Change your Time Zone and DST to match where you are.
 +#''(Optional)'' Set a "Server IP/Name" in ''Time Setting'' section for NTP (blank uses a hidden default server)
 +#Hit SAVE (not Apply)
 +#''(Optional)'' In ''Security->Firewall'', disable ''SPI Firewall'' if security between AP & Client is not needed
 +#Hit Apply, then set the computer back to auto IP and DNS if needed (replug the LAN cable if not working)
 +#The Client router should connect to the AP within a minute, otherwise unplug the router for 30 sec
 +#Once connected and working, configure as needed (e.g. Virtual Interface for wireless connection)
-Previously there were overly complex instructions that have been removed. If you would like to see them then use the wiki's page history. This new guide is simpler also fits the needs on devices with only 1 LAN port (e.g. EOC-, Fonera, NS/PS, ...) which would lose connectivity when hit apply with the wrong settings. That is why we hit "save" and not "apply" most of the time!+==Client Restrictions==
- +To allow internet access but prevent ''192.168.1.x'' clients from seeing each other on ''br0'', use this firewall script (iptables):
-The Router/AP that you are trying to connect to is the primary router. The Router you are configuring is the client router. You don't need to worry about the primary router as long as you set your client LAN IP address to a different subnet. What this means is, if the primary router has an IP of 192.168.'''A'''.x, you need to set the client router to an IP of 192.168.'''B'''.x. Most primary routers will be at 192.168.1.1, or 192.168.0.1. So, when you are configuring your client router, set it to 192.168.2.x.+ iptables -I FORWARD -i br0 -d 192.168.1.0/24 -j DROP
- +
-With that in mind, here is how to configure it:+
- +
-# Download the '''current''' recommended build for your router. Check the forum for your chipset to find recommended builds and general information related to your hardware. If you are using a Broadcom based router, read the [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486 peacock thread] prior to starting.+
-# Do a HARD reset on your router.+
-# Connect a cable from your computer to the LAN port on your router.+
-# Set your computer to a static IP address of e.g. 192.168.1.7+
-# Open a web browser and connect to 192.168.1.1 to view the DD-WRT GUI.+
-# You should be asked to change your password and username. Carefully type these in. If you aren't asked for a password and username, do a hard reset, this time doing it properly! Hit change password.+
-# Go FIRST to wireless -> wireless security and enter the security type and key that matches your primary router.+
-# Hit SAVE (not apply) +
-# Go to the wireless basic settings page and change the wireless mode to Client. +
-# Set the wireless network name to exactly the same as your primary router. Make sure spelling and capitalization match.+
-''Note: If there are multiple routers broadcasting the same SSID, and you would like to connect to a specific one (IE, the primary router, instead of the repeater), enable MAC Filtering on the Wireless Tab, and add the MAC Address of the correct Access Point. The MAC Address can be found on the "Site Survey" page, linked from the "Wireless" Sub-tab of the "Status" Tab.'' - Conjur+
-# ''(Optional)'' Set the correct ack timing in meters.+
-# Hit SAVE (not apply)+
-# Go to Setup -> Basic Setup and set the WAN port protocol to what you need for the AP (mostly static, dhcp or pppoe). This is the setting that is bonded to the Wifi interface. Fill in the needed info provided by your ISP if this AP is externally managed. Note: This is what a computer (wired or wireless) connected to the ROUTER would use to gain access to the network, not to be confused with the settings required to gain access to the WAN by the ROUTER.+
-# ''(Optional)'' Set Static DNS servers in the Network Address Server Settings section if your WAN type does not provide them or you want to use different ones than the AP provides.+
-# Change the router LAN IP to 192.168.2.1 (Your LAN subnet '''MUST''' differ from the WAN subnet!).+
-# ''(Optional)'' Check "Assign Wan" port to a switch if you want to be able to use it as another LAN port.+
-# ''(Recommended)'' Change your Time Zone and DST to match where you are.+
-# ''(Optional)'' Set a NTP server address (it will use a hidden default server if you leave it blank).+
-# Hit SAVE (not apply)+
-# ''(Optional)'' Go to Security -> Firewall. Disable the SPI firewall if you do not need to worry about security between the AP and Client router.+
-# Hit Apply.+
-# Set your computer back to auto IP and auto DNS if you like. You will get a DHCP address from the router.+
-You are done and the Client router should connect to the AP within a minute or so. After you ensure that it does connect and work properly then you may configure any other settings you wish to.+==Troubleshooting==
 +If the preceding instructions do not work, it is usually an encryption or password problem. Disable encryption on the primary router and retry the setup. Using proper encryption and the correct case-sensitive password is key. Do a reset and start over. Note: WPA2-AES (aka CCMP) ''is required for 802.11N (and newer) devices''.
-==External Links== 
-*http://www.dd-wrt.com/wiki/index.php?title=Client_Mode&oldid=34051 - Old wiki instructions. 
-*http://forum.bsr-clan.de/ftopic694.html Old forum discussion on topic 
-*http://www.wi-fiplanet.com/tutorials/article.php/3639271 graphical representation 
-[[Category:Wlan]]+[[Category:Wlan]][[Category:Linking Routers]]
-[[Category:Basic tutorials]]+

Revision as of 00:10, 31 December 2019

Wiki Path: DD-WRT Wiki Main / Tutorials / Linking Routers / Client Mode



The secondary (client) router is unbridged in a different subnet (with NAT), while a Client Bridge is the same subnet as the host.

Contents

Introduction

This mode is NOT for WIRED connections between two routers, like an Access Point. It is a wireless connection between two routers only, usually to the primary gateway router. A Client Mode router connects to a Wireless Access Point (WAP) wireless connection as the WAN interface, and shares the internet connection only to the LAN ports, or a separate WAP for multi-radio routers. It is not seen as a WAP, nor accepts wireless connections by other client devices.

The primary (host) router is not required to be running DD-WRT firmware. The primary and secondary (DD-WRT Client Mode) routers must be on separate subnets, and NAT is used between them. Thus, when port forwarding is needed it must be configured at both routers - not just on the host router.

A Client Mode router uses its own DHCP server for IP Address, Gateway, and DNS server to connected devices. To have computers connected to both routers (main and secondary) and co-exist in the same subnet, set up DD-WRT as a Client Bridge, Repeater Bridge or use WDS. Further explanation of bridging modes is at Linking Routers.

  • If using a multi-band router, do not set more than one band to CB. The other radio(s) would normally be set as AP. For example, the 2.4GHz radio can a CB while the 5GHz is an AP, or vice versa.

Client Mode Setup

Ensure the secondary client router is on a different subnet than the primary host router. Thus, if the primary router IP address is 192.168.A.x, you need to set the client router to an IP of 192.168.B.x. For example, if the host router uses 192.168.1.1, configure your client router to e.g. 192.168.2.x.

  1. Recommended: reset the router
  2. Connect a cable from your computer to the LAN port on your router.
  3. Set your computer to a static IP address (e.g. 192.168.1.7 subnet 255.255.255.0)
  4. Open a web browser and connect to 192.168.1.1 to view the DD-WRT GUI.
  5. Set a username and password, if not asked for this, do a proper reset
  6. Go to Wireless->Wireless Security and enter the Security Mode and other information same as Primary
  7. Hit SAVE (not apply)
  8. Go to the Wireless->Basic Settings and change the Wireless Mode to "Client"
  9. Set the Wireless Network Name (SSID) to exactly match the primary router. Check spelling and case!
    • If multiple routers broadcast the same SSID, to connect to a specific one (i.e. the primary router, instead of a repeater), enable MAC Filtering on the Wireless Tab, and add the specific device's MAC Address.
    • MAC Address can be found on the "Site Survey" page, linked from the Wireless tab in Status
  10. (Optional) If available, in Wireless tab (or under Advanced), set (or disable) the Ack Timing in meters
  11. Hit SAVE (not apply)
  12. Go to Setup->Basic Setup and change Connection Type to Static IP or "Automatic Configuration - DHCP"
    • Static IP allows easier access remote GUI, SSH, or telnet access is enabled under Administration
    • If the client router is externally managed (e.g. in a college dorm), go to Setup->Basic Setup, set the WAN port protocol as needed for the AP (usually Static, DHCP, or PPPoE), and enter info provided by your ISP. This is the setting that is bonded to the wireless interface.
    • This is what a computer (wired or wireless) connected to the ROUTER would use to gain access to the network, not to be confused with the settings required to gain access to the WAN by the ROUTER.
    • The device should be in GATEWAY mode (not ROUTER), otherwise Masquerade/NAT does not happen.
  13. In Network Setup set the Local IP Address to a different subnet from the Primary (e.g. 192.168.2.1)
  14. (Optional) Set your gateway to the IP address of your client router (same as the previous step)
  15. (Optional) Set Static DNS servers in the Network Address Server Settings section if your WAN type does not provide them or you want to use different ones than the AP provides.
  16. (Recommended) Change your Time Zone and DST to match where you are.
  17. (Optional) Set a "Server IP/Name" in Time Setting section for NTP (blank uses a hidden default server)
  18. Hit SAVE (not Apply)
  19. (Optional) In Security->Firewall, disable SPI Firewall if security between AP & Client is not needed
  20. Hit Apply, then set the computer back to auto IP and DNS if needed (replug the LAN cable if not working)
  21. The Client router should connect to the AP within a minute, otherwise unplug the router for 30 sec
  22. Once connected and working, configure as needed (e.g. Virtual Interface for wireless connection)

Client Restrictions

To allow internet access but prevent 192.168.1.x clients from seeing each other on br0, use this firewall script (iptables):

iptables -I FORWARD -i br0 -d 192.168.1.0/24 -j DROP

Troubleshooting

If the preceding instructions do not work, it is usually an encryption or password problem. Disable encryption on the primary router and retry the setup. Using proper encryption and the correct case-sensitive password is key. Do a reset and start over. Note: WPA2-AES (aka CCMP) is required for 802.11N (and newer) devices.