{"id":547,"date":"2026-08-24T17:56:32","date_gmt":"2026-08-24T16:56:32","guid":{"rendered":"https:\/\/7zeros.com\/?page_id=547"},"modified":"2026-08-24T17:56:32","modified_gmt":"2026-08-24T16:56:32","slug":"route-selection-order","status":"publish","type":"page","link":"https:\/\/7zeros.com\/?page_id=547","title":{"rendered":"Route Selection Order"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. Longest Prefix Match<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<p>e.g. \/24 is chosen over \/16 because it is more specific.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Administrative Distance (AD)<\/h2>\n\n\n\n<p>AD is used when there are multiple routes for the same destination and prefix length, for example static (10) wins over BGP (20).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Route Priority<\/h2>\n\n\n\n<p>If the prefix and AD are the same, then priority is used.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Route A: 172.21.2.0\/24 &#91;10\/5]\nRoute B: 172.21.2.0\/24 &#91;10\/10]<\/code><\/pre>\n\n\n\n<p>The lower priority wins, i.e. 5.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. BGP best-path selection<\/h2>\n\n\n\n<p>For multiple BGP paths to the same prefix, BGP attributes determine which path wins.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Weight\n\nLocal Preference\n\nLocally originated\n\nAS-path length\n\nOrigin\n\nMED\n\neBGP vs iBGP\n\nIGP cost to next hop<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. Longest Prefix Match e.g. \/24 is chosen over \/16 because it is more specific. 2. Administrative Distance (AD) AD is used when there are multiple routes for the same destination and prefix length, for example static (10) wins over BGP (20). 3. Route Priority If the prefix and AD are the same, then priority [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-547","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/7zeros.com\/index.php?rest_route=\/wp\/v2\/pages\/547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/7zeros.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/7zeros.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/7zeros.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/7zeros.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=547"}],"version-history":[{"count":1,"href":"https:\/\/7zeros.com\/index.php?rest_route=\/wp\/v2\/pages\/547\/revisions"}],"predecessor-version":[{"id":549,"href":"https:\/\/7zeros.com\/index.php?rest_route=\/wp\/v2\/pages\/547\/revisions\/549"}],"wp:attachment":[{"href":"https:\/\/7zeros.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}