IAE Academy

GATE 2025 CS2 Q.18: solution and answer

GATE 2025 · CS2Q.18 · 1 mark · MCQ

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?

  1. (A)

    Internet Control Message Protocol (ICMP)

  2. (B)

    Internet Group Management Protocol (IGMP)

  3. (C)

    Open Shortest Path First (OSPF)

  4. (D)

    Routing Information Protocol (RIP)

See the question in the paper

Answer and solution

ANSWER

Option (D), RIP, is the one that cannot be the protocol named in the IPv4 protocol field.

Official answer: DSource: Official answer key, GATE 2025 CS2 (IIT Roorkee)

  1. The protocol field of an IPv4 header names the protocol carried directly in the datagram's payload. So X must be a protocol that is encapsulated straight inside IP, with no transport protocol in between.

  2. ICMP is carried directly in IP datagrams and has protocol number 1, so it is a possible X.

  3. IGMP is carried directly in IP datagrams and has protocol number 2, so it is a possible X.

  4. OSPF is carried directly in IP datagrams and has protocol number 89. It uses no TCP or UDP, so it is a possible X.

  5. RIP is an application-layer protocol that runs over UDP, on port 520. An IPv4 datagram that carries a RIP message has protocol number 17, which is UDP, in its protocol field. RIP has no IP protocol number of its own.

  6. So RIP can never appear in the protocol field. The answer is (D).

KEY IDEA

The IPv4 protocol field names the protocol sitting directly above IP. ICMP (1), IGMP (2) and OSPF (89) sit directly on IP. RIP sits on UDP (port 520), so the field shows 17 (UDP) for it.

WATCH OUT FOR

Treating every routing protocol as a network-layer protocol that has its own IP protocol number. OSPF does, but RIP rides on UDP, and BGP rides on TCP.

From the GATE 2025 CS2 paper. Every question of this paper · Download the full paper · All 20 IPv4 questions, with notes

More IPv4 questions