0% found this document useful (0 votes)
40 views9 pages

Tiempos Control de Acceso Al Medio

The document summarizes the IEEE 802.11 (Wi-Fi) frame formats and medium access control protocol. It shows that 802.11 frames have (a) a MAC header containing control information and addresses, and (b) a physical layer frame with a preamble, header, and MAC frame payload. It also describes how stations use different interframe spaces (SIFS, PIFS, DIFS) and random backoff times to avoid collisions when accessing the wireless medium according to the CSMA/CA protocol.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views9 pages

Tiempos Control de Acceso Al Medio

The document summarizes the IEEE 802.11 (Wi-Fi) frame formats and medium access control protocol. It shows that 802.11 frames have (a) a MAC header containing control information and addresses, and (b) a physical layer frame with a preamble, header, and MAC frame payload. It also describes how stations use different interframe spaces (SIFS, PIFS, DIFS) and random backoff times to avoid collisions when accessing the wireless medium according to the CSMA/CA protocol.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Ivan Marsic  Rutgers University 118

MAC header MSDU

bytes: 2 2 6 6 6 2 6 2 0 to 2304 4

FC D/I Address-1 Address-2 Address-3 SC Address-4 QC Data FCS

FC = Frame control MSDU = MAC Service Data Unit


D/I = Duration/Connection ID
SC = Sequence control
(a) QC = QoS control
FCS = Frame check sequence

bits: 2 2 4 1 1 1 1 1 1 1 1
Protocol To From
Type Type MF RT PM MD W O
version DS DS

DS = Distribution system MD = More data


MF = More fragments W = Wired equivalent privacy (WEP) bit
RT = Retry O = Order
PM = Power management

(b)
802.11 physical-layer frame: Physical protocol data unit (PPDU)

shown above
in part (a)
Physical-layer preamble Physical-layer header MAC-layer frame (payload)
144 bits 48 bits (variable)

Synchronization SFD Signal Service Length CRC


SFD = start frame delimiter
128 bits 16 bits 8 bits 8 bits 16 bits 16 bits

Figure 1-78: IEEE 802.11 (Wi-Fi) frame formats. (a) Link-layer (or, MAC-layer) frame
format. (b) Physical-layer frame format (also known as Long PPDU format).

In the infrastructure BSS case (Figure 1-75), only three addresses are used along with the bits
“To DS” and “From DS” (Figure 1-78(a)). If the frame has the “To DS” bit set, then Address 3 is
the destination address; if “From DS” set to 1, then Address-3 is the original source address.
The 802.11 physical-layer frame (Figure 1-78(b)) is known as PLCP protocol data unit (PPDU),
where PLCP stands for “physical (PHY) layer convergence procedure.” The version shown in
Figure 1-78(b) is known as Long PPDU format. A preamble is a bit sequence that allows a
receiver to distinguish silence from transmission periods and detect the beginning of a new
packet. Receivers watch for a preamble to lock onto the rest of the frame transmission. (We
encountered preambles in Section 1.1.4, as well as in Ethernet, Figure 1-66.) There are two
different preamble and header formats defined for 802.11 physical-layer frames. The mandatory
supported long preamble and header, shown in Figure 1-78(b), is interoperable with the basic 1
Mbps and 2 Mbps data transmission rates. There is also an optional short preamble and header
(not illustrated here), known as Short PPDU format. This format is used at higher transmission
rates to reduce the control overhead and improve the network performance. (More discussion is
provided in Chapter 6.)
Chapter 1  Introduction to Computer Networking 119

DIFS
PIFS Contention
period
SIFS
Busy Frame transmission
.....
Backoff Time
slots

Defer access Select slot using binary exponential backoff

Figure 1-79: The timing diagram for IEEE 802.11 frame transmissions. The collision-
avoidance (or “contention”) period follows the interframe space (xIFS) and contains a
random number of backoff slots. The IFS length is used to control the priority of a station.

Medium Access Control (MAC) Protocol


