Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
| zh:docs:guide-user:network:wifi:relay_configuration [2020/03/25 06:18] – 修正一些细节翻译 chaircat | zh:docs:guide-user:network:wifi:relay_configuration [2021/07/01 09:13] – keep up to the last version biaji | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| <WRAP center round important 80%> | <WRAP center round important 80%> | ||
| - | 本文中以relayd为基础的实现不保证一定能用。\\ | + | If supported by both devices, consider using [[docs: |
| + | |||
| + | 本文中以relayd为基础的实现不保证一定能用且只适用于IPv4。\\ | ||
| 最常见的问题是,作为客户端的路由无法在主路由和连接至客户端路由的客户端(设备)之间正常传递DHCP消息。目前看来,问题在于硬件/ | 最常见的问题是,作为客户端的路由无法在主路由和连接至客户端路由的客户端(设备)之间正常传递DHCP消息。目前看来,问题在于硬件/ | ||
| 您可以考虑使用[[docs: | 您可以考虑使用[[docs: | ||
| Line 21: | Line 23: | ||
| \\ {{ docs: | \\ {{ docs: | ||
| - | 上图展示了一个示例配置。wifi扩展器的**LAN**接口**必须**配置为不同的子网,否则realyd无法正常工作(因为它需要两个不同的子网来进行路由)。 | + | 上图展示了一个示例配置。Wi-Fi扩展器的**LAN**接口**必须**配置为不同的子网,否则realyd无法正常工作(因为它需要两个不同的子网来进行路由)。 |
| + | |||
| + | 因为有线端口和无线网络均属于同一个**LAN**接口,所有连接至Wi-Fi扩展器有线端口和无线网络的客户端将由**relayd**进行路由,进而连接到您的主网。 | ||
| - | 因为有线端口和无线网络均属于同一个**LAN**接口,所有连接至WiFi扩展器有线端口和无线网络的客户端将由**relayd**进行路由,进而连接到您的主网。 | + | **LAN**接口所配置的子网将只被用作“管理”网段,而连接到Wi-Fi扩展器的设备则会被分配到主网段。您必须给您的PC设置一个和**LAN**接口同网段的静态IP地址(比如192.168.2.10)以便再次连接到Wi-Fi扩展器的管理界面或SSH。\\ |
| - | **LAN**接口所配置的子网将只被用作“管理”网段,而连接到wifi扩展器的设备则会被分配到主网段。您必须给您的PC设置一个和**LAN**接口同网段的静态IP地址(比如192.168.2.10)以便再次连接到wifi扩展器的管理界面或SSH。\\ | + | ===== 使用relayd ===== |
| + | ==== 需要安装的包 ==== | ||
| + | **relayd**包当然是必装的。如果您想使用Luci图形界面来配置您的wifi扩展器,还需要安装**luci-proto-relay**包。 | ||
| - | ===== 必须安装的包 ===== | ||
| - | 您必须安装**relayd**包以实现本文讨论的方法。 | ||
| - | 如果您想使用Luci图形界面来配置您的wifi扩展器,还需要安装**luci-proto-relay**包。 | ||
| - | ===== 使用Luci图形界面进行设置 ===== | + | ==== 使用Luci |
| - | 如上图所示,**LAN**接口必须设置一个与您将连接的wifi网段不同的子网。 | + | === LAN接口 |
| + | As shown in the image above, the **LAN** | ||
| - | Begin by configuring and enabling the normal | + | Begin by configuring and enabling the normal |
| - | If you are making a simple | + | If you are making a simple |
| But you can also choose to have a different name/ | But you can also choose to have a different name/ | ||
| - | Setting up a WiFi network at this stage is not necessary if you want a "WiFi bridge", | + | Setting up a Wi-Fi network at this stage is not necessary if you want a "Wi-Fi bridge", |
| \\ {{ : | \\ {{ : | ||
| - | Set LAN as static address 192.168.2.1 | + | * Set **LAN protocol** |
| + | * Assign an IP address in a different subnet (e.g. 192.168.2.1) | ||
| + | * Disable | ||
| + | * (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. | ||
| ---- | ---- | ||
| + | Set your PC's ethernet or Wi-Fi settings at static IP 192.168.2.10 and default gateway 192.168.2.1, | ||
| - | Set your PC's ethernet or wifi settings at static IP 192.168.2.10 and default gateway 192.168.2.1, | + | === Wi-Fi === |
| - | + | We will now set up the client | |
| - | We will now set up the client | + | |
| \\ {{ : | \\ {{ : | ||
| - | Choose the wifi network you want to connect to from the page and click "Join Network" | + | Choose the Wi-Fi network you want to connect to from the page and click "Join Network" |
| ---- | ---- | ||
| - | |||
| \\ {{ : | \\ {{ : | ||
| - | Enter the wifi password, leave the "name of new network" | + | Enter the Wi-Fi password, leave the "name of new network" |
| ---- | ---- | ||
| - | |||
| - | ---- | ||
| - | |||
| \\ {{ : | \\ {{ : | ||
| - | You will land in the client | + | You will land in the client |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ---- | + | |
| + | === 扩展器接口 === | ||
| Go in the **Interfaces** page, we will now add the relayd interface that will join the **lan** and **wwan** interfaces.\\ | Go in the **Interfaces** page, we will now add the relayd interface that will join the **lan** and **wwan** interfaces.\\ | ||
| Click on **Add New Interface**.\\ | Click on **Add New Interface**.\\ | ||
| Line 76: | Line 77: | ||
| \\ {{ : | \\ {{ : | ||
| - | 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**. | + | 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**. |
| - | ---- | + | You may need to reboot your device before the **Relay bridge** option appears. |
| + | ---- | ||
| \\ {{ : | \\ {{ : | ||
| In this new interface' | In this new interface' | ||
| - | This interface | + | This "Local IPv4 address" |
| ---- | ---- | ||
| Line 96: | Line 98: | ||
| ---- | ---- | ||
| - | After you have done this, it might be necessary to reboot the wifi extender. | + | After you have done this, it might be necessary to reboot the Wi-Fi extender. |
| \\ {{ : | \\ {{ : | ||
| Line 102: | Line 104: | ||
| This is the final result. Note how the client network has a ? instead of a IP address. | This is the final result. Note how the client network has a ? instead of a IP address. | ||
| - | ---- | + | === 防火墙 === |
| - | + | ||
| - | ---- | + | |
| :!: The following part of the configuration should not be necessary (already default options or changed automatically), | :!: The following part of the configuration should not be necessary (already default options or changed automatically), | ||
| Line 112: | Line 112: | ||
| ---- | ---- | ||
| + | :!: 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. | ||
| - | ---- | + | ==== 用命令行进行设置 ==== |
| - | :!: if you are doing this with a device that has a single radio, both wifi networks will stay on the same channel, and total bandwith will be halved as the same radio is used for 2 different wifi networks. | + | Before |
| - | + | < | |
| - | + | uci set wireless.@wifi-device[0].disabled="0" | |
| - | ===== 用命令行进行设置 ===== | + | |
| - | + | ||
| - | Before doing any actual configuration, | + | |
| - | + | ||
| - | < | + | |
| uci commit wireless | uci commit wireless | ||
| - | wifi</ | + | wifi |
| + | </ | ||
| * Set the disabled option to 0 (to enable wireless) | * Set the disabled option to 0 (to enable wireless) | ||
| Line 135: | Line 132: | ||
| '' | '' | ||
| - | < | + | < |
| + | # iw dev wlan0 scan | ||
| BSS c8: | BSS c8: | ||
| TSF: 24324848870 usec (0d, 06:45:24) | TSF: 24324848870 usec (0d, 06:45:24) | ||
| Line 181: | Line 179: | ||
| * Pairwise ciphers: TKIP CCMP | * Pairwise ciphers: TKIP CCMP | ||
| * Authentication suites: PSK | * Authentication suites: PSK | ||
| - | * Capabilities: | + | * Capabilities: |
| + | </ | ||
| - | In the example, there are two networks, a Wifi g one called Violetta and a Wifi n one called GOinternet_EB20FB. | + | In the example, there are two networks, a Wi-Fi g one called Violetta and a Wi-Fi n one called GOinternet_EB20FB. |
| The device was configured to connect to the one called Violetta. | The device was configured to connect to the one called Violetta. | ||
| These are the uci values that were added or changed by the configuration procedure.\\ | These are the uci values that were added or changed by the configuration procedure.\\ | ||
| - | For SSID, BSSID, and encryption you must use the info you got from the wifi scan above.\\ | + | For SSID, BSSID, and encryption you must use the info you got from the Wi-Fi scan above.\\ |
| For an explanation of why these values were changed, please read the luci tutorial above.\\ | For an explanation of why these values were changed, please read the luci tutorial above.\\ | ||
| - | < | + | < |
| + | network.lan.ipaddr=' | ||
| network.repeater_bridge=interface | network.repeater_bridge=interface | ||
| network.repeater_bridge.proto=' | network.repeater_bridge.proto=' | ||
| Line 218: | Line 218: | ||
| </ | </ | ||
| - | Please note that the wifi network generated by the device in this example (the one called OpenWrt) has no password nor encryption.\\ | + | Please note that the Wi-Fi network generated by the device in this example (the one called OpenWrt) has no password nor encryption.\\ |
| This was done because the focus of this article was getting the relay bridge up and running.\\ | This was done because the focus of this article was getting the relay bridge up and running.\\ | ||
| - | You will likely want to set up your device' | + | You will likely want to set up your device' |
| - | ===== 访问OpenWrt设备 ===== | + | ==== 访问OpenWrt设备 ==== |
| + | If you find the OpenWrt device itself is only accessible from those computers directly connected to the W-LAN AP, not from the ones connected to the OpenWrt W-LAN client, when in the 192.168.1.0 subnet, Make sure the '' | ||
| + | (The alternative is tedious: It is possible to access the OpenWrt box via its '' | ||
| - | With this setup your OpenWrt device itself may only be accessible from those computers directly connected to the W-LAN AP, not from the ones connected to the OpenWrt W-LAN client only, when in the 192.168.1.0 subnet. It is however still possible to access the OpenWrt box via its '' | + | ==== 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 | |
| - | < | + | |
| - | iface eth0 inet dhcp | + | |
| - | gateway 192.168.1.1 | + | |
| - | + | ||
| - | auto eth0:1 | + | |
| - | 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!]// | + | |
| - | + | ||
| - | ===== 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 WiFi Extender | + | |
| 1. Go to Network / Interfaces and create a new interface. Name it '' | 1. Go to Network / Interfaces and create a new interface. Name it '' | ||
| Line 248: | Line 234: | ||
| 3. Open a SSH session on your OpenWrt device. Issue the following commands:\\ | 3. Open a SSH session on your OpenWrt device. Issue the following commands:\\ | ||
| - | < | + | < |
| uci set dhcp.wan.interface=wwan | uci set dhcp.wan.interface=wwan | ||
| uci set dhcp.wan.ra=relay | uci set dhcp.wan.ra=relay | ||
| Line 255: | Line 241: | ||
| uci commit | uci commit | ||
| </ | </ | ||
| - | We suppose that you created a '' | + | We suppose that you created a '' |
| + | |||
| + | 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:// | ||
| + | - Need additional instruction for backdoor to router since once dhcp is disabled on LAN, the router become unreachable | ||
| - | That's it. Restart '' | ||
| - | ===== 用NAT实现Wifi扩展器(如果别的方法都不行)===== | + | ===== 使用NAT ===== |
| 这个方法就是单纯的将第二个无线路由配置在第一个的层级之下。\\ | 这个方法就是单纯的将第二个无线路由配置在第一个的层级之下。\\ | ||