OpenWrt WDS

Archived

This page has been archived and will receive no further updates.

WDS (wireless distribution system)

WDS is one way to extend a wireless network by adding an additional wireless router.

⚠️ WDS seems to suffer from frequent loss of network connectivity between the routers and as such cannot be recommended. A superior option would be a wireless mesh such as the 802.11s mesh in OpenWrt or mesh functionality of vendor-provided firmware.

Prerequisites:

  • The routers must all use the same chipset family (e.g. Qualcomm Atheros)
  • All routers must be explicitly configured as a WDS AP (access point) or WDS client, otherwise devices on one router may not be able to communicate with devices on the other

References:

On the secondary router:

  1. Disable DHCP server

    1. Network > Interfaces > LAN > Edit
    2. Under DHCP Server > General Setup check Ignore interface
    3. Under DHCP Server > IPv6 Settings
      1. Set Router Advertisement-Service to disabled
      2. Set DHCPv6-Service to disabled
    4. Save & Apply
  2. Set a static IP on the same network as the primary router

    Make sure you use a different IP as the primary router (e.g. 192.168.0.2)

    1. Network > Interfaces > LAN > Edit
    2. Change IPv4 address
    3. Save & Apply
    4. Wait until the configuration has been applied; if you see Configuration has been rolled back!, click Apply unchecked
    5. Connect to the device at the new address
  3. Configure the primary wireless network on the secondary router for WDS

    While it’s possible to use one wireless network in OpenWrt that serves as both a WDS client/AP and an AP for wireless clients, this seems to exacerbate WDS connection issues between the routers. Here we will create one wireless network for WDS and another for clients.

    1. Network > Wireless > Edit (at this point there should only be one network on the wireless interface)
    2. Under Interface Configuration > General Setup

      1. Set Mode to Access Point (WDS)
      2. Set ESSID to a different value than the SSID used by the primary router

        This is a safeguard to prevent clients from connecting to this network

      3. Make sure Network is set to lan

        This will make sure the firewall doesn’t block the WDS connection between the secondary and primary routers

    3. Under Wireless Security

      1. Set Encryption to a security mechanism supported by the primary router

      2. Set Key to a different value from the key used by the primary network

        This is another safeguard to prevent clients to connecting to this network

    4. Save & Apply
      • If you’re connected wirelessly and you see Configuration has been rolled back!, either use a wired connection or click Apply unchecked and connect using the new SSID and key to do the remaining steps
  4. Add a secondary wireless network for clients

    In OpenWrt when you disable the primary network, the secondary network BSSID changes to the previous BSSID of the primary network. This will break WDS, but clients typically won’t care. By having the clients connect to the secondary network, the client network can be disabled without breaking the WDS connection between the two routers.

    1. Network > Wireless > Add
    2. Under Interface Configuration > General Setup

      1. Set Mode to Access Point
      2. (Recommended) Set ESSID to the same SSID as the primary router

        This will make the network look like the same network as the primary router so clients can automatically use either one

      3. Set Network to lan

        This should ensure that devices that connect to the secondary router won’t get blocked by the firewall from seeing devices on the primary router

    3. Under Wireless Security

      1. Set Encryption and Key to the same values as the primary wireless network

        This is required if you use the same SSID

    4. Save & Apply
  5. Configure DNS forwarding

    1. Network > DHCP and DNS
    2. Set DNS forwardings to the IP address of the primary router
    3. Save & Apply
  6. Configure IPv4 gateway

    1. Network > Interfaces > LAN > Edit
    2. Set IPv4 gateway to the IP address of the primary router
    3. Save & Apply
  7. Enable Spanning Tree Protocol

    1. Network > Interfaces > LAN > Edit
    2. Go to the Physical Settings tab
    3. Check Enable STP
    4. Save & Apply
  8. (Recommended) Schedule a periodic wireless restart

    WDS seems to frequently lose connectivity between the two routers and the only way to resolve this seems to be by restarting the wireless network on the WDS AP

    1. System > Scheduled Tasks
    2. Create a scheduled task to periodically restart the wireless

      For example, this will ping the primary router once every 10 minutes and restart the wireless if it fails:

      */10 * * * * /bin/ping -c 1 192.168.0.1 || (/sbin/wifi down && /sbin/wifi up)
      

      Or you could restart the wireless every day at 6:05:

      5 6 * * * /sbin/wifi down && /sbin/wifi up
      
    3. Submit
    4. Restart the cron service

      System > Startup > find cron and click Restart

On the primary router:

  1. Configure the primary router as a WDS client according to the vendor’s documentation

On the secondary router:

  1. (Recommended) Hide the SSID

    This is another safeguard to prevent clients to connecting to this network

    1. Network > Wireless
    2. Click Edit by the WDS network
    3. Under Interface Configuration > General Setup check Hide ESSID

Set up a secondary router as a WDS client

https://openwrt.org/docs/guide-user/network/wifi/atheroswds#luci

⚠️ This is only recommended if the stock firmware on the primary router has support for running as a WDS access point or if you do not have administrative access to the primary router. If the stock firmware on the primary router does not have support for running as a WDS access point, devices connected to the primary router may be unable to see devices on the secondary router (e.g. network printers or the secondary router admin interface).

On the primary router:

  1. Configure the primary router to act as a WDS access point
    • If the primary router only has an option to “enable” WDS, this may actually configure it as a client. If so, follow the steps in the above section instead.

On the secondary router:

  1. Follow all of these steps using the instructions in the previous section:

    1. Disable DHCP server
    2. Set a static IP on the same network as the primary router
    3. Configure DNS forwarding
    4. Configure IPv4 gateway
    5. Enable Spanning Tree Protocol
  2. Join the network of the primary router

    This creates a new wireless network on the secondary router that acts as a client of the network on the primary router

    1. Network > Wireless > Scan
    2. Find the network of the primary router and click Join Network
    3. Enter the WPA passphrase of the existing network
    4. Set the firewall zone to lan
    5. Submit
    6. Under Device Configuration and Operating frequency set Channel to auto
    7. Under Interface Configuration change Mode to Client (WDS)
    8. Under Interface Configuration change Network to lan
    9. Save & Apply
  3. (Recommended) Remove the wwan interface

    This gets automatically created when you join the network of the primary router and can be safely removed

    1. Network > Interfaces
    2. By WWAN click Delete > OK
  4. (Recommended) Rename the secondary router SSID

    If you wish for the secondary router to use the same SSID so it looks like part of the same network for clients:

    1. Network > Wireless
    2. By the network for the secondary router (the one with Mode: Master) click Edit
    3. Under Interface Configuration set ESSID to the same SSID as the primary router
    4. Save & Apply
    5. Wait until the configuration has been applied; if you see Configuration has been rolled back!, click Apply unchecked