86.0k views
1 vote
Alice and Bob are communicating over a TCP connection, and Bob has already received from Alice all bytes up through byte 358. Suppose Alice then sends two segments to Bob back-to-back. The first and second segments contain 200 and 80 bytes of data, respectively. In the first segment, the sequence number is 359, the source port number is 1028, and the destination port number is 80. Bob sends an acknowledgement whenever he receives a segment from Alice.

In the second segment sent from Alice to Bob, what are the sequence number, source port number and destination port number?

1 Answer

2 votes

Final answer:

The sequence number in the second TCP segment sent from Alice to Bob is 559, while the source port number is 1028, and the destination port number remains 80, consistent with the first segment.

Step-by-step explanation:

When Alice sends a sequence of segments over a TCP connection, each segment's sequence number is the byte-stream number of the first byte in that segment. Since Alice has already sent all bytes up through byte 358, and Bob has received them, the first segment Alice sends starts with byte 359. Given that the first segment contains 200 bytes of data, the sequence number for the next segment, which follows immediately after, would be 359 + 200 = 559.

The source port number and destination port number remain consistent across all segments sent from one source to a specific destination in a single TCP session. Therefore, the source port number in the second segment will still be 1028, and the destination port number will continue to be 80, just as it was in the first segment.

Putting it all together, in the second segment sent from Alice to Bob, the sequence number is 559, the source port number is 1028, and the destination port number is 80.

User Mike Douglas
by
9.0k points