Sunday 13 February 2011

Brief Overview

Since the release of Mikrotik v4.03beta, 802.11n draft wireless cards are now supported. This guide's purpose is to explain to those familiar with the use of regular wireless, exactly how to go about setting up an 802.11n card.

Pre-Setup

Equipment

Equipment used on my test bench:

  • RB411A x 2
  • TP-Link Wireless N MiniPCI Adapter, Atheros, 2T2R, 2.4GHz, 802.11n Draft 2.0, 802.11g/b x 2


Image:Wlan1-tp-link.jpg


Note: I will be doing further testing with the Mikrotik 802.11n cards and adding info when they arrive but at the time of release I already had these cards spare.

Upgrading to v4

Steps to upgrading your Routerboard or x86 device are located here - Upgrading_RouterOS

Updating Licence key and unlocking 802.11n

Once you have completed the upgrade to v4, connect via winbox to your device then:

  1. Open the licence page via System -> Licence
  2. Click on the "update licence key"

Image:Update-mikrotik-licence-key.jpg

Setup and Testing

This section details how to configure your wireless 802.11n card along with an example at the end of a preconfigured setup you can attempt on your own cards. I will also go into as much detail as possible on the new options provided to the 802.11n cards and what each of these does.

802.11n Configuration options

Winbox changable configuration options
  • band (2ghz-b/g/n | 2ghz-onlyn | 5ghz-a/n | 5ghz-onlyn | other-original a/b/g options also available)
  • ht-extension-channel (above-control | below-control | disabled)
  • ht-rxchains (0,1,2 - any combination of these)
  • ht-txchains (0,1,2 - any combination of these)
  • ht-ampdu-priorities (0,1,2,3,4,5,6,7 - any combination of these)
  • ht-guard-interval (any | long)

These items can be viewed and changed from in winbox or terminal.

Winbox viewable configuration options
  • ht-basic-mcs (mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15 - any combination of these)
  • ht-supported-mcs (mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15 - any combination of these)

These previous 2 options can be changed only from terminal, but appear in winbox. (In ROS4.0beta4 they can be changed in winbox Wireless Interface window, tab "Data Rates" and set rate to "configured". Under "HT MCS" tab options are now configurable.)

Non-Winbox viewable configuration options
  • ht-amsdu-limit (0..8192)
  • ht-amsdu-threshold (0..8192)

These last two only appear in terminal at this time. (ROS4.0beta4 made these configurable in winbox too.)

Winbox 802.11n configuration tabs

Image:Mikrotik-ht-tab.jpgImage: Mikrotik-ht-mcs-tab.jpg

Configurable options, in depth.

  • ht-extension-channel (above-control | below-control | disabled)

The current 802.11n draft supports a method of channel bonding for both 2.4Ghz and 5.Ghz systems. There is 1 20Mhz channel defined as the "control channel" while the secondary channel can then be set to sit above or below the control channel. Seeing as 2.4Ghz only has 3 'usable' channels (1,6,11) its recommended to use this on a 5Ghz where there are more available channels.

  • ht-rxchains (0,1,2 - any combination of these)
  • ht-txchains (0,1,2 - any combination of these)

Which antenna connector to use for TX or RX. You can use one of these or multiple (depending on your antenna configuration). On MikroTik R2n and R52n card there are 2 antenna connectors and to use both of them ht-tx/rx-chains should be set to 0,1.

  • ht-ampdu-priorities (0,1,2,3,4,5,6,7 - any combination of these)

A-MPDU (Aggregated Mac Protocol Data Unit) allows the transmissions of multiple ethernet frames to a single location as burst of up to 64kbytes This is performed on the hardware itself. It is important to understand these numbers, 0-7 correspond to packet priority for which A-MPDU will be used. For example, if you check options 0 and 6, A-MPDU will only be used on packets with a priority of 0 and 6, no other packets will be affected. A-MPDU should not be used with applications that require low latency such as VOIP since the price paid for higher throughput is increased latency.

  • ht-guard-interval (any | long)

In 802.11n the OFDM Guard interval (GI) is decreased from 800ns to 400ns, without any futher info I am assuming that the 'any' is the new 400ns timing and 'long' is the old 800ns

Example configuration

As above I used 2 x RB411's with 2.4ghz 802.11n cards for my test setup, here is a sample config's for each one.

Access Point

/ip address
add address=192.168.1.1/24 broadcast=192.168.1.255 comment="" disabled=no interface=wlan1 network=192.168.1.0
/interface wireless
set 0 ack-timeout=dynamic adaptive-noise-immunity=none allow-sharedkey=no antenna-gain=0 antenna-mode=ant-a area="" arp=enabled band=2ghz-b/g/n basic-rates-a/g=6Mbps \
basic-rates-b=1Mbps comment="" compression=no country=no_country_set default-ap-tx-limit=0 default-authentication=yes default-client-tx-limit=0 default-forwarding=\
yes dfs-mode=none disable-running-check=no disabled=no disconnect-timeout=3s frame-lifetime=0 frequency=2412 frequency-mode=manual-txpower hide-ssid=no \
ht-ampdu-priorities=0 ht-amsdu-limit=8192 ht-amsdu-threshold=8192 ht-basic-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7 ht-extension-channel=above-control \
ht-guard-interval=any ht-rxchains=0,2 ht-supported-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15 \
ht-txchains=0,2 hw-fragmentation-threshold=disabled hw-protection-mode=none hw-protection-threshold=0 hw-retries=4 mac-address=00:1D:0F:BB:8C:66 max-station-count=\
2007 mode=ap-bridge mtu=1500 name=wlan1 periodic-calibration=default periodic-calibration-interval=60 preamble-mode=both \
proprietary-extensions=post-2.9.25 radio-name=001D0FBB8C66 rate-set=default scan-list=default security-profile=default ssid=abc station-bridge-clone-mac=\
00:00:00:00:00:00 supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps tx-power-mode=default \
wds-mode=disabled wmm-support=enabled

Wireless Station

/ip address
add address=192.168.1.2/24 broadcast=192.168.1.255 comment="" disabled=no interface=wlan1 network=192.168.1.0
/interface wireless
set 0 ack-timeout=dynamic adaptive-noise-immunity=none allow-sharedkey=no antenna-gain=0 antenna-mode=ant-a area="" arp=enabled band=2ghz-b/g/n basic-rates-a/g=6Mbps \
basic-rates-b=1Mbps comment="" compression=no country=no_country_set default-ap-tx-limit=0 default-authentication=yes default-client-tx-limit=0 default-forwarding=\
yes dfs-mode=none disable-running-check=no disabled=no disconnect-timeout=3s frame-lifetime=0 frequency=2412 frequency-mode=manual-txpower hide-ssid=no \
ht-ampdu-priorities=0 ht-amsdu-limit=8192 ht-amsdu-threshold=8192 ht-basic-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7 ht-extension-channel=above-control \
ht-guard-interval=any ht-rxchains=0,2 ht-supported-mcs=mcs-0,mcs-1,mcs-2,mcs-3,mcs-4,mcs-5,mcs-6,mcs-7,mcs-8,mcs-9,mcs-10,mcs-11,mcs-12,mcs-13,mcs-14,mcs-15 \
ht-txchains=0,2 hw-fragmentation-threshold=disabled hw-protection-mode=none hw-protection-threshold=0 hw-retries=4 mac-address=00:1D:0F:BB:8C:1E max-station-count=\
2007 mode=station mtu=1500 name=wlan1 periodic-calibration=default periodic-calibration-interval=60 preamble-mode=both \
proprietary-extensions=post-2.9.25 radio-name=001D0FBB8C1E rate-set=default scan-list=default security-profile=default ssid=abc station-bridge-clone-mac=\
00:00:00:00:00:00 supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps tx-power-mode=default \
wds-mode=disabled wmm-support=enabled

My first test gave similar to the following results, thou I expect to improve on these shortly.

Image:802.11n-speed-mikrotik.jpg

Current Optimum setup configuration

As supplied by User:NetTraptor in the forum thread - http://forum.mikrotik.com/viewtopic.php?p=160517#p160517

/interface wireless security-profiles
set default authentication-types="" eap-methods=passthrough group-ciphers="" \
group-key-update=5m interim-update=0s management-protection=disabled \
management-protection-key="" mode=none name=default \
radius-eap-accounting=no radius-mac-accounting=no \
radius-mac-authentication=no radius-mac-caching=disabled \
radius-mac-format=XX:XX:XX:XX:XX:XX radius-mac-mode=as-username \
static-algo-0=none static-algo-1=none static-algo-2=none static-algo-3=\
none static-key-0="" static-key-1="" static-key-2="" static-key-3="" \
static-sta-private-algo=none static-sta-private-key="" \
static-transmit-key=key-0 supplicant-identity=MikroTik tls-certificate=\
none tls-mode=no-certificates unicast-ciphers="" wpa-pre-shared-key="" \
wpa2-pre-shared-key=""
/interface wireless
set 0 ack-timeout=dynamic adaptive-noise-immunity=none allow-sharedkey=no \
antenna-gain=0 antenna-mode=ant-a area="" arp=enabled band=5ghz-onlyn \
basic-rates-a/g="" basic-rates-b="" comment="" compression=no country=\
no_country_set default-ap-tx-limit=0 default-authentication=yes \
default-client-tx-limit=0 default-forwarding=yes dfs-mode=none \
disable-running-check=no disabled=no disconnect-timeout=3s \
frame-lifetime=0 frequency=5180 frequency-mode=manual-txpower hide-ssid=\
no ht-ampdu-priorities=0,1,2,3,4,5,6,7 ht-amsdu-limit=8192 \
ht-amsdu-threshold=8192 ht-basic-mcs=mcs-0 ht-extension-channel=disabled \
ht-guard-interval=any ht-rxchains=0,1 ht-supported-mcs=\
mcs-0,mcs-7,mcs-8,mcs-14,mcs-15 ht-txchains=0,1 \
hw-fragmentation-threshold=disabled hw-protection-mode=none \
hw-protection-threshold=0 hw-retries=15 mac-address=00:0C:42:3A:CF:E9 \
max-station-count=2 mode=bridge mtu=1500 name=wlan1 on-fail-retry-time=\
100ms periodic-calibration=disabled periodic-calibration-interval=60 \
preamble-mode=short proprietary-extensions=post-2.9.25 radio-name=\
000C423ACFE9 rate-set=configured scan-list=5180,5760,5320,5825 \
security-profile=default ssid=awmn-2315-3665 station-bridge-clone-mac=\
00:00:00:00:00:00 supported-rates-a/g="" supported-rates-b="" tx-power=3 \
tx-power-mode=all-rates-fixed update-stats-interval=disabled \
wds-cost-range=50-150 wds-default-bridge=none wds-default-cost=100 \
wds-ignore-ssid=no wds-mode=disabled wmm-support=enabled
/interface wireless manual-tx-power-table
set wlan1 comment="" manual-tx-powers="1Mbps:17,2Mbps:17,5.5Mbps:17,11Mbps:17,\
6Mbps:17,9Mbps:17,12Mbps:17,18Mbps:17,24Mbps:17,36Mbps:17,48Mbps:17,54Mbps\
:17,HT20-1:0,HT20-2:0,HT20-3:0,HT20-4:0,HT20-5:0,HT20-6:0,HT20-7:0,HT20-8:\
0,HT40-1:0,HT40-2:0,HT40-3:0,HT40-4:0,HT40-5:0,HT40-6:0,HT40-7:0,HT40-8:0"
/interface wireless nstreme
set wlan1 comment="" disable-csma=no enable-nstreme=yes enable-polling=yes \
framer-limit=3998 framer-policy=best-fit
/interface wireless align
set active-mode=yes audio-max=-20 audio-min=-100 audio-monitor=\
00:00:00:00:00:00 filter-mac=00:00:00:00:00:00 frame-size=300 \
frames-per-second=25 receive-all=no ssid-all=no
/interface wireless sniffer
set channel-time=200ms file-limit=10 file-name="" memory-limit=10 \
multiple-channels=no only-headers=no receive-errors=no streaming-enabled=\
no streaming-max-rate=0 streaming-server=0.0.0.0
/interface wireless snooper
set channel-time=200ms multiple-channels=yes receive-errors=no

0 comments:

Post a Comment