Bài giảng MAC and Physical.ppt
MAC & Physical Layers (1 September, 2006) February 2005 Coypright 2005 All Rights Reserved Objectives Upon completion of this chapter you will be able to: q Explain how a client joins a network q Describe the modes of operation wireless LANs use to communicate q Explain how wireless LANs avoid collisions on the network q Define the Request-to-Send / Clear-to-Send transmission protocol q Explain the effects of fragmentation on a network February 2005 Coypright 2005 All Rights Reserved Communication Modes q Wireless LANs vs Ethernet q Joining a network Passive scanning Active scanning q Distributed Coordination Function (DCF) q Point Coordination Function (PCF) February 2005 Coypright 2005 All Rights Reserved IEEE 802.3 - Ethernet February 2005 Coypright 2005 All Rights Reserved IEEE 802.3 PROCESS DATA DATA DSAP SSAP CNTRL LLC-PDU ETHERNET DESTINATION ADDRESS PREAMBLE IEEE 802.3 CSMA/CD PREAMBLE DA SA 2/6 2/6 q THIS FIELD IS NOT IN ETHERNET q ETHERNET HAS A TYPE FIELD q q q q q 1-2 FIELD TYPE 6 SFD SOURCE ADDRESS PROCESS DATA LENGTH LLC-PDU LLC PDU FCS 0-1500 LLC PDU LLC-PDU 0-1500 q THIS FIELD IS NOT PRESENT IN ETHERNET q ETHERNET LENGTH MUST BE >= 64 OCTETS Ethernet was developed by Bob Metcalf, Xerox Corp Standardized in 1980 as IEEE 802.3 CSMA/CD algorithm is same for both Ethernet and 802.3 Frame format differs between Ethernet and 802.3 Frame format differs between Ethernet and 802.11 February 2005 PAD FCS Coypright 2005 All Rights Reserved IEEE 802.3 FORMAT q 802.3 Ethernet Frame size of 1518 bytes (1500 for payload) Jumbo Frames are 9000 bytes Fragmented at 1518 bytes by Host or Routers (IPv4) q 802.11 Wireless Ethernet Frame size 2346 (3212 for payload) Fragmented by Access Point to 1518 for traversing wired system February 2005 Coypright 2005 All Rights Reserved IEEE 802.11 – Wireless Ethernet February 2005 Coypright 2005 All Rights Reserved Generic 802.11 Frame Frame Control 6 Duration Rec ID Addr Xmit Addr Dest Addr Seq Cntl Src Addr 0-2312 Frame Body FCS q Frame Control Specifies control information unique to wireless transmission q Duration Generally indices how may microseconds the medium is expected to stay busy during transmission q Addresses These are the MAC address of the MS, AP and Ethernet nodes q Sequence Field The number of each transmitted frame q Frame Body The higher layer payload transmitted from station to station q Frame Check Sequence (FCS) Used to validate the integrity of the transmitted data February 2005 Coypright 2005 All Rights Reserved 802.11 Frames/Protocols q Three major 802.11 frame types exist Data frames carry higher level protocol data in the Frame body Control frames are used to assist in the delivery of data frames, administer access to the medium and to provide MAC layer reliability Management frames perform supervisory functions such as joining/ leaving a wireless network and move associations from AP to AP February 2005 Coypright 2005 All Rights Reserved 802.11 Frame Types Management Frames Association Request frame Association Response frame Reassociation Request frame Probe request Frame Probe Response frame Beacon frame ATIM frame Disassociation frame Authentication frame Deauthentication frame February 2005 Control Frames Request to Send (RTS) Clear to Send (CTS) Acknowledgement (ACK) Power-Save Poll (PS Poll) Contention-Free End (CF End) CF-End + CF ACK Coypright 2005 All Rights Reserved 10 EDCAF q EDCAF defines traffic priority levels with the higher priority traffic being transmitted first EDCAF does not provide any guaranteed bandwidth but it does provide an increased probability that stations with high priority traffic will transmit first An Arbitration Interframe Space (AIFS) wait period which corresponds to the traffic priority is transmitted prior to the data The stations with the highest priority traffic which corresponds to the smallest AIFS wait period, transmits data February 2005 Coypright 2005 All Rights Reserved 32 February 2005 Coypright 2005 All Rights Reserved 33 HCF q The Hybrid Coordination Function (HCF) polls stations during contention-free periods and grants each station a specific start time and maximum duration for transmission During the Contention Free Period (CFP), the AP (Hybrid Coordinator) controls the access to the medium The HCF defines a number of different Traffic Classes (TC) The stations give information about the lengths of their queues for each Traffic Class (TC) to the AP The AP uses this information to give priority to one station over another In addition, stations can be given a Transmit Opportunity (TXOP) and, for a given time period selected by the HC, they may send multiple packets in a row q Since PCF has not been widely used, this second enhancement has received lower interest levels than Enhanced DCF, although the two can work together February 2005 Coypright 2005 All Rights Reserved 34 RTS/CTS February 2005 Coypright 2005 All Rights Reserved 35 Carrier Sensing Review q CSMA/CA is based upon two types of carrier sensing mechanisms Physical Carrier and Virtual Carrier-Sensing Virtual Carrier Sensing is provided by Network Allocation Vector (NAV) 802.11 frames carry a duration field which reserves the medium for a fixed time The NAV is a timer that indicates the amount of time the medium is to be reserved Stations set their NAV timer upon receipt of a frame containing a duration field Stations cannot transmit during that period When the NAV timer reaches zero the Virtual CarrierSensing indicates the medium is idle and the station can transmit q For the station to transmit both the physical and virtual carrier sense must report an idle condition otherwise the station must enter a deferral condition February 2005 Coypright 2005 All Rights Reserved 36 Carrier Sensing Review Contd q For the station to transmit both the physical and virtual carrier sense must report an idle condition otherwise the station must enter a deferral condition q Each data frame contains a duration field that sets the NAV timer in all stations This value is long enough to (1) transmit an ACK in response to a data frame and to (2) account for the IFS The NAV value is said to protect the ACK q If an RF coverage area has a high rate of collisions, CSMA/CA, based upon carrier sensing, will not help the problem of collission Under these circumstances it might be more efficient to reserve transmission time This reservation of transmission time is the purpose of RTS/CTS February 2005 Coypright 2005 All Rights Reserved 37 RTS/CTS q The client station issue a Request to Send (RTS) frame to the AP This frame contain a duration field value which is issued to set the NAV timer All stations in the BSS will hopefully hear the RTS Some may not due to the Hidden Node problem q The AP responds with a Clear to Send (CTS) frame which contains a shorter Duration field because all stations may not have heard the RTS –remember the hidden Node problem All stations in the BSS now set their NAV timer and will not attempt to transmit unit their NAV timer decreases to zero q The client then passes data to the AP which ACKs the data transmission q After this exchange the wireless medium may be used by any station after the Distributed Interframe Space (DIFS) February 2005 Coypright 2005 All Rights Reserved 38 RTS/CTS Handshaking The RTS/CTS contains a Duration value which sets the NAV timer February 2005 Coypright 2005 All Rights Reserved 39 RTS/CTS Process Station Access Point SIFS - Short Interface Frame Space DIFS - Distributed Interface Frame A client transmits an RTS frame to the AP The receiving AP respond with a CTS frame containing a shorter duration field This value is used to set the NAV timer by the other stations After this exchange all clients in the BSS then contend based upon the contention window after the DIFS February 2005 Coypright 2005 All Rights Reserved 40 RTS/CTS Issues q RTS/CTS causes significant overheard traffic on the WLAN thereby reducing throughput q Because it decreases throughput RTS/CTS is normally turned OFF by default on a WLAN Most vendor products will allow the Wireless Network Administrator to set the RTS/CTS threshold if required If the network is experiencing a high amount of collisions this may indicate a Hidden Node One solution to a high collision rate may be RTS/CTS February 2005 Coypright 2005 All Rights Reserved 41 Fragmentation and Reassembly February 2005 Coypright 2005 All Rights Reserved 42 Fragmentation and Reassembly q Fragmentation, breaking larger packets into smaller size packets, is a techniques used in wireless communication to improve the throughput of the wireless channel as a result of interference caused by microwave ovens, wireless phones, jamming, etc., Interference affects smaller fragments less than larger fragments Fragments all have the same sequence number but ascending fragment numbers to aid in reassembly Frame control information indicates whether more fragments are coming Stations never fragment multicast or broadcast frames February 2005 Coypright 2005 All Rights Reserved 43 Fragmentation There is a tradeoff between the lower frame error rate that can be achieved by fragmentation and the increase overhead due to fragmentation Fragments comprising a frame are normally sent in fragmentation bursts February 2005 Coypright 2005 All Rights Reserved 44 Fragmentation Burst Fragments and their ACKs are separated by SIFS so a station retains control of the channel during the fragmentation burst The NAV is used to retain control of the channel The RTS/CTS set the NAV from the expected time to the end of the first fragment The ACK fragments set the NAV thereafter until completion of the fragmentation burst February 2005 Coypright 2005 All Rights Reserved 45 End of Lecture February 2005 Coypright 2005 All Rights Reserved 46 ... Xerox Corp Standardized in 1980 as IEEE 802.3 CSMA/CD algorithm is same for both Ethernet and 802.3 Frame format differs between Ethernet and 802.3 Frame format differs between Ethernet and 802.11... administer access to the medium and to provide MAC layer reliability Management frames perform supervisory functions such as joining/ leaving a wireless network and move associations from AP to... slot is medium dependent Stations pick a random slot and wait for that time slot before attempting to access the medium The station with the lowest random number (slot) accesses first The number