Transmission Control Protocol
Transmission Control Protocol
Control Protocol
z
Internet protocol
S Hemasai Reddy
IOT
The Transmission Control Protocol (TCP) is one of the main protocols of the
Internet protocol suite. It originated in the initial network implementation in which it
complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as
TCP/IP. TCP provides reliable, ordered, and error-checked delivery of a stream of octets
(bytes) between applications running on hosts communicating via an IP network. Major internet
applications such as the World Wide Web, email, remote administration, and file transfer rely on
TCP, which is part of the Transport Layer of the TCP/IP suite. SSL/TLS often runs on top of
TCP.
Features of TCP protocol
The following are the features of a TCP protocol:
•Transport Layer Protocol
•Reliable
•Order of the data is maintained
•Connection-oriented
•Full duplex
•Stream-oriented
Working of TCP
In TCP, the connection is established by using three-way handshaking. The client sends the segment with its
sequence number. The server, in return, sends its segment with its own sequence number as well as the
acknowledgement sequence, which is one more than the client sequence number. When the client receives
the acknowledgment of its segment, then it sends the acknowledgment to the server. In this way, the
connection is established between the client and the server.
TCP segment structure
Transmission Control Protocol accepts data from a data stream, divides it into chunks, and adds a
TCP header creating a TCP segment. The TCP segment is then encapsulated into an Internet
Protocol (IP) datagram, and exchanged with peers.[7]
The term TCP packet appears in both informal and formal usage, whereas in more precise
terminology segment refers to the TCP protocol data unit (PDU), datagram[8] to the IP PDU,
and frame to the data link layer PDU:
TCP segment header
Offs
Octe 0 1 2 3
ets t
Oct
Bit 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
et
Reserved CW UR
12 96 Data offset NS ECE ACK PSH RST SYN FIN Window Size
000 R G
20 160
Options (if data offset > 5. Padded at the end with "0" bits if necessary.)
⋮ ⋮
60 480
Advantages of TCP
•It provides a connection-oriented reliable service, which means that it guarantees the delivery of data
packets. If the data packet is lost across the network, then the TCP will resend the lost packets.
•It provides a flow control mechanism using a sliding window protocol.
•It provides error detection by using checksum and error control by using Go Back or ARP protocol.
•It eliminates the congestion by using a network congestion avoidance algorithm that includes various
schemes such as additive increase/multiplicative decrease (AIMD), slow start, and congestion window.
Disadvantage of TCP
It increases a large amount of overhead as each segment gets its own TCP header, so fragmentation by the
router increases the overhead.
The End