TCP

Pasted image 20230601200521.png

  1. URG:
    Indicates that the urgent pointer filed is significant. The urgent pointer indicates that the incoming data is urgent, and that a TCP segment with the URG flag set is processed immediately without consideration of having to wait on previously sent TCP segments.
  2. ACK:
    Acknowledgement flag indicates that the acknowledgement number is significant. It is used to acknowledge the receipt of a TCP segment.
  3. PSH:
    Push flag asking TCP to pass the data to the application promptly.
  4. RST:
    Reset flag is used to reset the connection. Another device, such as a firewall, might send it to tear a TCP connection. This flag is also used when data is sent to a host and there is no service on the receiving end to answer.
  5. SYN:
    Synchronize flag is used to initiate a TCP 3-way handshake and synchronize sequence numbers with the other host. The sequence number should be set randomly during TCP connection establishment.
  6. FIN:
    The sender has no more data to send.

Advantages and Disadvantages

Advantages of TCP Disadvantages of TCP
Guarantees the accuracy of data. Requires a reliable connection between the two devices. If one small chunk of data is not received, then the entire chunk of data cannot be used.
Capable of synchronising two devices to prevent each other from being flooded with data. A slow connection can bottleneck another device as the connection will be reserved on the receiving computer the whole time.
Performs a lot more processes for reliability. TCP is significantly slower than UDP because more work has to be done by the devices using this protocol.

Pasted image 20241001084720.png|400

  • This request contains something called a SYN (short for synchronise) bit, which essentially makes first contact in starting the connection process.
  • The server will then respond with a packet containing the SYN bit, as well as another "acknowledgement" bit, called ACK.
  • Finally, your computer will send a packet that contains the ACK bit by itself, confirming that the connection has been setup successfully.

If the server is respond with an RST.

  • Could be closed, filtered, blocked by the Firewall or another reason.
    Pasted image 20241009105121.png

Pasted image 20231128153059.png