The medium access control (MAC) protocol for IEEE 802.11 is a CSMA/CA protocol (Section
1.3.3). A CSMA/CA sender tries to avoid collision by introducing a variable amount of delay
before starting with transmission. This is known as the access deferral state. Similar to an
Ethernet adapter (Section 1.5.2), a Wi-Fi adapter needs time to decide that the channel is idle.
Again, this period is known as interframe space (IFS). However, unlike Ethernet, the IFS delay is
not fixed for all stations to 96-bit times. Wi-Fi has an additional use of the IFS delay, so that it
can differentiate stations of different priority. Each station must delay its transmission according
to the IFS period assigned to the station’s priority class. A station with a higher priority is
assigned a shorter interframe space and, conversely, lower priority stations are assigned longer
IFSs. The idea behind different IFSs is to create different priority levels for different types of
traffic. Then, high-priority traffic waits less time after the medium has become idle. If there is any
high-priority traffic, it grabs the medium before a lower-priority station has a chance to try.
When a station wants to transmit data, it first senses if the medium is busy. Three rules apply:
1. If the station found the medium idle, and it stayed idle for the duration of IFS
corresponding to this station’s priority level, the transmission can begin immediately.
2. If the medium is busy, the station continuously senses the medium, waiting for it to
become idle. When the medium becomes idle, the station enters the collision-avoidance
state (or, access deferral state). The station can transmit the packet if the medium is idle
after the collision-avoidance period expires.
3. If during the collision-avoidance state the channel is sensed busy (because another station
transmitted), this station will remain silent for the duration of that transmission.
The event sequence and IFS relationships are illustrated in Figure 1-79. First, the station waits for
its assigned IFS duration, which may be different for different stations, but once assigned it is
fixed. After IFS, the station enters collision-avoidance by setting a contention timer (or,
“backoff timer”) to a time interval randomly selected in the range [0, CW1], and counting down
to zero while sensing the carrier. If the carrier is idle when the backoff countdown reaches zero,
the station transmits. If the carrier becomes busy before the backoff reaches zero, the station
freezes the counter and resumes the countdown when the medium again becomes idle.
Ivan Marsic  Rutgers University 120

To assist with interoperability between different data rates (Figure 1-77), the interframe space is a
fixed length of time, independent of the physical layer bit rate (even for the latest 802.11
standard, see Chapter 6). There are two basic intervals determined by the physical layer (PHY):
the short interframe space (SIFS), which is equal to the parameter  (Section 1.3.3), and the slot
time, which is equal to 2. To be precise, the 802.11 slot time is the sum of the physical-layer
Rx-Tx turnaround time12, the clear channel assessment (CCA) interval, the propagation delay on
the air medium, and the link-layer processing delay. The station must sense the channel state (idle
or busy) for a full slot duration.
The four different types of IFSs defined in 802.11 (three of which are shown Figure 1-79) are:
SIFS: Short interframe space is used for the highest priority transmissions, such as control frames,
or to separate transmissions belonging to a single dialog (including Data-and-ACK frames,
Figure 1-80). This value is a fixed value per PHY and is calculated in such a way that the
transmitting station will be able to switch back to the receive mode and be capable of
decoding the incoming packet.
PIFS: PCF (or priority) interframe space is used by the point coordination function (PCF) during
contention-free operation. The coordinator station (usually the Access Point) uses PIFS
when issuing polls and the polled station may transmit after the SIFS has elapsed and
preempt any contention-based traffic. PIFS is equal to SIFS plus one slot time.
DIFS: DCF (or distributed) interframe space is the minimum time that the medium should be idle
for asynchronous frames contending for access. Stations may have immediate access to the
medium if it has been idle for a period longer than the DIFS. DIFS is equal to SIFS plus
two slot times.
EIFS: Extended interframe space (not illustrated in Figure 1-79) is much longer than any of the
other interframe spaces. If a station has received a frame containing errors while waiting for
transmission, then a station has to defer EIFS duration instead of DIFS before transmitting.
This station could not decode the duration information of the received frame (D/I field in
Figure 1-78) and correctly set its deferral period (defined later as “network allocation
vector”). EIFS ensures that this station is prevented from colliding with a future
acknowledgment frame belonging to the current dialog.
EIFS
Busy Backoff Frame transmission

