Trong một số trường hợp đặc biệt, người dùng cần kết nối 2 mạng nội bộ (LAN) với nhau thông qua kết nối không dây (wireless) như: mạng LAN ở 2 tòa nhà 2 bên đường, không thể kết nối cáp ngang qua đường, hoặc kết nối mạng LAN ở những nơi không thể đi dây cáp mạng.




Chúng ta có thể sử dụng tính năng WDS trên MikroTik RouterOS để kết nối không dây 2 mạng LAN lại với nhau, hay thuật ngữ kỹ thuật là Transparently Bridge two Networks.

Hướng dẫn này thực hiện trên 2 thiết bị router WiFi hAP ac - RB962 của MikroTik.

Cấu hình WDS trên wlan2 của hAP ac, sử dụng wireless chipset Athreros AR9888, hỗ trợ băng tần 5 Ghz, 3 MIMO.

Thực hiện theo theo các bước sau:

Trên hAP ac với chức năng AP:
- Tạo interface wds-bridge, chứa các interface wlan2 và ether1


- Tạo wds trên interface wlan2, với bridge vừa tạo ở trên


Sau đây là cấu hình của AP:

Code:
[admin@AP] > export 
# jul/21/2017 12:05:32 by RouterOS 6.35.4
# software id = Sao Thien Vuong
#
/interface bridge
add comment="Bridge Interface cho WDS" name=wds-bridge
/interface wireless
set [ find default-name=wlan1 ] antenna-gain=10 band=2ghz-b/g/n channel-width=20/40mhz-eC country="viet nam" frequency=auto frequency-mode=regulatory-domain mode=bridge \
    ssid=MikroTik-2Ghz wds-default-bridge=wds-bridge wds-mode=dynamic-mesh wireless-protocol=802.11 wmm-support=enabled
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee disabled=no frequency=6020 frequency-mode=superchannel mode=bridge ssid=MikroTik-5Ghz \
    wds-default-bridge=wds-bridge wds-mode=dynamic wireless-protocol=802.11 wmm-support=enabled
/ip neighbor discovery
set wds-bridge comment="Bridge Interface cho WDS"
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys supplicant-identity=MikroTik wpa2-pre-shared-key=P@ssw0rd
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/queue interface
set wlan1 queue=only-hardware-queue
set wlan2 queue=only-hardware-queue
/interface bridge port
add bridge=wds-bridge interface=ether1
add bridge=wds-bridge interface=wlan2
add bridge=wds-bridge interface=ether4
add bridge=wds-bridge interface=ether3
add bridge=wds-bridge interface=ether2
add bridge=wds-bridge interface=ether5
add bridge=wds-bridge interface=sfp1
add bridge=wds-bridge interface=wlan1
/system clock
set time-zone-name=Asia/Ho_Chi_Minh
/system identity
set name=AP
/system leds
set 1
Trên hAP ac với chức năng Station:
- Tạo interface wds-bridge, chứa các interface wlan2 và ether1.
- Tạo kết nối wireless trên wlan2 với mode station-wds và các thông số khác liên quan.


Cấu hình trên Station
Code:
[admin@Station] > export 
# jan/02/1970 20:15:22 by RouterOS 6.35.4
# software id = Sao Thien Vuong
#
/interface bridge
add name=wds-bridge
/interface wireless
set [ find default-name=wlan1 ] antenna-gain=10 country="viet nam" frequency-mode=regulatory-domain mode=station-wds ssid=MikroTik-2Ghz
set [ find default-name=wlan2 ] band=5ghz-onlyac disabled=no distance=indoors frequency=5215 frequency-mode=superchannel mode=station-wds scan-list=default,6010-6040 \
    ssid=MikroTik-5Ghz wmm-support=enabled
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys supplicant-identity=MikroTik wpa2-pre-shared-key=P@ssw0rd
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/queue interface
set wlan1 queue=only-hardware-queue
set wlan2 queue=only-hardware-queue
/interface bridge port
add bridge=wds-bridge interface=wlan2
add bridge=wds-bridge interface=ether1
add bridge=wds-bridge interface=ether2
add bridge=wds-bridge interface=ether3
add bridge=wds-bridge interface=ether4
add bridge=wds-bridge interface=ether5
add bridge=wds-bridge interface=sfp1
add bridge=wds-bridge interface=wlan1
/system identity
set name=Station
/system leds
set 1 interface=wlan2
/system routerboard settings
set cpu-frequency=720MHz protected-routerboot=disabled
[admin@Station] >
Kết quả đạt được trong môi trường LAB, 2 thiết bị hAP ac đặt cách nhau tầm 5m


Trong môi trường thực tế, khoảng cách giữa 2 hAP ac tầm 40m, kết nối wireless giữa 2 tòa nhà ở 2 bên đường.


Với signal strength trong trường hợp này là -80dBm (cho khoảng cách 40m), Không đảm bảo kết nối ổn định.

Một số tips liên quan đến kết nối wireless link điểm - điểm, tôi để nguyên tiếng anh để anh/chị tham khảo:
- Keep Signal Levels in the -40’s to -50’s, Low SNR helps keep modulation rates high
- Don’t overdrive the receiver.
- Use lowest channel size the application calls for (Be a good bandwidth neighbor).
- Use fastpath feature to decrease system load.
- Stick with high pole isolation antenna designs.

Với bài LAB này, sử dụng một số thế mạnh của MikroTik:
- Điểu chính công suất phát sóng theo mong muốn.
- Superchannel, cho phép lựa chọn kênh "tự do", trong bài này, tôi dùng kênh 6020 ở băng tần 6Ghz.