PROTOCOL EXPLORERLearn how the internet works
Now learningTCP · Reliable deliveryOverview · 5 steps
Learning progress0%
0 / 14 complete · 0 in progress
Client192.168.1.10Router192.168.1.1InternetWeb Server203.0.113.10

Protocol overview

TCP

Active

Transmission Control Protocol

Build a reliable, ordered byte stream over an unreliable packet network. Observe connection setup, acknowledgement, retransmission and shutdown.

Layer
Transport (Layer 4)
Default port
Application dependent
Transport
IPv4 / IPv6
Data format
Ordered byte stream
Defined in
RFC 9293
Read the complete guide ↗

Packet flow

DNSTCPRequestResponse
No.TimeSourceDestinationProtocolInfoSize
10.000s192.168.1.10203.0.113.10TCP52344 → 80 [SYN] Seq=066 B
20.024s203.0.113.10192.168.1.10TCP80 → 52344 [SYN, ACK] Seq=0 Ack=166 B
30.048s192.168.1.10203.0.113.10TCP52344 → 80 [ACK] Seq=1 Ack=160 B
40.072s192.168.1.10203.0.113.10TCP52344 → 80 [PSH, ACK] Seq=1 Ack=1 Len=360 B
50.096s203.0.113.10192.168.1.10TCP80 → 52344 [ACK] Seq=1 Ack=460 B
60.120s192.168.1.10203.0.113.10TCP52344 → 80 [PSH, ACK] Seq=4 Ack=1 Len=360 B
70.144s192.168.1.10203.0.113.10TCP52344 → 80 [PSH, ACK] Seq=4 Ack=1 Len=3 · Retransmission60 B
80.168s203.0.113.10192.168.1.10TCP80 → 52344 [ACK] Seq=1 Ack=760 B
90.192s192.168.1.10203.0.113.10TCP52344 → 80 [FIN, ACK] Seq=7 Ack=160 B
100.216s203.0.113.10192.168.1.10TCP80 → 52344 [ACK] Seq=1 Ack=860 B
110.240s203.0.113.10192.168.1.10TCP80 → 52344 [FIN, ACK] Seq=1 Ack=860 B
120.264s192.168.1.10203.0.113.10TCP52344 → 80 [ACK] Seq=8 Ack=260 B

TCP Handshake and Retransmission

Animate the TCP three-way handshake and see how sequence numbers, acknowledgements and retransmission recover a lost segment.

Understanding TCP

Build a reliable, ordered byte stream over an unreliable packet network. Observe connection setup, acknowledgement, retransmission and shutdown.

Default port
Application dependent
Transport / carrier
IPv4 / IPv6
Category
core

What to look for in the lab

Jump to the loss step. Compare the sequence number on the lost segment with the one on its retransmission, then find the ACK that advances after delivery. That ACK names the next expected byte.

1. Synchronize sequence numbers

The client sends SYN with its initial sequence number. SYN consumes one sequence number even though it carries no application data here.

2. Acknowledge the handshake

The server replies SYN-ACK and the client acknowledges it. Both directions now have independent sequence spaces.

3. Deliver and acknowledge bytes

An ACK is cumulative: Ack=1004 means all bytes before 1004 have arrived in order. The advertised window limits outstanding data.

4. Recover a lost segment

A missing acknowledgement can trigger retransmission. Retransmitted bytes retain their sequence numbers so a receiver can discard duplicates.

5. Close both directions

FIN closes one sending direction and consumes a sequence number. The peer can finish its own data before closing the opposite direction.

Protocol relationships

Protocols cooperate across layers. Compare the neighboring lessons to distinguish addressing, delivery, application semantics and encryption.

Standards and editorial method

Written and implemented independently by NavSprout. Lessons summarize public protocol standards using synthetic documentation addresses and fictional credentials. Consult the standards for complete wire formats and normative behavior.

RFC 9293 ↗

Check your understanding

What does a TCP sequence number identify?