Calculate the acknowledgement number?

Started by networkloser, December 01, 2023, 07:42:14 AM

Previous topic - Next topic

networkloser

Ok a brain teaser. I assure this is not a homework. I'm learning computer networks from scratch again as I love networking.


IP Layer:

Header Length=10
Total length=1000

TCP Layer:

Sequence Number=100
Header Length=5

Find the acknowledgement number.

I know the answer and I understand it a little bit, but I want to hear your perspectives on how you'd solve it.

Here's how the youtuber solved it:

Total size at IP layer=IP_header+TCP_header+TCP_data
or 1000 =10*4+5*4+TCP_data

=> TCP_data length=940

Sequence number of first byte=100 Thus sequence number of last byte=940+100-1=1039

So the next acknowledgement number is 1040.

How'd you solve it?

deanwebb

Interesting bit of maths, but not really something I do in a day's work. Most of the time, if I'm reading a packet sequence, it's in Wireshark or some other capture reader, and the numbers I need are already there and I can line up communications that way. If I'm reading an asynchronous communication or one where network errors are causing retransmissions, the absence of properly-numbered packets helps to show those problems.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.