28
IEEE 802.11 CSMA/CA DCF CSE 6590 Fall 2009 03/26/22 1

2a_CSMA_CA

  • Upload
    kvsrvzm

  • View
    212

  • Download
    0

Embed Size (px)

DESCRIPTION

Networking slides

Citation preview

  • IEEE 802.11 CSMA/CA DCFCSE 6590Fall 2009**

  • **MAC RequirementsTo avoid interference among simultaneous transmissionsBut enable as many non-interfering transmission as possibleMaintain fairness among transmissions

    No centralized coordinators: fully distributed operations

    No clock synchronization: asynchronous operations

  • **Carrier SensingProblemsHidden terminal problemExposed terminal problem

    Sensing range Transmission range

    Contention matters only at the receivers end

  • **Hidden Terminal Problem ABXNo carrier OK to transmit

  • **Exposed Terminal Problem ABXYPresence of carrier holds off transmission

  • **Existing WorkMACA [Karn 1990]Proposes to solve the hidden terminal problem by RTS/CTS dialog

    MACAW [Bharghanvan 1994]Increasing reliability by RTS/CTS/DATA/ACK dialog

    IEEE 802.11Distributed Coordination Function (DCF)Also use RTS/CTS/DATA/ACK dialog

  • **RTS/CTS dialog (1)RTSDeferAny node hearing this RTS will defer medium access

  • **RTS/CTS dialog (2)RTSDeferCTSDeferAny node hearing this CTS will defer medium access

  • **RTS/CTS/DATA/ACK dialog DataDeferACKDefer

  • **IEEE 802.11 DCFUses RTS/CTS exchange to avoid hidden terminal problemAny node overhearing a CTS cannot transmit for the duration of the transfer.Any node overhearing an RTS cannot transmit for the duration of the transfer (to avoid collision with ACK)Uses ACK to achieve reliabilityCSMA/CAContention-based random accessCollision detection not possible while transmitting

  • **IEEE 802.11 DCF (cont.)Carrier sense in 802.11Physical carrier senseVirtual carrier sense using Network Allocation Vector (NAV)RTS/CTS specify duration of subsequent DATA/ACKNAV is updated based on overheard RTS/CTS Collision avoidanceNodes stay silent when carrier sensed busy (physical/virtual)Backoff intervals are used to reduce collision probability

  • **Backoff IntervalWhen channel is busy, choose a backoff interval in the range [0, cw].Count down the backoff interval when medium becomes idle.Count down is suspended if medium becomes busy again.When backoff interval reaches 0, transmit RTS.Binary exponential backoff in 802.11 DCF:When a node fails to receive CTS, cw is doubled up (up to an upper bound).When a data transfer completes successfully, cw is reset to cwmin.

  • **IEEE 802.11 CSMA/CA ExampleDIFS: DCF inter-frame spaceSISF: short inter-frame space

  • **Disadvantages of IEEE 802.11 DCFHigh power consumptionHidden terminal problem not totally solved (e.g., collision of RTS)Exposed terminal problem not solvedFairness problem among different transmitting nodesOnly providing best-effort service

  • Detailed 802.11 DCF**

  • Media Access Control*

  • Distributed Coordination FunctionDCF sublayer uses CSMA if station has frame to send it listens to mediumif medium idle, station may transmitelse waits until current transmission complete No collision detection since on wireless networkDCF includes delays that act as a priority scheme*

  • Fig. 6.69 (Leon-Garcia)Basic CSMA/CA operations*

  • IEEE 802.11 Medium Access Control Logic*

  • Fig. 6.71 (Leon-Garcia)

    Transmission without RTS/CTS*

  • Fig. 6.72 (Leon-Garcia)

    Transmission with RTS/CTS*

  • Priority IFS ValuesSIFS (short IFS) for all immediate response actions (see later) PIFS (point coordination function IFS)used by the centralized controller in PCF scheme when issuing pollsDIFS (distributed coordination function IFS)used as minimum delay for asynchronous frames contending for access

    *

  • SIFS UseSIFS gives highest priorityover stations waiting PIFS or DIFS timeSIFS used in following circumstances:Acknowledgment (ACK)station responds with ACK after waiting SIFS gapfor efficient collision detect & multi-frame transmissionClear to Send (CTS)station ensures data frame gets through by issuing RTSand waits for CTS response from destinationPoll responsesee Point coordination Function (PCF) discussion next

    *

  • PIFS and DIFS UsePIFS used by centralized controllerfor issuing pollshas precedence over normal contention trafficbut not SIFSDIFS used for all ordinary asynchronous traffic*

  • IEEE 802.11 MAC TimingBasic Access Method*

  • IEEE 802.11 MAC Frame Format*

  • MAC for Multicast**

  • **MAC for Multicast: a Challenging IssueMulticast: efficient info delivery from a source to a set of destinations simultaneously

    Uses 802.11 CSMA/CA

    Cannot use RTS/CTS exchange

    Currently there are no effective MAC protocols for multicast

    *The 802.11 working group considered two types of proposals for a MAC algorithm: distributed access protocols, which, like Ethernet, distribute the decision to transmit over all the nodes using a carrier sense mechanism; and centralized access protocols, which involve regulation of transmission by a centralized decision maker. A distributed access protocol makes sense for an ad hoc network of peer workstations (typically an IBSS) and may also be attractive in other wireless LAN configurations that consist primarily of bursty traffic. A centralized access protocol is natural for configurations in which a number of wireless stations are interconnected with each other and some sort of base station that attaches to a backbone wired LAN; it is especially useful if some of the data is time sensitive or high priority. The end result for 802.11 is a MAC algorithm called DFWMAC (distributed foundation wireless MAC) that provides a distributed access control mechanism with an optional centralized control built on top of that. Stallings DCC8e Figure 17.5 illustrates the architecture. The lower sublayer of the MAC layer is the distributed coordination function (DCF). DCF uses a contention algorithm to provide access to all traffic. Ordinary asynchronous traffic directly uses DCF. The point coordination function (PCF) is a centralized MAC algorithm used to provide contention-free service. PCF is built on top of DCF and exploits features of DCF to assure access for its users.

    *The DCF sublayer makes use of a simple CSMA (carrier sense multiple access) algorithm. If a station has a MAC frame to transmit, it listens to the medium. If the medium is idle, the station may transmit; otherwise the station must wait until the current transmission is complete before transmitting. The DCF does not include a collision detection function (i.e., CSMA/CD) because collision detection is not practical on a wireless network. The dynamic range of the signals on the medium is very large, so that a transmitting station cannot effectively distinguish incoming weak signals from noise and the effects of its own transmission. To ensure the smooth and fair functioning of this algorithm, DCF includes a set of delays that amounts to a priority scheme. Let us start by considering a single delay known as an interframe space (IFS). In fact, there are three different IFS values, but the algorithm is best explained by initially ignoring this detail.

    *Using an IFS, the rules for CSMA access are as follows (Stallings DCC8e Figure 17.6):1. A station with a frame to transmit senses the medium. If the medium is idle, it waits to see if the medium remains idle for a time equal to IFS. If so, the station may transmit immediately.2. If the medium is busy (either because the station initially finds the medium busy or because the medium becomes busy during the IFS idle time), the station defers transmission and continues to monitor the medium until the current transmission is over.3. Once the current transmission is over, the station delays another IFS. If the medium remains idle for this period, then the station backs off a random amount of time and again senses the medium. If the medium is still idle, the station may transmit. During the backoff time, if the medium becomes busy, the backoff timer is halted and resumes when the medium becomes idle.4.If the transmission is unsuccessful, which is determined by the absence of an acknowledgement, then it is assumed that a collision has occurred.To ensure that backoff maintains stability, binary exponential backoff, described in Chapter 16, is used. Binary exponential backoff provides a means of handling a heavy load. Repeated failed attempts to transmit result in longer and longer backoff times, which helps to smooth out the load. Without such a backoff, the following situation could occur: Two or more stations attempt to transmit at the same time, causing a collision. These stations then immediately attempt to retransmit, causing a new collision.

    *The preceding scheme is refined for DCF to provide priority-based access by the simple expedient of using three values for IFS: SIFS (short IFS): The shortest IFS, used for all immediate response actions, as explained in the following discussion PIFS (point coordination function IFS): A midlength IFS, used by the centralized controller in the PCF scheme when issuing polls DIFS (distributed coordination function IFS): The longest IFS, used as a minimum delay for asynchronous frames contending for access

    *Consider first the SIFS. Any station using SIFS to determine transmission opportunity has, in effect, the highest priority, because it will always gain access in preference to a station waiting an amount of time equal to PIFS or DIFS. The SIFS is used in the following circumstances: Acknowledgment (ACK): When a station receives a frame addressed only to itself (not multicast or broadcast), it responds with an ACK frame after waiting only for an SIFS gap. This has two desirable effects. First, because collision detection is not used, the likelihood of collisions is greater than with CSMA/CD, and the MAC-level ACK provides for efficient collision recovery. Second, the SIFS can be used to provide efficient delivery of an LLC protocol data unit (PDU) that requires multiple MAC frames. In this case, the following scenario occurs. A station with a multiframe LLC PDU to transmit sends out the MAC frames one at a time. Each frame is acknowledged by the recipient after SIFS. When the source receives an ACK, it immediately (after SIFS) sends the next frame in the sequence. The result is that once a station has contended for the channel, it will maintain control of the channel until it has sent all of the fragments of an LLC PDU. Clear to Send (CTS): A station can ensure that its data frame will get through by first issuing a small Request to Send (RTS) frame. The station to which this frame is addressed should immediately respond with a CTS frame if it is ready to receive. All other stations receive the RTS and defer using the medium. Poll response: This is explained in the following discussion of PCF.

    *The next longest IFS interval is the PIFS. This is used by the centralized controller in issuing polls and takes precedence over normal contention traffic. However, those frames transmitted using SIFS have precedence over a PCF poll.

    Finally, the DIFS interval is used for all ordinary asynchronous traffic.

    *Stallings DCC8e Figure 17.7a illustrates the use of these time values. *Stallings DCC8e Figure 17.8 shows the 802.11 frame format. This general format is used for all data and control frames, but not all fields are used in all contexts. The fields are: Frame Control: Indicates the type of frame (control, management, or data) and provides control information. Control information includes whether the frame is to or from a DS, fragmentation information, and privacy information. Duration/Connection ID: If used as a duration field, indicates the time (in microseconds) the channel will be allocated for successful transmission of a MAC frame. In some control frames, this field contains an association, or connection, identifier. Addresses: The number and meaning of the 48-bit address fields depend on context. The transmitter address and receiver address are the MAC addresses of stations joined to the BSS that are transmitting and receiving frames over the wireless LAN. The service set ID (SSID) identifies the wireless LAN over which a frame is transmitted. Sequence Control: Contains a 4-bit fragment number subfield, used for fragmentation and reassembly, and a 12-bit sequence number used to number frames sent between a given transmitter and receiver. Frame Body: Contains an MSDU or a fragment of an MSDU. The MSDU is a LLC protocol data unit or MAC control information. Frame Check Sequence: A 32-bit cyclic redundancy check.