detected a corrupted frame


More IFS types are defined in recent variants of the 802.11 standard, see Chapter 6 for details.
The values of some important 802.11b system parameters are shown in Table 1-6. The values
shown are for the 1Mbps channel bit rate and some of them are different for other bit rates.

12
Rx-Tx turnaround time is the maximum time (in s) that the physical layer requires to change from
receiving to transmitting the start of the first symbol. More information about the Rx-Tx turnaround time
is available in: “IEEE 802.11 Wireless Access Method and Physical Specification,” September 1993; doc:
IEEE P802.11-93/147: http://www.ieee802.org/11/Documents/DocumentArchives/1993_docs/1193147.doc
Chapter 1  Introduction to Computer Networking 121

DIFS Backoff Time


Busy Data
Sender 4 3 2 1 0

SIFS
Busy Receive data ACK
Receiver
Resume
countdown
after deferral
DIFS Backoff Suspend countdown and defer access DIFS
Busy
Another station 9 8 7 6 5 6 5 4 3

Figure 1-80: Timing diagram for the IEEE 802.11 basic transmission mode, which is based
on the stop-and-wait ARQ. Note the backoff slot countdown during the contention period.

Table 1-6: Example IEEE 802.11b system parameters.


Parameter Value for 1 Mbps channel bit rate
Slot time 20 sec
SIFS 10 sec
DIFS 50 sec (DIFS = SIFS + 2 × Slot time)
EIFS SIFS + PHY-preamble + PHY-header + ACK + DIFS = 364 sec
CWmin 32 (minimum contention window size)
CWmax 1024 (maximum contention window size)
PHY-preamble 144 bits (144 sec)
PHY-header 48 bits (48 sec)
MAC data header 28 bytes = 224 bits
ACK 14 bytes + PHY-preamble + PHY-header = 304 bits (304 sec)
RTS 20 bytes + PHY-preamble + PHY-header = 352 bits (352 sec)
CTS 14 bytes + PHY-preamble + PHY-header = 304 bits (304 sec)
CTS-timeout SIFS + CTS + Slot time = 10 + 304 + 20 = 334 bits (334 sec)
MTU* Adjustable, up to 2304 bytes for frame body before encryption
(*) The Maximum Transmission Unit (MTU) size specifies the maximum size of a payload
(in bytes) that a frame can carry, not counting the frame’s header and trailer (see Section
1.1.3). MAC-layer MTU is also known as MSDU, for MAC Service Data Unit (see Figure
1-78(a)). The reader may also encounter the numbers 2312, 2324, or 2320, which are
802.11 MTU sizes after encryption, depending on the encryption method. The maximum
MAC frame size is 2346 bytes, known as MPDU, for MAC Protocol Data Unit which
including the MAC header and FCS (Figure 1-78(a)). In practice, MSDU size seldom
exceeds 1500 bytes because of the need to bridge with Ethernet.
Unlike Ethernet (Section 1.5.2) or PPP (Section 1.5.1), 802.11 implements a reliable transmission
ARQ with acknowledgments and retransmissions. An example of an 802.11 frame transmission
in the so-called basic mode is shown in Figure 1-80. Note that even the units of the atomic
transmission (data and acknowledgment frames) are separated by SIFS, which is intended to give
the transmitting station a short break so it will be able to switch back to receive mode and be
capable of decoding the incoming (in this case ACK) frame.
Ivan Marsic  Rutgers University 122

New packet /
Idle / Wait for Idle / ACK error-free /
Sense Sense Send End
DIFS
ACK in error /
Busy / Busy / Wait for
EIFS
Timeout / 1

(a) Increase CW & attempts 


