Introductory Example Mesh clients (mobile) Gateway Internet Mesh router (stationary) Wireless Mesh Networks: Introduction Basic Concepts Eduard Glatz (eglatz@hsr.ch) Mesh network Example Scenario: Infrastructure/backbone Wireless Mesh Network ■ ■ ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 1 of 45 Objectives Multi-hop network: one or more routers on path between source and destination node Mesh network: multipoint to multipoint connectivity ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm Agenda ■ You can define and characterize a wireless mesh network ■ Definition and characteristics of a wireless mesh network ■ You can illustrate five different application areas of wireless mesh networks ■ Typical application scenarios ■ You know how to calculate a wireless communication range ■ RF communication basics ■ You can explain the relationship between coding/modulation schemes and capacity ■ Channel access schemes in wireless communications ■ You can give an overview about wireless channel access schemes and their properties ■ Multi-hop wireless networking and formation guidelines ■ You know the history and formation guidelines of wireless mesh networks ■ The path length and power control problem ■ You know the path length and power control problem ■ Routing in mesh networks: requirements, taxonomy, example ■ You can name five wireless-specific routing problems ■ You know the taxonomy of wireless routing protocols ■ You can explain the principle of the ad-hoc wireless distance vector (AODV) routing ¤ E. Glatz 2 of 45 ATCN: WMN-BasicsWS0607.fm NB: Not covered topic is security 3 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 4 of 45 Mesh Networking ■ Characteristics of a WMN Network Topologies: ■ WMN‘s are considered to be a subclass of ad hoc networking --> Routing nodes are stationary (unlike in Mobile Ad Hoc Networks, MANET‘s) Full mesh: each node is directly connected to all other nodes ■ - Self-Configuration - Self-Healing (redundant, decentralized, no central point of failure) - Self-Managment - Self-Optimization --> Challenging tasks for a good system design Partial mesh: not all nodes are directly interconnected ■ ■ High overall capacity: - Spatial diversity - Power management Definition of a Wireless Mesh Network (WMN): In short: Multi-hop network built from wireless routers More detailed: Multi-hop peer-to-peer wireless network in which nodes connect with redundant interconnections and cooperate with one another to route packets ¤ E. Glatz WMN‘s have properties of an autonomic system: ATCN: WMN-BasicsWS0607.fm 5 of 45 Important constraints: - Shared bandwidth & interference - Number and location of nodes ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm Application Scenario Application Scenario Broadband Internet Access (last mile) Community Mesh Network 6 of 45 ADSL Backbone ■ Middle Mile Last Mile Cable Wired infrastructure often too expensive for last and middle mile: - Rural areas - Weakly populated countries ■ Cost factors in wired infrastructure: - Number of endpoints - Cable costs (length, unfriendly terrain) ■ WiMAX Issues in wireless solutions: - Range and bandwidth (mesh networking is the key) - Costs and maintenance requirements of hardware ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm Mesh infrastructure owned by participants 7 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm WiMAX ADSL Cablemodem Mesh network Wholesale local loop 8 of 45 Application Scenario Application Scenario City-wide Wireless Coverage (Blanket) Spontaneous Mesh Network ■ ■ Example: Roofnet Project Temporary mesh network for collaboration (usually with portable wireless devices) Scenarios: Real-time advisory (e.g. traffic information) - 802.11b mesh network - volunteer user host nodes - omnidirectional antennas - only up/downlink to wired ethernet - goal: high TCP throughput (average realized 627 kbps, routing queries failed for 10% of source-destination pairs) Public safety (emergency teams, fire, rescue) Peer-to-peer calling within local groups (events, university campus, conference ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 9 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm Application Scenario RF Communications Basics Industry Breakdown Transmission Formula (ideal conditions) Neighborhood Mesh Network Internet Wireless mesh based broadband access architecture: 101 Bus Stop 206 Master node: connects to wired internet Gas Station (Internet TAP) Mesh Router 7 Mini base station: mesh router rented to subscriber EXIT Mesh Router 5 Mesh Router 2 Mesh Router 3 Mesh Zone Mesh Router 1 Mesh End Device ¤ E. Glatz 10 of 45 End Device (Guest to Router 1) ATCN: WMN-BasicsWS0607.fm 90 Franchising: system and business model rented to local service provider (usually as a „side business“) [image source: V. Bahl, MSR] 11 of 45 Transmitter ■ Receiver Friis transmission formula (free space, ideal isotropic antennas): 2 c P r = -------------------- P t 2 4 S df [1] Pr: Signal power available at receiver antenna output [W] Pt: Signal power fed to transmitter antenna input [W] d: Distance between antennas [m] f: Frequency [Hz] c: Speed of light (3 x 108 m/s) ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 12 of 45 Multipath Fading and Shadowing Transmissions under Non-ideal Conditions Effects to consider ■ ■ ■ ■ LOS (Line-Of-Sight) ■ Distance between transmitter and receiver (Friis transmission law): Path loss Receiver sensitivity: Thermal noise Multipath fading: Reflection (eg. ground, buildings, water surface), diffraction, refraction Shadowing: Absorption (e.g. walls, buildings, rain, windows) Interference: same source or different source - May annihilate signal (same frequency & amplitude, 180o fixed phase relation) - May amplify signal (same frequency, 0o fixed phase relation) NLOS (Non Line-Of-Sight) ■ Multipath fading: diffraction, reflection, scattering ■ Shadowing: absorption ¤ E. Glatz - May be caused by other radio sources (e.g. microwave oven, WLAN, WPAN) ■ ATCN: WMN-BasicsWS0607.fm 13 of 45 Technical: Antenna Gains, Cable Losses ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 14 of 45 Communication Range Calculations Communication Range Calculations Use of the Decibel (dB) Strength of received signal ■ Ratio between two quantities expressed by a dimensionless logarithmic unit [dB] ■ May be used in different application areas (acoustics, physics, electronics) ■ ■ ■ P r > dBm @ = P t > dBm @ – L fs > dB @ + G t > dBi @ + G r > dBi @ Usage in calculations for RF communications: Ratio between two power values = 10 log10(P2/P1) ■ Special use: [dBi] = Antenna gain relative to an isotropic antenna (one-point source) ATCN: WMN-BasicsWS0607.fm Path loss (free space) § Pt · 4 S df L fs > dB @ = 10 log ¨ ------¸ > dB @ = 20 log § ------------· > dB @ © c ¹ © P r¹ [3] d: Distance between antennas f: Frequency c: Speed of light Examples: 2 dBi (simple antenna), 5 dBi (omnidirectional), 18-27 dBi (parabolic) ¤ E. Glatz [2] „Link Budget“ Pr: Signal power available at receiver antenna output Pt: Signal power fed to transmitter antenna input Lfs: Free space loss Gt, Gr: Gain of transmit antenna, of receive antenna Special use: [dBm] = Power level relative to a reference value of 1 mW Examples: - Typical 802.11 receiver sensitivity -60...-80 dBm - Typical 802.11 maximum transmitter power ~14 dBm - Typical minimal Signal-to-Noise (S/N, SNR) values for BPSK modulation ~6 dB ■ Receive signal strength expressed in dBm (non isotropic antennas): 15 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 16 of 45 Communication Range Calculations ■ Antenna Types Maximum usable communication range is given by: ■ - Signal strength at receiver - Noise level at receiver - Minimum required S/N (given by modulation and coding used) - omnidirectional radiation pattern - sectorial radiation pattern - directive radiation patterns ■ ■ Signal-to-Noise Ratio (SNR): ■ SNR > dB @ = P r > dBm @ – N > dBm @ Thermal noise level: [4] ■ [5a] N = k B T fbw > W @ ■ kB: Boltzmann‘s constant [J/K] T: Temperature [K] fbw: Bandwidth [Hz] ■ Formula for room temperature ■ (20o Antenna: reciprocity property (same behavior for transmit/receive) Basic reference is ideal isotropic antenna (radiates equally in all directions) Antenna gain: expressed in dBi relative to an ideal isotropic antenna Example „Cantenna“: - Uses a tin can as a wave guide - Cheap solution for developing countries C equiv. 293 K) for a non-ideal receiver: N > dBm @ = – 174 + 10 log f bw + NF Many different forms: [5b] NF (Noise Figure): Ratio of actual receiver noise to ideal receiver noise ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 17 of 45 MIMO (Multiple-Input Multiple-Output) Antennas MIMO SIMO ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 18 of 45 Communication Range and Modulation/Coding ■ Maximum communication range is given by minimal required S/N ■ Minimal required S/N is determined by an acceptable BER (Bit Error Rate) MISO Modulation scheme and code rate determine SNR requirements ■ ■ Modulation schemes (e.g. 802.16): BPSK: Binary Phase-shift keying QPSK: Quadrature Phase-shift Keying QAM: Quadrature amplitude modulation MIMO is a promising multi-antenna systems approach to: increase link capacity (eg. 802.11n) improve robustness benefit from „constructive“ interference avoid „destructive“ interference MIMO allows for: FEC (Forward Error Correction): Code rate = useful bits/total bits e.g., code rates in 802.16: 1/2, 2/3, 3/4 - multiple radio links (spatial multiplexing) - space-time coding - beamforming ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 19 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 20 of 45 Adaptive Modulation and Coding ■ ■ Overview: Spectrum Usage Regulations Constellation diagram: shows a digital modulation scheme in the complex plane --> distances between constellation points are a measure for „robustness“ Examples: BPSK , QPSK 16QAM , ■ Government regulations restrict frequency spectrum usage ■ Regulations are not equal in all countries (e.g. Europe, USA, Asia) ■ Frequency spectrum is „overloaded“ - For example the 2.4 GHz band („junk band“): WLAN 802.11b&g, WPAN 802.15 Bluetooth, 15.245 sensors, Part18-ISM, amateur, .... , - For example the 5.8 GHz band: WLAN 802.11a, WiMAX 802.16a, 15.209 generic unlicensed, satellite, aviation,... Adaptive modulation and coding: Switch between modulation/coding scheme based on actual SNR ■ Coverage Area Regulations differentiate between „licensed“ and „unlicensed“ spectrum usage Capacity available SNR r min. SNR r (radius) 2.4 GHz Band (USA) 5.8 GHz Band (USA) Optimization: automate adaptation (SNR-based, packet loss-based, ...) ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 21 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm CSMA and Wireless Communication CSMA and Wireless Communication The Collision Detection Problem The Hidden Terminal Problem 22 of 45 Wired ethernet B A B C A ■ A ■ C C ■ A wants to send to B: if the channel is clear then the transmission starts ■ C wants also to send (A is still sending) and checks if channel is free ■ Since C can not hear A it assumes the channel is free Example CSMA/CD situation: - A and C both want to transmit - If channel is idle, then both A and C start to transmit --> Collision ■ B Wireless LAN Wired Ethernet: A and C detect collision during sending (stop and backoff) Wireless LAN: Sender cannot detect collision during sending (technically not feasible) ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 23 of 45 --> Collision at B! ■ A is a hidden station (hidden terminal) from the viewpoint of C ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 24 of 45 CSMA and Wireless Communication MACA (Multiple Access Collision Avoidance) The Exposed Terminal Problem D RTS A RTS B CTS B D C ■ ■ A starts a transmission to B ■ C detects an occupied channel and waits with its transmission to D (until A-->B ends) ■ Since D cannot receive A this waiting is not really necessary 25 of 45 Backoff Procedure A ■ A waits until the channel is clear A announces its transmission intent with a Request-To-Send (RTS) The addressed node B responds with a Clear-To-Send (CTS) A transmits the data Behavior of C and D in this example: - The RTS and CTS PDU‘s contain the length of the transmission - Hidden node C overhears the CTS and does not send during A‘s data transmission - Exposed node D overhears RTS (but not CTS) and may send if he wants (NB: depending on WLAN standard this may be treated alike a CTS reception) ATCN: WMN-BasicsWS0607.fm RTS Before a data transmission starts a RTS/CTS handshaking is done Example: A wants to send data to B - ■ D CTS DATA A ¤ E. Glatz C ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 26 of 45 Carrier Sense in Wireless Systems RTS B (CTS) RTS Physical Carrier Sensing C (CTS) ■ Done at the air interface ■ Carrier sensing by CCA (Clear Channel Assessment): --> Process of detecting transmitting stations inside of the CCA detection range ■ Channel access: - ■ before transmission choose a backoff time tb in the range (0, cw); cw = contention window count down tb when channel is idle suspend countdown when channel is busy when tb=0 then start transmission Collision example: A and C want to send data to B - A and C send both RTS to B at the same time --> collision at B! - A and C can not detect collision during sending - B will not send CTS --> A and C back off ■ ■ CCA detection range depends on detector implementation ■ Interference may be interpreted as non-clear channel Virtual Carrier Sensing ■ Done at the MAC layer ■ Transmission duration info is extracted from MAC PDU header of RTS/CTS ■ Stations use so-called NAV (Network Allocation Vector) to store reservation periods ■ NAV reservation periods represent a virtually detected carrier ■ For carrier sensing both methods are combined in an OR‘ed fashion Binary exponential backoff: - each time expected CTS is not received: cw is doubled (up to a maximum size cwmax) - upon each successful transmission cw is restored to cwmin ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 27 of 45 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 28 of 45 Communication and Interference Range Lost Packet Detection Interference range D RTS RTS A B C ri A B CTS CTS DATA rc ACK Communication range ■ Typical reasons for packet loss: - poor signal quality (path loss, multipath fading, scattering, absoprtion, ...) - interference ■ ■ ■ ■ ■ ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm ■ 29 of 45 TDMA (Time Division Multiple Access) ■ Dynamic TDMA: 30 of 45 ■ DoD: Office environment multimedia communications with handheld devices - GloMo (Global Mobile Information Systems) 1995 - 2000 Characteristics: CSMA/CA and TDMA, several routing and topology control schemes, frequency 225-450 MHz, data rate 300 kbps - 802.16 (WiMAX), combined with TDD (Time Division Duplexing) or FDD (Frequency Division Duplexing) - 802.15 (Bluetooth), combined with FHSS (Frequency Hopping Spread Spectrum) ATCN: WMN-BasicsWS0607.fm DoD: Battlefield communications in infrastructureless hostile environments - PRNET (Packet Radio Network) 1972 - 1983 - SURAN (Survivable Adaptive Radio Network) 1983 - 1992 Characteristics (both): Combined Aloha & CSMA, distance vector routing, frequency 1.78 - 1.84 GHz, data rates 100..400 kbps Dynamic TDMA application examples: ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm Historical perspective - alternative to CSMA/CA in wireless networks - dynamically assigns a variable number of time slots per frame to each data flow - combines characteristics of circuit switching and packet switching - data flows may differ in guaranteed capacity (and other QoS properties) ■ ¤ E. Glatz Multi-hop wireless networking - used in circuit switched networks - examples: GSM, DECT ■ MACAW (Multiple Access Collision Avoidance for Wireless LAN): - extends basic MACA sequence by ACK Dynamic TDMA ■ Example: A transmits to B - Transmission is successfully completed when A receives ACK - a missing ACK would cause a timeout and a retransmission - Announced transmission time includes ACK (NAV reservation covers RTS/CTS,DATA,ACK) Communication range rc: Area for possible communication links Interference range ri: Area of interfered stations ri/rc ratio: depends on radio technology, typical values are 1.5 - 3 rc, ri may vary between stations (eg. A hears B, but B does not hear A) ■ ■ 31 of 45 IETF: „ad hoc networks“ - Mobile ad hoc networking (MANET) working group, since 1997 IEEE: - 802.11s working group, since 2004 ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 32 of 45 Mesh formation guidelines & results Performance: Packets in Flight Problem RTS ■ ■ ■ 1 Problem: How many nodes have to sign up before a viable mesh network forms? 1 1 5 6 7 8 4 5 6 7 8 3 ■ 0 20 40 60 80 100 120 140 160 ■ ■ [image source: V. Bahl, MSR] ■ 33 of 45 11 9 10 11 9 10 CTS RTS RTS 4 5 6 7 CTS 8 RTS 11 CTS Using MACAW (Multiple Access Collision Avoidance for Wireless): - Step 1: RTS 3-> 4 (inhibits 2), RTS 9-> 8 (inhibits 10) - Step 2: CTS 4-> 3 (inhibits 5), CTS 8->9 (inhibits 7) - Step 3: RTS 1->2 (can‘t proceed), RTS 11->10 (can‘t proceed), RTS 6->5 (can‘t proceed) 2 packets in flight Only 4 out of 11 nodes are active Backoff algorithm hurts (binary exponential backoff) ¤ E. Glatz Traffic flow through chain (starting from node 1) ■ Sending node 1 has least interference resulting in highest throughput A B C D ■ Reducing transmit power decreases interference (eg. C does not interfere with B) --> Increases throughput ■ ATCN: WMN-BasicsWS0607.fm 34 of 45 Example situation: 6 ■ ATCN: WMN-BasicsWS0607.fm Performance: Power Control Problem ■ 5 10 RTS RTS 2 9 Backoff window doubles Performance: Path Length Problem ¤ E. Glatz 3 Zeit ATCN: WMN-BasicsWS0607.fm 4 2 RTS ¤ E. Glatz 3 4 CTS Experimental results for mesh formation (MS Research): - at least 5-10% subscription rate required with wireless ranges > 100 m - if a mesh forms, then it is typically well connected (node degree > 2) - increasing range is a key for good mesh connectivity 2 3 RTS Answer: Depends on - Interpretation of „viable“ - Topology - Wireless range - Probability of participation 1 2 RTS 35 of 45 However: Collision at C when B and D transmit simultaneously ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 36 of 45 Performance: Power Control Problem ■ Routing in Wireless Mesh Networks Solution for example situation Differences to Wired Networks - Reduced transmit power for B - Collision problem solved - However: network disconnected --> What power setting is optimal? ■ Implementation issues: ■ A - Set all nodes to same power level? - Tune each node at deployment time? - Use equipment capable for automatic power control? Availability? - Use directional antennas? B Topology changes related to environmental fluctuations - new nodes may join - nodes may leave network - link qualities may vary over time (movement) --> Dynamics may prevent convergence of routing algorithm C D ■ Limited bandwidth and battery life --> periodic updates are unattractive ■ Partly unidirectional links --> computed routes may not work ■ Many redundant links --> increase routing updates ■ Additional factors to consider for path selection - link quality (stability, BER, bandwidth, ...) - interference ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 37 of 45 Taxonomy ■ ¤ E. Glatz Pro-active (table-driven) ■ ■ - discover routes only when needed - overhead scales automatically with movement Hybrid (Pro-Active/Reactive) ■ Hierarchical ■ Geographical ■ Power aware ¤ E. Glatz Flat addressing - node address independent of location - each node runs routing protocol Reactive (on-demand) ■ 38 of 45 Addressing - routes are learned and spread out - typically periodic updates ■ ATCN: WMN-BasicsWS0607.fm Hierarchical addressing - a subnet per cluster - nodes acquire address of subnet - only cluster heads run routing protocol ■ Clustering - node address independent of location - only cluster heads run routing protocol ■ ATCN: WMN-BasicsWS0607.fm 39 of 45 Each wireless routing protocol is related to a particular addressing scheme ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 40 of 45 Path Selection Metrics ■ AODV (Ad hoc On-demand Distance Vector) Minimal hop count metric often not optimal ■ Popular but still experimental routing protocol (IETF RFC 3561) ■ Routing problem divided into two parts: route discovery and route maintenance - weights derived from low rate, available bandwidth, ... ■ Route discovery: on-demand when packets have to be routed Path metric: combine all link metrics on path ■ Route maintenance: when routing failures (packet loss) occur ■ Sequence numbers: - wireless links often vary in quality ■ ■ Link metric: assign weights to links - prefer short paths ■ - route freshness - loop prevention Metrics: - hop count ETT (Expected Transmission Time) ETX (Expected Transmission Count) WCETT (Weighted Cumulative ETT) ■ Routing tables at nodes: - routes are stored as long as routes are active - timeouts: mark route(s) as inactive ■ Two-dimensional routing metric: hop count, sequence number ■ Basic routing messages: - RREQ (Route Request) - RREP (Route Reply) - RERR (Route Error) ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 41 of 45 ¤ E. Glatz AODV (Ad hoc On-demand Distance Vector) Summary Route discovery: ■ ■ ■ RREQ RREQ rebroadcast RREP RREP rebroadcast Reverse route Forward route ¤ E. Glatz ■ ■ ATCN: WMN-BasicsWS0607.fm 43 of 45 42 of 45 A wireless mesh network is a multi-hop network built from wireless routers and has properties of an autonomic system Wireless mesh networks have promising application areas, e.g. - ■ ATCN: WMN-BasicsWS0607.fm broadband internet access (last mile) community mesh networks city-wide wireless voverage (blanket) spontaneous mesh networks industry breakdown The wireless communication range can be calculated exactly in theory, but in practice the topology of the terrain has often a limiting influence Advanced wireless systems use adaptive modulation/coding schemes to leverage range and capacity for optimum performance Wireless networks may use several channel access schemes (CDMA/CA, MACAW, TDM, ...), which are clearly different from wired solutions Wireless mesh networks have evolved over more than 30 years and allow to build up viable networks if the communication range and node density fit reasonably ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 44 of 45 Summary (2) ■ ■ The performance of a wireless mesh network is degraded when using long paths and in the case of interfering nodes The routing in wireless networks is different from wired networks because of: - ■ Wireless mesh routing protocols may be classified into the following categories: - ■ topology changes related to environmental fluctuations limited bandwidth and battery life partly unidirectional links many redundant links link quality pro-active (table-driven) reactive (on-demand) hybrid (pro-active/reactive) hierarchical geographical power aware The AODV routing protocol uses on-demand route discovery and is resilient by doing route maintenance in case of routing failures ¤ E. Glatz ATCN: WMN-BasicsWS0607.fm 45 of 45