0% found this document useful (0 votes)
7 views48 pages

9 - Data Link Layer

The document discusses the Data Link Layer of data communication, focusing on multiple access control protocols, which are categorized into random-access, controlled-access, and channelization protocols. It details various protocols such as ALOHA, CSMA, CSMA/CD, CSMA/CA, and methods like reservation, polling, and token-passing, along with channelization techniques like FDMA, TDMA, and CDMA. Additionally, examples illustrate the throughput calculations and operational procedures for these protocols in different scenarios.

Uploaded by

devanbansal777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views48 pages

9 - Data Link Layer

The document discusses the Data Link Layer of data communication, focusing on multiple access control protocols, which are categorized into random-access, controlled-access, and channelization protocols. It details various protocols such as ALOHA, CSMA, CSMA/CD, CSMA/CA, and methods like reservation, polling, and token-passing, along with channelization techniques like FDMA, TDMA, and CDMA. Additionally, examples illustrate the throughput calculations and operational procedures for these protocols in different scenarios.

Uploaded by

devanbansal777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 48

Data Communication and

Networks
DCN(ITPC-205)

Data Link Layer


Access Control
Data link layer divided into two functionality-oriented sublayers

2
 The first section discusses random-access protocols. Four
protocols, ALOHA, CSMA, CSMA/CD, and CSMA/CA, are
described in this section. These protocols are mostly used in
LANs and WANs.
 The second section discusses controlled-access protocols. Three
protocols, reservation, polling, and token-passing, are described in
this section. Some of these protocol are used in LANs.

 The third section discusses channelization protocols. Three


protocols, FDMA, TDMA, and CDMA are described in this
section. These protocols are used in cellular telephony.
Multiple Access Control

Figure: Multiple-access protocols

4
Random access protocol

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.

If more than one station tries to send, there is an access


conflict- called collision and the frames will be either
destroyed or modified.
5
Random access protocol

To avoid access conflict or to resolve it when it happens, each


station follows a procedure that answer the following question
When can the station access the medium?
What can the station do if the medium is busy?
How can the station determine the success or failure of the
transmission?
What can the station do if there is an access conflict?

– ALOHA
– Carrier Sense Multiple Access
– Carrier Sense Multiple Access with Collision Detection
– Carrier Sense Multiple Access with Collision Avoidance

6
Pure ALOHA

Figure: Frames in a pure ALOHA network

7
Pure ALOHA protocol

Figure: Vulnerable time for pure ALOHA protocol

8
Pure ALOHA

Figure: Procedure for pure ALOHA protocol

9
Slotted ALOHA

Figure: Frames in a slotted ALOHA network

10
Slotted ALOHA

Figure: Vulnerable time for slotted ALOHA protocol

11
Throughput of pure and slotted
ALOHA
The throughput for pure ALOHA is
S = G × e −2G .
The maximum throughput Smax = 0.184
when G= (1/2).

The throughput for slotted ALOHA is

S = G × e−G.

The maximum throughput Smax = 0.368 when G = 1.

12
Example 1

The stations on a wireless ALOHA network are a maximum


of 600 km apart. Find Tp & TB for K = 2.
Assume that signals propagate at 3 × 108 m/s

If we assume that signals propagate at


3 × 108 m/s, we find Tp = (600 × 103) / (3 × 108) = 2 ms.

For 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 2

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 period (1 ms) that this station is sending.
Example 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
a. 1000 frames per second?
b. 500 frames per second?
c. 250 frames per second?
Solution
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, or 1 frame

per millisecond, then G = 1.


In this case S = G × e−2G = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only 135
Example 3 (continued)

b. If the system creates 500 frames per second, or 1/2 frames

per millisecond, then G = 1/2. In this case S = G × e −2G


= 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, percentage-wise.

c. If the system creates 250 frames per second, or 1/4


frames per millisecond, then G = 1/4. In this case S =
G × e−2G = 0.152 (15.2 percent). This means that the
throughput is 250 × 0.152 = 38. Only 38 frames out of

250 will probably survive


Example 4

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

a. 1000 frames per second.


b. 500 frames per second.
c. 250 frames per second.

Solution
This situation is similar to the previous exercise except that
the network is using slotted ALOHA instead of pure
ALOHA. The frame transmission time is 200/200 kbps or 1
ms.
Example 4 (continued)

a) In this case G is 1. So S = G × e−G = 0.368 (36.8


percent). This means that the throughput is 1000 ×
0.0368 = 368 frames. Only 368 out of 1000 frames will
probably survive. Note that this is the maximum
throughput case, percentage-wise.
b) Here G is 1/2. In this case S = G × e−G = 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) Now G is 1/4. In this case S = G × e−G = 0.195 (19.5
percent). This means that the throughput is 250 × 0.195
= 49. Only 49 frames out of 250 will probably survive.
Carrier Sense Multiple Access
(CSMA)
To minimize the chance of collision and increase the
performance, the CSMA method was developed.

The chance of collision can be reduced if a station senses the


medium before trying to use it.

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

In other words, CSMA is based on the principle “sense before


transmit” or “listen before talk.”

19
Carrier Sense Multiple Access

Figure: Space/time model of the collision in CSMA

20
Carrier Sense Multiple Access

Figure: Vulnerable time in CSMA

21
Carrier Sense Multiple Access

Figure: Behavior of three persistence methods

22
Carrier Sense Multiple Access

Figure: Flow diagram for three persistence methods

23
Carrier Sense Multiple Access with
Collision Detection (CSMA/CD)

The CSMA method does not specify the procedure following a


collision. CSMA/CD gives the algorithm to handle the
collision.

In this method, a station monitors the medium after it sends a


frame to see if the transmission was successful. If so, the
station is finished. If, however, there is a collision, the frame is
sent again.

24
Carrier Sense Multiple Access with
Collision Detection

Figure: Collision of the first bit in CSMA/CD

25
Carrier Sense Multiple Access with
Collision Detection

Figure: Collision and abortion in CSMA/CD

26
Example 5

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) is 25.6 μs, what is the minimum size of the frame?

Solution
The minimum frame transmission time is Tfr = 2 × Tp =
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.
Carrier Sense Multiple Access with
Collision Detection

Figure: Flow diagram for the CSMA/CD

28
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)

Carrier sense multiple access with collision avoidance


(CSMA/CA) was invented for wireless networks.

We need to avoid the collisions on wireless networks because


they can not be detected.

Collisions are avoided through the use of CSMA/CA’s three


strategies:
– Inter frame space,
– Contention window, and
– Acknowledgments

29
Carrier Sense Multiple Access with
Collision Avoidance

Figure: Flow diagram for CSMA/CA

30
Carrier Sense Multiple Access with
Collision Avoidance

Figure: Timing in CSMA/CA

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


– Reservation
– Polling
– Token Passing

32
Reservation

• Fix the time for reservation

• Data transmission period after reservation

Figure: Reservation access method

33
Polling

 Polling works with topologies in which one device is designated as a


primary station and other devices are secondary stations.
 All the data exchange must be made through the primary device even when
the ultimate destination is a secondary device.
 Primary device controls the link; secondary devices follows its
instructions.
 It is up to the primary device to determine which device is allowed to use
the channel at a given time.
 If primary device want to receive the data, it ask from secondaries if they
have anything to send, this is called poll function.

34
Polling

Figure: Select and poll functions in polling access method

35
Token Passing

Figure: Logical ring and physical topology in token-passing access method

36
CHANNELIZATION

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

– Frequency-Division Multiple Access (FDMA)


– Time-Division Multiple Access (TDMA)
– Code-Division Multiple Access (CDMA)

37
Frequency-Division Multiple Access
(FDMA)
 In FDMA, the available bandwidth of the common channel is divided into
bands that are separated by guard bands.

Figure: Frequency-division multiple access (FDMA)

38
Time-Division Multiple Access
(TDMA)
In TDMA, the bandwidth is just one channel that is timeshared between
different stations.

Figure: Time-division multiple access (TDMA)


39
Note

In CDMA, one channel carries all


transmissions simultaneously.
Figure 12.23 Simple idea of communication with code
The assigned code have two properties:

If we multiply each code with another, we get 0

If we multiply each code by itself, we get 4 (no. of stations)

12.42
Figure 12.24 Chip sequences
Figure 12.25 Data representation in CDMA
Figure 12.26 Sharing channel in CDMA
Suppose station 3 is listening to station 2.

Station 3 multiply the total data on the channel by the code


of station 2.

[-1, -1, -3, +1] [+1, -1, +1, -1]= -4/4=-1 means bit 0

12.46
Figure 12.27 Digital signal created by four stations in CDMA
Figure 12.28 Decoding of the composite signal for one in CDMA

You might also like