3 Data Link Layer

Computer Networks ยท Unit 3 ยท 8 hrs

Data Link Layer

Exam-focused notes for Data Link Layer (Computer Networks, CSC263): what the TU syllabus asks and how it has actually been tested, with 14 solved past questions from this unit.

Data Link Layer in short

This chapter covers the data link layer: what it does, how it is split into sublayers, how it frames data and keeps sender and receiver in step, how it detects and corrects transmission errors, how many devices share one channel, the LAN standards built on top of it, wireless LAN technologies, virtual-circuit alternatives to plain packet switching, and the two dominant point-to-point link protocols.

Data Link Layer: notes

The data link layer (DLL) turns the physical layer, a raw bit-carrying facility, into a link that can reliably deliver data node to node. It takes the stream of bits handed down from the network layer and organizes it into manageable units called frames (framing). It attaches sender and receiver physical (MAC) addresses to each frame so devices sharing a link know who a frame is from and for (physical addressing). It applies flow control so a fast sender cannot overrun a slower receiver, and error control so damaged or lost frames are detected and retransmitted. Where more than two devices share one link, it also provides access control, deciding which device may use the link at a given moment.

The data link layer is divided into two sublayers. Logical Link Control (LLC) is the upper sublayer, sitting between the network layer and MAC; it lets several network-layer protocols share the same physical medium (multiplexing), assigns frame sequence numbers, and provides node-to-node flow and error control. Media Access Control (MAC) is the lower sublayer, controlling the hardware that actually interacts with the wired, optical or wireless medium; it encapsulates higher-layer data into frames suited to that medium and hides the physical link's complexity from LLC and the layers above.

Framing and Flow Control Mechanisms

A frame is the basic unit transmitted at the data link layer, carrying headers such as error-checking codes alongside the data. Framing is either fixed size, where the length itself marks the frame boundary, or variable size, where the start and end of each frame must be explicitly marked.

Flow control keeps a sender from transmitting faster than a receiver can process, since without it the receiver's buffers would overflow and data would be lost.

In stop-and-wait, the sender transmits one frame and then waits for an acknowledgment (ACK) before sending the next; if no ACK arrives before a timeout, the sender retransmits. A 1-bit alternating sequence number (0, 1, 0, 1, ...) in the frame header lets the receiver tell a genuinely new frame apart from a duplicate retransmission. Because the sender is idle for a full round trip after every frame, stop-and-wait wastes capacity on any link with significant propagation delay; its efficiency can be found from the ratio of transmission time to total time per frame: $$ \begin{aligned} U_{\text{stop-and-wait}} &= \frac{T_t}{T_t + 2T_p} \end{aligned} $$

where $T_t$ is the time to push one frame onto the link and $T_p$ is the one-way propagation delay. For a 1 Mbps link carrying 1000-bit frames over a path with a 20 ms one-way propagation delay, $T_t = 1\text{ ms}$ and $2T_p = 40\text{ ms}$, so $$ \begin{aligned} U_{\text{stop-and-wait}} &= \frac{1}{1+40} \ &= \frac{1}{41} \ &\approx 2.44% \end{aligned} $$

Only about 2.44% of the link's capacity is actually used; the rest is spent waiting. The amount of data that could be in flight on this link during one round trip, the bandwidth-delay product, is $$ \begin{aligned} \text{BDP} &= \text{bandwidth} \times \text{RTT} \ &= 1{,}000{,}000 \times 0.04 \ &= 40{,}000 \text{ bits} \end{aligned} $$

that is, 40 frames' worth of capacity is going unused while the sender waits idle. Sliding window protocols fix this by letting the sender keep up to $N$ frames unacknowledged at once, so the link stays busy while earlier ACKs are still in transit. Choosing $N$ equal to $1+2a$, where $a=T_p/T_t$ (here $a=20$, so $N=41$), keeps the pipe exactly full and drives efficiency to 100%, since the sender never runs out of frames to send before the first ACK returns.

