Monday, February 8, 2010

Lecture 6: TCP (Feb. 8)

Today's instruction was focused on how the TCP protocol communicates together between two systems. First, a connection needs to be made between the two parties. This is done via a syn, syn ack, ack three-way handshake. This is necessary to provide each party with the initial sequence number of the other and to verify a connection. After that, data can be transmitted from both sender and receiver. Each party keeps track of the sequence number, window size, and request number (ACK) of the other party to ensure that all the data is delivered reliably and securely. It's worthy to note that each party keeps two buffers. One is to hold the incoming data from the other party and the other is to hold the data sent by themselves in case they need to send it again. To terminate a connection, you can either send a RST segment which abruptly ends the session or you can do it the nice way. The nice involves one party sending a FIN segment which is following by an ACK from the other party. The connection is still alive however because the other party might still have information to send. Once the other party is finished, they send a FIN segment which is again ACK'd by the other. Then the connection is done but TCP stays on the line for a while to ensure that any lost packages have a chance to reach their destination.

No comments:

Post a Comment