TCP in depth: connection and reliability

The TCP header field by field, the three-way handshake, byte and acknowledgement numbering, retransmission, closing with FIN or RST and the states of a connection.

  • 37 cards
  • 6 topics
  • Free

The outline, topic by topic

Each topic is weighted the way the exam weighs it.

  1. Concepts
  2. Questions
  3. Sort and link
  4. The numbers
  5. On the diagram
  6. Scenarios

A few cards from the deck

  • TCP protocol: what is it?

    Show the answer

    A transport protocol that gives two applications a reliable, ordered byte stream, once a connection has been established.

    The network underneath loses, duplicates and reorders packets. TCP numbers the bytes, acknowledges them and resends what is missing, so the application gets exactly what was sent.

  • The flags byte of a TCP segment is 0x12. Which flags are set?

    • SYN and ACK
    • FIN and ACK
    • SYN, PSH and ACK
    • PSH and ACK
    Show the answer

    SYN and ACK

    0x12 = 0001 0010 in binary: the 0x10 bit is ACK and the 0x02 bit is SYN. FIN+ACK is 0x11 and PSH+ACK is 0x18.

  • A SYN segment and a FIN segment each use up … sequence number, even when they carry no data.

    Show the answer

    A SYN segment and a FIN segment each use up one sequence number, even when they carry no data.

    That is what allows them to be acknowledged: after a SYN with Seq=1000, the expected acknowledgement is Ack=1001. A bare ACK, with no data, uses up nothing.