無線網路CH5
學校 : 中華大學 系所 : 通訊工程學系 老師 : 余誌民教授
1
無線網路 多重無線電存取
6.1 簡介 處理多重存取議題,有兩種不同的協定型 態:競爭式(contention-based)協定與無 衝突(或無碰撞)協定。 媒介共享技術可以分類為兩種作法:靜態通 道化(static channelization)與動態媒 介存取控制(dynamic medium access control)。
無線通訊 第六章 第142頁
6.2 多重無線電存取協定
無線通訊 第六章 第143頁 圖6.3
6.3.1 純ALOHA
無線通訊 第六章 第145頁 圖6.4
6.3.1 純ALOHA 由於排程時間的分佈是假設為一個波松過 程,我們有:
無線通訊 第六章 第145頁
6.3.1 純ALOHA 既然封包排程的速率為每秒g個封包,其中 僅一小部分PS是成功的,成功傳送率為 純ALOHA的產出率為:
無線通訊 第六章 第145頁
6.3.1 純ALOHA
無線通訊 第六章 第146頁 圖6.5
6.3.2 時隙ALOHA 若一行動台有封包要傳送,在傳送之前必須 等待至下一個時隙的開始。 新產生與重送封包的過程為波松過程,成功 傳送的機率為:
以及產出率
無線通訊 第六章 第146-147頁
是
6.3.1 純ALOHA
無線通訊 第六章 第147頁 圖6.6
6.3.3 CSMA
無線通訊 第六章 第148頁 圖6.7
6.3.3 CSMA
無線通訊 第六章 第148頁 圖6.8
非持續性CSMA協定 在此協定中,每當行動台有封包要傳送,會 先感測媒介。 若媒介是忙碌的,行動台會等待一段隨機長 度的時間,然後再次感測媒介。 如果媒介是空閒的,行動台會立即傳送封 包。 若發生碰撞,行動台會等待一段隨機長度的 時間,然後重新來過。 無線通訊 第六章 第149頁
非持續性CSMA協定 對非時隙式非持續性CSMA
對時隙式非持續性CSMA
無線通訊 第六章 第149頁
1-持續性CSMA協定 如果媒介是忙碌的,行動台會持續聆聽媒 介,並在媒介變成空閒時立即 立即進行封包傳 立即 送。 這協定叫做1-持續性,因為每當行動台發現 媒介是空閒時,就以機率1作封包傳送。 時隙式1-持續性CSMA,其產出率可由 [6.7] 獲得
無線通訊 第六章 第149-150頁
p-持續性CSMA協定 若媒介是空閒的,行動台會以機率p進行傳 送或以機率(1 2 p)將封包傳送的動作暫 緩至下一個時隙 。 若發生碰撞,行動台會等待一段隨機長度的 時間,並重新來過。
無線通訊 第六章 第150頁
p-持續性CSMA協定
無線通訊 第六章 第152頁 圖6.9
6.3.4 CSMA/CD 在典型的CSMA協定,若兩個終端點在同時間 開始傳送,儘管會碰撞,各自仍會傳送完整 封包。 這造成媒介浪費一整個封包時間,而此問題 可以透過一種新的協定叫做載波感測多重存 取/碰撞偵測(CSMA/CD)來解決。
無線通訊 第六章 第152頁
6.3.4 CSMA/CD
無線通訊 第六章 第153頁 圖6.10
6.3.5 CSMA/CA
無線通訊 第六章 第155頁 圖6.12
基本CSMA/CA
無線通訊 第六章 第155頁 圖6.12
具ACK之CSMA/CA
無線通訊 第六章 第156頁 圖6.14
具RTS與CTS之CSMA/CA
無線通訊 第六章 第157頁 圖6.15
無線區域網路媒體存取控制層協定
26
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
Introduction to IEEE 802.11 Wireless networks get rid of tangling and restriction of wired networks. Wireless channels are inherently unreliable and of limited bandwidth Dedicated MAC/PHY protocols are required. IEEE 802.11 standardizes and boosts the deployment of WLAN.
IEEE 802.11 vs. OSI Model IEEE 802.2 Logical Link Control (LLC) IEEE 802.11 Media Access Control (MAC) Frequency Hopping Spread Spectrum (FHSS)
Direct Infrare 802.11a Sequenc d (IR) 802.11b e Spread 802.11g Spectru ‌ m (DSSS)
MAC
PHY
OSI Layer 2 (Data Link)
OSI Layer 1 (Physical)
IEEE 802.11 Topologies Independent Basic Service Set (also called Ad-Hoc Network) STA: Wireless Station : Wireless Medium : Data Link
STA
IEEE 802.11 Topologies (cont) Infrastructure Basic Service Set
DS AP
DS: Distribution System AP: Access Point STA: Wireless Station : Distribution System Medium
STA
: Wireless Medium : Data Link
IEEE 802.11 Topologies (cont) Extended Service Set
IEEE 802.11 Network Services IEEE 802.11 Network Services
MAC Service Data Unit (MSDU) delivery Association Disassociation Authentication De-authentication Privacy (Wired Equivalent Privacy, WEP) ‌
IEEE 802.11 Network Services (cont) Network services are implemented via the exchange of frames by following MAC protocol Data Frame Control Frame Management Frame
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
Frame Format PHY Layer Convergence Protocol (PLCP) Data Unit (PPDU) PLCP Preamble 144 bits
PLCP Header 48 bits
MAC Protocol Data Unit (MPDU)
Frame Format (cont) MAC Protocol Data Unit (MPDU) Frame Duration Control or ID 16 bits 16 bits
Addr 1
Addr 2
Addr 3
48 bits
48 bits
48 bits
Sequence Control 16 bits
Addr 4 48 bits
Frame Body 0-16K bits
Protocol Type Subtype To From More Retry Pwr More WEP Order Version DS Frag DS Mgt Data 2 bits 2 bits 4 bits 1 bits 1 bits 1 bits 1 bits 1 bits 1 bits 1 bits 1 bits
CRC 32 bits
Frame Format (cont) Partial List of Type and Subtype Typ e 00
01
Type Description Management
Control
10
Data
11
Reserved
Subtyp Subtype Description e 0000 Association Request 1000
Beacon
1011
Authentication
1011
Request To Send (RTS)
1100
Clear To Send (CTS)
1101
Acknowledgement (ACK)
0000
Data Reserved
Frame Format (cont) Inter Frame Space
Short Inter Frame Space (SIFS) Point Coordination Inter Frame Space (PIFS) Distributed Inter Frame Space (DIFS) ‌
IFSs provide guarding spaces between frames With different durations, IFSs differentiate frames/entities with different priority Duration: DIFS>PIFS>SIFS Frames follow shorter IFSs have higher priority
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
IEEE 802.11 MAC Protocol IEEE 802.2 Logical Link Control (LLC) IEEE 802.11 Media Access Control (MAC) Frequenc y Hopping Spread Spectrum (FHSS)
Direct Infrare 802.11a Sequenc d (IR) 802.11b e Spread 802.11g Spectru ‌ m (DSSS)
MAC
PHY
OSI Layer 2 (Data Link)
OSI Layer 1 (Physical)
IEEE 802.11 MAC Protocol (cont) Functionalities Reliable frame delivery over the wireless PHY media Controlled multiple access to the shared wireless media Protection of the security/privacy of frames being delivered ‌
IEEE 802.11 MAC Protocol (cont) Objectives
Reliable Delivery Multiple Access Security/Privacy QoS (Quality of Service) Support Fair Sharing ‌
IEEE 802.11 MAC Protocol (cont) Mechanisms Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e ‌
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
MAC Access Modes Distributed Coordination Function (DCF) Distributed, contention-based Exponential backoff upon collision Optional CSMA/CA
Point Coordination Function (PCF) Superframe = Content Free Period + Contention Period (DCF) AP polls STAs in turn in Content Free Period (CFP) CFP is centralized, polling-based, contention-free
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
Carrier Sense Multiple Access / Collision Avoidance 802.3 (Ethernet) adopts Carrier Sense Multiple Access / Collision Detection (CSMA/CD) for medium access control Collision detection by sending and listening Frames
Data Source 1
Data Destination 1
Destination 2
Source 2
Carrier Sense Multiple Access / Collision Avoidance (cont) Collision detection is infeasible in WLAN Hidden Terminal Problem
Source 1
Destination
Source 2
Carrier Sense Multiple Access / Collision Avoidance (cont) 802.11 adopts Carrier Sense Multiple Access / Collision Avoidance (CSMA/CA) for medium access control RTS/CTS/Data/ACK 4-way handshaking and Virtual Carrier Sensing to reduce the chance of collision Network Allocation Vector (NAV), required duration for intended transmission, is carried in the Duration filed of RTS and CTS
Carrier Sense Multiple Access / Collision Avoidance (cont) 1. RTS: Request To Send 2. CTS: Clear To Send 3. Data 4. ACK: Acknowledgement
Source
Destination
Carrier Sense Multiple Access / Collision Avoidance (cont) Channel Previous Competition SIFS Cycle // RTS Source
SIFS
SIFS Data
CTS
ACK
Destination NAV(RTS) Others
NAV(CTS) Defer Access
DIFS
Next Cycle
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
Distributed Coordination Function Distributed Coordination Function
No coordinator Contention-based Exponential backoff upon collision Optional CSMA/CA For both infrastructure and ad-hoc topologies
Distributed Coordination Function (cont) Backoff Algorithm STA randomly picks up a Backoff Time (number of “Slot Time”) from [0,CW] Backoff timer Freeze when medium is busy Decrease when free period > DIFS
Transmission is commenced when timer reaches zero
Distributed Coordination Function (cont) : Frame
: Backoff
st: Slot Time
: MSDU Arrival
DIFS
A B C D
19st
9st
4st
10st 15st
5st 7st
2st
2st
Distributed Coordination Function (cont) Exponential Backoff Slot Time = transmitter turn-on delay + medium propagation delay + medium busy detect response time On collision, CW is increased exponentially till CWmax On success, CW is reset to CWmin For IEEE 802.11b A Slot Time is of 20us CW is in {CWmin=31,63,127,255,511,CWmax=1023}
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Distributed Coordination Function Point Coordination Function IEEE 802.11e
Point Coordination Function Point Coordination Function Superframe = Content Free Period + Contention Period (DCF) In Content Free Period (CFP), Point Coordinator (AP in general) polls STAs in turn CFP is centralized, polling-based, contention-free Adequate for time-bounded applications Only for infrastructure topologies Not widely implemented
Point Coordination Function (cont) B: Beacon, Dx: Downlink, Ux: Uplink, P: CF-Poll, A: CF-Ack, E: CF-End PIFS SIFS SIFS SIFS PC STA 1 STA 2
B
D1/P
SIFS SIFS
D2/A/P
PIFS
D3/A/P
SIFS SIFS
D4/P
E
U1/A U2/A
STA 3 U4/A
STA 4 NAV Contention Free Period Superframe
// Contention Period
Outline Introduction to IEEE 802.11 Frame Format Medium Access Control Protocol MAC Access Modes Carrier Sense Multiple Access / Collision Avoidance Point Coordination Function Distributed Coordination Function IEEE 802.11e
IEEE 802.11e Limitation of 802.11 PCF Simple round-robin algorithm Limited QoS support Transmission time of the polled stations is not under control
IEEE 802.11e Enhanced QoS supports for service differentiation Different Arbitration Inter Frame Space (AIFS) and CWmin/CWmax for different Access Categories (ACs) Controlled Transmission Opportunity (TXOP)
IEEE 802.11e (cont) IEEE 802.11e Superframe = (Optional) Point Coordination Function (PCF) + Hybrid Coordination Function (HCF)
HCF = Mixture of Enhanced DCF channel access (EDCA) HCF controlled channel access (HCCA)
Hybrid Coordinator (HC) has total control over the mixture of EDCA/HCCA
IEEE 802.11e (cont) Enhanced DCF Channel Access (EDCA) Prioritized QoS support 4 Access Categories AC_VO (voice), AC_VI (video), AC_BE (best effort), AC_BG (background)
Different AIFS and CWmin/CWmax for different ACs ACs with higher priorities have better chance to gain access right
IEEE 802.11e (cont)
IEEE 802.11e (cont) HCF controlled channel access (HCCA) Parameterized QoS support HC polls and assigns TXOP to Traffic Stream (TS) according to its Traffic Specification (TSPEC) HC can gain control of medium after PIFS
Thank you for your attention! Comments and suggestions are sincerely welcomed! 謝欽旭, csshieh@cc.kuas.edu.tw