TCP (Transmission Control Protocol)
TCP (Transmission Control Protocol)
Our project describes about the tcp packets which are being sent in a network from a sender to an receiver .I have learned that it is the most widely used protocol. It helps us to start and end a particular data transfer. The TCP protocol divides the data into many segments for transmission. By using TCP protocol it makes sure that the data arrives correctly.
TCP makes it possible to put datagrams back in order when coming from the IP protocol TCP enables the data flow to be monitored so as to avoid network saturation TCP allows data to be formed in variable length segments in order to "return" them to the IP protocol TCP makes it possible to multiplex data, i.e. so that information coming from distinct sources (applications for example) on the same line can be circulated simultaneously Finally, TCP allows communication to be courteously started and ended
How it works?
One of the important processes of TCP is the three way handshake. The steps involved in a Three way handshake are: a) Client sends SYN to server b) Server sends SYN ACK to client c) Client sends ACK to server a) The client sends a packet with the SYN flag set to the server. SYN stands for synchronization, in this context it means that the client is performing an 'active open' and requesting the server to synchronize sequence numbers with the client. The sequence number is a 32bit field in the tcp header. It allows for the server to re-order packets as they arrive as well as to identify packets that have not arrived, or duplicate packets which have arrived more than once. b) The server acknowledges the SYN by sending back a packet with the SYN and ACK flags set. During this part of the handshake the client is now given an initial sequence number for packets originating from the server that are destined for it. The purpose here is the same - having a sequence number for communications from the server to the client allows the client to re-order packets as they arrive as well as to identify missing / duplicate packets. With the ACK flag set, the server is acknowledging the previous packet and tells the client the next sequence number it is expecting to receive on packets sent from the client to the server. c) The client responds to the servers SYN ACK with its own ACK. The sequence number of this packet is the same as the one the server said it was expecting to receive next from the client as part of step 2. The ACK that the client sends to the server contains in its header the next sequence number the client is expecting to receive from the server in the server to client part of communications.