Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:wifi:relay_configuration [2024/02/15 05:56] – [RELAYD - Historically used as a Wi-Fi extender] Change title. use relayd where mesh and wds not possible. bill888 | docs:guide-user:network:wifi:relay_configuration [2024/06/22 06:26] – Final editorial pass richb-hanover | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== Wireless Repeater/ |
| - | **RELAYD**// | + | This article describes how to make an OpenWrt router into a Wi-Fi repeater/extender/bridge. |
| - | \\ | + | It makes a Wi-Fi connection to the "main router" |
| - | Relayd may be used where the Access Point does not run OpenWrt, or does not support WDS/802.11s Mesh. \\ | + | and acts as an AP (access point) for local devices with another radio. |
| - | \\ | + | The extender then relies on the '' |
| - | You may also wish to consider using [[: | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | <WRAP center round important 90%> | + | |
| - | **WARNING: Relayd is rarely needed, if at all, with modern wireless drivers.** | + | |
| - | Using relayd as instructed in this article | + | For the sake of simplicity, |
| + | This configuration is useful where you do not control the main router, | ||
| + | where the main router does not run OpenWrt, | ||
| + | or does not support preferred [[docs: | ||
| + | or [[docs: | ||
| + | You may also wish to consider using an alternate [[: | ||
| - | If supported by both devices, consider using [[docs:guide-user:network: | + | There is a Youtube video that shows substantially the same procedure as described below: |
| + | https://www.youtube.com/ | ||
| - | If vlan support | + | The image below shows the normal configuration. |
| + | The "main router" | ||
| + | and its LAN port (192.168.1.1/ | ||
| + | The Wi-Fi extender is on the left. | ||
| + | It makes a wireless connection (labeled | ||
| + | The Wi-Fi extender' | ||
| + | \\ {{ docs: | ||
| - | The most common problem is that the client router cannot pass the DHCP message between the main router and the client connected to the client router. Currently it seems to be the hardware/ | + | Other notes on the configuration: |
| - | Instead of relayd it should be possible to use **kmod-trelay**, | + | Even though all end devices on the Wi-Fi extender |
| - | </ | + | The rest of this article uses 192.168.2.1 as the "Wi-Fi extender subnet" |
| - | + | ||
| - | In this article you will see how to configure your device to become a Wi-Fi extender/ | + | |
| - | + | ||
| - | In some cases, the wireless drivers used in OpenWrt do not support "Layer 2" bridging in client mode with a specific " | + | |
| - | + | ||
| - | When other options don't work, the **relayd** package implements a bridge-like behavior for IPv4 (only), complete with DHCP and broadcast relaying. This configuration can be done through SSH (remote terminal) or through Luci GUI. | + | |
| - | + | ||
| - | /*** | + | |
| - | For the sake of simplicity, I'll call the device we are working on "Wi-Fi extender" from now on. | + | |
| - | ***/ | + | |
| - | + | ||
| - | \\ {{ docs: | + | |
| - | + | ||
| - | This image shows an example setup. **LAN** interface of the relayd device | + | |
| Since both ethernet ports and Access Point Wi-Fi network are on the same **LAN** interface, all clients connecting to the Ethernet ports and to the Access Point Wi-Fi network of the Wi-Fi extender device will be routed by **relayd** and will be connected to your main network. | Since both ethernet ports and Access Point Wi-Fi network are on the same **LAN** interface, all clients connecting to the Ethernet ports and to the Access Point Wi-Fi network of the Wi-Fi extender device will be routed by **relayd** and will be connected to your main network. | ||
| - | The **LAN** interface subnet will be used only as a " | + | The **LAN** interface subnet will be used only as a " |
| - | ===== Using relayd ===== | + | You may use the same Wi-Fi network name (SSID) and encryption, password, etc. |
| - | ==== Required packages ==== | + | settings on the Wi-Fi extender as your main router. |
| - | **relayd** package is of course needed, and **luci-proto-relay** is optional for the LuCI Web Interface. \\ | + | This allows wireless devices connected to your (wider) |
| - | \\ | + | Alternatively, |
| - | Disconnect this router from your main network | + | |
| + | This procedure has been tested with OpenWrt 23.05.3 | ||
| - | Alternatively, | ||
| + | ===== Setup with LuCI Web GUI ===== | ||
| - | ==== Setup with LuCI Web Interface ==== | + | ==== Configure LAN Interface ==== |
| - | Updated with new screenshots from OpenWrt 21.02. \\ | + | The **LAN** interface of the Wi-Fi extender must be set in a different subnet than the main router. |
| - | \\ | + | |
| - | \\ | + | |
| - | To build a simple Wi-Fi repeater (a device that extends | + | |
| - | \\ | + | |
| - | Alternatively, | + | |
| - | \\ | + | |
| - | Setting up a Wi-Fi network at this stage is not necessary if you just want a "Wifi bridge" | + | |
| - | \\ | + | |
| - | For simplicity and best chance of success, the instructions below are only for setting up a Wifi bridge device. A computer with an ethernet connection is required. \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | === LAN Interface === | + | * Remove any wired connections between your Wi-Fi extender and your main router. |
| - | \\ | + | * Connect a computer with Ethernet to a LAN port on the Wi-Fi extender and log into LuCI web UI at 192.168.1.1 (default address) |
| - | As shown in the above image, the **LAN** | + | * (Optional) Update |
| + | * On **System -> Backup/ | ||
| + | * Go to **Network -> Interfaces**, | ||
| + | * Set **LAN protocol** to **static address**, click **Change protocol** | ||
| + | * Assign an IP address using the "Wi-Fi extender subnet" | ||
| + | * Click **Save and Apply**. | ||
| - | /*** | + | \\ {{media: |
| - | < | + | |
| - | ***/ | + | |
| - | + | ||
| - | /*** old LEDE17 image | + | |
| - | \\ {{ : | + | |
| - | ***/ | + | |
| - | + | ||
| - | * Do NOT wire the router to your main router. | + | |
| - | * Reset the router to return to default openwrt settings. | + | |
| - | * Connect a computer to a LAN port and log into LuCI web UI at 192.168.1.1. | + | |
| - | * Set **LAN protocol** as **static address** (default setting) | + | |
| - | * Assign an IP address in a **different** subnet (e.g. 192.168.2.1). Click **Save**. | + | |
| - | + | ||
| - | \\ {{media: | + | |
| - | * Click **Save and Apply**. | + | |
| ---- | ---- | ||
| * Reconnect to router at its new IP address (eg. 192.168.2.1) | * Reconnect to router at its new IP address (eg. 192.168.2.1) | ||
| - | * Disable DHCP for the **LAN** interface as shown below (Otherwise, it does prevent | + | * From **Network -> Interfaces**, |
| - | * < | + | |
| + | * On the **General Settings** tab, check the " | ||
| + | * On the **IPv6 Settings** tab, choose " | ||
| + | * See images below | ||
| + | * Click **Save**. | ||
| + | * Click **Save and Apply**. | ||
| + | | ||
| + | (e.g., 192.168.2.10) and default gateway (e.g., 192.168.2.1), | ||
| + | then connect again to the Wi-Fi extender via Ethernet. | ||
| \\ {{media: | \\ {{media: | ||
| Line 96: | Line 76: | ||
| \\ {{media: | \\ {{media: | ||
| - | * Click **Save and Apply**. | + | ==== Configure Wi-Fi Interface ==== |
| - | ---- | + | |
| - | \\ | + | To configure the Wi-Fi connection to the main router. |
| - | * Set your PC's ethernet port with a static IP 192.168.2.10 and default gateway 192.168.2.1, | + | * Keep your PC connected |
| - | \\ | + | * Navigate to the **Network -> Wireless** page |
| - | When you finish all of the following steps, remember | + | * Choose a radio to connect |
| + | * Click on **Scan** button for that radio. | ||
| - | \\ | + | \\ {{media: |
| - | \\ | + | |
| + | * From the list of SSIDs found in the scan, choose the Wi-Fi SSID from the main router and click **Join Network**. | ||
| - | ---- | + | \\ {{media: |
| - | + | ||
| - | === Wi-Fi === | + | |
| - | + | ||
| - | \\ | + | |
| - | We will now set up the client Wi-Fi network, the configuration needed to connect to another Wi-Fi network.\\ | + | |
| - | * Disconnect any ethernet cable between this router and the main router | + | |
| - | * Navigate to the wireless networks page, and click on **Scan** button for the desired radio.\\ | + | |
| - | + | ||
| - | /*** old LEDE17 image | + | |
| - | \\ {{ : | + | |
| - | ***/ | + | |
| - | \\ {{media: | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | * Choose the Wi-Fi network you want to connect to from the page and click **Join Network**.\\ | + | |
| - | \\ {{media: | + | |
| - | \\ | + | |
| - | \\ | + | |
| ---- | ---- | ||
| - | /*** | + | |
| - | \\ {{ :docs:guide-user: | + | * Set the "Name of new network" |
| - | ***/ | + | * Enter any Wi-Fi credentials such as WPA passphrase |
| + | * Select **lan** firewall zone. | ||
| + | * Click **Save**. | ||
| + | * Click **Save & Apply**. | ||
| - | * Enter the Wi-Fi password, leave the "name of new network" | ||
| - | * Click **Save**. | ||
| - | * Click **Save & Apply**.\\ | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | ||
| - | \\ | ||
| ---- | ---- | ||
| - | /*** old LEDE17 image | ||
| - | \\ {{ : | ||
| - | ***/ | ||
| - | You will land in the client Wi-Fi settings page. Edit as required.\\ | + | You will see the client Wi-Fi settings page (image below). Edit as required. |
| - | The most important settings are on the **Operating Frequency** line.\\ | + | The most important settings are on the **Operating Frequency** line. |
| + | |||
| * Set the **Mode** to **Legacy** if you are connecting to a Wi-Fi g network, or **N** if you are connecting to a Wi-Fi n (and so on).\\ | * Set the **Mode** to **Legacy** if you are connecting to a Wi-Fi g network, or **N** if you are connecting to a Wi-Fi n (and so on).\\ | ||
| - | * Set the **Width** to the same value that you set on the Wi-Fi you are connecting to (to avoid bottlenecking | + | * Set the **Width** to the same channel width as the main router |
| - | * Do **NOT** change the wifi channel number ! | + | * Keep the same Wi-Fi channel number. The extender must match the main router. |
| - | \\ | + | * Click **Save** when finished. |
| - | \\ | + | |
| \\ {{media: | \\ {{media: | ||
| - | | + | ==== Remove redundant WAN interface and firewall zones ==== |
| - | * Click **Save & Apply**. \\ | + | |
| - | \\ | + | Although it's optional, it is recommended to delete the redundant WAN interfaces and firewall zones. |
| - | \\ | + | |
| + | | ||
| + | * Delete both '' | ||
| + | * Go to **Network > Firewall** (image below) | ||
| + | * Delete the '' | ||
| + | * Click **Save & Apply** | ||
| - | ---- | + | **Note:** These actions will also automatically remove any redundant firewall traffic and port forwarding rules. |
| - | === Removing redundant WAN interface and firewall zones (Optional) === | ||
| - | |||
| - | \\ | ||
| - | \\ | ||
| - | Although not absolutely necessary, it is recommended to delete the redundant WAN interfaces and firewall zones. \\ | ||
| - | \\ | ||
| - | * Go to Network Interfaces: | ||
| - | \\ | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | ||
| - | ---- | ||
| - | |||
| - | \\ | ||
| - | * Go to Network Firewall: | ||
| - | \\ | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | + | ==== Add static IP on wwan ==== |
| - | Click **Save & Apply** button. \\ | + | |
| - | \\ | + | It is recommended to assign a static IP address to newly created wwan interface. |
| - | **<color # | + | This should be in the same subnet as the main router' |
| - | \\ | + | You can then manage the router using this static IP address. |
| - | \\ | + | This static IP address |
| - | \\ | + | |
| - | \\ | + | |
| - | ---- | + | * Go to **Network |
| + | * Click **Edit** for the '' | ||
| - | === Configure static IP address on wwan interface === | ||
| - | |||
| - | \\ | ||
| - | It is recommended to assign a static IP address to newly created wwan interface. (eg. 192.168.1.30) \\ | ||
| - | The main advantage is it will be possible to manage the router using this static IP address. | ||
| - | This static IP address will also be used later when creating the Relay interface. \\ | ||
| - | |||
| - | * Go to Network Interfaces menu and click **Edit** | ||
| \\ {{media: | \\ {{media: | ||
| - | ---- | + | * On the **General Settings** tab, change the protocol to ' |
| + | * Enter an IP address from the main router' | ||
| - | \\ | ||
| - | * Change the protocol to ' | ||
| - | * Enter valid IP address (eg. 192.168.1.30), | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | ||
| - | * Press **Save** | ||
| - | \\ | ||
| - | ---- | + | * On the **Advanced Settings** tab (image below) |
| + | * Set **Use custom DNS Servers** to the IP address of the main router (e.g., 192.168.1.1). | ||
| + | * Press **Save** | ||
| + | * Press **Save & Apply** | ||
| - | \\ | ||
| - | * Enter DNS server IP address (eg. LAN IP address of your main wifi router) | ||
| - | * Click on green + button. | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | + | ==== Test Connection ==== |
| - | * Press **Save** | + | |
| - | * Press **Save & Apply**. | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | \\ | + | |
| - | ---- | + | At this point, the Wi-Fi extender should be wirelessly connected to the main router. |
| - | + | To verify the the connection: | |
| - | === Testing Connection === | + | * Go to **Network |
| - | + | * Perform | |
| - | \\ | + | * A few moments later, you should see ping results if the main router is connected to the internet. |
| - | To verify the newly configured static IP address parameters are valid, \\ | + | * |
| - | * Go to Network Diagnostics | + | |
| \\ {{media: | \\ {{media: | ||
| - | \\ | ||
| - | \\ | ||
| - | ---- | + | ==== Install relayd package ==== |
| - | === Installing relayd package === | + | * Go to **System -> Software**. |
| + | * Click **Update List** button. If the Wi-Fi extender is connected to the main router, and that is connected to the internet, a few moments later, the results of the update appears. | ||
| + | * Enter **luci-proto-relay** into the Filter box (image below), and click **Install**. | ||
| + | * When that completes, reboot the router from **System -> Reboot** (image below). | ||
| - | \\ | + | \\ {{media: |
| - | * Go to System Software page. | + | |
| - | * Click **Update List** button. | + | |
| - | * Enter **luci-proto-relay** into the Filter box, and click Install. | + | |
| - | \\ {{media: | ||
| - | \\ | ||
| - | * **Important: | ||
| - | \\ | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | ||
| - | \\ | ||
| - | ---- | + | ==== Create Relay Interface ==== |
| - | + | Add the '' | |
| - | \\ | + | * Go to **Network -> Interfaces** |
| - | + | * Click on **Add New Interface** | |
| - | === Creating Relay Interface === | + | |
| - | + | ||
| - | \\ | + | |
| - | To add the relayd interface that will join/bridge the **lan** and **wwan** interfaces.\\ | + | |
| - | * Go in the **Interfaces** | + | |
| - | * Click on **Add New Interface**. | + | |
| - | + | ||
| - | /*** old LEDE17 | + | |
| - | \\ {{ : | + | |
| - | ***/ | + | |
| \\ {{media: | \\ {{media: | ||
| - | ---- | + | * In the **Add new interface** window (image below) |
| - | \\ | + | * Enter a name (" |
| - | \\ | + | * Select |
| - | | + | |
| * Click **Create Interface** | * Click **Create Interface** | ||
| + | |||
| \\ {{media: | \\ {{media: | ||
| - | ---- | + | |
| - | \\ | + | |
| - | \\ | + | * Enter the IP address assigned to the '' |
| - | | + | * Select both **lan** and **wwan** in the **Relay between networks** list. |
| - | * Select both **lan** and **wwan** in the **Relay between networks** list. | + | |
| - | \\ {{media: | + | |
| * Click **Save**. | * Click **Save**. | ||
| * Click **Save & Apply**. | * Click **Save & Apply**. | ||
| + | * After you have completed above steps, reboot the router. | ||
| - | \\ | + | \\ {{media: |
| - | \\ | + | |
| + | ==== Enable the AP ==== | ||
| + | Enable and configure the Wi-Fi extender to be an access point for local devices. | ||
| + | * Go to **Network -> Wireless** | ||
| + | * Click **Edit** button for any item with **Mode: Master**. (Don't edit your Client connection to the main router.) | ||
| + | * In the Interface Configuration section, configure SSID, security and other parameters of your Wi-Fi extender so it can act like an access point. | ||
| + | * If you are configuring the same radio that also serves as the client connection to the main router, ensure the **Operating frequency** matches the Client network. | ||
| + | * Click **Save** | ||
| + | * **Enable** the wireless network. | ||
| + | * You might edit/enable other radios (for example, enabling both the b/g/n and n/ | ||
| + | * Click **Save & Apply**. | ||
| - | ---- | + | ==== You're Done - More Testing ==== |
| - | /*** old LEDE17 image | + | |
| - | \\ {{ : | + | |
| - | **/ | + | |
| + | After configuring the Wi-Fi extender' | ||
| + | and connect to the newly-configured Wi-Fi. | ||
| + | Your computer should be fully on the internet, having acquired a DHCP IP address from your main router. | ||
| + | The Wi-Fi extender can be managed through its static '' | ||
| - | /*** | + | The **Status -> Overview** window (image below) shows the final result. |
| - | < | + | '' |
| + | '' | ||
| + | The client Wi-Fi has a ? in the **Host** column instead | ||
| + | because its '' | ||
| - | ---- | ||
| - | |||
| - | ---- | ||
| - | < | ||
| - | |||
| - | ***/ | ||
| - | |||
| - | /*** old LEDE17 image. Redundant. | ||
| - | \\ {{ : | ||
| - | ***/ | ||
| - | |||
| - | |||
| - | ---- | ||
| - | |||
| - | ---- | ||
| - | |||
| - | * After you have completed above steps, reboot the router. | ||
| - | \\ | ||
| - | **<color # | ||
| - | |||
| - | When the Wifi bridge is powered up, your computer should acquire DHCP IP address from your main router. \\ | ||
| - | The Wifi bridge can be managed through its static wwan IP address (eg. 192.168.1.30) \\ | ||
| - | \\ | ||
| - | \\ | ||
| - | \\ | ||
| - | This is the final result. Note how the client network has a ? instead of a IP address. \\ | ||
| - | The wwan IP address is only visible in the Network Interfaces page.\\ | ||
| - | |||
| - | /*** old LEDE17 image | ||
| - | \\ {{ : | ||
| - | ***/ | ||
| \\ {{media: | \\ {{media: | ||
| - | \\ | + | ===== Setup with CLI ===== |
| - | \\ | + | |
| - | + | ||
| - | + | ||
| - | === Check Firewall zone settings === | + | |
| - | + | ||
| - | :!: The following part of the configuration should not be necessary (already default options or changed automatically), | + | |
| - | + | ||
| - | + | ||
| - | /*** old LEDE17 image | + | |
| - | \\ {{ : | + | |
| - | ***/ | + | |
| - | + | ||
| - | \\ {{media: | + | |
| - | \\ | + | |
| - | ---- | + | |
| - | \\ {{media: | + | |
| - | + | ||
| - | \\ | + | |
| - | \\ | + | |
| - | /*** redundant instructions | + | |
| - | + | ||
| - | Under the **Network** tab, click on the **Firewall** tab. Under **Zones**, change the forwarding for **lan** and **wwan** to **accept** | + | |
| - | + | ||
| - | ---- | + | |
| - | :!: if you are doing this with a device that has a single radio, both Wi-Fi networks will stay on the same channel, and total bandwidth will be halved as the same radio is used for 2 different Wi-Fi networks. | + | |
| - | + | ||
| - | ***/ | + | |
| - | ==== Setup with CLI ==== | + | |
| Before doing any actual configuration, | Before doing any actual configuration, | ||
| Line 464: | Line 330: | ||
| You will likely want to set up your device' | You will likely want to set up your device' | ||
| - | ==== Accessing the OpenWrt device | + | ===== Troubleshooting ===== |
| - | If you find the OpenWrt device | + | ==== Accessing the Extender |
| + | If you find the Wi-Fi extender | ||
| (The alternative is tedious: It is possible to access the OpenWrt box via its '' | (The alternative is tedious: It is possible to access the OpenWrt box via its '' | ||
| + | |||
| + | ==== Check Firewall zones ==== | ||
| + | |||
| + | :!: The following part of the configuration should not be necessary (already default options or changed automatically), | ||
| + | |||
| + | \\ {{media: | ||
| + | \\ | ||
| + | ---- | ||
| + | \\ {{media: | ||
| ==== Adding IPv6 support ==== | ==== Adding IPv6 support ==== | ||
| Line 503: | Line 379: | ||
| - IPv6 on macOS 10.15+ does not work with a ULA prefix set on LAN [[https:// | - IPv6 on macOS 10.15+ does not work with a ULA prefix set on LAN [[https:// | ||
| - | ===== Using NAT ===== | + | ==== Using NAT ==== |
| **<color # | **<color # | ||