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 [2019/12/04 01:51] – [Wi-Fi extender / repeater / bridge configuration] jeff | docs:guide-user:network:wifi:relay_configuration [2024/06/22 06:26] – Final editorial pass richb-hanover | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | <WRAP center round important 80%> | + | This article describes how to make an OpenWrt router into a Wi-Fi repeater/ |
| - | If supported by both devices, consider using [[docs: | + | It makes a Wi-Fi connection to the "main router" |
| + | and acts as an AP (access point) for local devices with another radio. | ||
| + | The extender then relies on the '' | ||
| - | Using relayd as instructed in this article | + | For the sake of simplicity, |
| - | The most common problem | + | This configuration |
| + | where the main router | ||
| + | or does not support preferred [[docs: | ||
| + | or [[docs: | ||
| + | You may also wish to consider using an alternate [[: | ||
| - | Instead of relayd it should be possible to use **kmod-trelay**, | + | There is a Youtube video that shows substantially |
| - | </ | + | https://www.youtube.com/watch? |
| - | In this article you will see how to configure your device to become | + | 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 "W-LAN (Client)" | ||
| + | The Wi-Fi extender's other radio acts as an access point for local devices. | ||
| - | In some cases, the wireless drivers used in OpenWrt do not support "Layer 2" bridging in client mode with a specific " | + | \\ {{ docs: |
| - | When other options don't work or are too complex to implement, | + | Other notes on the configuration: |
| - | For the sake of simplicity, I'll call the device we are working | + | Even though all end devices on the Wi-Fi extender will get a DHCP address from the main router's LAN subnet, |
| + | The rest of this article uses 192.168.2.1 as the "Wi-Fi extender | ||
| - | \\ {{ docs:guide-user: | + | 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 |
| - | This image shows an example setup. | + | The **LAN** interface |
| - | Since both ethernet ports and Access Point Wi-Fi network | + | You may use the same Wi-Fi network |
| + | settings | ||
| + | This allows wireless devices connected | ||
| + | Alternatively, | ||
| + | |||
| + | This procedure has been tested with OpenWrt 23.05.3 | ||
| - | The **LAN** interface subnet will be used only as a " | ||
| - | ===== Required packages | + | ===== Setup with LuCI Web GUI ===== |
| - | ==== Compulsory ==== | + | |
| - | **relayd** package | + | |
| - | ==== Optional ==== | + | |
| - | **luci-proto-relay** - for LuCI Web Interface | + | |
| - | ===== Setup with LuCI Web Interface ===== | + | ==== Configure |
| - | ==== LAN Interface ==== | + | The **LAN** interface |
| - | As shown in the image above, the **LAN** interface must be set in a different subnet than the Wi-Fi network you are connecting to. | + | |
| - | Begin by configuring and enabling the normal | + | * Remove any wired connections between your Wi-Fi extender |
| - | If you are making | + | * Connect |
| - | But you can also choose | + | * (Optional) Update the firmware of the Wi-Fi extender |
| - | Setting up a Wi-Fi network at this stage is not necessary if you want a " | + | * On **System -> Backup/ |
| + | * Go to **Network -> Interfaces**, | ||
| + | * Set **LAN protocol** | ||
| + | * Assign an IP address using the " | ||
| + | * Click **Save and Apply**. | ||
| - | \\ {{ :docs:guide-user:wifirepeater_interfaces_lan.png |}} \\ | + | \\ {{media:docs:howto:relay_lan_changeip.jpg?400|}} \\ |
| - | * Set **LAN protocol** as **static address** | + | ---- |
| - | * Assign an IP address in a different subnet (e.g. 192.168.2.1) | + | |
| - | * Disable DHCP for the **LAN** interface (as it does prevent **relayd** from working). | + | |
| - | * (May be required in certain case) set **Gateway address** and **Use custom DNS servers** using IP address of the primary router (e.g. 192.168.1.1) | + | |
| - | * Save and Apply. | + | |
| + | * Reconnect to router at its new IP address (eg. 192.168.2.1) | ||
| + | * From **Network -> Interfaces**, | ||
| + | * Click the **DHCP Server** tab and disable DHCP, IPv6 RA-Service, and DHCP-v6 Service. To do this: | ||
| + | * On the **General Settings** tab, check the " | ||
| + | * On the **IPv6 Settings** tab, choose " | ||
| + | * See images below | ||
| + | * Click **Save**. | ||
| + | * Click **Save and Apply**. | ||
| + | * Finally, set your PC's Ethernet port to use a static IP in the Wi-Fi extender subnet | ||
| + | (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: | ||
| ---- | ---- | ||
| - | Set your PC's ethernet or Wi-Fi settings at static IP 192.168.2.10 and default gateway 192.168.2.1, | + | \\ {{media: |
| + | |||
| + | ==== Configure | ||
| - | ==== Wi-Fi ==== | + | To configure |
| - | We will now set up the client | + | * Keep your PC connected to the Wi-Fi extender |
| + | * Navigate to the **Network -> Wireless** | ||
| + | * Choose a radio to connect to the main router. Typically this should be a b/g/n radio, since they have longer range than 5GHz radios | ||
| + | * Click on **Scan** button | ||
| - | \\ {{ :docs:guide-user:wifirepeater_joinnetwork_wifi_scan.png |}} \\ | + | \\ {{media:docs:howto:relay_join_wifi_1.jpg?800|}} \\ |
| + | |||
| + | * From the list of SSIDs found in the scan, choose the Wi-Fi SSID from the main router and click **Join Network**. | ||
| - | Choose the Wi-Fi network you want to connect to from the page and click "Join Network" | + | \\ {{media: |
| ---- | ---- | ||
| - | \\ {{ : | ||
| - | Enter the Wi-Fi password, leave the "name of new network" | + | * You'll see the " |
| + | * Set the "Name of new network" | ||
| + | * Enter any Wi-Fi credentials such as WPA passphrase | ||
| + | * Select | ||
| + | * Click **Save**. | ||
| + | * Click **Save & Apply**. | ||
| + | |||
| + | \\ {{media: | ||
| ---- | ---- | ||
| - | \\ {{ : | ||
| - | You will land in the client Wi-Fi settings page, set other things | + | You will see the client Wi-Fi settings page (image below). Edit as required. |
| + | 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 **Width** to the same channel width as the main router | ||
| + | * Keep the same Wi-Fi channel number. The extender must match the main router. | ||
| + | * Click **Save** when finished. | ||
| + | * Click **Save & Apply**. | ||
| - | ==== Repeater Interface | + | \\ {{media: |
| - | Go in the **Interfaces** | + | ==== Remove redundant WAN interface and firewall zones ==== |
| - | Click on **Add New Interface**.\\ | + | |
| + | Although it's optional, it is recommended to delete | ||
| + | |||
| + | * Go to **Network -> Interfaces** | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| - | \\ {{ :docs: | + | **Note:** These actions will also automatically remove any redundant firewall traffic and port forwarding rules. |
| - | Write a name for it (**repeater_bridge** is the name I used in the example), and then choose **Relay bridge** in the **Protocol of the new interface** field. Click **Submit**. | + | \\ {{media: |
| - | ---- | + | \\ {{media:docs:howto:relay_firewall_delete_wan.jpg?800|}} \\ |
| - | \\ {{ :docs:guide-user:wifirepeater_relaybridge1.png |}} \\ | + | ==== Add static IP on wwan ==== |
| + | |||
| + | It is recommended to assign a static IP address to newly created wwan interface. | ||
| + | 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 will also be used later when creating the Relay interface. | ||
| - | In this new interface' | + | |
| + | | ||
| - | This "Local IPv4 address" | + | \\ {{media: |
| - | ---- | + | |
| - | ---- | + | * On the **General Settings** tab, change the protocol to ' |
| + | * Enter an IP address from the main router' | ||
| - | \\ {{ :docs:guide-user:wifirepeater_relaybridge2.png |}} \\ | + | \\ {{media:docs:howto:relay_wwan_static_2.jpg?500|}} \\ |
| - | Move to the Firewall tab of this interface settings page and select **lan**. Click on **Save and Apply**. | + | |
| - | ---- | + | * 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** | ||
| - | ---- | + | \\ {{media: |
| + | ==== Test Connection ==== | ||
| - | After you have done this, it might be necessary to reboot | + | At this point, the Wi-Fi extender |
| + | To verify the the connection: | ||
| + | * Go to **Network -> Diagnostics** | ||
| + | * Perform a ping test by clicking the "IPv4 Ping" button. | ||
| + | * A few moments later, you should see ping results if the main router is connected to the internet. | ||
| + | * | ||
| + | \\ {{media: | ||
| - | \\ {{ : | + | ==== Install relayd package ==== |
| - | This is the final result. Note how the client network has a ? instead | + | * Go to **System -> Software**. |
| + | * Click **Update List** button. If the Wi-Fi extender | ||
| + | * Enter **luci-proto-relay** into the Filter box (image below), and click **Install**. | ||
| + | * When that completes, reboot the router from **System -> Reboot** (image below). | ||
| - | ==== Firewall ==== | + | \\ {{media: |
| - | :!: The following part of the configuration should not be necessary (already default options or changed automatically), | + | \\ {{media:docs:howto: |
| - | \\ {{ : | + | ==== Create Relay Interface ==== |
| - | Under the **Network** tab, click on the **Firewall** tab. Under **Zones**, change the forwarding for **lan** and **wwan** to **accept** | + | |
| - | ---- | + | Add the '' |
| - | :!: if you are doing this with a device that has a single | + | * Go to **Network |
| + | * Click on **Add New Interface** (image below) | ||
| + | |||
| + | \\ {{media: | ||
| + | * In the **Add new interface** window (image below) | ||
| + | * Enter a name (" | ||
| + | * Select **Relay bridge** protocol as shown below. (Reboot your device if the **Relay bridge** option fails to appears.) | ||
| + | * Click **Create Interface** | ||
| + | |||
| + | \\ {{media: | ||
| + | |||
| + | * In **Network | ||
| + | * Enter the IP address assigned to the '' | ||
| + | * Select both **lan** and **wwan** in the **Relay between networks** list. | ||
| + | * Click **Save**. | ||
| + | * 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 | ||
| + | * 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 | ||
| + | * Click **Save & Apply**. | ||
| + | |||
| + | ==== You're Done - More Testing ==== | ||
| + | |||
| + | 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 | ||
| + | because its '' | ||
| + | |||
| + | \\ {{media: | ||
| ===== Setup with CLI ===== | ===== Setup with CLI ===== | ||
| - | Before doing any actual configuration, | + | |
| + | Before doing any actual configuration, | ||
| <code bash> | <code bash> | ||
| Line 217: | 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 ===== |
| - | With this setup your OpenWrt device | + | ==== Accessing the Extender |
| + | If you find the Wi-Fi extender | ||
| + | (The alternative is tedious: | ||
| - | < | + | ==== Check Firewall zones ==== |
| - | iface eth0 inet dhcp | + | |
| - | gateway 192.168.1.1 | + | |
| - | auto eth0:1 | + | :!: The following part of the configuration should not be necessary (already default options or changed automatically), |
| - | iface eth0:1 inet static | + | |
| - | address 192.168.2.102 | + | |
| - | netmask 255.255.255.0 | + | |
| - | broadcast 192.168.2.255 | + | |
| - | </ | + | |
| - | //[If someone can describe a solution without modifications to the client network configuration that would be appreciated!]// | + | \\ {{media: |
| + | \\ | ||
| + | ---- | ||
| + | \\ {{media: | ||
| - | ===== Adding IPv6 support | + | ==== Adding IPv6 support ==== |
| Activate IPv6 support on your Internet box, this will get you a public IPv6 prefix. We will now activate IPv6 on our Wi-Fi extender to allow for [[https:// | Activate IPv6 support on your Internet box, this will get you a public IPv6 prefix. We will now activate IPv6 on our Wi-Fi extender to allow for [[https:// | ||
| Line 250: | Line 361: | ||
| We suppose that you created a '' | We suppose that you created a '' | ||
| - | That's it. Restart '' | + | That's it. Restart '' |
| + | |||
| + | ==== Known Issues ==== | ||
| + | |||
| + | Here are a list of some recently reported issues: | ||
| + | |||
| + | - DHCP issue caused by Access Point. [[https:// | ||
| + | - Extremely poor upstream transfer speeds with some MT762x devices. [[https:// | ||
| + | - [[https:// | ||
| + | - [[https:// | ||
| + | - Additional instruction for backdoor to router since once dhcp is disabled on LAN, the router become unreachable. | ||
| + | - Connect a computer using ethernet cable to LAN port of the Wifi bridge. | ||
| + | - Configure a static IP address on the computer. eg. if the Wifi bridge uses LAN IP address of 192.168.2.1 in above example, use static IP address: 192.168.2.10. | ||
| + | - Access LuCI at 192.168.2.1 for above example. | ||
| + | - [[https:// | ||
| + | - Alternative detailed Relayd setup instructions can also be found in section 9.10 of the [[https:// | ||
| + | - IPv6 on macOS 10.15+ does not work with a ULA prefix set on LAN [[https:// | ||
| + | |||
| + | ==== Using NAT ==== | ||
| + | |||
| + | **<color # | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | This method basically puts a second Wi-Fi router in cascade on the first one; i.e. usually this means that the extender' | ||
| - | ===== Wi-Fi extender with NAT (or what to do when all else fails) ===== | ||
| - | This method basically puts a second Wi-Fi router in cascade on the first.\\ | ||
| It's like connecting with a cable the WAN port on the Wi-Fi extender to the LAN ports of the main router, the Wi-Fi extender creates a new network for itself and the devices connected to it, that can go on the Internet and reach devices in the LAN network of the main router. But in this case we are doing it with wireless networks instead. | It's like connecting with a cable the WAN port on the Wi-Fi extender to the LAN ports of the main router, the Wi-Fi extender creates a new network for itself and the devices connected to it, that can go on the Internet and reach devices in the LAN network of the main router. But in this case we are doing it with wireless networks instead. | ||