Information

Author(s) Olivier Bonaventure
Deadline No deadline
Submission limit No limitation
Category tags tcp

Tags

Sign in

The source and destination ports in the TCP headers

The TCP header, shown in the TCP chapter of Computer Networking: Principles, Protocols and Practice contains a source port and a destination port. The two segments below correspond to the beginning of a TCP connection.


TCP source and destination ports

The first TCP segment was sent by a client to a server to establish a connection. From the response returned by the server, can you infer the source and destination ports used in the first segment ?


0000  ????????c9613aec  0000000060027080  
0010  00000000020405a0                    

0000  ????Éa:ì....`.p.
0010  ........        
  • Transmission Control Protocol, Src Port: ????, Dst Port: ????, Seq: 0, Len: 0
    • Source Port: ?
    • Destination Port: ?
    • Sequence number: 0 (relative sequence number)
      • Acknowledgment number: 0
        • 0110 .... = Header Length: 24 bytes (6)
          • Flags
            • 000. .... .... = Reserved: Not set
              • ...0 .... .... = Nonce: Not set
                • .... 0... .... = Congestion Window Reduced (CWR): Not set
                  • .... .0.. .... = ECN-Echo: Not set
                    • .... ..0. .... = Urgent: Not set
                      • .... ...0 .... = Acknowledgment: Not set
                        • .... .... 0... = Push: Not set
                          • .... .... .0.. = Reset: Not set
                            • .... .... ..1. = Syn: Set
                              • .... .... ...0 = Fin: Not set
                              • Window size value: 28800
                                • Urgent pointer: 0
                                  • Options: (4 bytes), Maximum segment size
                                    • TCP Option - Maximum segment size: 1440 bytes
                                      • Kind: Maximum Segment Size (2)
                                        • Length: 4
                                          • MSS Value: 1440