📜 ⬆️ ⬇️

Making a wireless network bridge for 2 Mikrotik

Situation: on the Mikrotik, different grids have their own grids:


In these networks Mikrotik (model RB751G-2HnD) distributes the settings via DHCP.

Task: using Wi-Fi to connect more equipment so that it is on the network 192.168.3.0/24.
I have such a problem due to the fact that on the balcony of the network storage (NAS) is connected by wire to the router (the router itself is in the hallway). And in the living room - a media player that should show movies from a NAS device. But there is no Ethernet cable in the living room (that is, it was, but I refused it).
')
For this we will use the second Mikrotik (model hAP lite). Both Mikrotik will form a wireless network bridge. To do this, on the main Mikrotik we will create another wireless interface - a virtual access point (Virtual AP). As a result, the scheme should get something like this:



Those. In this scheme, the NAS and Comp hardware must be on the 192.168.3.0/24 network. In this case, NAS and Comp are physically separated and connected to different Mikrotik.
ether1 on the primary Mikrotik is the source of the internet.

At the end of the setting, the average speed between microtices for 5 minutes was 220 Mbps (according to the ping test utility, included in RouterOS):




Hereinafter, the Comp and the media player are the same.

All settings were made through the web administration interface (webfig).

Creating VirtualAP on RB751G-2HnD



As mentioned above, the RB751G-2HnD is initially configured to distribute different subnets on different physical ports. I will not consider this in detail. It is already described here .

On RB751G-2HnD we will create and configure VirtualAP.
Go to the section Wireless-> Security Profiles and click the Add New button. We set the profile name and password for our future virtual access point.
The second router (hAP Lite) is in the living room. It is for him that the network is created. Therefore, I called the profile gostinnaya:



Next, create the virtual access point itself. To do this, go to Wireless-> Interfaces and select Add New-> VirtualAP. Specify the previously created profile and set the wizard interface by the name of an existing wireless adapter (mine is wlan1).



After that, the gostinnaya virtual interface will appear in the list of wireless interfaces besides wlan1 .

Bridge configuration on RB751G-2HnD between VirtualAP and Ethernet



We need to make a network bridge consisting of interfaces:

  1. ether3
  2. gostinnaya


To do this, in the Bridge section, click Add New and fill in the parameters. NAS is on the balcony, so I called the network interface bridge_balcon and gostinnaya_wi-fi


After that, we will have a new virtual interface (I have this bridge_balcon and gostinnaya_wi-fi ).

Now you need to assign which real interfaces will be associated with the created bridge. Go to Bridge-> Ports , click Add New . Select the desired Ether (I have ether3-slave-local ). Click Add New again and select the previously created VirtualAP interface (I have a gostinnaya ). Now both selected interfaces will be displayed in the Ports tab.


Setup on RB751G-2HnD is completed.

HAP Lite setup



I set up hAP Lite so that any equipment connected to any Ethernet port would be on the 192.168.3.0/24 network. Those. I need to create a network bridge consisting of all Ethernet ports + wireless connection (through which hAP Lite will connect to the RB751G-2HnD). So hAP Lite turns into a switch. And it will have its address in the grid 192.168.3.0/24.

HAP Lite had factory settings that need to be changed.

In IP-> Firewall-> NAT we deactivate the network masquerading rule



In IP-> DHCP Server-> DHCP, we delete (or make inactive) the default distribution setting by DHCP:



Now you need to configure getting the address itself hAP Lite from his relative (RB751G-2HnD) via DHCP. In IP-> DHCP Client-> DHCP Client, click Add New and set the interface of the network bridge (I have bridge-local).

Ether1 is not yet included in the network bridge - this is the factory setting. You can add it like this. Go to Interfaces , click on Ether1 and in the Master Port field select ether2-master-local

Connect hAP Lite to RB751G-2HnD via Wi-Fi



Setup in Wireless-> Security Profiles is done in the same way as on RB751G-2HnD. After that, in the Wireless-> Interfaces tab, configure the existing wireless interface (I have wlan1 ):


If everything is set correctly, then after setting up here you will see the line “connected to ess”.

Next in Bridge-> Ports , click Add New and select the newly configured wireless interface (I have wlan1 )



At the same time, on MikroTik hap Lite, to the existing default bridge-local (which was created by pressing the reset on the device to reset to the default settings) added wlan1 and removed the DHCP server.

On hAP in wlan1 settings, change Mode from “station” to “Station bridge” or “Station pseudobridge”. Both options work.

Hap Lite network bridge tinctures:


As a result, the equipment correctly received the settings via DHCP from the network 192.168.3.0/24. NAS and Comp see each other perfectly.



At the time of settings on all Mikrotik was firmware RouterOS 6.29.1. The configuration feels great on RouterOS 6.33.5 (the latest currently available).

Performance tests (version RouterOS 6.33.5 on both devices)


As I pointed out at the very beginning, the average speed between microtices for 5 minutes was 220 Mbit / s (according to the ping test utility. Let me give you a few more figures. All the tests took place without an uncontrolled switch, which is shown in the very first figure.

Average speed between RB751G-2HnD and equipment for hAP lite (media player): 54 Mbit / s. It would seem - a serious drop in speed during transit through hAP lite. In fact, not everything is so bad: the hAP lite Ethernet port in the settings shows a speed of 100 Mbps. The speed between the hAP lite and the equipment behind it ((media player) is 85 Mbit / s. Maybe someone will not be satisfied with such a drop in speed. But this channel is enough for me, so that the media player shows movies from NAS, which average size is 30-45 GB .

UPD
This was my first experience of creating a wireless bridge, not only on Mikrotik, but in principle. And the first time I was close to the working solution. An annoying nuance intervened, taking a lot of time and nerves. hAP in the wlan1 settings, the Mode position was set to “station”. After I changed to “Station bridge” or “Station pseudobridge” everything was fixed. Read more about the problem and its manifestation here .

Source: https://habr.com/ru/post/274983/


All Articles