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 11–15 of 46
A TCP server application is programmed to listen on port number P on host S. A TCP client is connected to the TCP server over the network.
Consider that while the TCP connection was active, the server machine S crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?
Consider that while the TCP connection was active, the server machine S crashed and rebooted. Assume that the client does not use the TCP keepalive timer. Which of the following behaviors is/are possible?
One or more options are correct.
Answer: (A), (B), (C)
Let us check every option one by one:
- (A) The client is not told about the crash. If keepalive is not used, a client that waits to receive data may wait forever: possible.
- (B) After the reboot, the application can bind to port P and listen on it again: possible.
- (C) The rebooted server has no record of the old connection. So the client's segment gets a RST in reply: possible.
- (D) A FIN is sent only when a known connection is closed in the normal way: not possible.
Answer: (A), (B), (C)
- (A) The client is not told about the crash. If keepalive is not used, a client that waits to receive data may wait forever: possible.
- (B) After the reboot, the application can bind to port P and listen on it again: possible.
- (C) The rebooted server has no record of the old connection. So the client's segment gets a RST in reply: possible.
- (D) A FIN is sent only when a known connection is closed in the normal way: not possible.
Answer: (A), (B), (C)
Consider two hosts P and Q connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes, and between R and Q is 820 bytes.
A TCP segment of size 1400 bytes was transferred from P to Q through R, with IP identification value as 0x1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don't Fragment (DF) flag in the IP header is not set by P.
Which of the following statements is/are correct?
A TCP segment of size 1400 bytes was transferred from P to Q through R, with IP identification value as 0x1234. Assume that the IP header size is 20 bytes. Further, the packet is allowed to be fragmented, i.e., Don't Fragment (DF) flag in the IP header is not set by P.
Which of the following statements is/are correct?
One or more options are correct.
Answer: (A), (C)
Link P R: the datagram is 1400 + 20 = 1420 bytes, which is 1500, so there is no fragmentation. Link R Q (MTU 820): the largest data part is 820 - 20 = 800 bytes, which is a multiple of 8, so it is allowed.
- (A) The 1400 data bytes split into 800 and 600 bytes, giving datagrams of 820 and 620 bytes: TRUE.
- (B) Routers do not store or resend fragments: FALSE.
- (C) IP at Q cannot rebuild the datagram without the lost piece, so the segment is discarded and TCP at P resends the whole segment: TRUE.
- (D) Only the first fragment has the TCP header with the ports: FALSE.
Answer: (A), (C)
- (A) The 1400 data bytes split into 800 and 600 bytes, giving datagrams of 820 and 620 bytes: TRUE.
- (B) Routers do not store or resend fragments: FALSE.
- (C) IP at Q cannot rebuild the datagram without the lost piece, so the segment is discarded and TCP at P resends the whole segment: TRUE.
- (D) Only the first fragment has the TCP header with the ports: FALSE.
Answer: (A), (C)
Consider the three-way handshake mechanism followed during TCP connection establishment between hosts P and Q. Let X and Y be two random 32-bit starting sequence numbers chosen by P and Q respectively. Suppose P sends a TCP connection request message to Q with a TCP segment having SYN bit =1, SEQ number =X, and ACK bit =0. Suppose Q accepts the connection request. Which one of the following choices represents the information present in the TCP segment header that is sent by Q to P?
Answer: (C)
Q replies with a SYN-ACK segment:
- SYN = 1, and the SEQ field holds Q's own starting sequence number, SEQ = Y
- ACK = 1, because Q acknowledges the SYN from P (the SYN takes up one sequence number) ACK number = X + 1
- FIN = 0
Answer: SYN = 1, SEQ = Y, ACK = 1, ACK number = X+1, FIN = 0
- SYN = 1, and the SEQ field holds Q's own starting sequence number, SEQ = Y
- ACK = 1, because Q acknowledges the SYN from P (the SYN takes up one sequence number) ACK number = X + 1
- FIN = 0
Answer: SYN = 1, SEQ = Y, ACK = 1, ACK number = X+1, FIN = 0
Consider a TCP connection between a client and a server with the following specifications; the round trip time is 6 ms, the size of the receiver advertised window is 50 KB, slow-start threshold at the client is 32 KB, and the maximum segment size is 2 KB. The connection is established at time t=0. Assume that there are no timeouts and errors during transmission. Then the size of the congestion window (in KB) at time t+60 ms after all acknowledgements are processed is _______
Answer: 44
At the start, cwnd is 1 MSS = 2 KB. In slow start it doubles after every RTT (6 ms) until it reaches ssthresh = 32 KB. After that, it grows by 1 MSS = 2 KB in each RTT:
- t = 0: 2, 6: 4, 12: 8, 18: 16, 24: 32 (threshold reached)
- 30: 34, 36: 36, 42: 38, 48: 40, 54: 42, 60: 44
The value 44 KB stays under the 50 KB receiver window.
Answer: 44
- t = 0: 2, 6: 4, 12: 8, 18: 16, 24: 32 (threshold reached)
- 30: 34, 36: 36, 42: 38, 48: 40, 54: 42, 60: 44
The value 44 KB stays under the 50 KB receiver window.
Answer: 44
Match the following:
Answer: (C)
Let us go through each item one by one:
- UDP port number is 16 bits (IV)
- Ethernet MAC address is 48 bits (I)
- IPv6 Next Header field is 8 bits (II)
- TCP sequence number is 32 bits (III)
Answer: P-IV, Q-I, R-II, S-III
- UDP port number is 16 bits (IV)
- Ethernet MAC address is 48 bits (I)
- IPv6 Next Header field is 8 bits (II)
- TCP sequence number is 32 bits (III)
Answer: P-IV, Q-I, R-II, S-III
Keep practising
Topics in Computer Networks
OSI LayerPhysical LayerData Link LayerNetwork Layer Protocol
Transport Layer ProtocolYou are here
Application Layer ProtocolsNetwork Security