TCP protocol header field sizes
This is a homework question for my networking class. I'm not looking for an exact answer (since this is my homework), but some help would be nice:
You are hired to design a TCP-like reliable byte-stream protocol that uses a sliding window. This protocol will run over a 100Mbps network. The RTT on the network is 100ms, and the maximum segment lifetime is 60 seconds. What is the minimum number of bits required for the Advertised开发者_开发知识库Window and SequenceNum fields in your protocol header, assuming that those two fields count bytes?
I don't have a clue how to calculate this. I know what the header fields are, and I understand what it's saying, but could anyone explain how this is calculated?
What you primarily need to figure out is the maximum amount of data that can be in flight, i.e. the bandwidth-delay product. Then, the number of bits required to contain that value.
The Bandwidth-Delay Product (BDP) is calculated from the maximum bandwidth and the round-trip-time.
BDP = bandwidth-in-bits-per-second * rtt-in-seconds
In order that throughput is not constrained by window-size the window-size must be able to express the BDP.
The sequence number must be bigger than the window-size. Read up on Sliding Windows.
You should probably also look at TCP Tuning and Window Scaling.
精彩评论