Question

In: Computer Science

Host A and B are communicating over a TCP connection, and Host B has already received...

Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 120. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 80 and 50 bytes of data, respectively. In the first segment, the sequence number is 121, the source port number is 30058, and the destination port number is 80. Host B sends an acknowledgment whenever it receives a segment from Host A.

In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number?

If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number?

If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number?

Solutions

Expert Solution

[A]. Recall that, in TCP, the sequence number for a segment is the byte-stream number of the first byte in that segment.As the first segment sent had 80 bytes and a sequence number of 121, the sequence number of
the second segment will be 121 + 80 = 201. The source port will be the same used in the connection which is 30058. The destination port will be 80.


[B] In TCP, the ACK number is the next byte expected. If the first segment arrives before the second, this means that the next byte expected is the first byte of the second segment, so the ACK number will be 201. Since we are now in the server side, the source and destination ports are swapped, source port is 80 and destination port is 30058.

[C] If the second segment arrives before the first, this means that the server has received the segment with sequence number 201, but hasn’t received the segment with sequence number 121, which is actually the segment that it was expecting to receive.In this case, the server indicates in the ACK number of the response that it has the first 120 bytes,but still expects to receive the one with sequence number 121, so the ACK number would be 121.


Related Solutions

Host A and B are communicating over a TCP connection, and Host B has already received...
Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 99. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 30 and 70 bytes of data, respectively. In the first segment, the sequence number is 100, the source port number is 4321, and the destination port number is 80. Host B sends an ACK whenever it receives a segment...
Hosts A and B are communicating over a TCP connection and Host B has already received...
Hosts A and B are communicating over a TCP connection and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back (See the figure below). The first and second segments contain 80 and 40 bytes of data respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgment whenever...
Hosts A and B are communicating over a TCP connection, and Host B has already received...
Hosts A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 80 and 40 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgment whenever it receives a segment...
Host A and B are communicating over a TCP connection. The initial sequence number at Host...
Host A and B are communicating over a TCP connection. The initial sequence number at Host A is 2171. Host A opens the connection, sends three segments, the second of which carries 400 bytes of data, and closes the connection. In the segment sent by Host A, source port number is 303, and the destination port number is 80. ) What is the value of the sequence number of the SYN segment? (1.5 marks) ) What is the value of...
Host A and B are communicating over a TCP connection. The initial sequence number at Host...
Host A and B are communicating over a TCP connection. The initial sequence number at Host A is 2171. Host A opens the connection, sends three segments, the second of which carries 400 bytes of data, and closes the connection. In the segment sent by Host A, source port number is 303, and the destination port number is 80. ) What is the value of the sequence number of the SYN segment? (1.5 marks) ) What is the value of...
Consider sending a large file from a host to another over a TCP connection that has...
Consider sending a large file from a host to another over a TCP connection that has no loss. Suppose TCP uses AIMD for its congestion control without slow start. The initial MSS=4 and cwnd increases by 1 MSS every time a batch of ACKs is received. Assume approximately constant round-trip times. a. how long does it take for cwnd increase from 5 MSS to 9 MSS (assuming no loss events)? b. What is the average throughout (in terms of MSS...
Consider the TCP connection mechanism.    i. What mechanism is used to set up a TCP...
Consider the TCP connection mechanism.    i. What mechanism is used to set up a TCP connection? ii. Why is the mechanism needed? iii. Outline how the mechanism works with a diagram. iv.CLASSFULL AND CLASSLESS IP
Using a TCP SYN spoofing attack, the attacker aims to flood the table of TCP connection...
Using a TCP SYN spoofing attack, the attacker aims to flood the table of TCP connection requests on a system so that it is unable to respond to legitimate connection requests. Consider a server system with a table for 256 connection requests. This system will retry sending the SYN-ACK packet five times when it fails to receive an ACK packet in response, at 30 second intervals, before purging the request from its table. Assume that no additional countermeasures are used...
Using a TCP SYN spoofing attack, the attacker aims to flood the table of TCP connection...
Using a TCP SYN spoofing attack, the attacker aims to flood the table of TCP connection requests on a system so that it is unable to respond to legitimate connection requests. Consider a server system with a table for 256 connection requests. This system will retry sending the SYN-ACK packet five times when it fails to receive an ACK packet in response, at 30 second intervals, before purging the request from its table. Assume that no additional countermeasures are used...
Simultaneous TCP connection initiations are rare, but simultaneous connection termination is relatively common. How do two...
Simultaneous TCP connection initiations are rare, but simultaneous connection termination is relatively common. How do two TCP nodes negotiate the simultaneous sending of FIN packets to one another? Draw the ladder diagram, and label the states on each side. Which node goes into TIMEWAIT state?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT