Machine-translated by Google. Questions are authored in English.
Top

TCP/IP Questions and Answers

11.

A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the protocol number of a protocol X.

Which ONE of the following is NOT a possible candidate for X?

Exam Year(s)

GATE CS - 2025,

Answer: D

The protocol that cannot be X is the Routing Information Protocol (RIP).

The IPv4 protocol field names the protocol carried directly inside the IP datagram. ICMP (protocol number 1), IGMP (2) and OSPF (89) are all carried directly in IP, so their numbers can appear there.

RIP runs over UDP, on port 520. A datagram carrying a RIP message has UDP (17) in its protocol field, and RIP itself is identified only by the UDP port number. So RIP never appears in the IPv4 protocol field.

Please log in or register to report this question.

12.

Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in its data field. A UDP segment is transmitted. The payload (data) in the UDP segment is 7488 bytes.

Which ONE of the following choices has the CORRECT total number of fragments transmitted and the size of the last fragment including IPv4 header?

Exam Year(s)

GATE CS - 2025,

Answer: D

The datagram goes as 6 fragments, the last of 116 bytes.

The IP payload is the whole UDP segment: 7488 bytes of data plus the 8-byte UDP header, 7496 bytes. Each fragment carries a 20-byte IP header, leaving 1480 bytes of data, a multiple of 8 as fragment offsets require:

\[ \begin{aligned} 5 \times 1480 &= 7400 \\ 7496 - 7400 &= 96 \\ \text{last fragment} &= 96 + 20 = 116\ \text{bytes} \end{aligned} \]

So there are 5 full fragments and a sixth of 116 bytes. 108 bytes forgets the UDP header (88 + 20), 88 bytes forgets both headers, and five fragments cannot carry the datagram at all, since at most 5 × 1480 = 7400 bytes of data fit in them.

Please log in or register to report this question.

13.

Which one of the following protocols may need to broadcast some of its messages?

Exam Year(s)

GATE CS - 2026,

Answer: C

The protocol is DHCP.

A host that has just joined a network has no IP address and does not know where the DHCP server is. It therefore sends its DHCPDISCOVER (and usually its DHCPREQUEST) as a broadcast, from 0.0.0.0 to 255.255.255.255, so that any server on the local network can answer. Servers may broadcast their replies too, since the client cannot yet receive unicast IP traffic.

SMTP, FTP and HTTP all run over TCP connections between two known hosts, which are point-to-point by definition, so they never broadcast.

Please log in or register to report this question.

14.

Match the following:

FieldLength in bits
P. UDP Header's Port NumberI. 48
Q. Ethernet MAC AddressII. 8
R. IPv6 Next HeaderIII. 32
S. TCP Header's Sequence NumberIV. 16

Exam Year(s)

GATE CS - 2018,

Answer: C

The correct matching is P-IV, Q-I, R-II, S-III.

  • P: a UDP port number is 16 bits, so ports run from 0 to 65535 (IV).
  • Q: an Ethernet MAC address is 48 bits, six bytes (I).
  • R: the IPv6 Next Header field is 8 bits, using the same protocol numbers as the IPv4 Protocol field (II).
  • S: the TCP sequence number is 32 bits (III).

The other options misplace at least one: P-III makes the port 32 bits, P-II makes it 8 bits, and R-III with S-II would give IPv6 a 32-bit next header and TCP an 8-bit sequence number.

Please log in or register to report this question.

15.

Consider the following statements regarding the slow start phase of the TCP congestion control algorithm. Note that cwnd stands for the TCP congestion window and MSS denotes the Maximum Segment Size.

(i) The cwnd increases by 2 MSS on every successful acknowledgment.
(ii) The cwnd approximately doubles on every successful acknowledgement.
(iii) The cwnd increases by 1 MSS every round trip time.
(iv) The cwnd approximately doubles every round trip time.

Which one of the following is correct?

Exam Year(s)

GATE CS - 2018,

Answer: C

The correct choice is Only (iv) is true.

In slow start, the congestion window grows by 1 MSS for each acknowledgement received. In one round trip a full window's worth of segments is acknowledged, so the window gains as many MSS as it already holds and approximately doubles every round trip time (iv).