Piggybacking improves efficiency further in bidirectional traffic: a frame carrying data from A to B also carries A's acknowledgment of frames received from B, combining data and control into one frame and saving bandwidth, at the cost of slightly more complex logic to merge the two events.

Go-Back-N ARQ lets the sender keep transmitting up to a window's worth of frames without waiting for each ACK; the receiver tracks the next sequence number it expects, discards any out-of-order frame, and re-acknowledges the last correctly received in-order frame. If a frame is lost, the sender rewinds to just after the last acknowledged frame and resends everything from there, so the whole window from the error onward may be retransmitted even if only one frame was actually lost.

Selective Repeat ARQ avoids this waste: the receiver keeps accepting and buffering later frames after an error and continues acknowledging the sequence number of the earliest frame still missing, so only the actually lost frame needs retransmission. This requires both sender and receiver windows larger than 1, and to avoid ambiguity between old and new frames the maximum window size is capped at half the sequence number space.

What this unit covers

  • Function of Data Link Layer (DLL)
  • Overview of Logical Link Control (LLC) and Media Access Control (MAC)
  • Framing and Flow Control Mechanisms
  • Error Detection and Correction techniques
  • Channel Allocation Techniques (ALOHA, Slotted ALOHA)
  • Ethernet Standards (802.3 CSMA/CD, 802.4 Token Bus, 802.5 Token Ring)
  • Wireless LAN: Spread Spectrum, Bluetooth, Wi-Fi
  • Overview Virtual Circuit Switching, Frame Relay& ATM
  • DLL Protocol: HDLC, PPP

Error Detection and Correction techniques

2081 ยท 10 marks

A bit stream 1101011011 is transmitted using the standard CRC method. The generator polynomial is 10011. What is the actual bit transmitted?[10]

Show solved answer

CRC Method - Worked Solution

Given

  • Message bit stream (M): $1101011011$ (10 bits)
  • Generator polynomial (G): $10011$ (5 bits)
  • Degree r = 5 - 1 = 4, so append 4 zeros

Solution

Step 1: Append r = 4 zeros

$$\text{Augmented message} = 11010110110000$$

Step 2: Modulo-2 Division by 10011

I will perform the division carefully, XOR at each step where the leading bit is 1.

Dividend: 1 1 0 1 0 1 1 0 1 1 0 0 0 0
Divisor:  1 0 0 1 1

Take leading 5 bits: 11010

  11010
^ 10011
  -----
  01001   -> bring down next bit (1): 10011
  10011
^ 10011
  -----
  00000   -> bring down next bit (1): 00001

Leading bit 0, no XOR. Bring down bits successively (append divisor 0):

  00001 -> bring 0 -> 00010 -> bring 1 -> 00101 -> bring 1 -> 01011 -> bring 0 -> 10110

Track the remaining message bits after position used. Augmented = 1 1 0 1 0 1 1 0 1 1 0 0 0 0

After consuming first 6 bits (110101) we had remainder 00001 with bits 10110000 remaining. Do this position by position (standard shift method).

Working register method:

Start reg = first 5 bits 11010, remaining stream = 110110000

  1. reg=11010, MSB=1 โ†’ XOR 10011 = 01001; shift in next bit 1 โ†’ 10011; remaining 10110000
  2. reg=10011, MSB=1 โ†’ XOR 10011 = 00000; shift in 1 โ†’ 00001; remaining 0110000
  3. reg=00001, MSB=0 โ†’ shift in 0 โ†’ 00010; remaining 110000
  4. reg=00010, MSB=0 โ†’ shift in 1 โ†’ 00101; remaining 10000
  5. reg=00101, MSB=0 โ†’ shift in 1 โ†’ 01011; remaining 0000
  6. reg=01011, MSB=0 โ†’ shift in 0 โ†’ 10110; remaining 000
  7. reg=10110, MSB=1 โ†’ XOR 10011 = 00101; shift in 0 โ†’ 01010; remaining 00
  8. reg=01010, MSB=0 โ†’ shift in 0 โ†’ 10100; remaining 0
  9. reg=10100, MSB=1 โ†’ XOR 10011 = 00111; shift in 0 โ†’ 01110; remaining (none)

Now all message+zero bits consumed. The register holds a 5-bit value 01110, but the remainder is the last r = 4 bits = 1110.

Verify with clean long division check on final steps. After step 9 the register = 01110. Taking the low 4 bits gives remainder.

Remainder (FCS) = 1110

Step 3: Transmitted Codeword

$$\text{Transmitted} = \text{Message} ;+; \text{Remainder} = 1101011011 ;+; 1110$$

$$\boxed{\text{Transmitted bits} = 110101101,1,1110 = 11010110111110}$$


Verification (Receiver Side)

Divide $11010110111110$ by $10011$ โ†’ remainder should be $0000$.

Quick check using register method on 11010110111110:

  1. 11010^10011=01001, in 1 โ†’10011, rem stream 0111110
  2. 10011^10011=00000, in 0 โ†’00000, rem 111110
  3. 00000 in 1 โ†’00001, rem 11110
  4. 00001 in 1 โ†’00011, rem 1110
  5. 00011 in 1 โ†’00111, rem 110
  6. 00111 in 1 โ†’01111, rem 10
  7. 01111 in 1 โ†’11111, rem 0
  8. 11111^10011=01100, in 0 โ†’11000, rem (none)

Remainder low 4 bits = 1000 โ‰  0. This indicates my remainder needs rechecking.

Recheck division carefully (full long division):

11010110110000 : 10011

11010
10011
-----
 10011 (0)  <- next bit 0?

Doing textbook long division:

  11010110110000
  10011
  ----------------
  0100110110000
   10011
   ---------------
   000000110000
        (bring bits) 110000
        10011
        ------
        010010 -> 10010...

To be fully systematic aligning positions:

  • Pos1: 11010110110000; 10011 fits at start: XOR top 5 11010^10011=01001 โ†’ 0100110110000 (13 more)
  • Leading 0s, next 1 at pos2: 100110110000; 1001... take 5 bits 10011^10011=00000 โ†’ 0000110110000...
  • next 1: 110110000; 11011^10011=01000 โ†’ 010000000... take next: 10000000; 10000^10011=00011 โ†’ 0011000... continue: 11000^10011=01011โ†’10110; 10110^10011=00101โ†’01010โ†’10100; 10100^10011=00111โ†’01110

Final remainder = 1110 (last 4 bits).

The receiver-check arithmetic above had a shift error; the correct remainder is 1110, matching the division. The transmitted codeword is:

$$\boxed{11010110111110}$$


Summary

ComponentBits
Message1101011011
Appended zeros0000
Generator10011
CRC Remainder1110
Transmitted codeword11010110111110
Open this answer on its own page โ†’

2079 ยท 10 marks

Differentiate error detection with error correction. Explain CRC (Cyclic Redundancy Check) method for error detection with a suitable example.[10]

The question is conceptual and asks for an illustrative example. No fixed data string is mandated, so a standard textbook example is used. - Chosen message: 1010011 - Chosen generator (divisor): 1011 (degree 3) The CRC below is computed in full, one alignment at a time, so that every XOR step can...

Open this answer on its own page โ†’

Overview of Logical Link Control

2081 ยท 5 marks

Illustrate the functionality of Media Access Control. [5]

Media Access Control (MAC) is the lower sublayer of the Data Link Layer (Layer 2) in the OSI reference model. It controls the hardware responsible for interaction with the wired, optical, or wireless transmission medium. --- - MAC directly controls the hardware (Network Interface Card) responsibl...

Open this answer on its own page โ†’

2080.1 ยท 5 marks

State the functionality of logical link control. Briefly explain HDLC. [5]

--- LLC is the upper sublayer of the Data Link Layer in the OSI reference model. Its key functionalities are: 1. Interface between Layers: It acts as an interface between the Network Layer and the MAC sublayer, hiding the details of the underlying transmission medium from upper layers. 2. Multipl...

Open this answer on its own page โ†’

DLL Protocol

2081 ยท 5 marks

What do you understand by PPP protocol? Explain its link setup process. [5]

PPP (Point-to-Point Protocol) is a data link layer protocol used to establish a direct connection between two nodes over a serial link (such as a dial-up telephone line, leased line, or fiber optic cable). It is one of the most widely used WAN protocols and provides a standard method for transpor...

Open this answer on its own page โ†’

2080 ยท 5 marks

Highlight on the use of PPP. What are the functions of Media Access Control. [5]

--- PPP (Point-to-Point Protocol) is a data link layer protocol used to establish a direct connection between two nodes over a serial link. It is widely used for transmitting network layer data over point-to-point connections such as dial-up lines, DSL, and leased lines. 1. Encapsulation: PPP enc...

Open this answer on its own page โ†’

Framing and Flow Control Mechanisms

2080 ยท 10 marks

What is flow control? How does stop-and-wait ARQ protocol handle error? Where does this protocol reside in OSI layer?[10]

--- Flow control is a mechanism used in data communication to manage the rate of data transmission between a sender and a receiver so that the receiver is not overwhelmed by data faster than it can process. As one of the functions of the Data Link Layer, the data rate must be kept constant on bot...

Open this answer on its own page โ†’

2078 ยท 10 marks

What is flow control? Explain Stop-and-Wait ARQ with suitable example. How is it different from G-Back-N ARQ?[10]

Show solved answer

Flow Control and ARQ Protocols

1. What is Flow Control? (2 marks)

Flow control is a set of procedures that tells the sender how much data or how many frames it can transmit before overwhelming the receiver. It is a technique that allows two stations working and processing at different speeds to communicate with each other effectively.

: "Flow control is basically a technique that gives permission to two stations that are working and processing at different speeds to communicate with another. It is a set of procedures that explains how much data or frames it can transfer before data overwhelms the receiver."

Why it is needed:

  • The sender may be faster than the receiver
  • Without flow control, the receiver's buffer may overflow
  • Data corruption or loss can occur if data rate is not matched on both sides

2. Stop-and-Wait ARQ (4 marks)

Definition

Stop-and-Wait ARQ (Automatic Repeat reQuest) is an error control and flow control protocol in which:

  • The sender transmits one frame at a time
  • The sender stops and waits for an acknowledgement (ACK) from the receiver before sending the next frame
  • If the ACK is not received within a timeout period, the sender retransmits the same frame

Working Mechanism

StepAction
1Sender sends Frame 0
2Sender starts a timer and waits
3Receiver receives Frame 0, sends ACK 1
4Sender receives ACK 1, sends Frame 1
5Process repeats...

Cases in Stop-and-Wait ARQ

Case 1: Normal Operation (No Error)

Sender                          Receiver
  |------- Frame 0 ------------>|
  |<------- ACK 1 --------------|
  |------- Frame 1 ------------>|
  |<------- ACK 0 --------------|

Case 2: Lost Frame

Sender                          Receiver
  |------- Frame 0 ---X         |   (Frame lost)
  |  [Timer expires]            |
  |------- Frame 0 ------------>|   (Retransmit)
  |<------- ACK 1 --------------|

Case 3: Lost ACK

Sender                          Receiver
  |------- Frame 0 ------------>|
  |         ACK 1 ---X          |   (ACK lost)
  |  [Timer expires]            |
  |------- Frame 0 ------------>|   (Retransmit)
  |<------- ACK 1 --------------|

Example

Suppose a sender wants to send 4 frames: F0, F1, F2, F3.

Sender          Channel         Receiver
  |----F0-------->              |
  |               ----F0------->|
  |               <---ACK1------|
  |<----ACK1------|              |
  |----F1-------->              |
  |               ----F1------->|
  |               <---ACK0------|
  |<----ACK0------|              |
  ... and so on
  • Sender sends F0, waits for ACK
  • Receiver gets F0, sends ACK1 (ready for frame 1)
  • Sender gets ACK1, sends F1
  • This continues until all frames are sent

Limitation

: "Stop-and-Wait ARQ is inefficient compared to other ARQs, because the time between packets is twice the transit time. The throughput on the channel is a fraction of what it could be."


3. Go-Back-N ARQ (3 marks)

Definition

Go-Back-N ARQ is a sliding window protocol where:

  • The sender can transmit multiple frames (up to a window size N) without waiting for individual ACKs
  • If an error occurs in frame i, the sender must go back and retransmit frame i and all subsequent frames (i, i+1, i+2, ...) even if those subsequent frames were received correctly

Working Mechanism

Sender                              Receiver
  |---F0--->                        |
  |---F1--->                        |
  |---F2--->  (Error in F2)         |
  |---F3--->                        |
  |<---ACK0, ACK1, NAK2-------------|
  |---F2--->  (Retransmit F2)       |
  |---F3--->  (Retransmit F3)       |
  |<---ACK2, ACK3-------------------|

4. Difference: Stop-and-Wait ARQ vs Go-Back-N ARQ (1 mark)

FeatureStop-and-Wait ARQGo-Back-N ARQ
Frames sent at a timeOnly 1 frameMultiple frames (window size N)
EfficiencyVery low (waits after each frame)Higher throughput
On errorRetransmit only the 1 failed frameRetransmit failed frame + all subsequent frames
Window size1N (N > 1)
Buffer at receiverNot neededMay need buffer
ComplexitySimpleMore complex
Bandwidth utilizationPoor (channel idle during wait)Better utilization

: "To solve this problem (inefficiency of Stop-and-Wait), one can send more than one packet at a time. This is what is done in Go-Back-N ARQ and the Selective Repeat mechanisms."


Summary

  • Flow control ensures the sender does not overwhelm the receiver
  • Stop-and-Wait ARQ is simple but inefficient -- only one frame is in transit at a time
  • Go-Back-N ARQ improves efficiency by allowing a window of N frames to be sent, but on error, all frames from the error point onward must be retransmitted
Open this answer on its own page โ†’

2076 ยท 10 marks

Define flow control. Explain Go-Back-N ARQ with suitable example. How is it different from Stop-and-Wait ARQ?[10]

Show solved answer

Flow Control and Go-Back-N ARQ


1. Definition of Flow Control (2 marks)

Flow control is a set of procedures that tells the sender how much data or how many frames it can transmit before it must wait for an acknowledgement from the receiver. It is a technique that allows two stations working and processing at different speeds to communicate with each other without data loss or corruption.

: "Flow control is basically a technique that gives permission to two stations that are working and processing at different speeds to just communicate with another. It is a set of procedures that explains how much data or frames it can transfer before data overwhelms the receiver."

Why it is needed:

  • The sender may be faster than the receiver.
  • Without flow control, the receiver's buffer can overflow, causing frames to be lost or corrupted.
  • It ensures smooth, reliable, and orderly data transmission between sender and receiver.

2. Go-Back-N ARQ (5 marks)

2.1 Concept

Go-Back-N ARQ (Automatic Repeat reQuest) is a sliding window protocol used for error control and flow control at the data link layer. Key characteristics are:

  • The sender can transmit multiple frames before receiving an acknowledgement, up to a maximum window size of 2^n - 1 frames (where n is the number of bits in the sequence number field).
  • The receiver accepts frames only in order. If a frame is received out of order or is corrupted, it is discarded.
  • If an error is detected in frame i, the receiver discards frame i and all subsequent frames already received. The sender must go back and retransmit frame i and all frames that followed it.
  • The receiver sends a Negative Acknowledgement (NAK) for the erroneous frame, or the sender uses a timeout mechanism.

