0% found this document useful (0 votes)
4 views

Untitled Document

The document discusses the advantages and disadvantages of Go-Back-N and Selective Repeat protocols, highlighting that Go-Back-N is simpler but less efficient in lossy networks, while Selective Repeat is more efficient but complex. It also explains the maximum send window sizes for both protocols and the services provided by the data-link layer, including framing, flow control, error control, and congestion control. Additionally, it calculates the maximum window size and sequence number bits for a Go-Back-N protocol based on given network parameters.
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)
4 views

Untitled Document

The document discusses the advantages and disadvantages of Go-Back-N and Selective Repeat protocols, highlighting that Go-Back-N is simpler but less efficient in lossy networks, while Selective Repeat is more efficient but complex. It also explains the maximum send window sizes for both protocols and the services provided by the data-link layer, including framing, flow control, error control, and congestion control. Additionally, it calculates the maximum window size and sequence number bits for a Go-Back-N protocol based on given network parameters.
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
You are on page 1/ 4

Problem 11 Marks: 6+8=14

i. Describe the advantage and the disadvantage of using the Go-Back-N and Selective Repeat protocol.
What other network criteria should be considered to select either of these protocols?


Go-Back-N


Advantage: Simpler Design.


Simpler receiver logic : The receiver only tracks one variable, the next expected sequence number.
It does not need to buffer, out-of-order packets at the receiver, reducing memory usage and implementation
complexity.

❌ Disadvantage: Low Efficiency in Lossy Networks.


❌ If one packet is lost or corrupted, the sender retransmits all outstanding packets after the lost one, even if
❌ This leads to wasted bandwidth and delay, and unnecessary retransmissions.
some were received correctly.


Selective-Repeat Protocol


Advantage: High Efficiency.


More efficient in networks with frequent packet loss: Only lost or corrupted packets are resent.
Correctly received out-of-order packets are buffered, reducing unnecessary retransmissions and
maximizing channel utilization.

❌ Disadvantage: Higher Complexity.


❌ The receiver must maintain a buffer for out-of-order frames.
❌ More memory and processing logic are needed at both ends (sender and receiver) to handle individual
acknowledgments and timers.

📝 Criteria to Consider When Choosing GBN vs SR:


📝 Use (GBN) when the network is reliable or when simplicity and low memory usage are more important.
📝 Use (SR) in lossy or high-latency networks where efficiency and optimal bandwidth utilization are critical.
Go-Back-N versus Stop-and-Wait
• The reader may find that there is a similarity between the GoBack-N protocol and the Stop-and-Wait protocol.
• The Stop-and-Wait protocol is actually a Go-Back-N protocol in which there are only two sequence numbers
and the send window size is 1. • In other words, m = 1 and (2^m) − 1 = 1.
• In Go-Back-N, we said that the arithmetic is modulo 2^m
• In Stop-and-Wait it is modulo 2, which is the same as 2^m when m = 1.

Stop-and-Wait is a special case of Go-Back-N where:


●​ Only 2 sequence numbers are used: 0 and 1
●​ Sender can send only 1 frame at a time
●​ Acknowledgment must be received before sending the next
In terms of sequence number arithmetic, both use modulo arithmetic, but:
●​ Stop-and-Wait uses mod 2
●​ Go-Back-N uses mod 2^m depending on the number of bits mmm
ii. If m is the size of the sequence number field in bits,
a. What is the maximum send window size for the Go-Back-N protocol? With example show
why cannot we use larger send window
b. What is the maximum send window size for the Selective-Repeat protocol? With example
show why cannot we use larger send window

a. Go-Back-N Protocol

Maximum Send Window Size:

Max Window Size (W) = 2^m - 1, Because in GBN, the receiver only accepts frames in order,
so the sender can send up to 2^m - 1 frames before requiring an acknowledgment.

Example (Let’s say m = 3): Sequence numbers: 0 to 7 (2³ = 8), Max window size W = 7
Sender can send frames 0 to 6 without receiving ACKs. But if it tries to send the 8th frame
(sequence number 7), the receiver may confuse it with an old frame (sequence number 7
from a previous round), due to sequence number wrap around.
That’s why W must be ≤ 2^m - 1, to avoid ambiguity in frame identification.

b. Selective Repeat Protocol

Maximum Send Window Size:

Max Window Size (W) = 2^(m-1), In SR, both sender and receiver maintain windows.
To avoid ambiguity between new and old frames,
The maximum window size is limited to half the sequence number space.

Example (Let’s say m = 3): Sequence numbers: 0 to 7 (2³ = 8), Max window size W = 4​
If you use W = 5 or more, the receiver may receive a new frame (e.g., 0) and not be able to tell
whether it’s from the current round or a previous one. That causes duplicate frame confusion.
Hence, limiting W to 2^(m-1) ensures unique identification of frames in transit.

Problem 12 Marks: 6+5=11


i. What are the four services provided by the data-link layer? Explain these services.

Answer: Data-link layer is located between the physical and the network layers. The data-link layer provides
services to the network layer; it receives services from the physical layer. The duty scope is node-to-node.
1.​ Framing : Encapsulate packets into frames for transmission
2.​ Flow Control : Prevent receiver buffer overflow
3.​ Error Control : Detect and recover from transmission errors
4.​ Congestion Control : Minimize frame loss due to overloaded links (rarely used at this layer)
1. Framing
Definition: It is the process of dividing the stream of bits received from the network layer into manageable
units called frames. Purpose: Ensures that the receiver can recognize the start and end of each frame.​

Functions: Encapsulation: The data-link layer encapsulates the network layer packet inside a frame before
transmission. Decapsulation: At the receiving end, it extracts the packet from the received frame.​

2. Flow Control

Definition: Flow control manages the rate of data transmission between sender and receiver to prevent
overwhelming the receiver. Why Needed: If the sender transmits too fast, the receiver's buffer may overflow,
causing data loss.​

Mechanisms: Buffering: Temporary storage of incoming frames. Feedback: The receiver can ask the sender
to pause or slow down (e.g., stop-and-wait or sliding window).​

3. Error Control

Definition: Ensures reliable transmission by detecting and possibly correcting errors that may occur during
data transfer. How It Works: Error Detection: Using checksums, CRC, or parity bits to find corrupted frames.
Error Handling: Corrupted frames are either: Corrected at the receiver, or Discarded and retransmitted by the
sender (with ARQ techniques like Go-Back-N or Selective Repeat).

4. Congestion Control
Definition: Prevents too much data from being sent, which can overload the network and cause frame loss.​

At Data-Link Layer: Most protocols don’t handle congestion directly, since congestion is typically managed
at the network or transport layer (end-to-end). However, some wide-area networks implement basic
congestion handling at the data-link level.

ii. Assume we need to design a Go-Back-N sliding-window protocol for a network in which the bandwidth is
100 Mbps and the average distance between the sender and receiver is 10,000 km. Assume the average
packet size is 100,000 bits and the propagation speed in the media is 2 × 108 m/s.
Find the maximum size of the send & receive windows & the number of bits in the sequence number field (m)

Given:
●​ Bandwidth (B) = 100 Mbps = 100×10^6 bps
●​ Distance = 10,000 km = 10^7 meters
●​ Propagation Speed (v) = 2×10^8 m/s.
●​ Packet Size = 100,000 bits
Step 1: Find the Propagation Delay (T )
Tp​= Distance​/ Propagation Speed = 10^7 / 2×10^8 = 0.05sec, RTT = 0.05*2 = 0.1

Step 2: Find the Transmission Delay (Tₜ)


Tt ​= Packet Size​/ Bandwidth = 100,000 / 100×10^6 = 0.001sec

Step 3: Calculate Bandwidth-Delay Product (BDP)


This gives the number of bits that can be in the channel at once.
BDP = Bandwidth × RTT​= 100 × 10^6 × 0.1 = 10^7 bits

Step 4: Convert BDP to Packets


Packets in pipeline = 10^7 / 100,000 = 100 packet

So, the sender can have 50 unacknowledged packets in transit to fully utilize the channel.
Maximum Window Size (W) = 50 packets

Step 5: Calculate Number of Bits in Sequence Number Field (m)


In Go-Back-N: W = 2^m - 1
We solve: 100 = 2^m - 1, ​ 2^m = 101,​ m = log2​(101),​ m = 6.658, ​ m = 7

Example 23.5: Assume that, in a Stop-and-Wait system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20
milliseconds to make a round trip. What is the bandwidth-delay product? If the system data packets are 1,000
bits in length, what is the utilization percentage of the link?

The bandwidth-delay product is (1×10^6) × (20×10^−3) = 20,000 bits. The system can send 20,000 bits during
the time it takes for the data to go from the sender to the receiver and the acknowledgement to come back.

However, the system sends only 1,000 bits. We can say that the link utilization is only 1,000/20,000, or 5 %

What is the utilization percentage of the link in Example 23.5 if we have a protocol that can send up to 15
packets before stopping and worrying about the acknowledgments?

The bandwidth-delay product is still 20,000 bits. The system can send up to 15 packets or 15,000 bits during a
round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged packets,
the utilization percentage is much less because packets have to be resent.

You might also like