11/26/2021
Figure 12.1 Data link layer divided into two functionality-oriented sublayers
Chapter 12
Media
Access
Control
(MAC)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12.2
1 2
Figure 12.2 Taxonomy of multiple-access protocols discussed in this chapter 12-1 RANDOM ACCESS
In random access or contention methods, no station is
superior to another station and none is assigned the
control over another. No station permits, or does not
permit, another station to send. At each instance, a
station that has data to send uses a procedure defined
by the protocol to make a decision on whether or not to
send.
Topics discussed in this section:
ALOHA
Carrier Sense Multiple Access
Carrier Sense Multiple Access with Collision Detection
Carrier Sense Multiple Access with Collision Avoidance
12.3 12.4
3 4
Figure 12.3 Frames in a pure ALOHA network Figure 12.4 Procedure for pure ALOHA protocol
12.5 12.6
5 6
1
11/26/2021
Example 12.1 Example 12.1 (continued)
The stations on a wireless ALOHA network are a
maximum of 600 km apart. If we assume that signals b. For K = 2, the range is {0, 1, 2, 3}. This means that TB
propagate at 3 × 108 m/s, we find can be 0, 2, 4, or 6 ms, based on the outcome of the
Tp = (600 × 105 ) / (3 × 108 ) = 2 ms. random variable.
Now we can find the value of TB for different values of
K. c. For K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. This
means that TB can be 0, 2, 4, . . . , 14 ms, based on the
outcome of the random variable.
a. For K = 1, the range is {0, 1}. The station needs to|
generate a random number with a value of 0 or 1. This
d. We need to mention that if K > 10, it is normally set to
means that TB is either 0 ms (0 × 2) or 2 ms (1 × 2),
10.
based on the outcome of the random variable.
12.7 12.8
7 8
Example 12.2
Figure 12.5 Vulnerable time for pure ALOHA protocol
A pure ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the requirement to
make this frame collision-free?
Solution
Average frame transmission time Tfr is 200 bits/200 kbps or
1 ms. The vulnerable time is 2 × 1 ms = 2 ms. This means
no station should send later than 1 ms before this station
starts transmission and no station should start sending
during the one 1-ms period that this station is sending.
12.9 12.10
9 10
Example 12.3
A pure ALOHA network transmits 200-bit frames on a
shared channel of 200 kbps. What is the throughput if the
system (all stations together) produces
Note a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
The throughput for pure ALOHA is
S = G × e −2G . Solution
The maximum throughput The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
Smax = 0.184 when G= (1/2). frame per millisecond. The load is 1. In this case
S = G× e−2 G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.
12.11 12.12
11 12
2
11/26/2021
Example 12.3 (continued)
Figure 12.6 Frames in a slotted ALOHA network
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e −2G or S = 0.184 (18.4 percent). This
means that the throughput is 500 × 0.184 = 92 and that
only 92 frames out of 500 will probably survive. Note
that this is the maximum throughput case,
percentagewise.
c. If the system creates 250 frames per second, this is (1/4)
frame per millisecond. The load is (1/4). In this case
S = G × e −2G or S = 0.152 (15.2 percent). This means
that the throughput is 250 × 0.152 = 38. Only 38
frames out of 250 will probably survive.
12.13 12.14
13 14
Figure 12.7 Vulnerable time for slotted ALOHA protocol
Note
The throughput for slotted ALOHA is
S = G × e−G .
The maximum throughput
Smax = 0.368 when G = 1.
12.15 12.16
15 16
Example 12.4 Example 12.4 (continued)
A slotted ALOHA network transmits 200-bit frames on a b. If the system creates 500 frames per second, this is
shared channel of 200 kbps. What is the throughput if the (1/2) frame per millisecond. The load is (1/2). In this
system (all stations together) produces case S = G × e−G or S = 0.303 (30.3 percent). This
a. 1000 frames per second b. 500 frames per second means that the throughput is 500 × 0.0303 = 151.
c. 250 frames per second. Only 151 frames out of 500 will probably survive.
Solution
c. If the system creates 250 frames per second, this is (1/4)
The frame transmission time is 200/200 kbps or 1 ms.
frame per millisecond. The load is (1/4). In this case
a. If the system creates 1000 frames per second, this is 1
S = G × e −G or S = 0.195 (19.5 percent). This means
frame per millisecond. The load is 1. In this case
that the throughput is 250 × 0.195 = 49. Only 49
S = G× e−G or S = 0.368 (36.8 percent). This means
frames out of 250 will probably survive.
that the throughput is 1000 × 0.0368 = 368 frames.
Only 386 frames out of 1000 will probably survive.
12.17 12.18
17 18
3
11/26/2021
Figure 12.8 Space/time model of the collision in CSMA Figure 12.9 Vulnerable time in CSMA
12.19 12.20
19 20
Figure 12.10 Behavior of three persistence methods Figure 12.11 Flow diagram for three persistence methods
12.21 12.22
21 22
Figure 12.12 Collision of the first bit in CSMA/CD Figure 12.13 Collision and abortion in CSMA/CD
12.23 12.24
23 24
4
11/26/2021
Example 12.5
Figure 12.14 Flow diagram for the CSMA/CD
A network using CSMA/CD has a bandwidth of 10 Mbps.
If the maximum propagation time (including the delays in
the devices and ignoring the time needed to send a
jamming signal, as we see later) is 25.6 μs, what is the
minimum size of the frame?
Solution
The frame transmission time is Tfr = 2 × Tp = 51.2 μs.
This means, in the worst case, a station needs to transmit
for a period of 51.2 μs to detect the collision. The
minimum size of the frame is 10 Mbps × 51.2 μs = 512
bits or 64 bytes. This is actually the minimum size of the
frame for Standard Ethernet.
12.25 12.26
25 26
Figure 12.15 Energy level during transmission, idleness, or collision Figure 12.16 Timing in CSMA/CA
12.27 12.28
27 28
Note Note
In CSMA/CA, the IFS can also be used to In CSMA/CA, if the station finds the
define the priority of a station or a frame. channel busy, it does not restart the
timer of the contention window;
it stops the timer and restarts it when
the channel becomes idle.
12.29 12.30
29 30
5
11/26/2021
Figure 12.17 Flow diagram for CSMA/CA 12-2 CONTROLLED ACCESS
In controlled access, the stations consult one another
to find which station has the right to send. A station
cannot send unless it has been authorized by other
stations. We discuss three popular controlled-access
methods.
Topics discussed in this section:
Reservation
Polling
Token Passing
12.31 12.32
31 32
Figure 12.18 Reservation access method Figure 12.19 Select and poll functions in polling access method
12.33 12.34
33 34
Figure 12.20 Logical ring and physical topology in token-passing access method 12-3 CHANNELIZATION
Channelization is a multiple-access method in which
the available bandwidth of a link is shared in time,
frequency, or through code, between different stations.
In this section, we discuss three channelization
protocols.
Topics discussed in this section:
Frequency-Division Multiple Access (FDMA)
Time-Division Multiple Access (TDMA)
Code-Division Multiple Access (CDMA)
12.35 12.36
35 36
6
11/26/2021
Figure 12.21 Frequency-division multiple access (FDMA)
Note
We see the application of all these
methods in Chapter 16 when
we discuss cellular phone systems.
12.37 12.38
37 38
Figure 12.22 Time-division multiple access (TDMA)
Note
In FDMA, the available bandwidth
of the common channel is divided into
bands that are separated by guard
bands.
12.39 12.40
39 40
Note Note
In TDMA, the bandwidth is just one In CDMA, one channel carries all
channel that is timeshared between transmissions simultaneously.
different stations.
12.41 12.42
41 42
7
11/26/2021
Figure 12.23 Simple idea of communication with code Figure 12.24 Chip sequences
12.43 12.44
43 44
Figure 12.25 Data representation in CDMA Figure 12.26 Sharing channel in CDMA
12.45 12.46
45 46
Figure 12.27 Digital signal created by four stations in CDMA Figure 12.28 Decoding of the composite signal for one in CDMA
12.47 12.48
47 48
8
11/26/2021
Figure 12.29 General rule and examples of creating Walsh tables
Note
The number of sequences in a Walsh
table needs to be N = 2m.
12.49 12.50
49 50
Example 12.6 Example 12.7
Find the chips for a network with What is the number of sequences if we have 90 stations in
a. Two stations b. Four stations our network?
Solution Solution
We can use the rows of W2 and W4 in Figure 12.29: The number of sequences needs to be 2m. We need to
a. For a two-station network, we have choose m = 7 and N = 27 or 128. We can then use 90
[+1 +1] and [+1 −1]. of the sequences as the chips.
b. For a four-station network we have
[+1 +1 +1 +1], [+1 −1 +1 −1],
[+1 +1 −1 −1], and [+1 −1 −1 +1].
12.51 12.52
51 52
Example 12.8 Example 12.8 (continued)
Prove that a receiving station can get the data sent by a
specific sender if it multiplies the entire data on the
channel by the sender’s chip code and then divides it by
the number of stations.
Solution
Let us prove this for the first station, using our previous
When we divide the result by N, we get d1 .
four-station example. We can say that the data on the
channel
D = (d1 ⋅ c1 + d2 ⋅ c2 + d3 ⋅ c3 + d4 ⋅ c4).
The receiver which wants to get the data sent by station 1
multiplies these data by c1.
12.53 12.54
53 54