Transmission Control Protocol

As mentioned before, TCP is one of the most important parts of the IP protocol suite. It provides reliable delivery of data, sequencing, flow control, acknowledgement and re-transmission of packets. In its simplest operation, TCP requires establishment of connection first or sometime we call it handshake before actual transmission. The handshake is in three phases:

 

  1. Host A needs to send SYN signal to Host B
  2. Host B will then reply with SYN-ACK signal
  3. Host A finally will send an ACK signal.

 

Once the three way handshake is successful, a connection has been established. The host can then transfer data to another host. After data has been transferred, the established connection will then be closed. The process will be repeated again on another transmission.

 

TCP Header

Figure 3-1 TCP Header Information

You will find tons of books out there written just on TCP alone because the topics are broad. However, even though our aim is to get started with our Cisco as soon as possible, it is important for you to understand the TCP concept. Figure 3-1 gives us the TCP header information. Understanding its structure will give us better understanding of its characteristic. The parts of the Header are as follows:

 

 

  • Source Port (16 bits) – Identifies the Source port number

 

  • Destination Port (16 bits) – Identifies the Destination port number

 

  • Sequence Number (32 bits) – is the sequence number of the first data byte. If the SYN bit flag is set, the sequence number is the initial sequence number and the first data byte is the sequence number plus 1

 

  • Acknowledgement Number (32 bits ACK) – If the ACK flag bit is set, this field contains the value of the next sequence number that the receiver is expecting to get.

 

  • Data Offset (4 bits) – In the header, this specifies the number it 32-bit words. This is where the data begins.

 

  • Reserved (6 bits) – Reserved for future use. Must be Zero.
  • URG (1 bit) – describes that the urgent pointer field is significant.
  • ACK (1 bit) – describes that the acknowledgement field is significant.

 

  • PSH (1 bit)- Push function

 

  • RST (1 bit) – Resets the connection

 

  • SYN (1 bit)– This synchronize the sequence numbers

 

  • FIN (1 bit) – describes that no more data from the sender

 

  • Window (16 bits) – this describes the number of bytes the receiver is willing to receive indicated in the ACK.

 

  • Checksum(16 bits) – this field is used for checking error in the header

 

  • Urgent Pointer (16 bits) – this is only important when the URG control bit is set. This holds an offset pointer to the end following urgent data.

 

  • Options – a variable length option at the end of the header. It can be one of the following format:

 

  • A single octet of option-kind
  • An octet of option-kind, an octet of option-length and the option-data octets.

 

  • Padding – is used to ensure that the data and the header begins on a 32 bit boundary

 

 

The complete specification of TCP is described in RFC 793. You can view this at IETF website at http://www.ietf.org/rfc/rfc0793.txt?number=793