Download presentation
Presentation is loading. Please wait.
Published byAlban McCarthy Modified over 9 years ago
1
Chapter 12 Media Access Control (MAC) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2
Chapter 5: Outline 12.1 RANDOM ACCESS 12.1 RANDOM ACCESS 12.2 CONTROLLED ACCESS 12.2 CONTROLLED ACCESS 12.3 CHANNELIZATION 12.3 CHANNELIZATION
3
12.3 Figure 12.1: Taxonomy of multiple-access protocols
4
12.4 12-1 RANDOM ACCESS Random-access implies no station is superior to another station and none is assigned control over another.
5
12.5 12-1 RANDOM ACCESS Stations use a procedure defined by the protocol on whether or not to send a message. This decision depends on the state of the medium (idle or busy).
6
12.6 12.12.1 ALOHA ALOHA is the earliest random access method developed at the University of Hawaii in early 1970.
7
12.7 12.12.1 ALOHA ALOHA was designed for a radio (wireless) LAN, but it can be used on any shared medium.
8
12.8 12.12.1 ALOHA ALOHA shares the medium between the stations. When a station sends data, another station may attempt to do so at the same time. The data from the two stations collide and become damaged.
9
12.9 Figure 12.2: Frames in a pure ALOHA network
10
12.10 Figure 12.3: Procedure for pure ALOHA protocol
11
The stations on a wireless ALOHA network are a maximum of 600 km apart. Find the propagation time and wait time if signals propagate at 3 × 10 8 m/s. Example 12. 1 12.11
12
The stations on a wireless ALOHA network are a maximum of 600 km apart. … T p = (600 × 10 3 ) / (3 × 10 8 ) = 2 ms The wait time is 2 T p = 4 ms Example 12. 1 12.12
13
The stations on a wireless ALOHA network are a maximum of 600 km apart. What is the back-off time if K = 2? Example 12. 1 12.13
14
The stations on a wireless ALOHA network are a maximum of 600 km apart.... What is the back-off time if K = 2? Example 12. 1 12.14
15
The stations on a wireless ALOHA network are a maximum of 600 km apart. … What is the back-off time if K = 2? The range of R is {0, 1, 2, 3}. This means that T B can be 0, 2, 4, or 6 ms, based on the outcome of the random variable R. Example 12. 1 12.15
16
12.16 Figure 12.4: Vulnerable time for pure ALOHA protocol
17
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? Example 12.2 12.17
18
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 T fr is 200 bits/200 kbps or 1 ms/frame. The vulnerability time is 2 T fr = 2 ms. Example 12.2 12.18
19
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 The vulnerable time is 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 period (1 ms) that this station is sending. Example 12.2 12.19
20
A pure ALOHA throughput efficiency percentage S, is computed using S = G × e −2G Where G = duration * saturation. Example 12. 3 12.20
21
A pure ALOHA throughput efficiency percentage is computed using S = G × e −2G Take the derivative wrt-G and set to zero to find the maximum efficiency value. Example 12. 3 12.21
22
A pure ALOHA throughput efficiency percentage is computed using S = G × e −2G Take the derivative wrt-G and set to zero to find the maximum efficiency value. Smax =.184 or 18.4% Example 12. 3 12.22
23
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 a. 1000 frames per second? b. 500 frames per second? c. 250 frames per second? Example 12. 3 12.23
24
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 1000 frames per second? Example 12. 3 Solution part a The frame duration = (200bits/frame)/ (200kbits/sec) Saturation = 1000 frames/sec G = duration * saturation = 1 S =.135 or 135 frames/sec survive on average. 12.24
25
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 1000 frames per second? Example 12. 3 Solution part a The frame duration = (200bits/frame)/ (200kbits/sec) Saturation = 1000 frames/sec G = duration * saturation = 1 S =.135 or 135 frames/sec survive on average. 12.25
26
Solution b. If the system creates 500 frames per second, or 1/2 frames Duration = Saturation = G = S = Example 12. 3 (continued) 12.26
27
Solution b. If the system creates 500 frames per second, or 1/2 frames Duration = 1 ms / frame Saturation = 500 frames / sec G =.5 S is about 92 frames (18.4% survive) Example 12. 3 (continued) 12.27
28
Slotted ALOHA Each station must be synchronized to send frames on a frame duration interval.
29
12.29 Figure 12.5: Frames in a slotted ALOHA network
30
Slotted ALOHA Vulnerability The vulnerability time is half of the pure ALOHA
31
12.31 Figure 12.6: Vulnerable time for slotted ALOHA protocol
32
The slotted ALOHA throughput efficiency percentage is computed using S = G × e −G Take the derivative wrt-G and set to zero to find the maximum efficiency value. Example 12. 4 12.32
33
The slotted ALOHA throughput efficiency percentage is computed using S = G × e −G Take the derivative wrt-G and set to zero to find the maximum efficiency value. Smax = 36.8% Example 12. 4 12.33
34
A slotted ALOHA network transmits 200-bit frames using a shared channel with a 200-kbps bandwidth. Find the throughput if the system (all stations together) produces 250 frames per second. Example 12. 4 12.34
35
12.35 12.12.2 CSMA CSMA method was developed to reduce collisions. The chance of collision can be reduced if a station senses the medium before trying to use it.
36
12.36 12.12.2 CSMA Carrier sense multiple access (CSMA) requires that each station first listen to the medium (or check the state of the medium) before sending. (no more than one station can “talk” at a time.)
37
12.37 Figure 12.7: Space/time model of a collision in CSMA
38
12.38 Figure 12.8: Vulnerable time in CSMA
39
Persistence Methods Persistence methods are used to reduce the possibility of a collision.
40
Persistence Methods Three common persistence methods: 1-persistence non-persistence p-persistence
41
12.41 Figure 12.9: Behavior of three persistence methods
42
Exponential Back-off Let K = number of retries. K is incremented for each retry up to a maximum number of retries. Let N = { 0, 1, …, 2^K - 1 } Choose a random number from the set N. Multiply the result time the propagation time. Wait and retry
43
12.43 Figure 12.10: Flow diagram for three persistence methods
44
12.44 12.12.3 CSMA/CD The CSMA method does not specify the procedure following a collision. Carrier sense multiple access with collision detection (CSMA/CD) augments the algorithm to handle the collision.
45
12.45 12.12.3 CSMA/CD Here a station monitors the medium after it sends a frame to see if the transmission was successful. If so, the station is finished. Otherwise, there is a collision, and the frame is re- sent.
46
12.46 Figure 12.11: Collision of the first bits in CSMA/CD
47
12.47 Figure 12.12: Collision and abortion in CSMA/CD
48
CSMA/CD When a station sends a frame, it transmits and listens simultaneously to the sent-signal. If while listening, the signal is distorted, then a collision has occurred and the transmission is ended. Example 12. 5 12.48
49
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? Example 12. 5 12.49
50
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? The propagation-time times the bit rate will give the number of bits on the the link. But, that's not enough because,... Example 12. 5 12.50
51
A network using CSMA/CD... The propagation time times the bit rate will give the number of bits on the the link. The device is listening, but must listen for twice the propagation time to sense a collision. Therefore it must continuously send data for twice the propagation time. Example 12. 5 12.51
52
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 minimum frame transmission time is T fr = 2 × T p = 512.2 μs. This means, in the worst case, a station needs to transmit for a period of 512.2 μs to detect the collision. The minimum size of the frame is 10 Mbps × 512.2 μs = 512 bits or 64 bytes. This is actually the minimum size of the frame for Standard Ethernet. Example 12. 5 12.52
53
12.53 Figure 12.13: Flow diagram for the CSMA/CD
54
12.54 Figure 12.14: Energy level during transmission, idleness, or collision
55
12.55 12.12.4 CSMA/CA Carrier sense multiple access with collision avoidance (CSMA/CA) was invented for wireless networks.
56
12.56 12.12.4 CSMA/CA Collisions are avoided through the use of CSMA/CA’s three strategies: 1. The interframe space (DIFS & SIFS), 2. The contention window, and 3. Control frames (RTS, CTS, ACK).
57
12.57 Figure 12.15: Flow diagram for CSMA/CA
58
12.58 Figure 12.16: Contention window
59
12.59 Figure 12.17: CMACA and NAV
60
NAV Network Access Vector – stations not involved in the communication receive a CTS frame or RTS frame. The non-active stations can wait via the NAV.
61
12.61 12-2 CONTROLLED ACCESS In controlled access, the stations consult one another to find which station has the right to send.
62
12.62 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 to send.
63
12.63 12-2 CONTROLLED ACCESS TYPES Reservation, Polling, Token Passing.
64
12.64 12.2.1 Reservation A station makes a reservation before sending data.
65
12.65 12.2.1 Reservation Each station has an allotted time slot where it can reserve and insert its message.
66
12.66 Figure 12.18: Reservation access method
67
12.67 12.2.2 Polling Polling works with topologies in which one device is designated as a primary station and the other devices are secondary stations.
68
12.68 12.2.2 Polling All data exchanges must be made through the primary device even when the ultimate destination is a secondary device. The primary device controls the link; the secondary devices follow its instructions.
69
12.69 12.2.2 Polling It is up to the primary device to determine which device is allowed to use the channel at a given time.
70
12.70 12.2.2 Polling Primary station control frames. SEL = select, used by the primary device when it wishes to send POL = used to solicit transmission from secondary devices ACK = acknowledge receipt from a secondary device
71
12.71 12.2.2 Polling Secondary station control frames. ACK = acknowledge receipt from primary device NACK = non-ACK is used when there is nothing to send.
72
12.72 Figure 12.19: Select and poll functions in polling-access method
73
12.73 12.2.3 Token Passing Stations in this network are organized in a logical ring: there is a predecessor and a successor to each node. The predecessor is the station which is logically before the station in the ring; the successor is the station which is after the station in the ring.
74
12.74 12.2.3 Token Passing The predecessor is the station which is logically before the station in the ring; the successor is the station which is after the station in the ring.
75
12.75 12.2.3 Token Passing A special packet called a token moves from station to station. A station can only send messages while it holds the token. The token can be held for a limited amount of time before it is sent to the successor
76
12.76 12.2.3 Token Passing The token can be held for a limited amount of time before it is sent to the successor … priorities can be configured by setting a different holding time for each station.
77
12.77 12.2.3 Token Passing The dual ring, common with the FDDI implementation, allows for some redundancy if there is a failure on one of the rings.
78
12.78 12.2.3 Token Passing Each node on the ring must be able to re-generate the token if the token is lost or damaged.
79
12.79 12.2.3 Token Passing The ring is vulnerable to loss of a station unless the star ring is used. The central hub of a star ring is called an MAU (multi-access unit)
80
12.80 12-3 CHANNELIZATION Channelization is a multiple-access method where the available bandwidth of a link is shared among stations by 1. time 2. frequency 3. code
81
12.81 12-3 CHANNELIZATION Three common channelization protocols are: TDMA = Time Division Multiple Access FDMA = Frequency Division Multiple Access CDMA = Code Division Multiple Access
82
12.82 12.3.1 FDMA FDMA divides the available bandwidth into frequency bands. Each station is allocated a band of frequencies for data transmission.
83
FDMvs FDMA FDM is at the physical layer, combining low bandwidth channels into a high bandwidth channel. Used for the first generation analog mobile phone system.
84
FDM vs FDMA FDMA is at the data-link layer. Each station always uses the same band. Each stations transmits over the shared link media without a multiplexer. Bandpass filters are used at the stations to separate the signals.
85
12.85 12.3.1 FDMA Each station is allocated a band to send its data. Each station also uses a bandpass filter to confine the transmitter frequencies. Satellite communications and the cellular phone AMPS use FDMA.
86
12.86 Figure 12.21: Frequency-division multiple access (FDMA)
87
12.87 12.3.2 TDMA Time-Division Multiple Access (TDMA) is where stations share bandwidth in time.
88
12.88 12.3.2 TDMA Each station is allocated a time slot during which it can send data. Each station transmits its data in its assigned time slot. This requires all the stations be synchronized
89
12.89 12.3.2 TDM vs TDMA TDM operates at the physical layer. –Low bandwidth channels are combined into a high bandwidth channel using a multiplexer.
90
12.90 12.3.2 TDM vs TDMA TDMA operates at the data-link layer. –Stations transmit through one shared channel –Each station transmits when its assigned time slot is available.
91
12.91 12.3.2 TDM vs TDMA TDMA is used for digital cellular systems using GSM (Global System for Mobile Communication) TDMA became available with the 2 nd generation mobile phone service (2G).
92
12.92 Figure 12.22: Time-division multiple access (TDMA)
93
12.93 12.3.3 CDMA Code-division multiple access (CDMA) was conceived several decades ago. Advances in electronic technology have made its implementation possible.
94
12.94 12.3.3 CDMA CDMA differs from FDMA and TDMA in that all stations transmit simultaneously each using all the available frequency bandwidth.
95
12.95 Figure 12.23: Simple idea of communication with code
96
12.96 Figure 12.24: Chip sequences
97
Chip properties Length of the chip is the number of stations sharing the link. The dot product of any two different chips is zero. The dot product of a chip with itself is n, where n = number of communicating stations.
98
12.98 Figure 12.25: Data representation in CDMA
99
12.99 Figure 12.26: Sharing channel in CDMA
100
12.100 Figure 12.27: Digital signal created by four stations in CDMA
101
12.101 Figure 12.28: Decoding of the composite signal for one in CDMA
102
12.102 Figure 12.29: General rules and examples of creating Walsh tables
103
Walsh Table Each chip is read from a row in the Walsh table.
104
Find the chips for a network with a. Two stations b. Four stations Example 12.6 12.104
105
What is the number of sequences if we have 90 stations in our network? Example 12. 7 12.105
106
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. Example 12.8 12.106
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.