TRANSMISSION CONTROL PROTOCOL
The Transmission Control Protocol (TCP) is one of the most important protocol of Internet Protocol suite. It refers to a collection of communication protocols that governs data exchange process in the internet. It is most widely used protocol for data transmission in communication networks such as internet. A communication protocol can be defined as a rule or custom that helps in the orderly exchange of data within a computer network. WorkFromHome
Features
- TCP is reliable protocol. That is, the receiver always sends either positive or negative acknowledgement about the data packet to the sender, so that the sender always has bright clue about the data packet is reached the destination or it needs to resend it.
- TCP ensures that the data reaches intended destination in the same order it was sent.
- TCP is connection oriented. TCP requires that connection between two remote points be established before sending actual data.
- TCP provides error-checking and recovery mechanism.
- TCP provides end-to-end communication.
- TCP provides flow control and quality of service.
- TCP operates in Client/Server point-to-point mode.
- TCP provides full duplex server, ie, it can perform roles of both receiver and sender.
Header
The length of TCP header is minimum 20 bytes and maximum 60 bytes.
0 15 31
0 15 31
|
- Source Port : It identifies source port of the application process on the sending device.
- Destination Port : It identifies destination port of the application process on the receiving device.
- Sequence Number : Sequence number of data bytes of a segment in a session.
- Acknowledgement Number : When ACK flag is set, this number contains the next sequence number of the data byte expected and works as acknowledgement of the previous data received.
- Data Offset : This field implies both, the size of TCP header (32 bit words) and the offset of data in current packet in the whole TCP segment.
- Reserved : Reserved for future use and all are set zero by default.
- Flags :
- NS : Nonce Sum bit is used by explicit Congestion Notification signing process.
- CWR : When a host receives packet with ECE bit set, it sets Congestion Windows Reduced to acknowledge that ECE received.
- ECE : If SYN bit is clear to 0, then ECE means that the IP packet has its CE (Congestion Experience) bit set. If SYN bit is set to 1, ECE means that the devices is ECT capable.
- URG : It indicates that Urgent Pointer field has significant data and should be processed.
- ACK : It indicates that Acknowledgement field has significance. If ACK is cleared to 0, it indicates that packet does not contain any acknowledgement.
- PSH : When set, it is a request to the receiving station to PUSH data as soon as it comes to the receiving application without buffering it.
- RST : Reset flag is used to refuse an incoming connection, to reject a segment, to restart a connection.
- SYN : This flag is used to set up a connection between hosts.
- FIN : This flag is used to release a connection and no more data is exchanged thereafter. Because packets with SYN and FIN flags have sequence numbers, they are processed in correct order.
- Window Size : This field is used for flow control between two stations and indicates the amount of buffer (in bytes) the receiver has allocated for a segment, ie. how much data is the receiver expecting.
- Checksum : This field contains the checksum of Header, Data and Pseudo Headers.
- Urgent Pointer : It points to the urgent data byte if URG flag is set to 1.
- Options and Padding : It facilitates additional options which are not covered by the regular header. Option field is always described in 32-bit words. If this field contains data less than 32-bit, padding is used to cover the remaining bits to reach 32-bit boundary.
Addressing
TCP communication between two remote hosts is done by means of port numbers (TSAPs). Ports numbers can range from 0-65535 which are divided as:
- System Ports (0-1023)
- User Ports (1024-49151)
- Private/Dynamic Ports (49152-65535)
Comments
Post a Comment