chapter
    Routing Protocols and Packet Forwarding PYQs for GATE CS

    Solve 8+ Routing Protocols and Packet Forwarding previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2025 Slot Set2 PYQ
    Consider the routing protocols given in List I and the names given in List II:

    List I               List II
    (i) Distance vector routing     (a) Bellman-Ford
    (ii) Link state routing       (b) Dijkstra

    For matching of items in List I with those in List II, which ONE of the following options is CORRECT?
    Question 2
    2025 Slot Set1 PYQ
    A packet with the destination IP address 145.36.109.70 arrives at a router whose routing table is shown. Which interface will the packet be forwarded to?

    Subnet AddressSubnet Mask (in CIDR notation)Interface145.36.0.0/16E1145.36.128.0/17E2145.36.64.0/18E3145.36.255.0/24E4Default--E5
    Question 3
    2024 Slot Set1 PYQ
    Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation “/N” in a prefix indicates a subnet mask with the most significant N bits set to 1.

    Prefix Next hop router 10.1.1.0/24 R1 10.1.1.128/25 R2 10.1.1.64/26 R3 10.1.1.192/26 R4
    This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of packets forwarded via the next hop router R2 is _________
    Question 4
    2023 PYQ
    The forwarding table of a router is shown below.

    Subnet NumberSubnet MaskInterface ID200.150.0.0255.255.0.01200.150.64.0255.255.224.02200.150.68.0255.255.255.03200.150.68.64255.255.255.2244Default0

    A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID __________.
    Question 5
    2023 PYQ

    Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?

    Question 6
    2022 PYQ
    Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity.

    PQR

    The routers exchange distance vector routing information and have converged on the routing tables, after which the link Q−R fails. Assume that P and Q send out routing updates at random times, each at the same average rate. The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is___________.
    Question 7
    2022 PYQ
    Consider routing table of an organization’s router shown below:

    Subnet NumberSubnet MaskNext Hop
    12.20.164.0255.255.252.0R1
    12.20.170.0255.255.254.0R2
    12.20.168.0255.255.254.0Interface 0
    12.20.166.0255.255.254.0Interface 1
    defaultR3


    Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?
    Question 8
    2021 Slot Set2 PYQ
    Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is as shown below.

    R X Y Z Q P ... ... ...
    The objective is to find the shortest-cost path from the router to routers and . Assume that does not initially know the shortest routes to and . Assume that has three neighbouring routers denoted as , , and . During one iteration, measures its distance to its neighbours , , and as 3, 2, and 5, respectively. Router gets routing vectors from its neighbours that indicate that the distance to router from routers , , and are 7, 6, and 5, respectively. The routing vector also indicates that the distance to router from routers , , and are 4, 6, and 8, respectively. Which of the following statement(s) is/are correct with respect to the new routing table of , after updation during this iteration?
    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Routing Protocols and Packet Forwarding PYQs for GATE CS

    Solve 8+ Routing Protocols and Packet Forwarding previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: Routing Protocols and Packet Forwarding

    Chapter Journey

    1. Longest-Prefix Matching Current

    Focus: Per-packet decisions using forwarding tables.
    Weightage: High frequency of direct numerical questions.

    2. Distance-Vector & Link-State

    Focus: Dynamic table building (Bellman-Ford vs Dijkstra).
    Weightage: Algorithm steps and cost calculations.

    What You Will Master: Trace any IP packet, resolve ties using longest prefix match, and simulate routing convergence.

    Longest-Prefix Matching: The Router's Compass

    The Router's Compass

    The Core Problem

    Routers cannot maintain a specific entry for every single IP address out of millions.

    The Solution

    Use Forwarding Tables with IP prefixes and the Longest Prefix Match rule.

    What You Will Learn:

    • Table Structure: Prefixes, masks, and next hops.
    • Matching Algorithm: Bitwise AND operations.
    • Tie-Breaking: Why the longest prefix wins.

    Routing Protocols and Packet Forwarding: Solved Questions with Step-by-Step Explanations (8 Problems)

    Question 1 · Computer Networks · 2025_Set2 MCQ
    Consider the routing protocols given in List I and the names given in List II:

    List I               List II
    (i) Distance vector routing     (a) Bellman-Ford
    (ii) Link state routing       (b) Dijkstra

    For matching of items in List I with those in List II, which ONE of the following options is CORRECT?
    1. A.

      (i) – (a) and (ii) – (b)

    2. B.

      (i) – (a) and (ii) – (a)

    3. C.

      (i) – (b) and (ii) – (a)

    4. D.

      (i) – (b) and (ii) – (b)

    Question 2 · Computer Networks · 2025_Set1 MCQ
    A packet with the destination IP address 145.36.109.70 arrives at a router whose routing table is shown. Which interface will the packet be forwarded to?

    Subnet AddressSubnet Mask (in CIDR notation)Interface145.36.0.0/16E1145.36.128.0/17E2145.36.64.0/18E3145.36.255.0/24E4Default--E5
    1. A.

      E3

    2. B.

      E1

    3. C.

      E2

    4. D.

      E5

    Question 3 · Computer Networks · 2024_Set1 NAT
    Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation “/N” in a prefix indicates a subnet mask with the most significant N bits set to 1.

    Prefix Next hop router 10.1.1.0/24 R1 10.1.1.128/25 R2 10.1.1.64/26 R3 10.1.1.192/26 R4
    This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of packets forwarded via the next hop router R2 is _________
    Question 4 · Computer Networks · 2023 NAT
    The forwarding table of a router is shown below.

    Subnet NumberSubnet MaskInterface ID200.150.0.0255.255.0.01200.150.64.0255.255.224.02200.150.68.0255.255.255.03200.150.68.64255.255.255.2244Default0

    A packet addressed to a destination address 200.150.68.118 arrives at the router. It will be forwarded to the interface with ID __________.
    Question 5 · Computer Networks · 2023 MSQ

    Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?

    1. A.

      OSPF implements Bellman-Ford algorithm to find shortest paths.

    2. B.

      OSPF uses Dijkstra’s shortest path algorithm to implement least-cost path routing.

    3. C.

      OSPF is used as an inter-domain routing protocol.

    4. D.

      OSPF implements hierarchical routing.

    Question 6 · Computer Networks · 2022 NAT
    Consider a network with three routers P, Q, R shown in the figure below. All the links have cost of unity.

    PQR

    The routers exchange distance vector routing information and have converged on the routing tables, after which the link Q−R fails. Assume that P and Q send out routing updates at random times, each at the same average rate. The probability of a routing loop formation (rounded off to one decimal place) between P and Q, leading to count-to-infinity problem, is___________.
    Question 7 · Computer Networks · 2022 MSQ
    Consider routing table of an organization’s router shown below:

    Subnet NumberSubnet MaskNext Hop
    12.20.164.0255.255.252.0R1
    12.20.170.0255.255.254.0R2
    12.20.168.0255.255.254.0Interface 0
    12.20.166.0255.255.254.0Interface 1
    defaultR3


    Which of the following prefixes in CIDR notation can be collectively used to correctly aggregate all of the subnets in the routing table?
    1. A.

      12.20.164.0/20

    2. B.

      12.20.164.0/22

    3. C.

      12.20.164.0/21

    4. D.

      12.20.168.0/22

    Question 8 · Computer Networks · 2021_Set2 MSQ
    Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is as shown below.

    R X Y Z Q P ... ... ...
    The objective is to find the shortest-cost path from the router to routers and . Assume that does not initially know the shortest routes to and . Assume that has three neighbouring routers denoted as , , and . During one iteration, measures its distance to its neighbours , , and as 3, 2, and 5, respectively. Router gets routing vectors from its neighbours that indicate that the distance to router from routers , , and are 7, 6, and 5, respectively. The routing vector also indicates that the distance to router from routers , , and are 4, 6, and 8, respectively. Which of the following statement(s) is/are correct with respect to the new routing table of , after updation during this iteration?
    1. A.

      The distance from to will be stored as 10.

    2. B.

      The distance from to will be stored as 7.

    3. C.

      The next hop router for a packet from to is .

    4. D.

      The next hop router for a packet from to is .

    More previous year questions (pyqs) in this unit