cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
411
Views
0
Helpful
3
Replies

Routing Prefered

hs08
Spotlight
Spotlight

Hi..

Which routing will be win between static routing with dynamic routing, also large CIDR with small CIDR?

If i have static routing 0.0.0.0/0 via 1.2.3.4 and OSPF routing 10.10.10.0/24 via 10.11.11.1, if host want to connect to 10.10.10.1 which gateway will be used, 1.2.3.4 or 10.11.11.1?

1 Accepted Solution

Accepted Solutions

Longest prefix match :  Routers select routes with the longest match to the destination address in the forwarded packet. For example if a packet is destined to 192.168.12.1 and the router has 192.168.0.0/16 and 192.168.12.0/24 in its routing table, it will forward the packet using the 192.168.12.0/24 route.

Therefore , Due to Longest Prefix Match , The Path via OSPF would be selected 

Spooster IT Services Team

View solution in original post

3 Replies 3

sure it will select path through ospf
always longest match win

Longest prefix match :  Routers select routes with the longest match to the destination address in the forwarded packet. For example if a packet is destined to 192.168.12.1 and the router has 192.168.0.0/16 and 192.168.12.0/24 in its routing table, it will forward the packet using the 192.168.12.0/24 route.

Therefore , Due to Longest Prefix Match , The Path via OSPF would be selected 

Spooster IT Services Team

AD value and metric is use to select prefix add to RIB not use to select path for prefix already in RIB.
his case he have two path for prefix 
and router use only longest match to select path. 


Review Cisco Networking products for a $25 gift card