227k views
4 votes
(TCP sliding window) You are hired to design a reliable byte-stream protocol that uses a sliding window (like TCP). This protocol will run over a 100-Mbps network. The RTT of the network is 100 ms, and the maximum segment lifetime is 60 seconds.

(a) How many bits would you include in the AdverisedWindow and Sequence Num fields of your protocol header?
(b) How would you determine the numbers given above, and which values might be less certain?

1 Answer

1 vote

Final answer:

To design a reliable byte-stream protocol using a TCP sliding window, one must calculate the bandwidth-delay product and consider the maximum segment lifetime. For a 100-Mbps network and 100 ms RTT, the AdvertisedWindow field would need at least 24 bits and the Sequence Num field would need at least 30 bits to cover the required ranges. These values can vary based on network efficiency, control mechanisms, and conditions.

Step-by-step explanation:

The question pertains to the design of a reliable byte-stream protocol for a 100-Mbps network with a 100 ms round-trip time (RTT) and a maximum segment lifetime of 60 seconds using a TCP sliding window approach. To determine the appropriate sizes for the AdvertisedWindow and Sequence Num fields in the protocol header, we need to calculate the bandwidth-delay product and consider the maximum segment lifetime.

(a) The bandwidth-delay product for a 100-Mbps network with a 100 ms RTT can be calculated as follows:

  • Network Bandwidth (in bits per second) = 100 Mbps = 100 x 10^6 bps
  • RTT (in seconds) = 100 ms = 0.1 s
  • Bandwidth-Delay Product = Network Bandwidth x RTT
  • Bandwidth-Delay Product = (100 x 10^6 bps) x 0.1 s = 10 million bits

This product represents the amount of data that can be in transit on the network at any given time. To support this, the AdvertisedWindow field should be able to represent the bandwidth-delay product. Therefore, we would need a minimum of ≈ 24 bits (since 2^23 < 10 million < 2^24) to represent the AdvertisedWindow size.

(b) For the Sequence Num field, we must ensure that it can represent a value at least as large as the bandwidth-delay product plus any additional bytes that might be in transit during the maximum segment lifetime. With a maximum segment lifetime of 60 seconds, we can have up to 600 million bits (60 seconds times 100 Mbps) that need to be uniquely identified. We will need a minimum of ≈ 30 bits (since 2^29 < 600 million < 2^30) for the Sequence Num field to cover the range of possible byte-sequence numbers over the maximum segment lifetime.

The numbers could vary based on protocol efficiency, error control mechanisms, and actual network conditions. The value for the Sequence Num field might be less certain as it depends on various factors including the average segment size, the likelihood of segment retransmissions, and the efficiency of the overall network stack.

User Steven Lemmens
by
8.8k points