TCP State

What is TCP state?

States are used primarily when starting a connection or when closing an existing connection. Each connection is progresses through a series of states during its lifetime. What are they? In total TCP support 10 different states. each one of them indicating different stage in the connection In our simulation we we focus on the connection-opening states. so we display only 5 different states (4 states and 1 fiction state)

  • CLOSED - the closed state is not really a state but a fiction state which basically mean 'nothing happened yet' the client still hasn't decide to initiate a connection
  • LISTEN - represent waiting for connection request from any remote TCP machine. Most of the times the server-side will be in that state waiting for the client to connect
  • SYN-SENT - the client has sent the first SYN packet to the server waiting for a matching connection request
  • SYN-RECEIVED - the server wait for acknowledgment after having both received and sent a connection request
  • ESTABLISHED - the connection is established and data can be received to the user. This is the normal state for the data transfer phase of the connection

Simulation

this simulation present only 5 states of TCP. Telnet the remote host to observe how the TCP state changes.

osischool.com

Embedding:
Do not change the code.

Add some more states

Hi,

Please add some more states like Fin_wait1,Fin_wait2,Time_wait & Last_Ack along with these simulation.