Statement (i) is wrong because the increase is 1 MSS per acknowledgement, not 2. Statement (ii) is wrong because a single acknowledgement adds only 1 MSS; doubling happens per round trip, not per acknowledgement. Statement (iii) describes congestion avoidance, the additive-increase phase after slow start, not slow start itself.

Please log in or register to report this question.

16.

The fragment reassembly of IP datagrams is done at the destination not at the intermediate next hop router due to :

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: B

Reassembly is done at the destination because fragments may follow the different routes.

IP is a datagram service: each fragment is routed independently and may take a different path through the network. An intermediate router therefore cannot count on seeing all the fragments of a datagram, so it cannot reassemble them. Only the destination host is sure to receive every fragment, using the identification, offset and more-fragments fields to rebuild the datagram.

If fragments always followed the same route, reassembly en route would be possible. Networks have different MTUs, which is why fragmentation happens at all, and the reassembly method is part of the IP standard that routers implement.

Please log in or register to report this question.

17.

Match the following :

List - I (Protocols)List - II (Protocol port nos)
(P) DNS(1) 23
(Q) DHCP(2) 53
(R) IMAP(3) 67
(S) POP3(4) 68
(5) 110
(6) 143

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: C

The correct match is P - 2, Q - 4, R - 6, S - 5.

  • DNS uses port 53.
  • DHCP uses UDP ports 67 (server) and 68 (client); the code pairs it with 68.
  • IMAP uses port 143.
  • POP3 uses port 110.

Port 23 is Telnet. Options A and B give IMAP port 110 and POP3 port 143, the wrong way round, and options A and D misplace DNS. Only option C has DNS, IMAP and POP3 right, with DHCP on one of its two ports.

Please log in or register to report this question.

18.

Which DNS resource record is used to reverse map IP addresses to names ?

Exam Year(s)

MH SET - 2019, SET Exam - 2019,

Answer: D

Reverse mapping uses the PTR record.

A PTR (pointer) record maps an IP address to a host name. For reverse lookup, the address is written backwards under a special domain, for example 1.2.0.192.in-addr.arpa for 192.0.2.1 in IPv4, and the PTR record at that name gives the host name.

SRV records locate services (host and port for a protocol). 'ATR' and 'MXC' are not DNS record types; the real records they resemble are A, which maps a name to an address (the forward direction), and MX, which names a domain's mail exchangers.

Please log in or register to report this question.

19.

Calculate the HLEN (Header Length) value in IPv4, if the total length is 1200 bytes, 1176 of which is data from the upper layer :

Exam Year(s)

MH SET - 2019, SET Exam - 2019,

Answer: B

HLEN is 6.

The header is the total length minus the data:

\[ \begin{aligned} \text{header} &= 1200 - 1176 = 24 \text{ bytes} \\ \text{HLEN} &= 24 / 4 = 6 \end{aligned} \]

HLEN counts the header in 4-byte words, so a 24-byte header (the 20-byte minimum plus 4 bytes of options) has HLEN 6. 24 itself is not offered, 12 would count 2-byte units, and 4 or 16 do not fit the figures.

Please log in or register to report this question.

20.

Which mechanism in transport layer supplies multiple network connections along with the distribution of traffic over them in a round-robin basis/fashion ?

Exam Year(s)

MH SET - 2021, SET Exam - 2021,

Answer: B

The mechanism is Downward Multiplexing.

In downward (inverse) multiplexing a single transport connection is spread over several network connections, with traffic distributed among them in round-robin fashion. It is used to get more bandwidth than one network connection can provide.

Upward multiplexing is the reverse: several transport connections share one network connection. Buffering and flow control match the sender's rate to the receiver's capacity, and crash recovery deals with host or router failures, so neither distributes traffic over multiple connections.

Please log in or register to report this question.

Loading…
Tags: TCP/IP Questions and Answers || TCP/IP MCQ Questions and Answers || TCP/IP GK Questions and Answers || TCP/IP GK MCQ Questions || TCP/IP Multiple Choice Questions and Answers || TCP/IP GK || GK on TCP/IP || Computer Networking Questions and Answers || Computer Networking MCQ Questions and Answers || Computer Networking GK Questions and Answers || GK on Computer Networking