TCP communication

The Transmission Control Protocol (TCP) is one of the most well-known internet protocols. It is used in reliable host-to-host communications as a connection-oriented protocol. That means the connection is maintained until the message is fully transmitted. The TCP communications are handled by TCP flags called control bits, in a structured format known as TCP Headers. The control bits are URG, SYN, PSH, RST, and FIN.

  • SYN: Starts the connection
  • ACK: Acknowledges the reception
  • RST: Resets a connection
  • FIN: Finishes reception
  • URG: Indicates urgent processing
  • PSH: Sends immediately

The data exchange is done, thanks to a three-way handshake technique, shown here. The first step is the client sending an SYN packet to the server. ...

Get Advanced Infrastructure Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.