Longest Prefix Match Routing

Hi @lagapidis

To Summarise:

  1. If a route to a given destination is learnt via multiple routing sources including static routes, it’s always the static routes that end up on the routing table. All other sources are discarded.

  2. When there are multiple static routes for the same destination with different metric values, the route with the lowest metric is installed on the routing table.

  3. When a router learns a route to a specific destination via multiple routing protocols, AD becomes the tie-breaker to install a specific route from a specific source.

  4. When a router learns a route to a specific destination via the same source (say OSPF), then metric value is used to determine the route that will be installed in the routing table.

The longest prefix match is only to determine the route from the routing table. Also, there can’t exist duplicate entries within the routing table, so longest prefix match is usually applicable for determining the routing entry (inevitably the network) to which the packet will be forwarded?

Is my understanding correct?

Thanks,
Adi