8.6k views
2 votes
Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes from 1 through 233. Now, Host S then sends three segments to Host R back to back. The segments size are 50, 70, and 90 bytes respectively. In the first segment, the source port number is 212 and the destination port number is 80. Host R sends an acknowledgement whenever it receives a segment from Host S.

a. Give the sequence number, source port number, and destination port number for all the three seg- ments.
b. If the segments arrive at R in given order 1, 2, 3, what is the acknowledgement number, the source port number, and the destination port number in the acknowledgment of the second arriving segment?
c. If the segments arrive at R in given order 1, 3, 2, what is the acknowledgement number, the source port number, and the destination port number in the acknowledgment of the second arriving segment?
d. Lets suppose the three segments sent by S arrive in order at R. The first segments acknowledgment there is no additional packet loss. For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgement that you add, provide the acknowledgment number.

User MattDMo
by
3.8k points

1 Answer

4 votes

Answer:

Consider the given data

There are two host S and R communicating over a TCP connection.

Host R received from S all bytes from 1 through 233.

Host S sends three segments to Host R.

The sizes of the three segments are 50, 70, and 90 bytes.

In the first segment, the source port number is 212 and the destination port number is 80.

a)

For segment 1:

As, Host R received 233 bytes from Host S, the sequence number of the first segment is 234.

The source port number = 212

The destination port number = 80.

For segment 2:

As the first segment size is 50 bytes and the sequence number of the first segment is 234, the sequence number of the second segment will be 50+ 234= 284.

The source and destination ports of all the segments are same.

The source port number = 212

The destination port number = 80.

For segment 3:

As the second segment size is 70 bytes and the sequence number of the second segment is 284, the sequence number of the third segment will be 70+ 284= 354.

The source and destination ports of all the segments are same.

The source port number = 212

The destination port number = 80.

b)

In TCP, the acknowledgement number is the sequence number of the next byte to be expected.

The order of the segment arrive at R is 1, 2, 3.

The acknowledgement number of the second segment arriving is the sequence number of the next byte to be expected. The next byte is segment 3. The sequence number of the segment 3 is 354.

Therefore, the acknowledgement number of the second segment arriving is 354.

In the server side, the source and destination ports are swapped.

Then, the source port number = 80

The destination port number = 212.

c)

In TCP, the acknowledgement number is the sequence number of the next byte to be expected.

The order of the segment arrive at R is 1, 3, 2.

The acknowledgement number of the second segment arriving is the sequence number of the next byte to be expected. The next byte is segment 2. The sequence number of the segment 2 is 284.

Therefore, the acknowledgement number of the second segment arriving is 284.

In the server side, the source and destination ports are swapped.

Then, the source port number = 80

The destination port number = 212.

d)

The first segment acknowledge is the sequence number of the second segment that is lost.

The second and third segment acknowledgements arrive after the timeout interval. The timing diagram of these segments along with their sequence number and the number of bytes of data is shown in the below diagram.

Step-by-step explanation:

See the attached picture for timing diagram.

Suppose there are two hosts, S and R. They are communicating over a TCP connection-example-1
User James P
by
3.4k points