Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2004 | Question 55

View Discussion
Improve Article
Save Article
  • Last Updated : 28 Jun, 2021

The routing table of a router is shown below:

 Destination     Sub net mask          Interface             Eth0     Eth1     Eth3
 default                           Eth2

On which interfaces will the router forward packets addressed to destinations and respectively?
(A) Eth1 and Eth2
(B) Eth0 and Eth2
(C) Eth0 and Eth3
(D) Eth1 and Eth3

Answer: (A)

Explanation: To find the interface, we need to do AND of incoming IP address and Subnet mask. Compare the result of AND with the destination. Note that if there is a match between multiple Destinations, then we need to select the destination with longest length subnet mask., matches with and, the packet is forwarded to Eth1 as length of subnet mask in Eth11 is more.

If a result is not matching with any of the given destinations then the packet is forwarded to the default interface (here Eth2). Therefore the packet’s addressed to will be forwarded to Eth2.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!