1 Abort
Attempt count max-attempts /

attempts 
max-attempts /
backoff == 0 / 1

Set Wait for end of Idle / Countdown


Wait for
backoff transmission DIFS
Sense backoff  backoff  1

backoff  0 /
Busy /

Packet error-free / Wait for Send


Receive End
SIFS ACK

Packet in error /

(b)
Wait for
EIFS

Figure 1-81: (a) Sender’s state diagram for 802.11 MAC protocol basic mode. Compare to
CSMA/CA in Figure 1-36. In “Set backoff,” the backoff counter is set randomly to a
number  {0, …, CW1}. (b) Receiver’s state diagram for 802.11 MAC protocol.

The state diagrams for 802.11 senders and receivers are shown in Figure 1-81. Note that sender’s
state diagram is based on the CSMA/CA protocol shown in Figure 1-36, slightly modified.
Here is an example:
Example 1.6 Illustration of Timing Diagrams for IEEE 802.11 (Basic Mode)
Consider a local area network (infrastructure BSS) using the IEEE 802.11 protocol shown in Figure
1-81. Show the timing diagrams for the following scenarios:
(a) A single station has two frames ready for transmission on an idle channel.
(b) A single station has one frame ready for transmission on a busy channel. The acknowledgment for
the frame is corrupted during the first transmission.
(c) A single station has one frame ready for transmission on a busy channel. The data frame is
corrupted during the first transmission.
The solutions are shown in Figure 1-82. Sender’s actions are shown above the time axis and receiver’s
actions are shown below the time axis. A crossed block represents a loss or erroneous reception of the
corresponding frame.
Chapter 1  Introduction to Computer Networking 123

Packet arrival, DIFS


channel idle DIFS
(a) Frame-1 Backoff Frame-2 Time

ACK ACK
(no backoff) SIFS SIFS

(retransmission)
DIFS EIFS
(b) Busy Backoff Frame-1 Backoff Frame-1
ACK ACK
Frame retransmission due to ACK failure. SIFS SIFS

(retransmission)
DIFS ACK Timeout
(c) Busy Backoff Frame-1 Backoff Frame-1
ACK
Frame retransmission due to an erroneous data frame reception. SIFS

Figure 1-82: Timing diagrams for the 802.11 basic mode, showing the sender’s activity
above each timeline and receiver’s activity below the timeline. (a) Timing of successful
frame transmissions under the DCF. (b) Frame retransmission due to ACK failure. (c)
Frame retransmission due to an erroneous data frame reception.

The timing of successful frame transmissions is shown in Figure 1-82(a). If the channel is idle upon the
packet arrival, the station transmits immediately (after a mandatory DIFS), without backoff. The
rationale is that because there was no previous transmission to wait to end, there is no reason that
another station would synchronize and collide with this one. However, the station has to backoff for its
own second transmission.
Figure 1-82(b) shows the case where an ACK frame is received in error, i.e., received with an incorrect
frame check sequence (FCS). The transmitter re-contends for the medium to retransmit the frame after
an EIFS interval. This is also indicated in the state diagram in Figure 1-81. The reason for EIFS is that
our station has not received a (error-free) ACK; therefore, it need to (re-)transmit a data frame.
However, it just detected an erroneous frame (corrupted ACK). As a result, before contending for the
medium for retransmission, the station has to wait EIFS instead of DIFS.
On the other hand, if no ACK frame is received within a timeout interval (even a corrupted ACK), due
possibly to an erroneous reception at the receiver of the preceding data frame, as shown in Figure
1-82(c), the transmitter contends again for the medium to retransmit the frame after an ACK timeout.
(Note that the ACK timeout is much shorter than the EIFS interval; in fact, ACK_timeout = tSIFS + tACK
+ tslot. Check Table 1-6 for the values.)

Hidden Stations Problem


