0% found this document useful (0 votes)
8 views10 pages

Data Link Layer Protocols Explained

The document covers various data link layer protocols and concepts, including Piggybacking, Flow Control, and Sliding Window Protocols. It explains different ARQ methods such as Stop and Wait, Go Back N, and Selective Repeat, along with random access protocols like ALOHA and CSMA. Additionally, it discusses error detection and correction techniques, types of network links, and the structure of data frames.

Uploaded by

rkrams1147
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)
8 views10 pages

Data Link Layer Protocols Explained

The document covers various data link layer protocols and concepts, including Piggybacking, Flow Control, and Sliding Window Protocols. It explains different ARQ methods such as Stop and Wait, Go Back N, and Selective Repeat, along with random access protocols like ALOHA and CSMA. Additionally, it discusses error detection and correction techniques, types of network links, and the structure of data frames.

Uploaded by

rkrams1147
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

Unit 2

One Liner Questions:

1. Define Piggybacking.
For bidirectional data flow, the control information (ACK, NAK) can be transmitted along with
data frames to improve the efficiency. This technique is called as Piggybacking.

2. Define Flow Control.


Flow control refers to a set of procedures used to restrict the amount of data that the sender
can send before waiting for acknowledgment.

3. What do you mean by sliding windows protocol?


Sliding window protocols are data link layer protocols for reliable and sequential delivery of
data frames. It is also used in Transmission Control Protocol.

4. Enlist the different Random Access Protocols.


- Pure ALOHA
- Slotted ALOHA
- Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
- Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

Long Questions:

1. Explain Stop and Wait ARQ with a suitable example.

Stop and Wait ARQ is used in Connection-oriented communication. It offers error and flows
control. It is used in Data Link and Transport Layers.

At Sender:
Rule 1) Send one data packet at a time.
Rule 2) Send the next packet only after receiving acknowledgement for the previous.

At Receiver:
Rule 1) Send acknowledgement after receiving and consuming a data packet.
Rule 2) After consuming packet acknowledgement need to be sent (Flow Control)

The figure shows an example of Stop and Wait ARQ:


•Frame 0 is sent and acknowledged.
•Frame 1 is lost and resent after the time-out. The resent frame 1 is acknowledged and the
timer stops.
•Frame 0 is sent and acknowledged, but the acknowledgment is lost.
•The sender has no idea if the frame or the acknowledgment is lost, so after the time-out, it
resends frame 0, which is acknowledged.

2. Explain Go Back N ARQ with a suitable example.

Go-Back-N ARQ protocol is also known as Go-Back-N Automatic Repeat Request. It is a data
link layer protocol that uses a sliding window method. In this, if any frame is corrupted or
lost, all subsequent frames have to be sent again.

The size of the sender window is N in this protocol. For example, Go-Back-8, the size of the
sender window, will be 8. The receiver window size is always 1.

If the receiver receives a corrupted frame, it cancels it. The receiver does not accept a
corrupted frame. When the timer expires, the sender sends the correct frame again.
3. Explain Selective Repeat ARQ with a suitable example.

Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat Request. It is a
data link layer protocol that uses a sliding window method. The Go-back-N ARQ protocol
works well if it has fewer errors. But if there is a lot of error in the frame, lots of bandwidth
loss in sending the frames again. So, we use the Selective Repeat ARQ protocol. In this
protocol, the size of the sender window is always equal to the size of the receiver window.
The size of the sliding window is always greater than 1.

If the receiver receives a corrupt frame, it does not directly discard it. It sends a negative
acknowledgment to the sender. The sender sends that frame again as soon as on the
receiving negative acknowledgment. There is no waiting for any time-out to send that frame.
4. What are the types of network links?

There are two types of network links:


1. A point-to-point link: It consists of a single sender at one end of the link and a single
receiver at the other end of the link.
2. A broadcast link: It can have multiple sending and receiving nodes all connected to the
same, single, shared broadcast channel. The term broadcast is used here because when any
one node transmits a frame, the channel broadcasts the frame and each of the other nodes
receives a copy.

5. Explain Pure ALOHA Protocol with a suitable diagram.

It allows users to transmit whenever they have data to be sent. Senders wait to see if a
collision occurred after whole message has been sent. If collision occurs, each station
involved waits a random amount of time then tries again.

Whenever two frames try to occupy the channel at the same time, there will be a collision
and both will be garbled.

If the first bit of a new frame overlaps with just the last bit of a frame almost finished, both
frames will be totally destroyed and both will have to be retransmitted later.

