| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| pt-br:docs:guide-user:network:wifi:relay_configuration [2020/06/02 00:13] – [Wi-Fi] malves | pt-br:docs:guide-user:network:wifi:relay_configuration [2020/06/04 01:44] – [Known Issues] malves |
|---|
| \\ {{ :docs:guide-user:wifirepeater_joinnetwork_settings.png |}} \\ | \\ {{ :docs:guide-user:wifirepeater_joinnetwork_settings.png |}} \\ |
| |
| Digite a senha do Wi-Fi, deixe o "nome da nova rede" como "wwan" e selecione **lan** na zona de firewall. Clique em Salvar.\\ | Digite a senha do Wi-Fi, deixe o "nome da nova rede" como "wwan" e selecione **lan** na zona de firewall. Clique em Submit.\\ |
| |
| ---- | ---- |
| |
| Você chegará à página de configurações de Wi-Fi do cliente, definirá outras coisas conforme necessário.\\ As configurações mais importantes estão na linha **Operating Frequency **.\\ Defina o **Mode** como **Legacy** se você estiver se conectando a uma rede Wi-Fi g (como no meu exemplo) ou **N** se estiver se conectando a uma rede Wi-Fi n (e assim por diante).\\ Defina **Largura** como mesmo valor que você definiu no Wi-Fi ao qual está se conectando (para evitar gargalos na conexão sem motivo). | Você chegará à página de configurações de Wi-Fi do cliente, definirá outras coisas conforme necessário.\\ As configurações mais importantes estão na linha **Operating Frequency **.\\ Defina o **Mode** como **Legacy** se você estiver se conectando a uma rede Wi-Fi g (como no meu exemplo) ou **N** se estiver se conectando a uma rede Wi-Fi n (e assim por diante).\\ Defina **Largura** como mesmo valor que você definiu no Wi-Fi ao qual está se conectando (para evitar gargalos na conexão sem motivo). |
| ==== Repeater Interface ==== | ==== Interface do repetidor ==== |
| Go in the **Interfaces** page, we will now add the relayd interface that will join the **lan** and **wwan** interfaces.\\ | Vá para a página **Interfaces**, agora adicionaremos a interface relayd que se juntará às interfaces **lan** e **wwan**.\\ Clique em **Add New Interface**.\\ |
| Click on **Add New Interface**.\\ | |
| \\ {{ :docs:guide-user:wifirepeater_newinterface.png |}} \\ | \\ {{ :docs:guide-user:wifirepeater_newinterface.png |}} \\ |
| |
| 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**. | Escreva um nome para ele (**repeater_bridge** é o nome que usei no exemplo) e escolha **Relay bridge** no campo **Protocol of the new interface**. Clique em **Submit**. |
| |
| ---- | ---- |
| \\ {{ :docs:guide-user:wifirepeater_relaybridge1.png |}} \\ | \\ {{ :docs:guide-user:wifirepeater_relaybridge1.png |}} \\ |
| |
| In this new interface's setting page, select both **lan** and **wwan** in the **Relay between networks** list. | Na página de configuração desta nova interface, selecione **lan** e **wwan** na lista **Relay between networks**. |
| |
| This "Local IPv4 address" (empty in above screen shot, sorry, I don't have enough rights to upload a new screen shot) needs to match the IP address assigned by the Wifi-network (eg. from 192.168.1.0/24 range, but do not enter the netmask here!) otherwise this bridge will not be accessible from the clients connected directly to the primary router and the relayd-daemon will not start. It makes sense to either fixate the IP in the DHCP servers MAC-IP mapping table or configure then WWAN interface of OpenWRT to a fix IP which is not being used in Wifi-networks DHCP-range (I used 192.168.1.2, as my DHCP server only serves IP addresses higher than 192.168.1.100). | Este "endereço IPv4 local" (vazio na captura de tela acima, desculpe, não tenho direitos suficientes para carregar uma nova captura de tela) precisa corresponder ao endereço IP atribuído pela rede Wifi (por exemplo, de 192.168.1.0/24, mas não insira a máscara de rede aqui!) caso contrário, essa ponte não estará acessível a partir dos clientes conectados diretamente ao roteador principal e o relayd-daemon não será iniciado. Faz sentido fixar o IP na tabela de mapeamento MAC-IP dos servidores DHCP ou configurar a interface WWAN do OpenWRT para um IP fixo que não está sendo usado no intervalo DHCP das redes Wifi (usei 192.168.1.2, como meu DHCP servidor serve apenas endereços IP superiores a 192.168.1.100). |
| ---- | ---- |
| |
| |
| \\ {{ :docs:guide-user:wifirepeater_relaybridge2.png |}} \\ | \\ {{ :docs:guide-user:wifirepeater_relaybridge2.png |}} \\ |
| Move to the Firewall tab of this interface settings page and select **lan**. Click on **Save and Apply**. | Vá para a guia Firewall desta página de configurações da interface e selecione **lan**. Clique em **Save and Apply**. |
| ---- | ---- |
| |
| ---- | ---- |
| |
| After you have done this, it might be necessary to reboot the Wi-Fi extender. | Depois de fazer isso, pode ser necessário reiniciar o extensor de Wi-Fi. |
| |
| \\ {{ :docs:guide-user:wifirepeater_final_result.png |}} \\ | \\ {{ :docs:guide-user:wifirepeater_final_result.png |}} \\ |
| |
| This is the final result. Note how the client network has a ? instead of a IP address. | Esse é o resultado final. Observe como a rede do cliente possui uma? em vez de um endereço IP. |
| |
| ==== Firewall ==== | ==== Firewall ==== |
| |
| :!: The following part of the configuration should not be necessary (already default options or changed automatically), in case something isn't working check this too. | :!: A parte a seguir da configuração não deve ser necessária (já as opções padrão ou alteradas automaticamente), caso algo não esteja funcionando, verifique isso também. |
| |
| \\ {{ :docs:guide-user:wifirepeater_firewall.png |}} \\ | \\ {{ :docs:guide-user:wifirepeater_firewall.png |}} \\ |
| Under the **Network** tab, click on the **Firewall** tab. Under **Zones**, change the forwarding for **lan** and **wwan** to **accept** | No menu **Network**, clique em **Firewall**. Em **Zones**, altere o encaminhamento para **lan** e **wwan **para **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. | :!: se você estiver fazendo isso com um dispositivo que possui um único rádio, as duas redes Wi-Fi permanecerão no mesmo canal e a largura de banda total será reduzida pela metade, pois o mesmo rádio é usado para duas redes Wi-Fi diferentes. |
| |
| ===== Setup with CLI ===== | ===== Configuração com CLI ===== |
| Before doing any actual configuration, the Wi-Fi interface must be enabled in order to be able to scan for networks in the vincinity: | Antes de fazer qualquer configuração real, a interface Wi-Fi deve estar ativada para poder procurar redes na proximidade: |
| |
| <code bash> | <code bash> |
| </code> | </code> |
| |
| * Set the disabled option to 0 (to enable wireless) | * Defina a opção desativada como 0 (para ativar a conexão sem fio) |
| * Save changed configuration file | * Salvar arquivo de configuração alterado |
| * Start wireless using the //wifi// command | * Inicie a conexão sem fio usando o comando //wifi// |
| |
| Now we can list networks in range using ''iw dev wlan0 scan'', substituting your actual wireless interface for //wlan0// if different (''ifconfig'' lists all available interfaces to find how your wlan is called) | Agora podemos listar redes no intervalo usando ''iw dev wlan0 scan'', substituindo //wlan0// por sua interface sem fio real, se diferente (''ifconfig'' lista todas as interfaces disponíveis para descobrir como sua wlan é chamada) |
| |
| ''iw dev wlan0 scan'' output example:\\ | ''iw dev wlan0 scan'' exemplo de saída:\\ |
| |
| <code bash> | <code bash> |
| </code> | </code> |
| |
| In the example, there are two networks, a Wi-Fi g one called Violetta and a Wi-Fi n one called GOinternet_EB20FB. | No exemplo, existem duas redes, uma Wi-Fi g chamada Violetta e uma Wi-Fi n chamada GOinternet_EB20FB. O dispositivo foi configurado para conectar-se a chamada 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.\\ | Esses são os valores de uci que foram adicionados ou alterados pelo procedimento de configuração.\\ |
| For SSID, BSSID, and encryption you must use the info you got from the Wi-Fi scan above.\\ | Para SSID, BSSID e criptografia, você deve usar as informações obtidas na verificação Wi-Fi acima. \\ |
| For an explanation of why these values were changed, please read the luci tutorial above.\\ | Para uma explicação de por que esses valores foram alterados, leia o tutorial do luci acima.\\ |
| |
| <code bash> | <code bash> |
| </code> | </code> |
| |
| Please note that the Wi-Fi network generated by the device in this example (the one called OpenWrt) has no password nor encryption.\\ | Observe que a rede Wi-Fi gerada pelo dispositivo neste exemplo (a chamada OpenWrt) não possui senha nem criptografia.\\ |
| This was done because the focus of this article was getting the relay bridge up and running.\\ | Isso foi feito porque o foco deste artigo era colocar a ponte de retransmissão em funcionamento.\\ |
| You will likely want to set up your device's Wi-Fi network in a more secure way, as explained in the Wi-Fi setup page [[docs:guide-user:network:wifi:basic|here]]. | Você provavelmente desejará configurar a rede Wi-Fi do seu dispositivo de uma maneira mais segura, conforme explicado na página de configuração do Wi-Fi[[docs:guide-user:network:wifi:basic| aqui]]. |
| |
| ===== Accessing the OpenWrt device ===== | ===== Acessando o dispositivo OpenWrt ===== |
| 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 ''192.168.2.1'' address, when you are in that subnet. One way of being in both subnets at the same time with a Linux client is by adding a second, a virtual network interface to /etc/network/interfaces: | Com essa configuração, o próprio dispositivo OpenWrt pode ser acessível apenas a partir dos computadores diretamente conectados ao W-LAN AP, e não daqueles conectados apenas ao cliente OpenWrt W-LAN, quando na sub-rede 192.168.1.0. No entanto, ainda é possível acessar o roteador OpenWrt através do endereço ''192.168.2.1'', quando você está nessa sub-rede. Uma maneira de estar nas duas sub-redes ao mesmo tempo com um cliente Linux é adicionar uma segunda interface de rede virtual ao /etc/network/interfaces: |
| |
| <code> | <code> |
| </code> | </code> |
| |
| //[If someone can describe a solution without modifications to the client network configuration that would be appreciated!]// | //[Se alguém puder descrever uma solução sem modificações na configuração da rede do cliente, isso seria apreciado!]// |
| |
| ===== Adding IPv6 support ===== | ===== Adicionando suporte ao IPv6 ===== |
| 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://en.wikipedia.org/wiki/IPv6_address#Stateless_address_autoconfiguration|Stateless Address Autoconfiguration (SLAAC)]] of your public IPv6 addresses and IPv6 traffic. | Ative o suporte ao IPv6 na sua caixa da Internet, isso lhe dará um prefixo público do IPv6. Agora, ativaremos o IPv6 em nosso repetidor de Wi-Fi para permitir [[https://en.wikipedia.org/wiki/IPv6_address#Stateless_address_autoconfiguration|Configuração automática de endereço sem status (SLAAC)]] dos seus endereços IPv6 públicos e tráfego IPv6. |
| |
| 1. Go to Network / Interfaces and create a new interface. Name it ''WWAN6'', using protocol DHCPv6, cover the WWAN interface. In the Common Configuration of the new interface, configure: Request IPv6 address: disabled. In the Firewall settings: check that the "lan / repeater bridge…" line is selected. Leave the other settings by default, especially, leave the "Custom delegated IPv6-prefix" field empty. On the Interfaces / overwiew page check that the WWAN interface gets a public IPv6 address.\\ | 1. Vá para Rede/Interfaces e crie uma nova interface. Nomeie ''WWAN6'', usando o protocolo DHCPv6, para cobrir a interface WWAN. Na configuração comum da nova interface, configure: Solicitar endereço IPv6: desativado. Nas configurações do firewall: verifique se a linha "ponte lan/repetidora ..." está selecionada. Deixe as outras configurações por padrão, especialmente, deixe o campo "Prefixo IPv6 delegado personalizado" em branco. Na página Interfaces/visão geral, verifique se a interface WWAN obtém um endereço IPv6 público.\\ |
| |
| 2. Edit the ''LAN'' interface settings, DHCP server / IPv6 settings: check/modify the following settings: Router Advertisement Service: relay mode, DHCPv6 service: disabled, NDP-Proxy: relay mode.\\ | 2. Edite as configurações da interface ''LAN'', configurações do servidor DHCP/IPv6: verifique/modifique as seguintes configurações: Serviço de anúncio do roteador: modo de retransmissão, serviço DHCPv6: desativado, NDP-Proxy: modo de retransmissão.\\ |
| |
| 3. Open a SSH session on your OpenWrt device. Issue the following commands:\\ | 3. Abra uma sessão SSH no seu dispositivo OpenWrt. Emita os seguintes comandos: \\ |
| <code bash> | <code bash> |
| uci set dhcp.wan.interface=wwan | uci set dhcp.wan.interface=wwan |
| uci commit | uci commit |
| </code> | </code> |
| We suppose that you created a ''wwan'' interface when you joined to the other Wi-Fi network as suggested earlier in this guide; otherwise, change the ''dhcp.wan.interface=…'' line accordingly.\\ | Supomos que você criou uma interface ''wwan'' quando ingressou na outra rede Wi-Fi, conforme sugerido anteriormente neste guia; caso contrário, altere a linha ''dhcp.wan.interface =…'' de acordo.\\ |
| |
| That's it. Restart ''ophcpd'' (LuCI System/Starup page, or ''/etc/init.d/odhcpd restart'') and your IPv6-network should begin to configure itself. Connected IPv6-enabled devices should get their public IPv6 addresses, derived from your public IPv6 prefix, and IPv6 traffic should go through your Wi-Fi extender. | É isso aí. Reinicie ''ophcpd'' (página LuCI System/Startup ou ''/etc/init.d/odhcpd restart'') e sua rede IPv6 deve começar a se configurar. Os dispositivos habilitados para IPv6 conectados devem obter seus endereços IPv6 públicos, derivados do seu prefixo público IPv6, e o tráfego IPv6 deve passar pelo extensor de Wi-Fi. |
| |
| ===== Wi-Fi extender with NAT (or what to do when all else fails) ===== | ===== Repetidor Wi-Fi com NAT (ou o que fazer quando tudo mais falhar) ===== |
| This method basically puts a second Wi-Fi router in cascade on the first.\\ | Esse método basicamente coloca um segundo roteador Wi-Fi em cascata no primeiro.\\ É como conectar com um cabo a porta WAN no repetidor Wi-Fi às portas LAN do roteador principal, o repetidor Wi-Fi cria uma nova rede para si e os dispositivos conectados a ele, que podem acessar a Internet e alcançar dispositivos na rede LAN do roteador principal. Mas, neste caso, estamos fazendo isso com redes sem fio. |
| 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. | |
| |
| prerequisites: | pré-requisitos: |
| - router with two initial interfaces (LAN, WAN) | - roteador com duas interfaces iniciais (LAN, WAN) |
| |
| Setup with WebUI: | Configure com o WebUI: |
| * Go in the Network -> Interfaces page, click on edit lan interface, | * Vá na página Rede -> Interfaces, clique em editar interface da LAN, |
| * Set LAN as static IPv4 address as 192.168.x.1 (with x different from the network to which you will connect via Wi-Fi), | * Defina LAN como endereço IPv4 estático como 192.168.x.1 (com x diferente da rede à qual você se conectará via Wi-Fi) |
| * Go in the Network -> Wi-Fi, click on scan and choose the "network" link and click "Join Network". | * Vá em Rede -> Wi-Fi, clique em scan e escolha o link "rede" e clique em "Ingressar na rede". |
| * Enter the Wi-Fi password, leave the "name of new network" as "WWAN" and select WWAN (or WAN) firewall zone. Click Save, | * Digite a senha do Wi-Fi, deixe o "nome da nova rede" como "WWAN" e selecione a zona de firewall WWAN (ou WAN). Clique em Salvar, |
| * Go in the Network -> Interfaces page, click on edit wwan interface, | * Vá na página Rede -> Interfaces, clique em editar interface do wwan, |
| * Move to the Firewall tab. Click on Save and Apply. | * Vá para a guia Firewall. Clique em Salvar e aplicar. |
| * Go in the Network -> Firewall, click edit in wan zone and check WAN and WWAN in "covered networks", click save and apply, | * Vá em Rede -> Firewall, clique em editar na zona da rede e marque WAN e WWAN em "redes cobertas", clique em salvar e aplicar, |
| |
| Now you've correctly bounded WWAN with WAN, and consequently WWAN with LAN. | Agora você limitou corretamente a WWAN com a WAN e, consequentemente, a WWAN com a LAN. |
| |
| |
| ===== Known Issues ===== | ===== Problemas conhecidos ===== |
| |
| Here are a list of some recently reported issues: | Aqui está uma lista de alguns problemas relatados recentemente: |
| |
| - DHCP issue caused by Access Point. [[https://forum.openwrt.org/t/relayd-not-forwarding-broadcast-bootp-dhcp-responses/53607/15|OWrt forum]] | - Problema no DHCP causado pelo ponto de acesso. [[https://forum.openwrt.org/t/relayd-not-forwarding-broadcast-bootp-dhcp-responses/53607/15|Fórum OWrt]] |
| - Extremely poor upstream transfer speeds with some MT762x devices. [[https://forum.openwrt.org/t/question-xiaomi-mi-r3g-mir3g-5ghz-relayd-19-07-upload-performance/50248|Owrt forum]] [[https://bugs.openwrt.org/index.php?do=details&task_id=2816|Bug Report FS#2816]] | - Velocidades de transferência upstream extremamente baixas com alguns dispositivos MT762x.[[https://forum.openwrt.org/t/question-xiaomi-mi-r3g-mir3g-5ghz-relayd-19-07-upload-performance/50248|Fórum OWrt]] [[https://bugs.openwrt.org/index.php?do=details&task_id=2816|Relatório de erro FS#2816]] |
| |