The hidden and exposed station problems are described earlier in Section 1.3.3. A common
solution is to induce the receiver to transmit a brief “warning signal” so that other potential
transmitters in its neighborhood are forced to defer their transmissions. IEEE 802.11 extends the
basic access method (Figure 1-80) with two control frames: request-to-send (RTS) and clear-to-
send (CTS) frames, which are very short frames exchanged before the data and ACK frames.
(Frame lengths, including RTS and CTS durations, are shown in Table 1-6.) The process is shown
in Figure 1-83, where node A needs to send data to node B and node C is hidden to A and may
potentially interfere with its transmission. Sender A first sends the RTS frame to receiver B
(Figure 1-83(a)). If the transmission succeeds, receiver B responds by a short frame (CTS). The
Ivan Marsic  Rutgers University 124

A transmits Request-to-Send N bytes to B B responds with Clear-to-Send N bytes


(a) (b)
RTS(N-bytes)

B B
A C A C

CTS(N-bytes)

C listens but cannot hear A’s transmission both A and C hear B’s transmission

A transmits N-bytes long data frame to B

N-bytes frame “I should be


quiet for N-byte
B duration of
A C transmission”

Defer(N-bytes)
(c)
Figure 1-83: IEEE 802.11 protocol is augmented by RTS/CTS frames to reserve the channel
and prevent interference by hidden stations. The “N-bytes” information informs the
overhearing stations about the duration of the forthcoming transmission.

CTS frame is intended not only for sender A, but also for all other stations in the receiver’s range
(Figure 1-83(b)). All stations that receive a CTS frame know that this frame signals a
transmission in progress and must avoid transmitting for the duration of the upcoming data frame.
Through this indirection, the sender performs “floor acquisition” so it can speak unobstructed
because all other stations will remain silent for the duration of transmission (Figure 1-83(c)).
The 4-way handshake of the RTS/CTS/DATA/ACK exchange of the 802.11 protocol (Figure
1-84) requires that the roles of sender and receiver be interchanged several times between a pair
of communicating nodes, so neighbors of both these nodes must remain silent during the entire
exchange. Because some stations may be hidden from others (e.g., in Figure 1-83 stations A and
C and hidden to each other), the stations cannot rely on the regular carrier sense mechanism. For
this purpose, 802.11 introduced the so called virtual carrier sense mechanism. Each frame
carries in its D/I field of the MAC header (Figure 1-78(a)) the remaining duration (in
microseconds) needed to receive the next frame transmission. The neighboring nodes that
overhear the RTS or CTS frames will set their network allocation vector (NAV) values from the
D/I value to ensure that atomic operations are not interrupted. Figure 1-84 indicates how the NAV
duration is set for RTS, CTS, data and ACK frames.
The additional RTS/CTS exchange shortens the vulnerable period from the entire data frame in
the basic method (Figure 1-80) down to the duration of the RTS/CTS exchange in the RTS/CTS
method (Figure 1-84). If a “covered station” transmits simultaneously with the sender, they will
Chapter 1  Introduction to Computer Networking 125

SIFS
DIFS Backoff Time
Busy RTS Data
Sender 4 3 2 1 0

SIFS

SIFS
Busy CTS ACK
Receiver
NAV (Data)
NAV (CTS)

DIFS Backoff NAV (RTS)


Busy
Covered Station 8 7 6 5 4

Access to medium deferred for NAV(RTS)


DIFS Backoff
Busy
Hidden Station
Access to medium deferred for NAV(CTS)

Figure 1-84: The 802.11 protocol atomic unit exchange in RTS/CTS transmission mode
consists of four frames: RTS, CTS, Data, and ACK. (Compare to Figure 1-80.)

