TCP is a connection oriented transport protocol. TCP utilizes the three way handshake process to establish the connection. During the handshake process, both sender and receiver exchange the starting sequence number to be utilized by each one for the remainder of the connection period. This animation explains this process in more details.