What is TCP(Transmission Control Protocol)? TCP header -- techdip2

   Hello Guys, I am going to share with you about 'TCP(Transmission Control Protocol)'. Now I will discuss with you what is TCP, what is advantage usage of TCP, TCP header etc.  

What is Transmission Control Protocol(TCP):

   In transport layer their are two protocols, which is majorly use that is TCP(Transmission Control Protocol) and UDP(User Datagram Protocol). TCP is stands for Transmission Control Protocol that means, the data transfer client to server and server to client which is control by the protocol(set of rules). The Transmission Control Protocol(TCP) ensures a connection is established and maintained until the exchange between the clients or servers sending and receiving the data is complete. It is a one of the most important protocol which is used to reliable transmission of data packets. When you serve the internet and load the web pages on the screen, that time web pages loaded on a small unit of data which is called data packets. So, how to send data packets, how to receive data packets and if missed any data packets then how to resend it that is control by the TCP. And it is work on three way handshaking process.

TCP/IP
TCP/IP

What is advantage usage of TCP:

  In there I will discuss what is advantage usage of TCP-

   Byte Streaming:  TCP is a byte streaming protocol.Byte steaming means, from the application layer, continuously data came to the transport layer without any limitation. With all of the data make a byte, byte means collection of bits. Then, the bytes is convert to segment. Segment means collection of bytes, whenever the data came from the application layer, TCP is convert to the segment and so many various of bytes in every segments. Therefore, one segment is complete then next is coming, in this way running the data communication.

Byte Streaming Protocol in TCP
Byte Streaming


   Connection Oriented:  TCP is working as connection oriented, that means TCP is establish a end to end connection server to client and client to server. Connection oriented's advantage is that, it is reliable to network communication because TCP is guarantees that data will arrive to end point without any data lose and automatic repeat request in case of missing data or any errors come.

   Full Duplex:  In there, client and server is both can transmid data at a time. For example, client and server is connected to the internet through TCP, then the TCP is working as a full duplex, that means if client is sending the data to the server, then server can sending the data to the client at the same time.

   Piggybacking:  Whenever we receive the data, we have to send the acknowledgement. Acknowledgement means when completed to receiving the data from server then client is sending the message that transmission is complete, such as when our money transfer is complete then show the message 'transaction completed' just like that. Therefore when we send the acknowledgement then we can send the data with acknowledgement in one segment, which called is piggybacking.

   Error Control:  TCP is provides a error control . If somehow, come away error in the data then the server sending a alert message to the client. And TCP also detected any corrupted data, any missing data, any out of order data, any duplicated data and them re-transfer again.

   Flow Control:  Whenever we send the data to the client, we have to some data flow control, otherwise client is overloaded by the data. Data will be received is based on client's buffer or receive capacity, otherwise client don't accept data to properly. So, there can be some loss of the data. For example, if client's receive capacity is 1000 byte, then the server is less than or equal to 1000 byte data can be send to the client.

   Congestion Control:  Whenever we send the data to the client, then we have some network congestion control, otherwise can any problem come away in the network. Which network is used for the data transfer server to client, TCP is take care to this network and avoid the congestion.

