Transport Layer Protocol · Computer Networks
46 questions · asked in 22 of 27 years (2000–2026)
MCQ 33 · MSQ 6 · NAT 71-mark 29 · 2-mark 17
2000Questions per year2026
Questions 36–40 of 46
Consider a TCP connection in a state where there are no outstanding ACKs. The sender sends two segments back to back. The sequence numbers of the first and second segments are 230 and 290 respectively. The first segment was lost, but the second segment was received correctly by the receiver. Let X be the amount of data carried in the first segment (in bytes), and Y be the ACK number sent by the receiver. The values of X and Y (in that order) are
Answer: (D)
TCP numbers every byte. The first segment starts at byte 230 and the second at byte 290, so the first segment carries bytes 230 to 289.
bytes.
The ACK number is cumulative. It is the number of the next byte the receiver expects in order. The first segment was lost, so the receiver is still waiting for byte 230. It cannot acknowledge the second segment, so it sends ACK (a duplicate ACK).
So . An ACK of 290 would claim that bytes up to 289 arrived. The values 231 and 291 add 1 as if the sequence numbers counted segments, but they count bytes.
Answer: (D)
bytes.
The ACK number is cumulative. It is the number of the next byte the receiver expects in order. The first segment was lost, so the receiver is still waiting for byte 230. It cannot acknowledge the second segment, so it sends ACK (a duplicate ACK).
So . An ACK of 290 would claim that bytes up to 289 arrived. The values 231 and 291 add 1 as if the sequence numbers counted segments, but they count bytes.
Answer: (D)
Consider the following statements about the timeout value used in TCP.
i.The timeout value is set to the RTT (Round Trip Time) measured during TCP connection establishment for the entire duration of the connection.
ii.Appropriate RTT estimation algorithm is used to set the timeout value of a TCP connection.
iii.Timeout value is set to twice the propagation delay from the sender to the receiver.
Which of the following choices hold?
i.The timeout value is set to the RTT (Round Trip Time) measured during TCP connection establishment for the entire duration of the connection.
ii.Appropriate RTT estimation algorithm is used to set the timeout value of a TCP connection.
iii.Timeout value is set to twice the propagation delay from the sender to the receiver.
Which of the following choices hold?
Answer: (B)
(i) False. The RTT keeps changing during a connection because of queueing, routing and load. A timeout fixed at the handshake RTT would often be too short (needless retransmissions) or too long (slow recovery from loss). The figure shows only setup (SYN, SYN+ACK, ACK) and close (FIN), plus the 2MSL wait in TIME-WAIT, which is a different timer.
(ii) True. TCP measures the RTT of segments as they are acknowledged and keeps a running estimate, for example , along with the deviation of the samples. The timeout is set a few deviations above the estimate, .
(iii) False. Twice the propagation delay is only a lower bound on the RTT. The RTT also includes transmission, queueing and processing delays. A timeout of exactly that value would expire before the ACK can come back.
So only (ii) is true.
Answer: (B)
(ii) True. TCP measures the RTT of segments as they are acknowledged and keeps a running estimate, for example , along with the deviation of the samples. The timeout is set a few deviations above the estimate, .
(iii) False. Twice the propagation delay is only a lower bound on the RTT. The RTT also includes transmission, queueing and processing delays. A timeout of exactly that value would expire before the ACK can come back.
So only (ii) is true.
Answer: (B)
Which one of the following uses UDP as the transport protocol?
Answer: (C)
DNS uses UDP (port 53) for its normal queries and replies. A query and its answer are each one small message, so UDP's low overhead (no connection set-up) suits it. TCP is used for DNS only for large replies and zone transfers.
HTTP, Telnet and SMTP need reliable, ordered delivery of a byte stream, so they run over TCP.
Answer: (C)
HTTP, Telnet and SMTP need reliable, ordered delivery of a byte stream, so they run over TCP.
Answer: (C)
A program on machine X attempts to open a UDP connection to port 5376 on a machine Y, and a TCP connection to port 8632 on machine Z. However, there are no applications listening at the corresponding ports on Y and Z. An ICMP Port Unreachable error will be generated by
Answer: (A)
UDP to Y: UDP has no way to answer by itself when no application listens on the port. The host on Y sends an ICMP Destination Unreachable message with code 3 (Port Unreachable). So Y generates it.
TCP to Z: TCP handles a closed port inside the protocol. Z answers the SYN with a TCP segment that has the RST (reset) flag set. No ICMP message is sent.
So an ICMP Port Unreachable comes from Y but not from Z.
Answer: (A)
TCP to Z: TCP handles a closed port inside the protocol. Z answers the SYN with a TCP segment that has the RST (reset) flag set. No ICMP message is sent.
So an ICMP Port Unreachable comes from Y but not from Z.
Answer: (A)
On a TCP connection, current congestion window size is Congestion Window = 4 KB. The window size advertised by the receiver is Advertise Window = 6 KB. The last byte sent by the sender is LastByteSent = 10240 and the last byte acknowledged by the receiver is LastByteAcked = 8192. The current window size at the sender is:
Answer: (B)
The sender window is the smaller of the congestion window and the window advertised by the receiver:
LastByteSent and LastByteAcked are not needed for the window size. They give the data still in flight, bytes, so the sender can still send bytes. That is the usable window, not the window size the question asks for, so 2048 bytes is not the answer.
Answer: (B)
LastByteSent and LastByteAcked are not needed for the window size. They give the data still in flight, bytes, so the sender can still send bytes. That is the usable window, not the window size the question asks for, so 2048 bytes is not the answer.
Answer: (B)
Keep practising
Topics in Computer Networks
OSI LayerPhysical LayerData Link LayerNetwork Layer Protocol
Transport Layer ProtocolYou are here
Application Layer ProtocolsNetwork Security