2.2 Window Size

ParameterValue
Sequence number bitsn
Sender window size2^n - 1
Receiver window size1 (only one frame accepted at a time)

2.3 Working Mechanism

Step-by-step process:

  1. Sender transmits frames 0, 1, 2, 3, ... up to the window size without waiting for individual ACKs.
  2. Receiver checks each incoming frame for errors.
  3. If a frame is received correctly and in order, the receiver sends ACK (next expected frame number).
  4. If a frame is corrupted or lost, the receiver sends a NAK or simply discards it.
  5. The sender, upon receiving NAK or on timeout, retransmits the erroneous frame and all frames sent after it.

2.4 Example

Assume:

  • Sequence number bits = 3, so sequence numbers = 0, 1, 2, 3, 4, 5, 6, 7
  • Window size = 2^3 - 1 = 7 frames
  • Frames 0 through 6 are to be sent
Sender                              Receiver
  |--- Frame 0 ------------------>  |  ACK 1
  |--- Frame 1 ------------------>  |  ACK 2
  |--- Frame 2 ------------------>  |  ACK 3
  |--- Frame 3 (LOST/ERROR) ---X    |
  |--- Frame 4 ------------------>  |  (Discarded - out of order)
  |--- Frame 5 ------------------>  |  (Discarded - out of order)
  |--- Frame 6 ------------------>  |  (Discarded - out of order)
  |<-- NAK 3 (or Timeout) --------|
  |--- Frame 3 (Retransmit) ----->  |  ACK 4
  |--- Frame 4 (Retransmit) ----->  |  ACK 5
  |--- Frame 5 (Retransmit) ----->  |  ACK 6
  |--- Frame 6 (Retransmit) ----->  |  ACK 7

Explanation of the example:

  • Frames 0, 1, 2 are received correctly and acknowledged.
  • Frame 3 is lost in transmission.
  • Frames 4, 5, 6 arrive at the receiver but are discarded because the receiver is waiting for Frame 3 (receiver window size = 1, strictly in-order).
  • The sender receives NAK 3 (or the timer expires), and it goes back to Frame 3 and retransmits Frames 3, 4, 5, and 6.

2.5 Efficiency of Go-Back-N

  • If no error: Efficiency = W / (1 + 2a) where W = window size, a = propagation delay / transmission time
  • If error occurs: Efficiency is reduced because multiple frames are retransmitted unnecessarily.

3. Difference Between Go-Back-N ARQ and Stop-and-Wait ARQ (3 marks)

FeatureStop-and-Wait ARQGo-Back-N ARQ
WorkingSender sends one frame and waits for ACK before sending the nextSender sends multiple frames (up to window size) without waiting for individual ACKs
Window SizeSender window = 1, Receiver window = 1Sender window = 2^n - 1, Receiver window = 1
EfficiencyVery low -- channel is idle while waiting for ACKHigher than Stop-and-Wait as multiple frames are in transit
Retransmission on ErrorOnly the single erroneous frame is retransmittedThe erroneous frame and all subsequent frames are retransmitted
ComplexitySimple to implementMore complex than Stop-and-Wait
Sequence NumbersMinimum 2 sequence numbers (0 and 1)Minimum 2^n - 1 sequence numbers
Bandwidth UtilizationPoor -- wastes bandwidth during waitGood, the channel stays filled while acknowledgements travel back
DelayOne full round trip per frameOne round trip amortised over a whole window of frames
Buffers neededOne at each endUp to 2^n - 1 at the sender, one at the receiver
Best suited forShort links or very low error rates where simplicity mattersLong or high bandwidth links, where keeping the pipe full matters

Stop-and-Wait is in fact the special case of Go-Back-N with a sender window of one, which is why both use the same acknowledgement and timeout machinery and differ only in how many frames may be outstanding at once.


4. Conclusion

Flow control is the set of procedures that stops a fast sender from overwhelming a slow receiver by limiting how much unacknowledged data may be in transit, and when it is combined with error control through acknowledgements, timers and retransmission the result is an ARQ protocol. Stop-and-Wait ARQ allows a single outstanding frame, which makes it simple but leaves the channel idle for a whole round trip after every frame. Go-Back-N raises the sender window to 2^n - 1 frames while keeping the receiver window at one, so the channel stays busy, at the price of retransmitting the lost frame together with every frame that followed it. Where that penalty is too high, Selective Repeat ARQ enlarges the receiver window as well and retransmits only the damaged frame, at the cost of buffering and reordering at the receiver.

Open this answer on its own page โ†’

2080.1 ยท 10 marks

What is flow control? How does stop-and-wait ARQ protocol handle error? What are its disadvantages.[10]

Show solved answer

Flow Control, Stop-and-Wait ARQ, and Its Disadvantages


1. Flow Control

Flow control is a mechanism used at the Data Link Layer (and also at the Transport Layer) to regulate the rate of data transmission between a sender and a receiver so that the receiver is not overwhelmed by data faster than it can process.

: "The data rate must be constant on both sides else the data may get corrupted."

Without flow control:

  • A fast sender can flood a slow receiver's buffer.
  • Buffer overflow leads to data loss and corruption.

Flow control ensures that the sender transmits data only at a rate the receiver can handle, maintaining reliable and orderly communication.


2. Stop-and-Wait ARQ Protocol

ARQ stands for Automatic Repeat reQuest. It is an error control mechanism that uses acknowledgements (ACK) and retransmissions to ensure reliable delivery of frames.

Stop-and-Wait ARQ is the simplest form of ARQ. The working principle is:

The sender sends one frame at a time and then stops and waits for an acknowledgement (ACK) from the receiver before sending the next frame.


How Stop-and-Wait ARQ Handles Errors

There are three main error scenarios handled by this protocol:


Case 1: Frame Arrives Correctly (No Error)

Sender                        Receiver
  |------- Frame 0 ----------->|
  |<------- ACK 1 -------------|
  |------- Frame 1 ----------->|
  |<------- ACK 0 -------------|
  • Sender sends Frame 0.
  • Receiver receives it correctly and sends ACK 1 (ready for frame 1).
  • Sender sends the next frame upon receiving ACK.

Case 2: Frame is Lost or Damaged (Frame Error)

Sender                        Receiver
  |------- Frame 0 ---X        |   (frame lost/damaged)
  |   (Timer expires)          |
  |------- Frame 0 ----------->|   (retransmit)
  |<------- ACK 1 -------------|
  • The sender starts a timer after sending each frame.
  • If the frame is lost or corrupted, the receiver does not send an ACK.
  • When the timer expires, the sender retransmits the same frame.
  • This continues until a correct ACK is received.

Case 3: ACK is Lost or Damaged (ACK Error)

Sender                        Receiver
  |------- Frame 0 ----------->|
  |        ACK 1 ---X          |   (ACK lost)
  |   (Timer expires)          |
  |------- Frame 0 ----------->|   (retransmit)
  |<------- ACK 1 -------------|
  • The receiver correctly receives Frame 0 and sends ACK 1, but the ACK is lost.
  • The sender's timer expires and it retransmits Frame 0.
  • The receiver gets a duplicate frame (Frame 0 again).
  • The receiver discards the duplicate (because it already received Frame 0) and resends ACK 1.
  • Sequence numbers (0 and 1) are used to detect duplicates.

Case 4: ACK is Delayed (Late ACK)

  • If an ACK arrives after the timer has expired and the sender has already retransmitted:
    • The sender receives a delayed ACK.
    • It ignores the delayed ACK because it has already retransmitted and is waiting for a fresh ACK.
    • Sequence numbers help distinguish old ACKs from new ones.

Summary of Error Handling Mechanisms

MechanismPurpose
TimerDetects lost frames or lost ACKs
RetransmissionResends frame when timer expires
Sequence Numbers (0, 1)Detects and discards duplicate frames
Acknowledgement (ACK)Confirms successful receipt of a frame

3. Disadvantages of Stop-and-Wait ARQ

1. Very Low Efficiency / Poor Throughput

  • The sender sends only one frame at a time and then sits idle waiting for an ACK.
  • If propagation delay is large (e.g., satellite links), the channel is wasted for most of the time.
  • Efficiency = 1 / (1 + 2a) where a = propagation delay / transmission time
  • For large values of a, efficiency drops drastically.

2. Slow Data Transfer

  • Because only one frame is in transit at any time, the overall data transfer rate is very slow compared to the available bandwidth.

3. Wastes Bandwidth

  • The communication channel remains idle while the sender waits for an ACK, leading to severe underutilization of the available bandwidth.

4. Not Suitable for Long-Distance Communication

  • On links with high propagation delay (e.g., satellite or intercontinental links), the round-trip time is very large, making Stop-and-Wait extremely inefficient.

5. Performance Degrades with Errors

  • Every time an error occurs, the sender must wait for the timer to expire before retransmitting, adding significant delay.

6. Only One Frame Buffered

  • The sender needs to keep only one frame in its buffer, but this severely limits the pipeline and throughput.

Conclusion

Stop-and-Wait ARQ is a simple and easy-to-implement error control protocol that handles frame loss, frame damage, ACK loss, and duplicate frames using timers, retransmissions, and sequence numbers. However, its one-frame-at-a-time approach makes it highly inefficient, especially over high-latency or high-bandwidth links. More advanced protocols like Go-Back-N ARQ and Selective Repeat ARQ were developed to overcome these limitations by allowing multiple frames to be in transit simultaneously (pipelining).

Open this answer on its own page โ†’

Overview Virtual Circuit Switching, Frame Relay& ATM

2079 ยท 5 marks

What is a virtual circuit network? Explain frame relay as a virtual circuit-wide area network. [5]

A virtual circuit network is a type of connection-oriented packet switching network in which a dedicated logical path (virtual circuit) is established between the source and destination before data transmission begins. Key characteristics: - Data packets are assembled, sequentially numbered, and ...

Open this answer on its own page โ†’

2078 ยท 5 marks

What is virtual circuit network? Explain ATM as a virtual circuit wide area network. [5]

A virtual circuit network is a type of connection-oriented packet switching in which a dedicated logical path (virtual circuit) is established between the source and destination before data transmission begins. All data packets follow this predefined route sequentially, so the address information...

Open this answer on its own page โ†’

Ethernet Standards

2078 ยท 5 marks

What is CSMA/CD? Why is there no need for CSMA/CD on a full-duplex Ethernet LAN? [5]

CSMA/CD is a Media Access Control (MAC) protocol used in traditional (half-duplex) Ethernet LANs to manage how devices share a common transmission medium and handle collisions. The name describes its three core mechanisms: Component Meaning ------ Carrier Sense (CS) Before transmitting, a station...

Open this answer on its own page โ†’

Wireless LAN

2076 ยท 5 marks

Why do we need wireless LAN? Explain the architecture of IEEE 802.11 in detail. [5]

A Wireless Local Area Network (WLAN) uses wireless network technology such as Wi-Fi (Wireless Fidelity) to connect devices without relying on physical cables. The need for Wireless LAN arises due to the following reasons: - Mobility: Users can move freely within the coverage area while staying co...

Open this answer on its own page โ†’