Search code examples
socketsnetwork-programmingtcpiptcpdump

why ack packed don't have sequence number when three hand shark?


I use the tcpdump to watch the three-way handshake. the client port is 51484 and server port is 9501

 //connect to server
//three-way handshake
51484 > 9501 : Flags [S], seq 2969626801
9501  > 51484: Flags [S.], seq 587835665, ack 2969626802,
51484 > 9501 : Flags [.], ack 587835666     // <-  why the ack don't 
                                            //    have sequence number ?

//close the connect 
51484 > 9501 : Flags [F.], seq 2969626802, ack 587835666
9501  > 51484: Flags [F.], seq 587835666, ack 2969626803
51484 > 9501 : Flags [.], ack 587835667

I know that : if condition permit , the ack packet will be included in other's packet with some payload.But why the ack packet don't have sequence number when the payload is empty in the third step of three-way handshake ?

My question is : why the ack packet do not have sequence number in the third step of three-way handshake ?


Solution

  • There is always a sequence number in a successful handshake communication, but actually, in this case, tcpdump is not showing the same by default.

    You can enable the same by adding -vv or -vvv in your command for more verbose output from the available options. Below is the screenshot containing relevant verbose section description from the tcpdump manual:

    manual of tcpdump