What is TCP?

TCP (Transmission Control Protocol) is the main transport protocol utilized in IP networks.

The TCP protocol exists on the Transport Layer of the OSI Model.

The TCP protocol is a connection-oriented protocol which provides end-to-end reliability.

By connection-oriented, we mean that before two network nodes can communicate using TCP, they must first complete a handshaking protocol to create a connection.

When we say that TCP provides end-to-end reliability, we mean that TCP includes mechanisms for error detection and error correction between the source and the destination.

These properties of TCP are in contrast to UDP, which is connectionless and unreliable.

Higher layer protocols which utilize TCP include HTTP, SMTP, NNTP, FTP, telnet, SSH, and LDAP.

Diagram of the TCP Header

                        TCP Header Format
                        -----------------

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Source Port          |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Acknowledgment Number                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Data |           |U|A|P|R|S|F|                               |
| Offset| Reserved  |R|C|S|S|Y|I|            Window             |
|       |           |G|K|H|T|N|N|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Checksum            |         Urgent Pointer        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Options                    |    Padding    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             data                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Additional Reading on TCP

The TCP protocol is defined in RFC 793: Transmission Control Protocol.

TCP/IP Illustrated Volume 1 TCP/IP Illustrated Volume 2 TCP/IP Illustrated Volume 3
Purchase these excellent books on TCP/IP at Amazon.com


Top 5 Free Networking Tools

Free White Papers on Networking

Bookmark What is TCP?

Latest Blog Posts


English English GermanGerman SpanishSpanish FrenchFrench ItalianItalian PortuguesePortuguese RussianRussian DutchDutch
GreekGreek HindiHindi JapaneseJapanese KoreanKorean ChineseChinese Chinese (Simplified)Chinese (Simplified) ArabicArabic

Copyright 2009 Tech-FAQ. All rights reserved. Privacy Policy.