SME
Computer Networks · Problem type
Sequence and acknowledgment numbers
Use this for “A segment with sequence number 1000 carries 500 bytes. What acknowledgment number does the receiver send?”
This is an example. Type your own values to start a new problem.
(
seq
+
L (B)
)
mod
2³²
=
ack
Formulas
ack
=
(seq
+
L
)
mod
4,294,967,296
1,500 = (1,000 + 500) mod 4,294,967,296
Assumptions
•
A sequence number counts bytes: a segment’s number is the number of its first data byte.
•
The acknowledgment number is the next byte the receiver expects, once every earlier byte has arrived.
•
Numbers wrap past 2³² − 1 = 4,294,967,295 back to 0, so the sum is taken mod 2³² = 4,294,967,296.
Step-by-step
WE KNOW
seq = 1,000, L = 500 B
FIND
acknowledgment number (ack)
Step 1 · Find acknowledgment number (ack)
Use ack = (seq + L) mod 4,294,967,296
The
segment
holds
bytes
seq
up
to
seq
+
L
−
1,
so
the
next
byte
expected
is
seq
+
L
,
wrapped
past
2
32
−
1.
ack = (1,000 + 500) mod 4,294,967,296
ack = 1,500
Check
Put the numbers back in. Both sides should match.
1,500 = (1,000 + 500) mod 4,294,967,296 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
Related lessons
TCP/IP
Main lesson
Split a block into subnets
Use this for “Split a /24 block into 5 equal subnets. What is their prefix, and how many hosts does each hold?”
Throughput limited by the window
Use this for “A TCP connection has a 64 KiB window and a 50 ms round-trip time. What is its highest throughput?”
The TCP handshake
Use this for “Put the segments that open, use and close a TCP connection in order.”