IPv4 Packet Forwarding – Determining Next Hop Address

ip-forwarding-tableipv4

Say that we have a router with the follwing forwarding table

--------------------------------------------------
| Destination       | Next hop        | Flags    |
--------------------------------------------------
| 177.121.128.0/18  | 73.0.45.1       | G        |
| 0.0.0.0/0         | 73.0.65.1       | UG       |
--------------------------------------------------

Say also that the router receives packets with the destination address 177.121.128.2. In that case, what would happen to the packet?

Since the targeted ip-block is down (as the U flag is absent from 77.121.128.0/18) will the router drop the packet or will the router send it to the default next hop router 73.0.65.1?

Best Answer

In my experience with Cisco devices if it knows that the first gateway is unreachable (which it appears to know since it doesn't have the U flag), then it will move to the next entry on the list that provides the best match for the destination which is the quad zero.

***The routing table says that anything destined for 77.121.128.0/18 will be sent to 73.0.45.1. Packets destined for all other IP address will follow the quad zero rule; that is they will be sent to 73.0.65.1.

As such any packets destined for 177.121.128.2 will be sent to 73.0.65.1; in accordance with the rules in the routing table.***

Related Topic