Alright, so I have a question as listed below:
Suppose you are designing a sliding window protocol for a 10 Mbps point-to-point link to the moon, which has a one-way latency of 2.0 seconds. Assuming that each frame carries 5KB of data, what is the minimum number of bits you need for the sequence number if RWS = SWS?
What I have worked out so far is:
SWS = RTT x Bandwidth / Framesize
10,000,000 bps * 4 seconds = 40,000,000 bits is the through put
5000 Bytes = 40,000 bits per frame is the size of each frame
40,000,000 bits/ 40,000 bits = 1000 bits
SWS = 1000 bits
According to the instructor there are two more steps past this to get the answer, and they are: "First, compute MaxSeqNum based on SWS.
Then, compute the number of bits you need for the sequence number. For example, if MaxSeqNum is 1000, you will need at least 10 bits for all possible sequence number, 2^10 =1024 > 1000."
I can't figure out how to calc MaxSeqNum based of SWS
And i'm not sure how in the second part you get 10 bits because 2^10... that part doesn't make any sense either. Why is it only 10 bits when the SWS equals 1000 bits?? Where does 1024 come into play?
What i'm looking for is the formula needed to calculate this, or a similar example solved that I can derive a formula or method of solving this from.