Reordering the segments exchanged on a connection

TCP, as explained in the TCP chapter of Computer Networking: Principles, Protocols and Practice includes a sequence number in each segment that carries data.


Reorder the segments

During this connection, the client sent some data that was acknowledged by the server. Can you reorder the segments based on their sequence numbers and acknowledgements ? The trace starts at the third ack of the three-way handshake sent by the client to the server.

# Length Resumé Status
0 20 bytes <TCP: ACK, SEQ: 2250678588, ACK: 3164923749>
1 20 bytes <TCP: ACK, SEQ: 3164923749, ACK: 2250678594>
2 20 bytes <TCP: ACK, SEQ: 3164923749, ACK: 2250678590>
3 22 bytes <TCP: ACK, PSH, SEQ: 2250678594, ACK: 3164923749>
4 22 bytes <TCP: ACK, PSH, SEQ: 2250678592, ACK: 3164923749>
5 20 bytes <TCP: ACK, SEQ: 3164923749, ACK: 2250678592>
6 22 bytes <TCP: ACK, PSH, SEQ: 2250678588, ACK: 3164923749>
7 20 bytes <TCP: ACK, SEQ: 3164923749, ACK: 2250678596>
8 22 bytes <TCP: ACK, PSH, SEQ: 2250678590, ACK: 3164923749>

0000  d1cc04d28626a13c  bca4e76550107080  
0010  4f8c0000                            

0000  ÑÌ.Ò.&¡<¼¤çeP.p.
0010  O...            
  • TCP:
    • Source Port: 53708
    • Destination Port: 1234
    • Sequence Number: 2250678588
    • Acknowledgment Number: 3164923749
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 0
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20364
    • Urgent Pointer: 0
0000  04d2d1ccbca4e765  8626a14250107080  
0010  4f8c0000                            

0000  .ÒÑ̼¤çe.&¡BP.p.
0010  O...            
  • TCP:
    • Source Port: 1234
    • Destination Port: 53708
    • Sequence Number: 3164923749
    • Acknowledgment Number: 2250678594
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 0
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20364
    • Urgent Pointer: 0
0000  04d2d1ccbca4e765  8626a13e50107080  
0010  4f8c0000                            

0000  .ÒÑ̼¤çe.&¡>P.p.
0010  O...            
  • TCP:
    • Source Port: 1234
    • Destination Port: 53708
    • Sequence Number: 3164923749
    • Acknowledgment Number: 2250678590
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 0
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20364
    • Urgent Pointer: 0
0000  d1cc04d28626a142  bca4e76550187080  
0010  4f8e0000340a                        

0000  ÑÌ.Ò.&¡B¼¤çeP.p.
0010  O...4.          
  • TCP:
    • Source Port: 53708
    • Destination Port: 1234
    • Sequence Number: 2250678594
    • Acknowledgment Number: 3164923749
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 1
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20366
    • Urgent Pointer: 0
    • Data: bytearray(b'4\n')
0000  d1cc04d28626a140  bca4e76550187080  
0010  4f8e0000330a                        

0000  ÑÌ.Ò.&¡@¼¤çeP.p.
0010  O...3.          
  • TCP:
    • Source Port: 53708
    • Destination Port: 1234
    • Sequence Number: 2250678592
    • Acknowledgment Number: 3164923749
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 1
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20366
    • Urgent Pointer: 0
    • Data: bytearray(b'3\n')
0000  04d2d1ccbca4e765  8626a14050107080  
0010  4f8c0000                            

0000  .ÒÑ̼¤çe.&¡@P.p.
0010  O...            
  • TCP:
    • Source Port: 1234
    • Destination Port: 53708
    • Sequence Number: 3164923749
    • Acknowledgment Number: 2250678592
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 0
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20364
    • Urgent Pointer: 0
0000  d1cc04d28626a13c  bca4e76550187080  
0010  4f8e0000310a                        

0000  ÑÌ.Ò.&¡<¼¤çeP.p.
0010  O...1.          
  • TCP:
    • Source Port: 53708
    • Destination Port: 1234
    • Sequence Number: 2250678588
    • Acknowledgment Number: 3164923749
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 1
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20366
    • Urgent Pointer: 0
    • Data: bytearray(b'1\n')
0000  04d2d1ccbca4e765  8626a14450107080  
0010  4f8c0000                            

0000  .ÒÑ̼¤çe.&¡DP.p.
0010  O...            
  • TCP:
    • Source Port: 1234
    • Destination Port: 53708
    • Sequence Number: 3164923749
    • Acknowledgment Number: 2250678596
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 0
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20364
    • Urgent Pointer: 0
0000  d1cc04d28626a13e  bca4e76550187080  
0010  4f8e0000320a                        

0000  ÑÌ.Ò.&¡>¼¤çeP.p.
0010  O...2.          
  • TCP:
    • Source Port: 53708
    • Destination Port: 1234
    • Sequence Number: 2250678590
    • Acknowledgment Number: 3164923749
    • Data Offset: 5
    • Reserved: 0
    • NS: 0
    • CWR: 0
    • ECE: 0
    • URG: 0
    • ACK: 1
    • PSH: 1
    • RST: 0
    • SYN: 0
    • FIN: 0
    • Window: 28800
    • Checksum: 20366
    • Urgent Pointer: 0
    • Data: bytearray(b'2\n')

Information

Author(s) Olivier Bonaventure
Deadline No deadline
Submission limit No limitation
Category Tags TCP

Sign in