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 26–30 of 46
Which one of the following socket API functions converts an unconnected active TCP socket into a passive socket?
Answer: (C)
Let us look at each function one by one:
- connect: opens an active connection to a server
- bind: ties a local address and port to the socket
- listen: makes the socket passive, so it is ready to accept connections True
- accept: picks up a connection from a socket that is already listening
Answer: listen
- connect: opens an active connection to a server
- bind: ties a local address and port to the socket
- listen: makes the socket passive, so it is ready to accept connections True
- accept: picks up a connection from a socket that is already listening
Answer: listen
The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are
Answer: (C)
Let us go through each item:
- Real-time multimedia: UDP (speed is preferred to reliability)
- File transfer: TCP (it is reliable)
- DNS: UDP (the queries are short)
- Email (SMTP): TCP
Answer: UDP, TCP, UDP and TCP
- Real-time multimedia: UDP (speed is preferred to reliability)
- File transfer: TCP (it is reliable)
- DNS: UDP (the queries are short)
- Email (SMTP): TCP
Answer: UDP, TCP, UDP and TCP
Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.
Answer: (C)
Go through the transmissions one by one:
- Transmissions 1-3 (slow start): 2, 4, 8. The threshold is reached at 8.
- Transmissions 4 and 5: 9, 10 (additive increase). The timeout happens during the 5th.
- The new threshold is 10/2 = 5. The window starts again at 2.
- Transmission 6: 2, 7: 4, 8: 5 (held at the threshold), 9: 6, 10: 7
Answer: 7 MSS
- Transmissions 1-3 (slow start): 2, 4, 8. The threshold is reached at 8.
- Transmissions 4 and 5: 9, 10 (additive increase). The timeout happens during the 5th.
- The new threshold is 10/2 = 5. The window starts again at 2.
- Transmission 6: 2, 7: 4, 8: 5 (held at the threshold), 9: 6, 10: 7
Answer: 7 MSS
Which of the following transport layer protocols is used to support electronic mail?
Answer: (C)
SMTP is the protocol e-mail uses. It is an application layer protocol and it works on top of TCP. IP belongs to the network layer.
Answer: TCP
Answer: TCP
A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT
Answer: (D)
A layer-4 firewall can read the IP header (source and destination addresses, protocol field) and the TCP/UDP header (port numbers).
(A) HTTP uses a well-known port (80), so the firewall can match it. The 9:00 PM to 5:00 AM window is checked against the firewall's own clock, not against header data, so a time rule is possible.
(B) ICMP is identified by the protocol field of the IP header, so all ICMP traffic can be blocked.
(C) Source and destination addresses tell incoming packets from outgoing ones. A rule can drop packets whose source is that IP address and allow packets whose destination is that IP address.
(D) No header carries the name of the user who sent a packet from a multi-user machine; all users share the same IP address. So the firewall cannot separate one user's TCP traffic, even with the time rule.
Answer: (D)
(A) HTTP uses a well-known port (80), so the firewall can match it. The 9:00 PM to 5:00 AM window is checked against the firewall's own clock, not against header data, so a time rule is possible.
(B) ICMP is identified by the protocol field of the IP header, so all ICMP traffic can be blocked.
(C) Source and destination addresses tell incoming packets from outgoing ones. A rule can drop packets whose source is that IP address and allow packets whose destination is that IP address.
(D) No header carries the name of the user who sent a packet from a multi-user machine; all users share the same IP address. So the firewall cannot separate one user's TCP traffic, even with the time rule.
Answer: (D)
Keep practising
Topics in Computer Networks
OSI LayerPhysical LayerData Link LayerNetwork Layer Protocol
Transport Layer ProtocolYou are here
Application Layer ProtocolsNetwork Security