WDS repeater example

From MikroTik Wiki
Jump to: navigation, search

Introduction

This example shows how to configure a wireless repeater. Wireless repeater extends the range of an existing WLAN instead of adding more access points. Consider the network layout:

Repeater123.jpg

We will use two wireless interfaces (two antennas) on the repeater router. WDS links will be established between 'Main gateway' and 'Repeater', 'Repeater' and 'AP1', 'AP2' (end-users are connected to the AP1 and AP2).

Note, client wireless interfaces (station, ad-hoc, infrastructure) do not support bridging because of the limitations of 802.11.


Quick Start

Main Gateway configuration export:

/ ip address add address=192.168.0.1/24 interface=wlan1
/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X2  master-interface=wlan1
/ interface bridge add
/ interface bridge port add interface=wlan1 bridge=bridge1
/ interface bridge port add interface=wds1 bridge=bridge1

Repeater configuration export:

/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X1  master-interface=wlan1
/ interface bridge add
/ interface bridge port add interface=wlan1 bridge=bridge1
/ interface bridge port add interface=wds1 bridge=bridge1

/ interface wireless set wlan2 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X4  master-interface=wlan2
/ interface bridge port add interface=wlan2 bridge=bridge1
/ interface bridge port add interface=wds2 bridge=bridge1
/ ip address add address=192.168.0.2/24 interface=bridge1

AP1, AP2 configuration export:

/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X3  master-interface=wlan1
/ interface bridge add
/ interface bridge port add interface=wlan1 bridge=bridge1
/ interface bridge port add interface=wds1 bridge=bridge1
/ ip adress add address=192.168.0.3/24 interface=wlan1

Explanation

Main Gateway

/ ip address add address=192.168.0.1/24 interface=wlan1

The wireless interface has the name 'wlan1' and IP address of 192.168.0.1/24. It will be the default gateway for other nodes in the network.

/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static

Rule enables wireless interface and sets up appropriate configuration: band, frequency (WDS peers all need to be on the same frequency), SSID, wds-mode (static - WDS interfaces created manually in static mode).

/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X2  master-interface=wlan1

The rule creates WDS interface on the particular 'master-interface', where 'wds-address' is the remote WDS peer MAC-address.

/ interface bridge add
/ interface bridge port add interface=wlan1 bridge=bridge1
/ interface bridge port add interface=wds1 bridge=bridge1

First we create bridge interface on the router, then 'wlan1' and 'wds1' interface are added to the bridge.

Repeater

Let us consider wireless repeater configuration. First we need to establish communication to 'Main Gateway' router.

/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X1  master-interface=wlan1
/ interface bridge add
/ interface bridge port add interface=wlan1 bridge=bridge1
/ interface bridge port add interface=wds1 bridge=bridge1

The rules are quite similar to 'Main Gateway' configuration rules. We need to enable wireless interface, than set appropriate wireless and WDS configuration (don't forget about the same frequency channel) and add interface to created bridge.

/ interface wireless set wlan2 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X4  master-interface=wlan2
/ interface bridge port add interface=wlan2 bridge=bridge1
/ interface bridge port add interface=wds2 bridge=bridge1
/ ip address add address=192.168.0.2/24 interface=bridge1

Next, we should configure second wireless interface. Rules are very similar to the previous one. IP address configuration is required for troubleshoot options. Repetear will work fine without IP address configuration.

AP1, AP2 configuration

/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static
/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X3  master-interface=wlan1
/ interface bridge add
/ interface bridge port add interface=wlan1 bridge=bridge1
/ interface bridge port add interface=wds1 bridge=bridge1
/ ip adress add address=192.168.0.3/24 interface=wlan1

Finally, we need to configure AP1, AP2 client routers, which will provide connection to the Internet for the end-user. Add client interface to bridge (Ethernet, wireless). AP1 and AP2 clients will use 192.168.0.0/24 subnet, AP1 and AP2 clients will communicate as they are connected to the one switch.