MTCWE
MTCWE
www.MikroTiktrain.com
Instructors
Housekeeping
Course materials Routers, cables Break times and lunch Restrooms and smoking area locations
Working with MikroTik OS for More than 8 years Implementation and experience in DSL & Wimax Network Expert in VOIP Work as Network Engineer in Laser (Nation Wide Company) for 4 years
www.MikroTiktrain.com
www.MikroTiktrain.com
1/1/2013
Course Objective
Provide thorough knowledge and hands-on training for MikroTik RouterOS advanced wireless capabilities for small and medium size networks Introduce the 802.11n wireless networking Upon completion of the course you will be able to plan, implement, adjust and debug wireless MikroTik RouterOS network configurations
www.MikroTiktrain.com 5
Topics Overview
Wireless Standard overview Wireless tools Troubleshooting wireless clients Wireless Advanced settings
DFS and country regulation Data Rates and TX-power Virtual AP
www.MikroTiktrain.com
Introduce Yourself
Please, introduce yourself to the class
Your name Your Company Your previous knowledge about RouterOS Your previous knowledge about networking What do you expect from this course?
My number is:_________
www.MikroTiktrain.com 8
1/1/2013
Class Setup
www.MikroTiktrain.com
10
Simple/Advanced View
www.MikroTiktrain.com
12
1/1/2013
Wireless Standards
802.11b 11Mbps, 2.4Ghz 802.11g 54Mbps, 2.4Ghz 802.11a 54Mbps, 5Ghz 802.11n 300Mbps, 2.4/5Ghz 2Ghz
Wireless Bands
5Ghz
A, A-Turbo, Only-N, A/N, 5mhz, 10mhz
www.MikroTiktrain.com
13
www.MikroTiktrain.com
14
Band Variations
Double channel (40MHz) 108Mbit max air rate 2.4ghz-g-turbo 5ghz-turbo Half channel (10MHz) 27Mbit max air rate 2ghz-10mhz 5ghz-10mhz Quarter channel (5MHz) 13.5Mbit max air rate 2ghz-5mhz 5ghz-5mhz
www.MikroTiktrain.com 15
AR5416/AR9160/AR9220
A/B/G/N, 5Mhz*, 10Mhz*
www.MikroTiktrain.com
16
1/1/2013
Supported Frequencies
A/B/G Atheros chipset cards usually support such frequencies
2Ghz band: 2192-2539Mhz 5Ghz band: 4920-6100Mhz
Scan List
Default frequencies from the scan-list shown bold in the frequency field (Winbox only) Default scan-list value from the country shown as default Frequency range is specified by the dash
5500-5700
Wireless Tools
Wireless tools for finding the best band/frequency
Scan Frequency Usage Spectral Scan/History Snooper Align Sniffer
www.MikroTiktrain.com
19
www.MikroTiktrain.com
20
1/1/2013
Spectral Scan/History
Uses only Atheros Merlin 802.11n chipset wireless cards Range
2ghz, 5ghz, current-channel, range
Value
avg, avg-peak, interference, max, min
Classify-samples
wifi, bluetooth, microwave-oven, etc
www.MikroTiktrain.com 21 www.MikroTiktrain.com 22
Spectral-history
Plot spectrogram Power values are printed in different colors Audible option - plays each line as it is printed on the routers speaker
Each line is played from left to right, with higher frequencies corresponding to higher values in the spectrogram
Spectral-history
www.MikroTiktrain.com
23
www.MikroTiktrain.com
24
1/1/2013
Spectral-scan
Continuously monitor spectral data Each line displays one spectrogram bucket:
Frequency Numeric value of power average Character graphic bar
average power value - ':' average peak hold - '.' maximum lone floating - ':'
Spectral-scan
www.MikroTiktrain.com
25
www.MikroTiktrain.com
26
Alignment Tool
www.MikroTiktrain.com
27
www.MikroTiktrain.com
28
1/1/2013
Wireless Sniffer
www.MikroTiktrain.com
29
www.MikroTiktrain.com
30
DFS
Dynamic Frequency Selection (DFS)
no radar detect - at startup AP scans channel list from "scan-list" and chooses the frequency which is with the lowest amount of other networks detected radar detect - adds capability to detect radar at start up for 60 seconds and avoid them by changing frequency
1/1/2013
DFS Lab
Enable the AP on frequency 5180Mhz Enable DFS mode to no radar detect Disable wireless interface on the AP for few seconds and enable it back Observe frequency jumps
www.MikroTiktrain.com
33
www.MikroTiktrain.com
34
www.MikroTiktrain.com
35
www.MikroTiktrain.com
36
1/1/2013
Registration table
www.MikroTiktrain.com
37
www.MikroTiktrain.com
38
Using advanced settings for troubleshooting and fine tuning the wireless connection
www.MikroTiktrain.com
40
10
1/1/2013
HW-retries
Number of frame sending retries until the transmission is considered failed Data rate is decreased upon failure But if there is no lower rate, 3 sequential failures activate on-fail-retry-time transmission pause and the counter restarts The frame is being retransmitted either until success or until client is disconnected disconnect-timeout reached
www.MikroTiktrain.com 44
11
1/1/2013
HW-protection
Frame protection helps to fight "hidden node" problem CTS/RTS protection CTS to self protection hw-protection-threshold frame size threshold at which protection should be used; 0 used for all frames
www.MikroTiktrain.com
45
www.MikroTiktrain.com
46
12
1/1/2013
HW-fragmentation-threshold
Maximum fragment size in bytes when transmitted over wireless medium Fragmentation allows packets to be fragmented before transmiting over wireless medium to increase probability of successful transmission Only fragments that did not transmit correctly are retransmitted Transmission of fragmented packet is less efficient than transmitting unfragmented packet because of protocol overhead and increased resource usage at both - transmitting and receiving party
www.MikroTiktrain.com 49
Adaptive-noise-immunity
Adjusts various receiver parameters dynamically to minimize interference and noise effect on the signal quality Works on Atheros 5212 or newer Atheros chipset Uses CPU power 3 options:
None disabled Client-mode will be enabled only if station or station-wds used Ap-and-client-mode will be enabled in any mode
www.MikroTiktrain.com
50
Priorities set by
Bridge or IP firewall Ingress (VLAN or WMM) DSCP
www.MikroTiktrain.com 52
13
1/1/2013
Basic rates link management data Rates If router can't send or receive data at basic rate link goes down
www.MikroTiktrain.com
53
www.MikroTiktrain.com
54
TX power
Different TX-power for each data-rate higher date rate, less power Disabling the higher data-rates could improve the signal as it uses higher tx-power on lower data-rates
www.MikroTiktrain.com
56
14
1/1/2013
TX-power-mode
Default uses tx-power values from cards eeeprom Card-rates use tx-power, that for different rates is calculated according the cards transmit power algorithm, which as an argument takes txpower value All-rates-fixed use one tx-power value for all rates Manual-table use the tx-power as defined in /interface wireless manual-tx-power-table
www.MikroTiktrain.com 57
www.MikroTiktrain.com
58
Virtual AP
Use of Virtual AP feature for creating multiple APs
Used for creating a new AP on top of the physical wireless card Works for AR5212 and newer Atheros Chipset cards Up to 128 Virtual AP per wireless card Uses different MAC address and can be changed Can have different SSID, security profile, Access/Connect-list, WDS options
59 www.MikroTiktrain.com 60
www.MikroTiktrain.com
15
1/1/2013
Virtual AP Setup
Virtual AP Lab
Work two together Connect both routers using Ethernet cable First router
Create 2 VLAN interfaces on that Ethernet Create 2 hotspots one on each VLAN For one Hotspot change the background color of login page
add background-color: #A9F5A9; in the body line in the login.html page
Second router
Create 2 VLAN interfaces on the Ethernet interfaces with the VLAN ID from the first router Create 2 Virtual APs with different SSID Bridge first VLAN with first Virtual AP Create second bridge with second VLAN and second Virtual AP
Connect to each Virtual AP and check if one AP has different login page Reset the configuration and switch places
www.MikroTiktrain.com
61
www.MikroTiktrain.com
62
Access Management
Managing access for AP/Clients using Access-List and Connect-List
default-forwarding (on AP) whether the wireless clients may communicate with each other directly (access list may override this setting for individual clients) default-authentication default authentication policy that applies to all hosts not mentioned in the AP's access list or client's connect list Both options are obsolete same functionality can be achieved with new connect list and access list features
www.MikroTiktrain.com 63 www.MikroTiktrain.com 64
16
1/1/2013
It is possible to prioritize one AP over another AP by changing order of the entries Connect list is used also for WDS links, when one AP connects to other AP
www.MikroTiktrain.com 67 www.MikroTiktrain.com 68
17
1/1/2013
Delete all access list and connect list rules change places and repeat the lab
www.MikroTiktrain.com 71 www.MikroTiktrain.com 72
18
1/1/2013
www.MikroTiktrain.com
76
19
1/1/2013
Wireless Security
Authentication
PSK Authentication EAP Authentication
Security Principles
Authentication - ensures acceptance of transmissions only from confirmed source Data encryption
Confidentiality - ensures that information is accessible only to those authorized to have access Integrity ensures that information is not changed by any other source and are exactly the same as it was sent out
77 www.MikroTiktrain.com 78
Encryption
AES TKIP WEP
PSK Authentication
Pre-Shared Key is a authentication mechanism that uses a secret which was previously shared between the two parties Most common used wireless security type Multiple authentication types for one profile Optional PSK key for each MAC address (using Access list)
www.MikroTiktrain.com
79
www.MikroTiktrain.com
80
20
1/1/2013
EAP Authentication
Extensible Authentication Protocol provides a negotiation of the desired authentication mechanism (a.k.a. EAP methods) There are about 40 different EAP methods RouterOS support EAP-TLS method and also is capable to passtrough all methods to the RADIUS server
www.MikroTiktrain.com 81 www.MikroTiktrain.com 82
AES-CCM
AES-CCM AES with CTR with CBC-MAC AES - Advanced Encryption Standard is a block cipher that works with a fixed block size of 128 bits and a key size of 128, 192, or 256 bits CTR - Counter generates the next keystream block by encrypting successive values of a "counter"
www.MikroTiktrain.com 83
AES-CCM (2)
CBC - Cipher Block Chaining each block of plaintext is XORed with the previous ciphertext block before being encrypted. This way, each ciphertext block is dependent on all plaintext blocks processed up to that point. MAC - Message Authentication Code allows to detect any changes to the message content
www.MikroTiktrain.com 84
21
1/1/2013
TKIP
Temporal Key Integrity Protocol is a security protocol used in the IEEE 802.11 wireless networks TKIP is evolution of WEP based on RC4 stream cipher Unlike WEP it provides
per-packet key mixing, a message integrity check, rekeying mechanism
www.MikroTiktrain.com 85
WEP (obsolete)
Wired Equivalent Privacy is one of the first and simple security type Does not have authentication method Not recommended as it is vulnerable to wireless hacking tools
www.MikroTiktrain.com 86
Keys generated on association from PSK will be used in ciphers as entry key
www.MikroTiktrain.com 87 www.MikroTiktrain.com 88
22
1/1/2013
Unicast Cipher
On the AP and on Station at least one unicast cipher should match to make the wireless connection between 2 devices
www.MikroTiktrain.com
89
www.MikroTiktrain.com
90
Group Cipher
For the AP
If on AP the group cipher will be AES and TKIP the strongest will be used AES It is advised to choose only one group cipher on the AP
www.MikroTiktrain.com
92
23
1/1/2013
On the AP add an Access List entry with the neighbours MAC address and specify different PSK key, ask your neighbour to connect to it again
www.MikroTiktrain.com 93 www.MikroTiktrain.com 94
www.MikroTiktrain.com
95
24
1/1/2013
required - establish association only with remote devices that support management protection
for AP - accept only clients that support management protection for client - connect only to APs that support management protection
www.MikroTiktrain.com 97
www.MikroTiktrain.com
98
www.MikroTiktrain.com
100
25
1/1/2013
WDS Configuration
There are four different WDS operation modes
Dynamic WDS interfaces are created automatically as soon as other WDS compatible device is found Static WDS interfaces must be crated manually Dynamic-mesh same as dynamic mode, but with HWMP+ support (not compatible with standard dynamic mode or other vendors) Static-mesh same as static mode, but with HWMP+ support (not compatible with standard static mode or other vendors)
You must disable DFS setting if you have more that one AP in bridge/ap-bridge mode in your WDS network WDS implementation could be different for each vendor not all different vendor devices could be connected together with WDS
www.MikroTiktrain.com 103
www.MikroTiktrain.com
104
26
1/1/2013
WDS Configuration
There are four different WDS operation modes
Dynamic WDS interfaces are created automatically as soon as other WDS compatible device is found Static WDS interfaces must be crated manually Dynamic-mesh same as dynamic mode, but with HWMP+ support (not compatible with standard dynamic mode or other vendors) Static-mesh same as static mode, but with HWMP+ support (not compatible with standard static mode or other vendors)
www.MikroTiktrain.com
105
WDS Configuration
WDS Default Cost default bridge port cost of the WDS links WDS Cost Range margin of cost that can be adjusted based on link throughput WDS Ignore SSID whether to create WDS links with any other AP in this frequency
www.MikroTiktrain.com
107
www.MikroTiktrain.com
108
27
1/1/2013
www.MikroTiktrain.com
109
www.MikroTiktrain.com
110
www.MikroTiktrain.com
111
www.MikroTiktrain.com
112
28
1/1/2013
(R)STP in Action
www.MikroTiktrain.com
114
(R)STP Topology
www.MikroTiktrain.com
115
www.MikroTiktrain.com
116
29
1/1/2013
RSTP Configuration
Router with the lowest priority in the network will be elected as a Root Bridge
www.MikroTiktrain.com
118
30
1/1/2013
HWMP+
To configure HWMP+ use /interface mesh menu - configuration is very similar to bridge configuration. HWMP+ provide optimal routing based on link metric
For Ethernet links the metric is configured statically For WDS links the metric is updated dynamically depending on wireless signal strength and the selected data transfer rate
www.MikroTiktrain.com 122
www.MikroTiktrain.com
123
www.MikroTiktrain.com
124
31
1/1/2013
Proactive Mode
In proactive mode some routers are configured as portals router has interfaces to some other network, for example, entry/exit point to the mesh network Best suited when most of traffic goes between internal mesh nodes and a few portal nodes
www.MikroTiktrain.com 125
www.MikroTiktrain.com
126
Portals
Routes to portals will serve as a kind of default routes If an internal router does not know path to a particular destination, it will forward all data to its closest portal the portal will then discover path on behalf of the router, if needed. The data afterwards will flow through the portal This may lead to suboptimal routing, unless the data is addressed to the portal itself or some external network the portals has interfaces to
127 www.MikroTiktrain.com 128
www.MikroTiktrain.com
32
1/1/2013
WDS/MESH Lab
Configure the wireless interface as an AP with the same SSID as the teachers AP Enable Static WDS mesh mode Create WDS link with the teachers AP Configure the MESH add WDS to the mesh port Use MESH traceroute to check the path to the neighbors router Create WDS link with your neighbor router and add that to the mesh port Check again the MESH traceroute to your neighbor
www.MikroTiktrain.com 130
hwmp-preq-destination-only if no then on the Path Requests not only the destination router could answer but also one of the router on the way if it has route to the destination hwmp-preq-reply-and-forward effective only when hwmp-preq-destination-only=no; Router on the way after the reply will still forward the Path Request to the destination (with flags that only the destination router could answer)
www.MikroTiktrain.com 129
www.MikroTiktrain.com
131
www.MikroTiktrain.com
132
33
1/1/2013
www.MikroTiktrain.com
133
www.MikroTiktrain.com
134
Station-WDS
Set station-wds mode WDS-mode must be disabled on the wireless card Wireless client in Station-WDS mode can be bridged
Pseudobridge mode
Uses MAC-NAT MAC address translation for all the traffic Inspecting packets and building table of corresponding IP and MAC addresses All packets are sent to AP with the MAC address used by pseudobridge, and MAC addresses of received packets are restored from the address translation table Single entry in address translation table for all non-IP packets more than one host in the bridged network cannot reliably use non-IP protocols (pppoe for example) IPv6 doesn't work over Pseudobridge
www.MikroTiktrain.com
135
www.MikroTiktrain.com
136
34
1/1/2013
www.MikroTiktrain.com
138
35
1/1/2013
MikroTik Nstreme
Nstreme is MikroTik's proprietary (i.e., incompatible with other vendors) wireless protocol created to improve point-to-point and point-to-multipoint wireless links.
Nstreme Protocol
Benefits of Nstreme protocol: Client polling Disable CSMA No protocol limits on link distance Smaller protocol overhead per frame allowing super-high data rates No protocol speed degradation for long link distances
141 www.MikroTiktrain.com 142
www.MikroTiktrain.com
Nstreme Lab
Route your private network together with your neighbour's network Enable Nstreme and check link productivity with different framer policies
www.MikroTiktrain.com
144
36
1/1/2013
www.MikroTiktrain.com
145
www.MikroTiktrain.com
146
802.11n
www.MikroTiktrain.com
148
37
1/1/2013
802.11n
MIMO 802.11n Data Rates Channel bonding Frame Aggregation Wireless card configuration TX-power for N cards Transparent bridging for N links
MPLS/VPLS tunnel
www.MikroTiktrain.com 149
802.11n Features
Increased data rates up to 300Mbps 20Mhz and 2x20Mhz channel support Works both in 2.4 and 5ghz Uses multiple antennas for receive and transmit Frame aggregation
www.MikroTiktrain.com
150
MIMO
MIMO Multiple Input and Multiple Output SDM Spatial Division Multiplexing Multiple spatial streams across multiple antennas Multiple antenna configurations for receive and transmit:
1x1, 1x2, 1x3 2x2, 2x3 3x3
www.MikroTiktrain.com 151
www.MikroTiktrain.com
152
38
1/1/2013
www.MikroTiktrain.com
153
www.MikroTiktrain.com
154
Frame Aggregation
Combining multiple data frames into single frame decreasing the overhead Aggregation of MAC Service Data Units (AMSDU) Aggregation of MAC Protocol Data Units (AMPDU)
Uses Block Acknowledgement May increase the latency, by default enabled only for the best-effort traffic Sending and receiving AMSDUs will also increase CPU usage
www.MikroTiktrain.com 155
www.MikroTiktrain.com
156
39
1/1/2013
ht-amsdu-limit max AMSDU that device is allowed to prepare ht-amsdu-threshold max frame size to allow including in AMSDU
www.MikroTiktrain.com
157
www.MikroTiktrain.com
160
40
1/1/2013
www.MikroTiktrain.com
163
www.MikroTiktrain.com
164
41
1/1/2013
Outdoor setup
Test each chain separately before using both chains at the same time For 2 chain operation suggested to use different polarization for each chain When used dual-polarization antennas, isolation of the antenna recommended to be at least 25db
802.11n Lab
Establish the N link with your neighbor Test the performance with one and with two chains Create the transparent bridge using VPLS
www.MikroTiktrain.com
165
www.MikroTiktrain.com
166
Turn off your cellphone Dont use proxy Dont use copy, paste and print screen
bottom Close all messenger, email services and any capture software
168
167
42
1/1/2013
Certification Test
169
43