The throughput of the Pure ALOHA is maximized when the frames are of uniform length. The
formula to calculate the throughput of the Pure ALOHA is
S-=Ge-2G
The throughput is maximum when G=1/2 which is 18% of the total transmitted data frames.
6. Explain Slotted ALOHA Protocol with a suitable diagram.

Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of collision
in pure ALOHA are very high. The time of the shared channel is divided into discrete intervals
called slots. The stations can send a frame only at the beginning of the slot and only one
frame is sent in each slot. If any station is not able to place the frame onto the channel at the
beginning of the slot, then the station has to wait until the beginning of the next time slot.

The formula to calculate the throughput of the Slotted ALOHA is S=Ge-G.

The throughput is maximum when G=1 which is 36% to 37% of the total transmitted data
frames.

7. Explain Carrier Sense Multiple Access.

Carrier Sense Multiple Access (CSMA) method was developed to decrease the chances of
collisions when two or more stations start sending their signals over the data link layer. It
requires that each station first check the state of the medium before sending.

The persistence methods can be applied to help the station take action when the channel is
busy or idle.

CSMA is categorized in two different types:


1. Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
2. Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA):

8. Explain Carrier Sense Multiple Access with Collision Detection.


In this method, a station monitors the medium after it sends a frame to see if the
transmission was successful. If successful, the transmission is finished, if not, the frame is
sent again.

Throughput and Efficiency: The throughput is much greater than pure or slotted ALOHA.

- For the 1-persistent method, throughput is 50% when G=1.


- For the non-persistent method, throughput can go up to 90%.

9. Explain Carrier Sense Multiple Access with Collision Avoidance.

The basic idea behind CSMA/CA is that the station should be able to receive while
transmitting to detect a collision from different stations.

In wired networks, if a collision has occurred then the energy of the received signal almost
doubles, and the station can sense the possibility of collision.

In the case of wireless networks, most of the energy is used for transmission, and the energy
of the received signal increases by only 5-10% if a collision occurs. It can’t be used by the
station to sense collision. Therefore CSMA/CA has been specially designed for wireless
networks.

10. Explain types of CSMA Access Modes:

There are 4 types of access modes available in CSMA. It is also referred as 4 different types of
CSMA protocols which decides time to start sending data across a shared media.

1-Persistent:
It senses the shared channel first and delivers the data right away if the channel is idle. If not,
it must wait and continuously track for the channel to become idle and then broadcast the
frame without condition as soon as it does. It is an aggressive transmission algorithm.

Non-Persistent:
It first assesses the channel before transmitting data; if the channel is idle, the node
transmits data right away. If not, the station must wait for an arbitrary amount of time (not
continuously), and when it discovers the channel is empty, it sends the frames.

P-Persistent:
It consists of the 1-Persistent and Non-Persistent modes combined. Each node observes the
channel in the P-Persistent mode, and if the channel is idle, it sends a frame with a P
probability. If the data is not transferred, the frame restarts with the following time slot after
waiting for a (q = 1-p probability) random period.

O-Persistent:
A supervisory node gives each node a transmission order. Nodes wait for their time slot
according to their allocated transmission sequence when the transmission medium is idle.

Short Questions:
1. Draw the structure of a frame of information at data link layer and explain its parts.

1. Flag: It is a fixed pattern indicating starting and ending of frame.


2. Header: It consists of source and destination MAC address (48-bit physical address) and
control information regarding flow control.
3. Data: It may be considered as byte wise(character)or bit wise depends on protocol.
4. Trailer: It consists of error detecting and error correcting codes to ensure correct delivery
of data to next node.

2. What is the difference between Error Detection and Error Correction?

In error detection, it is only to been see if any error has occurred. The answer is a simple yes
or no.

In error correction, it is needed to know the exact number of bits that are corrupted and
more importantly, their location in the message. The number of the errors and the size of the
message are important factors. So, error correction is more complex than error detection.

3. What are the types of error?

There are two types of errors:


1. Single Bit Error: In a single-bit error, only one bit in the data unit has changed.

2. Burst Error: In a burst error, more than one bit in the data unit have changed.

4. Explain Error Detection using XORing with a suitable example.

Here to verify the correctness, a simple XOR operation is used. As shown in figure, when two
bits are same i.e., 0-0 or 1-1 then XOR operation is gives zero. And if both bits are different
then XOR is 1.
5. Give classification of Multiple Access Control Protocols.

6. Explain the difference between Pure ALOHA Protocol and Slotted ALOHA Protocol.

Pure ALOHA Slotted ALOHA

Any station can transmit the data at any Any station can transmit the data at the
time. beginning of any time slot.

The time is continuous and not globally In this, the time is discrete and globally
synchronized. synchronized.

Efficiency: 18% Efficiency: 36%

Throughput: S-=Ge-2G Throughput: S-=Ge-G

Examples are given below …

You might also like