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 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 from Host A, i.e., no delayed ACK.

  1. In the second segment sent from Host A to B, what is the sequence number?
  2. If the first segment arrives before the second segment, in the ACKs of two arriving segments, what are the acknowledgment numbers of the first and second arriving segment, respectively? What are the source port number and the destination port number in ACK?
  3. If the second segment arrives before the first segment, in the ACKs of two arriving segments, what are the acknowledgment numbers of the first and second arriving segment, respectively?
  4. Suppose the two segments sent by A arrive in order at B. The first ACK is lost and the second ACK arrives before the first timeout interval. What will happen at Host A? If Host A needs to retransmit some segment, what are the sequence number and the number of bytes of the data? Now assume the first ACK is lost and the second ACK arrives after the first timeout interval. What will happen at Host A? If Host A needs to retransmit some segment, what are the sequence number and the number of bytes of the data?

Solutions

Expert Solution

1.Tcp is the connection oriented protocol It provides a realible ,stream-oriented service to the application.

2.It reserves the resources both side sender and reciver so whenever we needs resources we can use it.

3.Tcp provides the full duplex communication.

In Above

Host A and B are communicating over a TCP connection.

Host B has already received from A all bytes up through byte 99. meaning host B recive the 99 byte then 99+1 =100 is acknowldgement number send to host A then 100 is the sequence number of first segment

sequence number :   the number identifies the segment if the reciver recives the x byte from sender then acknowldgement number is x+1 and After that x+1 is the sequence number of next byte.

Host A then sends two segments to Host B back-to-back.

First segment contain: 30 bytes.

In the first segment, the sequence number is 100, the source port number is 4321, and the destination port number is 80

Second segment contain: 70 bytes.Host B sends an ACK whenever it receives a segment from Host A

a.In the second segment sent from Host A to B, what is the sequence number?

So First segment sequence number is 100 and 30 bytes sends then it sends Acknowlegement number is seqno+ bytes   100+30 =130 to Host A why seqno+ bytes because the sequence number of a segment is the byte number of the first byte in the segment

In Second Segment:

So Host A recives 130 acknowlegement number

if the reciver recives the x byte from sender then acknowldgement number is x+1 and After that x+1 is the sequence number of next byte so 130 is sequence number of second segment sent from A to B.

​​​​​​b.If the first segment arrives before the second segment, in the ACKs of two arriving segments, what are the acknowledgment numbers of the first and second arriving segment, respectively? What are the source port number and the destination port number in ACK?

The First segment arrives before the second segment : Host A sends 30 byte data and sequence number is 100 source port number =4321 ,destination port number =80 so first segment recives 130 ACK number before second segment and second segment ACK no is 130+70=200(seq no+bytes)send to Host A. when first segment sends ACK traverse from B to A so source port number=80 and the destination port number =4321 in ACK.

c.If the second segment arrives before the first segment, in the ACKs of two arriving segments, what are the acknowledgment numbers of the first and second arriving segment, respectively?

If the second segment arrives before the first segment, After that Host A then sends two segments to Host B back-to-back. but fistly its sends ACK to second segment

in the acknowledgement of the first arriving segment, (99+1)the acknowledgement number is 100is the ACK of second Segment number because second segment arrives before the first segment, then ACK number of First Segment number is 230 .

d.Suppose the two segments sent by A arrive in order at B. The first ACK is lost and the second ACK arrives before the first timeout interval. What will happen at Host A? If Host A needs to retransmit some segment, what are the sequence number and the number of bytes of the data? Now assume the first ACK is lost and the second ACK arrives after the first timeout interval. What will happen at Host A? If Host A needs to retransmit some segment, what are the sequence number and the number of bytes of the data?

Host A then sends two segments to Host B back-to-back..   

First segment sequence number is 100 byte =30

Second Segment sequence number is 130 byte =70

The first ACK is lost the second ACK arrives before the first timeout interval.

sequence the first Ack lost that time host A sends Ack no is 130. after that it sends the ACK of second segment is 200 before the first timeout interval

sends If Host A needs to retransmit some segment the sequence number is 100 and number of byte data is 30.

it sends Ack number is 200.


Related Solutions

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 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...
What role does TCP play during HTTP requests? Is TCP a connection-oriented protocol? Explain in details....
What role does TCP play during HTTP requests? Is TCP a connection-oriented protocol? Explain in details. Also, show your knowledge about layers.
In an organization there are four Hosts (i.e. Host A, Host B, Host C and Host...
In an organization there are four Hosts (i.e. Host A, Host B, Host C and Host D) connected to a Router (i.e. Router0). Explain in your own words (a) what happens when each of the four Hosts send a broadcast (b) How many broadcast domains are on the Router0? (c) If the Router (i.e. Router0) is replaced by a hub, how many broadcast domains are on the hub? (d) If the Router (i.e. Router0) is replaced by a switch, how...
Which TCP/IP parameters must be defined for a host to be able to communicate with hosts...
Which TCP/IP parameters must be defined for a host to be able to communicate with hosts on a remote network? Hint: There are three. Please answer in 10m as IT'S URGENT!!! WILL DEFINITELY BE UPVOTED!
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT