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

IP Routing Questions and Answers

1.

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)Interface
145.36.0.0/16E1
145.36.128.0/17E2
145.36.64.0/18E3
145.36.255.0/24E4
Default--E5

Exam Year(s)

GATE CS - 2025,

Answer: A

The packet is forwarded to E3.

A router uses longest prefix match. The destination's third octet is 109 = 01101101 in binary. Check each entry:

  • 145.36.0.0/16 matches, since the first two octets agree.
  • 145.36.128.0/17 needs the first bit of the third octet to be 1 (128 to 255); 109 starts with 0, so no match.
  • 145.36.64.0/18 needs the first two bits of the third octet to be 01 (64 to 127); 109 starts 01, so it matches.
  • 145.36.255.0/24 needs the third octet to be 255; no match.

Of the matching entries, /18 is longer than /16, so the packet goes out on E3. E1 is what a router would choose if it ignored the longest match, E2's range 128 to 255 does not contain 109, and the default route E5 is used only when nothing else matches.

Please log in or register to report this question.

2.

Consider the routing protocols given in List I and the names given in List II:

List IList 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?

Exam Year(s)

GATE CS - 2025,

Answer: A

The correct matching is (i) - (a) and (ii) - (b).

In distance vector routing (as in RIP), each router keeps a vector of distances and repeatedly updates it from its neighbours' vectors. That is the distributed Bellman-Ford algorithm.

In link state routing (as in OSPF), each router floods its link states, so every router learns the whole topology and then computes shortest paths from itself with Dijkstra's algorithm.

The options pairing both protocols with the same algorithm, or swapping them, mix up the local, iterative update of distance vector routing with the global, single-source computation of link state routing.

Please log in or register to report this question.

3.

Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below.

A firewall links to the Internet, to a router below it and to a top router; the top router links to a web server and to a third router; the lower-left and right routers each serve an Ethernet segment of computers

What is the number of subnets inside the enterprise network?

Exam Year(s)

GATE CS - 2022,

Answer: C

There are 6 subnets.

Each router or firewall interface sits on its own subnet, so every separate link or segment between these devices is one subnet. Counting them in the figure:

  1. firewall to the lower-left router;
  2. firewall to the top router;
  3. top router to the web server;
  4. top router to the right router;
  5. the lower-left router's Ethernet segment;
  6. the right router's Ethernet segment.

The firewall's link to the Internet is outside the enterprise network, so it is not counted. 3 counts only the routers, 8 and 12 count interfaces or hosts rather than shared links.

Please log in or register to report this question.

4.

Consider the network shown below with six routers R1 to R6 connected with links having weights as shown in the following diagram.

Network of six routers R1 to R6 with weighted links: R1-R2 2, R1-R3 6, R2-R3 1, R2-R4 8, R2-R5 1, R3-R4 4, R3-R5 3, R4-R6 3, R5-R6 7

What is the initial routines table of Router R4 ?

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: D

The initial table of R4 is R1 ∞, R2 8, R3 4, R4 0, R5 ∞, R6 3.

In distance vector routing, a router's initial table contains only what it knows directly: a distance of 0 to itself, the link weight to each directly connected neighbour, and infinity to every other router. R4 is linked to R2 (weight 8), R3 (weight 4) and R6 (weight 3).

R1 and R5 are not neighbours of R4, so their entries are infinite at the start. Option A gives R1 the value 10 and option B gives R5 7, which are distances learnt only after routing information is exchanged. Option C also sets R4's distance to itself to 10 instead of 0.

Please log in or register to report this question.

5.

Which situation would primarily cause a router to choose a suboptimal path even though all routing protocols are functioning correctly ?

Exam Year(s)

Tripura Public Service Commission - 2026,

Answer: A

The cause is unequal cost metrics between heterogeneous routing protocols.

Each routing protocol measures paths in its own unit: RIP counts hops, OSPF uses a bandwidth-based cost, EIGRP a composite metric. When routes from different protocols meet on one router, or are redistributed from one protocol into another, the metrics cannot be compared directly. The router falls back on administrative distance or an assigned seed metric, and can end up preferring a longer path even though each protocol is working exactly as designed.

Redistribution loops and unacknowledged link-state packets are faults, so they contradict 'functioning correctly'. MTU mismatches cause fragmentation, dropped packets or failed adjacencies rather than a deliberate choice of a worse path.

Please log in or register to report this question.

6.

How does split horizon help reduce the count-to-infinity problem in distance vector routing ?

Exam Year(s)

Tripura Public Service Commission - 2026,

Answer: C

Split horizon works by preventing routers from advertising a route back on the interface from which it was learned.

Count-to-infinity happens when a link fails and two neighbours keep advertising the dead route to each other, each believing the other has a path, so the hop count climbs one step at a time towards infinity (16 in RIP). With split horizon, a router never sends a route back out of the interface it learned it on, so a neighbour cannot feed a stale route back to its source and the two-router loop is broken. Poison reverse is a variant that advertises the route back with an infinite metric.

Split horizon does not stop updates on all ports or disable periodic updates, and the change from hop count to distance has nothing to do with it.

Please log in or register to report this question.

7.

A station in a network forwards incoming packets by placing them on its shortest output queue. What routing algorithm is being used ?

Exam Year(s)

Tripura Public Service Commission - 2019,

Answer: A

The algorithm is hot potato routing.

In hot potato routing a station gets rid of each incoming packet as fast as possible by putting it on the shortest output queue, regardless of where that line leads, as if the packet were too hot to hold.

Flooding sends every packet out on every line except the one it arrived on. Static routing uses fixed tables computed in advance. Delta routing combines central routing information with local measurements such as queue lengths, so it is not the simple shortest-queue rule.

Please log in or register to report this question.

8.

Which routing algorithm uses the hop count as the metric ?

Exam Year(s)

Tripura Public Service Commission - 2026,

Answer: B

The algorithm is RIP (Routing Information Protocol).

RIP is a distance-vector protocol whose only metric is hop count, the number of routers on the path. It allows at most 15 hops, and 16 is treated as unreachable, which limits it to small networks.

OSPF is a link-state protocol that uses a cost usually based on bandwidth. BGP chooses routes between autonomous systems using path attributes and policy. EIGRP uses a composite metric of mainly bandwidth and delay.

Please log in or register to report this question.

Answer: D

Another way to avoid problems caused by inconsistent updates and to stop network loops is route poisoning. When a network goes down, the distance-vector routing protocol initiates route poisoning by advertising the network with a metric of 16, or unreachable (sometimes referred to as infinite).

Please log in or register to report this question.

10.

What does RIPv2 use to prevent routing loops?

1.CIDR

2.Split horizon

3.Authentication

4.Classless masking

5.Holddown timers

Answer: C

RIPv2 uses the same timers and loop-avoidance schemes as RIPv1. Split horizon is used to stop an update from being sent out the same interface it was received on. Holddown timers allow time for a network to become stable in the case of a flapping link.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: IP Routing Questions and Answers || IP Routing MCQ Questions and Answers || IP Routing GK Questions and Answers || IP Routing GK MCQ Questions || IP Routing Multiple Choice Questions and Answers || IP Routing GK || GK on IP Routing || Computer Networking Questions and Answers || Computer Networking MCQ Questions and Answers || Computer Networking GK Questions and Answers || GK on Computer Networking