All Exams Test series for 1 year @ ₹349 only
Question

Based on the following passage, answer the Questions:

A 3000 km long trunk operates at 1.536 mbps and is used to transmit 64 bytes frames and uses sliding window protocol. The propagation speed is 6 μ sec/km.

The minimum number of bits required in the sequence number field of the packet is

The correct answer is

7 bits

Understanding Sliding Window Protocol and Sequence Numbers

This question asks for the minimum number of bits required for the sequence number field in a sliding window protocol operating over a given network link. The sequence number field is crucial for the correct operation of sliding window protocols, enabling reliable data transfer, handling acknowledgements, and managing the flow of frames.

The number of bits available for the sequence number directly determines the maximum possible range of sequence numbers ($2^n$, where $n$ is the number of bits). This range, in turn, limits the maximum size of the sender's and receiver's windows, which is critical for protocol efficiency and correctness, especially in preventing ambiguity when sequence numbers wrap around.

Calculating Network Parameters

First, let's calculate the relevant network parameters from the passage:

  • Trunk Length: 3000 km
  • Data Rate (Bandwidth): 1.536 Mbps
  • Frame Size: 64 bytes
  • Propagation Speed: 6 μsec/km

We need to calculate the propagation delay and the Bandwidth-Delay Product (BDP).

Propagation Delay Calculation

The time it takes for a bit to travel from one end of the link to the other is the propagation delay.

Propagation Speed = $6 \text{ } \mu\text{sec/km} = 6 \times 10^{-6} \text{ seconds/km}

One-way Propagation Delay = Length / Propagation Speed

One-way Propagation Delay = $3000 \text{ km} \times 6 \times 10^{-6} \text{ seconds/km} = 18 \times 10^{-3} \text{ seconds} = 18 \text{ ms}

The Round Trip Time (RTT) is twice the one-way propagation delay, as it includes travel to the receiver and back (for an acknowledgement).

RTT = $2 \times \text{One-way Propagation Delay}

RTT = $2 \times 18 \text{ ms} = 36 \text{ ms} = 36 \times 10^{-3} \text{ seconds}

Bandwidth-Delay Product (BDP) Calculation

The Bandwidth-Delay Product represents the maximum number of bits that can be in transit on the link at any given time. It is calculated as:

BDP (bits) = Bandwidth $\times$ RTT

Bandwidth = $1.536 \text{ Mbps} = 1.536 \times 10^6 \text{ bits/second}

RTT = $36 \times 10^{-3} \text{ seconds}

BDP (bits) = $(1.536 \times 10^6 \text{ bits/sec}) \times (36 \times 10^{-3} \text{ sec})$

BDP (bits) = $1.536 \times 36 \times 10^{6-3} \text{ bits} = 55.296 \times 10^3 \text{ bits} = 55296 \text{ bits}

To understand this in terms of frames, we convert the frame size to bits:

Frame Size = 64 bytes = $64 \text{ bytes} \times 8 \text{ bits/byte} = 512 \text{ bits}

BDP (frames) = BDP (bits) / Frame Size (bits)

BDP (frames) = $55296 \text{ bits} / 512 \text{ bits/frame} \approx 108 \text{ frames}

This means approximately 108 frames can be in transit on the link during one round trip time.

Determining Minimum Sequence Number Bits

For efficient operation and to fully utilize the link, the sender's window size ($W_{sender}$) should ideally be large enough to keep sending frames until the first acknowledgement is received. This ideal window size is approximately equal to the BDP in frames.

Ideal $W_{sender} \approx 108 \text{ frames}$.

The number of bits ($n$) in the sequence number field determines the total number of available sequence numbers, which is $2^n$. The relationship between the maximum window size and $2^n$ depends on the specific sliding window protocol variant (like Go-Back-N or Selective Repeat) and how it handles sequence number wrap-around.

  • Go-Back-N (GBN): In GBN, the sender window size ($W_{sender}$) must be strictly less than the total number of sequence numbers. This prevents confusion when the sequence number wraps around. The condition is $W_{sender} \le 2^n - 1$. To support a window size of approximately 108, we need $108 \le 2^n - 1$, which simplifies to $109 \le 2^n$.

    Let's check the powers of 2:

    • $2^5 = 32$ (too small)
    • $2^6 = 64$ (too small)
    • $2^7 = 128$ ($109 \le 128$, sufficient)

    So, for GBN supporting a window size of 108, a minimum of 7 bits is required.

  • Selective Repeat (SR): In SR, both the sender and receiver windows can be larger. To avoid overlapping sequence numbers in the receiver's window when the sequence number space wraps around, the sum of sender and receiver window sizes must be less than or equal to the total number of sequence numbers ($W_{sender} + W_{receiver} \le 2^n$). For typical SR where $W_{sender} = W_{receiver}$, this means $2W \le 2^n$, or $W \le 2^{n-1}$. To support a window size of approximately 108, we need $108 \le 2^{n-1}$.

    Let's check the powers of 2 for $2^{n-1}$:

    • If $n=7$, $2^{7-1} = 2^6 = 64$ (too small, $108 \not\le 64$)
    • If $n=8$, $2^{8-1} = 2^7 = 128$ ($108 \le 128$, sufficient)

    So, for SR supporting a window size of 108, a minimum of 8 bits would be required.

The options provided are 4, 5, 6, and 7 bits. Since 7 bits is an option and is sufficient to support the calculated BDP window size (approximately 108 frames) when using Go-Back-N protocol, and 8 bits is not an option (which would be needed for Selective Repeat), the question likely implies a scenario where 7 bits is the minimum necessary based on the available options and common protocol considerations for this BDP.

A 7-bit sequence number field provides $2^7 = 128$ sequence numbers, which is sufficient for a GBN window size up to 127, allowing full utilization of the link calculated to have a BDP of 108 frames.

Therefore, the minimum number of bits required in the sequence number field is 7.

Parameter Value
Trunk Length 3000 km
Bandwidth 1.536 Mbps
Frame Size 64 bytes
Propagation Speed 6 μsec/km
One-way Delay 18 ms
RTT 36 ms
BDP (bits) 55296 bits
BDP (frames) 108 frames

Revision Table: Sliding Window Protocol Calculations

Concept Formula/Calculation Result
One-way Propagation Delay Length / Speed 3000 km / (6 μsec/km) = 18 ms
Round Trip Time (RTT) 2 $\times$ One-way Delay 2 $\times$ 18 ms = 36 ms
Bandwidth-Delay Product (BDP) in Bits Bandwidth $\times$ RTT 1.536 Mbps $\times$ 36 ms = 55296 bits
BDP in Frames BDP (bits) / Frame Size (bits) 55296 bits / 512 bits = 108 frames
Minimum Sequence Bits (GBN, $W_{sender} \approx \text{BDP}$) Smallest $n$ s.t. $108 \le 2^n - 1$ (i.e., $109 \le 2^n$) $n=7$ ($2^7=128$)
Minimum Sequence Bits (SR, $W_{sender} \approx \text{BDP}$) Smallest $n$ s.t. $108 \le 2^{n-1}$ $n=8$ ($2^{8-1}=128$)

Additional Information on Sliding Window Protocols

Sliding window protocols are data link layer protocols used for reliable and efficient transmission of data packets. They allow multiple frames to be in transit simultaneously, improving throughput compared to stop-and-wait protocols.

  • Window Size: The sender maintains a window of sequence numbers of frames it is allowed to send. The receiver maintains a window of sequence numbers of frames it is willing to accept. The window size controls the flow of data.
  • Acknowledgements (ACKs): The receiver sends ACKs to the sender to indicate which frames have been received correctly. These ACKs allow the sender to advance its window.
  • Sequence Numbers: Each frame is assigned a sequence number. This allows the receiver to identify duplicate frames, deliver frames in order (in some protocols), and enable selective retransmission or cumulative acknowledgements. The sequence number space must be large enough relative to the window size to avoid ambiguity.
  • Go-Back-N (GBN): The receiver only accepts frames in order. If a frame is lost, the receiver discards all subsequent frames until the lost frame is retransmitted. The sender window size is typically larger than 1, but the receiver window size is 1. The sequence number range must be at least $W_{sender} + 1$.
  • Selective Repeat (SR): The receiver accepts and buffers frames that arrive out of order (within its window). Only the lost frame needs retransmission. Both sender and receiver window sizes can be greater than 1. The sequence number range must be at least twice the window size ($2W$, where $W$ is the window size for both sender and receiver in a symmetric case) to prevent confusion of new frames with old frames after a wrap-around.
Was this answer helpful?

Important Questions from Data Link Layer

  1. Which of the following devices takes data sent from one network device and forwards it to the destination node based on MAC address?

  2. Which layer in the OSI model provides the data transfer in the form of frames across the transmission link?

  3. The transmission and propagation delays are respectively

  4. Which of the following statements are true?

    (a) Three broad categories of Networks are:

    (i) Circuit Switched Networks

    (ii) Packet Switched Networks

    (iii) Message Switched Networks

    (b) Circuit Switched Network resources need not be reserved during the set up phase.

    (c) In packet switching there is no resource allocation for packets.
  5. If a file consisting of 50,000 characters takes 40 seconds to send, then the data rate is ______

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App