collide within the RTS frame. If a hidden station overhears a CTS frame, it knows that another
station requested a transmission reservation and it will not interfere with the subsequent data
frame transmission. In either case, the sender will detect collision by the lack of the CTS frame. If
collision happens, it will last only a short period because RTS and CTS frames are very short
relatively to data frames. (For example, according to Table 1-6, RTS equals 352 bits or 44 bytes,
which is 18.1 slot times.)
Note, however, that within an access point area (“infrastructure BSS”) some stations may be
communicating in the RTS/CTS access mode and others in the basic access mode (Figure 1-80).
The NAV vector is set only in the RTS/CTS mode and not in the basic mode, because RTS/CTS
frames perform channel reservation for the subsequent data frame. To a station that operates in
the basic mode, an RTS/CTS/DATA/ACK exchange would appear as two successive
transmissions. The vulnerable period lengths would be different, as well, depending on the access
mode in which a given station operates.
This RTS/CTS exchange partially solves the hidden station problem but the exposed station
problem remains unaddressed. The hidden station problem is solved only partially, because if a
hidden station starts its transmission simultaneously with the CTS frame from the receiver, the
hidden station will not hear the CTS frame, the sender will receive the CTS frame correctly and
start with the data frame transmission, and this will result in a collision at the receiver. (Of course,
the probability of this event is very low.)
802.11 RTS/CTS protocol does not solve the exposed station problem (Figure 1-32(b)). Exposed
stations could maintain their NAV vectors to keep track of ongoing transmissions. However, if an
exposed station gets a packet to transmit while another transmission is in progress, it is allowed to
transmit for the remainder of the NAV, before the sender needs to receive the ACK. Tailoring the
frame to fit this interval and accompanied coordination is difficult and is not implemented as part
of 802.11.
Ivan Marsic  Rutgers University 126

Recent extensions in the evolution of the 802.11 standard are described in Chapter 6.

1.6 Quality of Service Overview

The focus of this chapter has been on what networks do and how they do it. We also need to
consider how well they do their work, particularly for multimedia applications. Multimedia
applications deal with analog signals of sound, light, touch, etc. Unlike symbolic data which can
be experienced in abstract chunks without strict dependence on time, analog signals require
faithful reproduction in time for best experience.
The Internet Protocol (IP, Section 1.4.1) is ubiquitous and very powerful because it is simple. IP
just tries to deliver packets to their destination; it does not make any promises about how well the
packets will be delivered or, in other words, it does not try to do anything complicated. Such
approach (known as “best effort”) works well for wired networks and traditional data
applications. All a network needs to know is where we want our packets delivered. With the
advent of wireless networks and multimedia applications, people became aware of the “how well”
issue (or, “quality of service”). Because the old telephone network dealt with a multimedia
application (spoken conversations) from the outset, the telephone networkers have been well
aware of quality issues and effective ways of dealing with it. On the other hand, telephone
network never had to deal with such complexity of scenarios and diversity of applications as the
Internet does. This raises the question of whether the Internet should provide better-quality
service to some packets. The answer is not straightforward and to understand the issues we will
need to understand the mechanisms for providing differentiated quality of service.
Users exchange information through computing applications. A distributed application at one end
accepts information, uses the network for transport, and presents the information at the other end.
Therefore, it is common to talk about the characteristics of information transfer of different
applications. These characteristics describe the traffic that the applications generate as well as the
acceptable delays and information losses by the intermediaries (network) in delivering that traffic.
Figure 1-85 illustrates multimedia information delivery over the network. The recurring themes
for Quality-of-Service (QoS) include packet loss, delay and their statistical properties. We have
seen that the network capacity is subject to physical or economic constraints and for this reason
many customers share the same network resources (“statistical multiplexing,” Section 1.1.3).
Because customer usage patterns are random and changing over time, statistical multiplexing
inevitably results in random packet delays and loss. Users working with applications based on
symbolic data (known as elastic applications, such as email or Web browsing) can tolerate
significant delays and lost packets can be retransmitted, if important. One the other hand, users of
multimedia-based applications (such as telephone calls or video streaming) are much more
sensitive to delays and lost packets.
A complement of delay is capacity, also referred to as bandwidth. Constraints on the network
capacity are imposed by physical and economic limitations. Constraints on the delay (also
referred to as latency), on the other hand, are imposed subjectively by the task of the information

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy