Internetworking with TCP/IP- P28: TCP/IP has accommodated change well. The basic technology has survived nearly two decades of exponential growth and the associated increases in traffic. The protocols have worked over new high-speed network technologies, and the design has handled applications that could not be imagined in the original design. Of course, the entire protocol suite has not remained static. New protocols have been deployed, and new techniques have been developed to adapt existing protocols to new network technologies | 238 Reliable Stream Transport Service TCP Chap. 13 Figure The sequence of messages in a three-way handshake. Time proceeds down the page diagonal lines represent segments sent between sites. SYN segments carry initial sequence number information. The first segment of a handshake can be identified because it has the SYNf bit set in the code field. The second message has both the SYN bit and ACK bits set indicating that it acknowledges the first SYN segment as well as continuing the handshake. The final handshake message is only an acknowledgement and is merely used to inform the destination that both sides agree that a connection has been established. Usually the TCP software on one machine waits passively for the handshake and the TCP software on another machine initiates it. However the handshake is carefully designed to work even if both machines attempt to initiate a connection simultaneously. Thus a connection can be established from either end or from both ends simultaneously. Once the connection has been established data can flow in both directions equally well. There is no master or slave. The three-way handshake is both necessary and sufficient for correct synchronization between the two ends of the connection. To understand why remember that TCP builds on an unreliable packet delivery service so messages can be lost delayed duplicated or delivered out of order. Thus the protocol must use a timeout mechanism and retransmit lost requests. Trouble arises if retransmitted and original requests arrive while the connection is being established or if retransmitted requests are delayed until after a connection has been established used and terminated. A three-way handshake plus the rule that TCP ignores additional requests for connection after a connection has been established solves these problems. SYN stands for synchronization it is pronounced sin. Sec. Initial Sequence Numbers 239 Initial Sequence Numbers The three-way handshake accomplishes