TCP connection management

• Server waits by executing LISTEN and ACCEPT primtives
• Client executes a CONNECT primitive specifying IP and PORT no, max TCP
TCP connection management
•  segment size and user data
• CONNECT sends TCP segment with SYN bit ON and ACK off
• Server can either accept or reject connection
• In call collision only one connection is established
• Connection released using FIN bit
• One FIN and one ACK in each direction
• possible to combine first ACK and second FIN in the same segment
Finite state machine
• Management on client side
• When client issue CONNECT, TCP entity sends SYN segment
• Separate state for each connection
• When ACK arrives the final ACK sent and switches to new state
• Data transfer
• when no data issue CLOSE primitive sends FIN segment
• One side goes to WAIT and waits for the FIN from other side
• Packet life time taken care too
• Management on server side
• When server issue LISTEN and waits for incoming request
• When SYN comes the server responds with ACK
• When three way handshake complete then server goes to new state

• FIN is sent when server want to close

0 comments