11-28-2022 06:08 AM
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?
Solved! Go to Solution.
11-28-2022 07:08 AM - edited 11-28-2022 07:34 AM
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
11-28-2022 06:19 AM
sure it will select path through ospf
always longest match win
11-28-2022 07:08 AM - edited 11-28-2022 07:34 AM
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
11-28-2022 07:14 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide