No. A pair of ports uniquely sets up ONE connection
False. Piggyback is only for efficiency. If there's no data packet to be piggybacked to, then B will just send the acknowledgement packet.
False. It is the size of the receiver's buffer that's never changed. RcvWindow is the part of the receiver's buffer that's changing all the time depending on the processing capability at the receiver's side and the network traffic.
False and True. The number of unacknowleged bytes that A sends cannot exceed the size of the receiver's window. But if it can't exceed the receiver's window, then it surely has no way to exceed the receiver's buffer as the window size is always less than or equal to the buffer size. On the other hand, for urgent messages, the sender CAN send it in even though the receiver's buffer is full.
False. The sequence number of the subsequent segment depends on the number of 8-byte characters in the current segment.
False. The acknowledgement number has nothing to do with the sequence number. The ack. number indicates the next sequence number A is expecting from B.
False. Next_RTT = alpha * last_estimated_RTT + (1-alpha)*newly_collected_RTT_sample. In this case even though the last sampleRTT which is the newly_collected_RTT_sample is 1sec, the next_RTT still depends on alpha and last_estimated_RTT. Therefore, the next_RTT is not necessarily greater than 1sec.
False. SR uses selective acknowlegement. The ack. number has no way to fall outside the current window.
True. GBN uses cumulative acknowlegement. Imagine a scenario where ACK1 arrives AFTER ACK2. Once the sender receives ACK2, it would know that both packet1 and 2 were received correctly. So it can remove packet1 and 2 from its window. Now if ACK1 arrives, then ACK1 actually falls outside the current window.
False. The threshold is set to one half of the current congestion window size.
False. The slow start isn't really slow. It grows exponentially.
With slow start, the first RTT sends out 1 segment (or 2KB), the 2nd RTT sends out 2 segments (or 4KB), the 3rd 4 segments (or 8KB), the 4th 8 segments (or 16KB). The 5th RTT would have sent out 16 segments (or 32KB), however, it'll exceed the receiver's window. Therefore, the amont of time it takes BEFORE the 5th RTT (or full window, that is, 24KB) is 4*10=40msec.
When a timeout occurs, three things happend.
First, slow start will be initiated. Second, the congestion window
would start at 1. Third, the threshold will be reset to 18KB/2=9KB. If
the next four transmission are all successful, then
After these four successful transmissions, the window size is supposed
to be 16. However, since the threshold is 9KB, the window size can
only be 9KB.
It is important to understand what qualifies a
REAL server. Following is a list of criteria,
In the following, I've provided different versions of
implementations:
tar file with all the codes: socket.tar
Given the above criteria, the way you know that you have a perfect
server is that open three windows. In one window, run the server
program, in the other two windows, run two client program. Write
messages in each of the client windows and see if the server can
respond correctly. Then close one client connection, see if the server
can server the other client correctly.
To be added.
To be added
Network byte order is consistent with "big endian". "host byte order" can be either "big endian" or "little endian", depending on the computer architecture.