38
Multiple Access

Multiple Access. Data link layer divided into two functionality-oriented sublayers

Embed Size (px)

Citation preview

Page 1: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Multiple Access

Page 2: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Data link layer divided into two functionality-oriented sublayers

Page 3: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Multiple Access Protocols

When nodes or stations are connected to or use a common link, called a multipoint or broadcast link, we need a multiple access protocol to coordinate access to the link.

Many formal protocols have been devised to handle access to the shared link. We categorize them into three groups. Protocols belonging to each group are shown in Figure 1.

Page 4: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 1. Taxonomy of multiple-access protocols discussed

Page 5: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Random Access Method

In a random-access method, each station has the right to the medium without being controlled by any other station.

However, if more than one station tries to send, there is an access conflict (collision) and the frames will be either destroyed or modified.

The random-access methods we study in this chapter have evolved as shown in Figure 2.

Page 6: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 2 Evolution of random-access methods

Page 7: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Multiple access (MA)-ALOHA Protocol Multiple access. Any station sends a frame

when it has a frame to send. Acknowledgement. After sending the frame,

the station waits for an acknowledgement (explicit or implicit).

If it does not receive an acknowledgement during the allotted time, which is 2 times the maximum propagation delay (the time it takes for the first bit of the frame to reach every station), it assumes that the frame is lost; it tries sending again after a random amount of time.

The protocol flowchart is shown in Figure 3.

Page 8: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 3 Procedure for pure ALOHA protocol

Page 9: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 4 Frames in a pure ALOHA network

Page 10: Multiple Access. Data link layer divided into two functionality-oriented sublayers

12.10

The stations on a wireless ALOHA network are a maximum of 600 km apart. If we assume that signals propagate at 3 × 108 m/s, we find Tp = (600 × 105 ) / (3 × 108 ) = 2 ms. Now we can find the value of TB for different values of K .

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 means that TB is either 0 ms (0 × 2) or 2 ms (1 × 2), based on the outcome of the random variable.

Example 1

Page 11: Multiple Access. Data link layer divided into two functionality-oriented sublayers

b. For K = 2, the range is {0, 1, 2, 3}. This means that TB

can be 0, 2, 4, or 6 ms, based on the outcome of the random variable.

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.

d. We need to mention that if K > 10, it is normally set to 10.

Example 1 (continued)

Page 12: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 5 Vulnerable time for pure ALOHA protocol

Page 13: Multiple Access. Data link layer divided into two functionality-oriented sublayers

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 2

SolutionAverage 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.

Page 14: Multiple Access. Data link layer divided into two functionality-oriented sublayers

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) producesa. 1000 frames per second b. 500 frames per secondc. 250 frames per second.

Example 3

SolutionThe frame transmission time is 200/200 kbps or 1 ms.a. If the system creates 1000 frames per second, this is 1 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.

Page 15: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Example 3 (continued)

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.

Page 16: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Slotted ALOHA

In slotted ALOHA, we divide the time into slots of Tfr s and force each station to send the frame only at the beginning of the time slot (See Fig. 6).

The vulnerable time for slotted ALOHA is one-half that of pure ALOHA.

Slotted ALOHA vulnerable time= Tfr.

Page 17: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 6 Frames in a slotted ALOHA network

Page 18: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 7 Vulnerable time for slotted ALOHA protocol

Page 19: Multiple Access. Data link layer divided into two functionality-oriented sublayers

A slotted ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) producesa. 1000 frames per second b. 500 frames per secondc. 250 frames per second.

Example 4

SolutionThe frame transmission time is 200/200 kbps or 1 ms.a. If the system creates 1000 frames per second, this is 1 frame per millisecond. The load is 1. In this case S = G× e−G or S = 0.368 (36.8 percent). This means that the throughput is 1000 × 0.0368 = 368 frames. Only 386 frames out of 1000 will probably survive.

Page 20: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Example 4 (continued)

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−G or S = 0.303 (30.3 percent). This means that the throughput is 500 × 0.0303 = 151. Only 151 frames out of 500 will probably survive.

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 −G or S = 0.195 (19.5 percent). This means that the throughput is 250 × 0.195 = 49. Only 49 frames out of 250 will probably survive.

Page 21: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Carrier Sense Multiple Access (CSMA) Carrier sense multiple access (CSMA) requires

that each station first listen to the medium (or check the state of the medium) before sending.

CSMA can reduce the possibility of collision, but it cannot eliminate it.

The possibility of collision still exists because of the propagation delay; when a station sends a frame, it takes a while (although very short) for the first bit to reach every station and for every station to sense it.

In other words, a station may sense the medium and find it idle, only because propagation by another station has not yet reached this station. Figure 8 shows how a collision may happen.

Page 22: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 8 Space/time model of the collision in CSMA

Page 23: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 9 Vulnerable time in CSMA

Page 24: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Persistence Methods

What should a station do if the channel is busy? What should a station do if the channel is idle?

Three methods have been devised to answer these questions: 1-persistent method, Nonpersistent method, and p-persistent method.

In the 1-persistent method, if the station finds the line idle, the station sends its frame immediately (with a probability of 1). If the line is not idle, the station will continuously sense the line.

In the nonpersistent method, a station that has a frame to send senses the line. If the line is idle, the station sends immediately.

If the line is not idle, the station waits a random period of time and then senses the line again.

Page 25: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Persistence Methods

In the p-persistent method, if the station finds the line idle, the station may or may not send. It sends with probability p and refrains from sending with probability 1-p. If the line is not idle, the station will continuously sense the line.

The nonpersistent approach reduces the chance of collision because it is unlikely that two or more stations wait the same amount of time and retry again simultaneously. However, this method reduces the efficiency of the network if the medium is idle when there are stations that have frames to send.

The p-persistent strategy combines the advantages of the other two strategies. It reduces the chance of collision and improves the efficiency.

Page 26: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 10 Behavior of three persistence methods

Page 27: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 11 Flow diagram for three persistence methods

Page 28: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) The CSMA method does not define the procedure for

a collision. That is the reason CSMA was never implemented.

Carrier sense multiple access with collision detection (CSMA/CD) adds a procedure to handle a collision.

In this method, any station can send a frame. The station then monitors the medium to see if transmission was successful. If so, the station is finished.

If, however, there was a collision, the frame needs to be sent again. To reduce the probability of collision the second time, the station waits – it needs to back off.

Page 29: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 12 Collision of the first bit in CSMA/CD

Page 30: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 13 Collision and abortion in CSMA/CD

Page 31: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Minimum Frame Size

For CSMA/CD to work, we need a restriction on the minimum frame size.

Before sending the last bit of the frame,the sending station must detect a collision,if any, and abort the transmission. This is so because the station, once the entire frame is transmitted, does not keep a copy of the frame.

Therefore, the frame transmission time Tfr must be at least two times the maximum propagation time Tp.

Page 32: Multiple Access. Data link layer divided into two functionality-oriented sublayers

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 5

SolutionThe 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.

Page 33: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 14 Flow diagram for the CSMA/CD

Page 34: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Energy Level

The energy level in a channel can have three values:

1. Zero (when the channel is idle) 2. Normal (when the station is sending its frame) 3. Abnormal (when there is a collision in

the channel) A station before sending its frame needs to

monitor the energy level of the channel to determine if the channel is idle, busy or in collision mode.

Page 35: Multiple Access. Data link layer divided into two functionality-oriented sublayers

12.35

Figure 12.15 Energy level during transmission, idleness, or collision

Page 36: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) We need to avoid collisions on wireless

networks because they cannot be detected. CSMA/CA was invented for this network. Collisions are avoided through the use of

three strategies (Fig. 16): Interframe space (IFS) Contention window acknowledgement After it finds the line idle, the station waits an

IFS amount of time. It then waits another random amount of time (contention window).

Page 37: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 16 Timing in CSMA/CA

Page 38: Multiple Access. Data link layer divided into two functionality-oriented sublayers

Figure 17 Flow diagram for CSMA/CA