Multimedia Communication Services Traffic Modeling and Streaming Medium Access Control algorithms Introduction to IEEE 802.11 Università degli Studi di Brescia A.A. 2014/2015 Francesco Gringoli Master of Science in Communication Technologies and Multimedia
IEEE 802.11 Wireless Lan: Infrastructure Mode Standard 802.11: cell based Each cell is a Basic Service Set (BSS) Controlled by an Access Point (AP), may be connected to wired network Stations in the same cell communicates through the AP More cells form an Extended Service Set (ESS) In each cell, AP works as a Bridge for the other cells ESS it s a single wide 802 network (Broadcast domain) Distribution System (DS) connect all APs DS Traffic Modeling and Streaming 2
IEEE 802.11 Wireless Lan standard Many PHYs: Infrared (never implemented) RF @ 2.4GHz Industrial, Scientific and Medical (ISM) Interferences possible with Bluetooth and microwave ovens RF @ 5GHz Unlicensed National Information Infrastructure (UNII) Channel bandwitdh (standards pre 2014): 20MHz, 40MHz Several modulations: Quaternary Phase Shift Keying (QPSK), up to 2Mb/s Complementary Code Keying (CCK), up to 11Mb/s Orthogonal Frequency Division Multiplexing (OFDM), up to 150Mb/s Multi-streams at the same time (MIMO): up to 600Mb/s (x4) Traffic Modeling and Streaming 3
IEEE 802.11 Wireless Lan standard/2 Standard: evolution and supported data rates 1997: 802.11(802.1y), R LEGACY =[1Mb/s, 2Mb/s], @ 2.4GHz; B/QPSK 1999: 802.11b, R CCK =[5.5,11]Mb/s, @ 2.4GHz; CCK; supports R LEGACY 2001: 802.11a, R OFDM =[6,9,12,18,24,36,48,54]Mb/s, @ 5GHz; OFDM OFDM: signal transmitted over 52 orthogonal subcarriers: 48 data, 4 pilots Each subcarrier transmits a symbol or N bits of the original packet Symbols form a macro-symbol whose duration is T = 4µs E.g.: macro-symbol:=216b, DataRate = 216bit/4µs = 54Mb/s Macro-symbol separated by guard interval Against fading T GI = 800ns, data takes T FFT = 3200ns FEC: packet bits are expanded inside symbols Tratto da [1] E.g., 54Mb/s Coding is 3/4 from 216b to 288b Traffic Modeling and Streaming 4
IEEE 802.11 Wireless Lan standard/3 Standard: evolution and supported data rates 2003: 802.11g, R=[R LEGACY,R CCK,R OFDM ], @ 2.4GHz; QPSK, CCK, OFDM Same rates as 802.11b + OFDM encoding (called ERP-OFDM) @ 2.4GHz Similar to 802.11a: additional pause (6µs) after tail (signal extension) 2009: 802.11n Same rates as OFDM (+802.11b) with many optionals More data subcarriers, from 48 to 52: 54Mb/s 58.5Mb/s (=54/48*52) FEC more efficient: 5/6 240b instead of 216b 58.5Mb/s 65Mb/s Guard Interval halved: symbol takes 3.6µs 65Mb/s 72.2Mb/s Channel bonding: two channel of 20MHz together 72.2Mb/s 150Mb/s(?) Multi-streams: up to 4 stream 150Mb/s 600Mb/s Today: 802.11ac, more bw, more optional, exceeds 1Gb/s! Traffic Modeling and Streaming 5
IEEE 802.11bg: insight 2.4GHz In ISM band there are 79(+2) 1MHz subchannels Each 802.11b/g channel covers 22MHz Standard places 13 channels spaced of 5MHz + channel 14 @ 2484MHz E.g.,: ch1 @ 2412MHz, ch2 @ 2417MHz,, ch13 @ 2472MHz Regulatory domain, defines how channels are allocated worldwide E.g., USA [1-11], Italy [1-13], Japan only channel 14. Problem: each channel (22MHz) wider than channel spacing (5MHz) Only 3 to 4 channels (22MHz) may be used at the same time! Traffic Modeling and Streaming 6
IEEE 802.11n: Channel Bonding Two adjacent channels may be bonded, bw raises to 40MHz Rate double (more than 2x, signaling overhead does not double!) From [2] Traffic Modeling and Streaming 7
IEEE 802.11n: MIMO Multiple Input Multiple Output Both tx er and rx er have multiple RF sections Multipath with a single radio is a problem, with MIMO is useful!! Each tx er antenna transmits a part of the overall signal (a stream) Streams arrive at different rx er antennas with different phases Streams can be separated! From [2] Traffic Modeling and Streaming 8
IEEE 802.11b: frame format/1 Frame includes: PLCP: for receiver synchronization PLCP:= Physical Layer Convergence Procedure PSDU: PLCP Service Data Unit, payload with data PPDU:=PLCP Protocol Data Unit = PLCP + PSDU E.g.: 802.11b Long preamble SYNC 128 bit SFD 16 bit SIGNAL 8 bit SERVICE 8 bit LENGTH 16 bit CRC 16 bit 192bit @1Mb/s DBPSK modulation PLCP Preamble 144 bit PLCP Header 48 bit PSDU @ 1, 2, 5.5 o 11Mb/s From [1] ΔT PLCP = 192µs!! PPDU Traffic Modeling and Streaming 9
IEEE 802.11b: frame format/2 E.g.: Acknowledgement, PSDU:=10byte + 4byte CRC32 = 112bit @1Mb/s, PLCP:=192µs, PSDU:= 112µs @2Mb/s, PLCP:=192µs, PSDU:= 56µs @5.5Mb/s, PLCP:=192µs, PSDU:= 21µs @11Mb/s, PLCP:=192µs, PSDU:= 11µs Problem with overhead: PLCP too long!! 802.11b introduces Short PLCP:=72bit(@1Mb/s)+48bit(@2Mb/s) = 96µs Short SYNC Short SFD 56 bit 16 bit DBPSK @ 1Mb/s SIGNAL 8 bit SERVICE LENGTH 8 bit 16 bit DQPSK @ 2Mb/s CRC 16 bit Short PLCP Preamble 72 bit @ 1Mb/s Short PLCP Header 48 bit @ 2Mb/s PSDU @2, 5.5, or 11Mb/s From [1] PPDU Traffic Modeling and Streaming 10
IEEE 802.11g: frame format/3 802.11g: new PLCP, very short PLCP Preamble: rx er synchronization (sig detect, diversity selection etc) SIGNAL contains PSDU rate and length in byte SERVICE: initialization scrambling sequence From [1] Traffic Modeling and Streaming 11
IEEE 802.11g: frame format/4 802.11g: frame includes PLCP Preamble made of 10 short symbols (8µs) + 2 long ones (8µs) PLCP Header made of SIGNAL field in its own symbol (4µs, PSDU length+rate) SERVICE field, first 16 bits of first data symbol PSDU made of symbols, each one carrying N bits, N depends on Rate PSDU terminate with CRC32 and at least 6 padding bits From [1] Traffic Modeling and Streaming 12
IEEE 802.11g: frame format/5 802.11g: data payload Bit expanded by convolutional encoder for FEC, R = [1/2, 2/3, 3/4] Groups of N CBPS (Coded Bit Per Symbol) or N DBPS (Data Bit Per Symbol) Each subcarrier transport N BPSC bit (Bit Per SubCarrier) Modulation R N BPSC N CBPS N DBPS Data rate BPSK 1/2 1 48 24 6 BPSK 3/4 1 48 36 9 QPSK 1/2 2 96 48 12 QPSK 3/4 2 96 72 18 16-QAM 1/2 4 192 96 24 16-QAM 3/4 4 192 144 36 64-QAM 2/3 6 288 192 48 64-QAM 3/4 6 288 216 54 Traffic Modeling and Streaming 13
IEEE 802.11g: frame format/6 E.g.: Acknowledgement, PSDU:=10byte + 4byte CRC32 = 112bit PLCP: 20µs DATA PSDU : 16b(SERVICE)+112b(PSDU)+6b(tail min )=134b Data rate PLCP bit symbol ΔT Extension Total 6 20µs 134 6 24µs 6µs 50µs 9 20µs 134 4 16µs 6µs 42µs 12 20µs 134 3 12µs 6µs 38µs 18 20µs 134 2 8µs 6µs 34µs 24 20µs 134 2 8µs 6µs 34µs 36 20µs 134 1 4µs 6µs 30µs 48 20µs 134 1 4µs 6µs 30µs 54 20µs 134 1 4µs 6µs 30µs Traffic Modeling and Streaming 14
IEEE 802.11: PSDU types Three types: Management, e.g. Association Request/Response, Beacon, Auth/Deauth Network Advertisement, BSS Join, Authentication etc Control, e.g. ACK, RTS, CTS, Poll, etc For channel access (RTS, CTS), positive frame acknowledgment Data: Plain data + QoS Data, etc Frames with user data PSDU fields: depend on frame type! 2 2 6 6 6 2 6 2 0-2312 4 Frame Control Duration ID Address 1 Address 2 Address 3 Sequence Control Address 4 QoS Control Frame Body FCS Traffic Modeling and Streaming 15
IEEE 802.11: PSDU fields/1 Frame Control: Protocol version, only 0 today Type and Subtype encode frame type + subtype ToDS: frame is for Distribution System; FromDS frame is from DS If both set to 1, frame is transported by a Wireless DS More: announce other fragments are coming (PSDU is fragmented) Retry: help rx er understanding this is a retransmission {Pwr Mgt, More Data} deal with power management, save Protected: announce Frame Body is encrypted From [1] Traffic Modeling and Streaming 16
IEEE 802.11: PSDU fields/2 Duration/ID Meaning depends on PSDU type Data: number of µs after frame end during which medium is reserved Used by Virtual Carrier Sense Address fields: they depends on ToDS/FromDS fields: BSSID: Basic Service Set IDentification Address of the joined AP DA: Destination Address, final destination RA: Receiver Address, immediate frame destination SA: Source Address, who has generated this frame TA: Transmitter Address, who has forwarded this frame Traffic Modeling and Streaming 17
IEEE 802.11: PSDU fields/3 Example: From [1] Traffic Modeling and Streaming 18
IEEE 802.11: PSDU fields/4 Sequence Control: Fragment number, 4 bits For fragmented PSDU, it s the number of this fragment Sequence Number, 12 bits, unique for PSDU Identify the PSDU (used by rx er to avoid accepting same frame > once) QoS Control: identify Traffic Category (check the standard) FCS: CRC/32 Frame Check Sequence protecting the PSDU Traffic Modeling and Streaming 19
IEEE 802.11: PSDU types E.g., Data Frame IP packet, no QoS, from STA to AP, N byte Encapsulated into a data frame Logical Link Control (LLC) encapsulation is used 8 bytes before IP: 0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00 Type: Data frame (0x02) & Subtype: 0 Byte#0 FC := 0x08 ToDS Byte#1 FC := 0x01 Duration: time to tx and ACK + SIFS Address: it s a ToDS frame SeqCTRL: frag. no:=0, seq. no:=33 SeqCTRL:=0x0210 ethertype 2 2 6 6 6 2 8 N 4 08 01 3A 01 BSSID SA DA 10 02 AA AA 03 00 00 00 08 00 IP FCS Traffic Modeling and Streaming 20
IEEE 802.11: Fragmentation Ethernet: packets up to 1518byte (No jumbo frames!) Wireless Lan: good reasons for using shorter packets Very high Bit Error Rate (wrt to 802.3): P e packet length If error, retransmitting shorter packets means less overhead To maintain compatibility with Ethernet at LLC layer Use a fragmentation mechanism at the MAC layer (below LLC) Send-and-Wait: station transmits the same fragment Until ack for the last (re)sent is received If a single fragment is retransmitted too many times, drop the packet Traffic Modeling and Streaming 21
IEEE 802.11: Point Coordination Function PCF used instead of DCF for time bounded traffic E.g., voice or video traffic AP gain access before other stations because of shorter wait Do not obey DIFS, wait for Point coordination IFS (PIFS) For handling unicast traffic in a Master-Slave fashion AP is the Master and polls Slaves, i.e., Stations MAC is managed with deterministic multiplexing of traffic E.g., stations transmit in turn Between adjacent PCF period, use DCF E.g., to transmit Best Effort traffic Traffic Modeling and Streaming 22
IEEE 802.11: PCF/2 time Traffic Modeling and Streaming 23
IEEE 802.11: PCF/3 and new techniques Attention: Actually they never implemented it Outdated by 802.11e New MAC based on polling Hybrid Coordination Function Controlled Channel Access (HCCA) Each Beacon interval divided into two parts Contention based access (DCF) Contention free access (HCCA) Outdated by 802.11aa New MAC for delivering multicast (groupcast) frames, e.g., video Deeply based on 802.11n Block Ack (frames acked in group) Traffic Modeling and Streaming 24
IEEE 802.11: Synchronization Stations in a BSS requires synchronization because tx slotted Station clock refreshed at every beacon (e.g., every 100ms) Beacon contains copy of AP clock when it was transmitted Stations simply copy this time info into their internal clock register Without this mechanism clocks will skew out in a while (cheap devices!) Traffic Modeling and Streaming 25
IEEE 802.11: Ad-hoc Networks Standard defines AP less networks E.g., for exchanging documents between a couple of laptops The first station that starts the cell will act as the AP Beacon generation Clock synchronization Traffic Modeling and Streaming 26
IEEE 802.11: rate choice/1 How to choose the rate is not specified by the standard Rate Controller algorithm: RC RCs use feedback based techniques E.g., Minstrel algorithm, it s the default today in Linux kernel Count total frames transmitted PER every rate, assess success probability Rate that has best success delivery ratio is the winner Periodically (every N frames) send a frame at a test rate Constantly scan the entire rate set Rely on frames that require ACK, by counting: Number of attempts per packet Failed rate, success rate Traffic Modeling and Streaming 27
IEEE 802.11: rate choice/2 Example: UDP packet TX RX backoff RC set up these 7 attempts: [54Mb/s {1,2},48Mb/s {3,4},12Mb/s {5},1Mb/s {6,7} ] tempo backoff backoff KO KO OK KO OK OK Try 1 Try 2 Try 3 Try 4 backoff 54 54 48 48 At the end of this packet, RC refreshes its table Rate Success Failure 54 2812/3004 (93%) 192/3004 (7%) 48 408/507 (80%) 99/507 (20%) 36 102/402 (25%) 300/402 (75%) Rate Success Failure 54 2812/3006 (93%) 194/3006 (7%) 48 409/509 (80%) 100/509 (20%) 36 102/402 (25%) 300/402 (75%) Don t change decision (not now ) Traffic Modeling and Streaming 28
IEEE 802.11n: rate choice 802.11b/g: RC chooses from 4+8 possible, from 1 to 54Mb/s 802.11n: RC may choose from 4+8+64 (two streams only!) Modulation Coding Scheme add 8 rates with 8 different configurations They are 8 basic encoding (52 subcarriers instead of 48) combined with {1/2 stream, channel bonding, long/short GI} that is 8 possibilities Actually this lead to only 55 different Data Rates over 76! Tratto da [2] Traffic Modeling and Streaming 29
Bibliography [1] IEEE 802.11-2007, Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, June 2007. [2] Tutorial on 802.11n from Cisco: http://www.wireshark.ch/download/cisco_pse_day_2009.pdf [3] G. Bianchi, Performance analysis of the IEEE 802.11 distributed coordination function. IEEE Journal on Selected Areas in Communications, 18(3), pp. 535-547, 2000. Traffic Modeling and Streaming 30