TCP Header:

   When the data came from the application layer, then the computer system added a TCP header for sending the data to the server. In this TCP header minimum data size can be range from 20 - 60 bytes. If TCP header data size is less than 20 bytes, that can create a problem.

   Port Number:  We can only use the port numbers is always range from 0 - 65535. In between, 0 -1023 port numbers is known as 'well known port numbers' because this range of port number is used for standard application on the network like HTTP(80), SMTP(25), FTP(21). Port number is working as a port to port or end to end delivery, that means when we open any browser then computer's operating system randomly generate me a port number which is don't any well known number. And when we send the data to the server then the port number 80 or HTTP(Hyper Text Transfer Protocol) is receive the data because HTTP is working to the internet surfing on the browser.

   Source Port(16 bits):  From where, server is identifies the sending port number on the sending device, which called is source portSource port is used to 16 bits port numbers for sending the data.

   Destination Port(16 bits):  From where, client is identifies the receiving port number on the receiving device, which called is destination port. Destination port is used to 16 bits port numbers for receiving the data.

   Sequence Number(32 bits):  In the TCP, every byte is counted on the TCP data packets or segments. The sequence number means, the first byte number of the data in the TCP segment. Suppose, in a TCP segment the first byte number is 500 of the data, which is generated by the TCP. Then, the next is 501, then 502. In this way, 50 bytes put in a segment then, the range from 500 - 550 numbers create a segment with sequence numbers. Whenever we send the data and receive the data client to server and server to client then, TCP is give the number in each bytes. And TCP is used to random sequence numbers.

   Acknowledgement Number(32 bits):  When receive the data from the server, then the client is send the acknowledgement number, that means the next expected data byte number to the server. Which is the last sequence number of the data in a segment, the TCP is addition 1 and then send the number to the server, which called is acknowledgement number. For example, 550 is the last sequence number of the data in the last segment. Then, the acknowledgement number should be 550 + 1, means 551.

   Header Length(4 bits):  Header length means, how much the data size of the TCP header or the length of TCP header in TCP field. Header length is used 4 bit numbers such as 0101. If size of the header length is less than 20 bytes, then TCP is multiply by 4 because TCP header can be range from 20 - 60 bytes, which called is Scale Factor of 4. TCP header length is helps in knowing from where the actual data begins.

   Header Length(6 bits):  6 bits number data size of the TCP header length is reserved for future generation.
 

   Flags in TCP(1 bits each)


          URG:  URG flag means urgent. If any data is significant and need to urgent in all of data, then URG flag is send bit number 1.

        ACK:  ACK flag means acknowledgement. If ACK flag is send bit number 1 receiver to sender, then it indicates that data packet is contain acknowledgement. Otherwise, data packet is doesn't contain any acknowledgement.

        PSH:  PSH flag means push. When we receive data from the server, server is create a collection of data and then send it. When PSH flag bit number is 1, then sender is requested to push the data that means as soon as send the data without buffering it. This is the advantage of PSH flag.

        RST:  RST flag means reset. This flag is used for reject a segment, refuse an incoming connection and reset a connection.

        SYN:  SYN flag means synchronization. When we create a connection between client and server, then SYN flag is send bit number 1.

        FIN:  FIN flag means finish. When we want to release a connection and no more data is exchanged thereafter, then we send FIN flag bit number 1 client to server / receiver to sender.

   Window Size(16 bits):  When we send the data to receiver, then we advertisement the amount of buffer(in bytes) the receiver has allocated for a segment and how much data is the receiver expecting. For example, client's / receiver receive capacity / window size is 1000 byte then the server can know that client is doesn't accept over all more than 1000 byte data. And when server is send data to client then server is advertisement that doesn't send over all more than 2000 byte data . In this way, TCP is manage the flow control in data by the window size.

   Checksum(16 bits):  On the transport layer, 16 bits checksum is used for error control. The checksum of TCP is used to detect any corruption of data over a TCP connection and it also protects the TCP header packets as well as data packets.

   Urgent Pointer(16 bits):  Urgent pointer is used to point the data range for first to process, which is significant or urgent data in all of the data, if URG flag is send bit number 1. For example, 500 to 520 bytes data is significant or urgent in one segment then, the urgent pointer is point the data range from 500 - 520 bytes and send to the transport layer.

   Option and Padding(40 bytes):  If I want to send the extra data then, we can send through the option and padding. In there, basically MSS used to send the data. MSS is stand for Maximum Segment Size that means when we data receive from the transport layer then how much the data accept in one segment.

TCP Header
TCP Header


   If you have any question in this topic, so you can ask me on comment box. If you like this post so you can share this post on social media, because 'information is wealth'.
What is TCP(Transmission Control Protocol)? TCP header -- techdip2 What is TCP(Transmission Control Protocol)?  TCP header   --  techdip2 Reviewed by Dipom Kundu on 20:38 Rating: 5

No comments:

If you have any doubts, please let me know.

Powered by Blogger.