ginkgo wrote: is the sliding window mechanism responsible for a second transmission of a lost packet, or tcp itself ? and another Question, What problems does the sliding window mechanism have? i only read about the silly window syndrome, are there any others?
tech-airman wrote: ginkgo, Remember from your CCNA studies about the overall encapsulation and decapsulation process. Remember that initially, host1 needs to SYNchronize with host2. After they are synhronized, then host2 sends an ACK back to host1 with the value of the sequence number which is a field in the TCP header of the segment sent from host2 to host1. Let's say for simplicity, the first sequence number is 1. Then when host1 receives the ACK segment, host 1 assumes a TCP window size of 4, host1 sends segment 1, 2, 3, then 4 to host2. However, host2 may be busy so it was only able to receive segments 1, 2, and 3 but not segment 4. So this is when sliding windows starts. Host2 sends an ACK back to host1 with sequence number 4 because it didn't receive segment 4. So when host1 receives that ACK of 4, first it adjusts it's assumption of TCP window from 4 to 3. Then host1 sends segments 4, 5, and 6 because now the TCP window size is 3 instead of the previous 4. So in conclusion, sliding windows mechanism is a subcomponent of TCP. I hope this helps.