During TCP connection establishment (above), the third segment is an ACK
from the client to the server. What is the sequence number in that segment?
Is it J or J+1 or 0 or some other value?
Figure 7 in RFC0793 shows the same handshake, but with the additional
detail needed to answer your question. The sequence number in the third
segment is shown as J+1.
In general, any TCP segment containing a set FIN flag, a set SYN flag,
and/or data must advance the sequence number. Any segment void of all three
of those sequence-number-consuming aspects should contain the current
sequence number.
Here is a question for you ...... when is the homework or takehome exam
due ?