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?
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.