{"id":92,"date":"2017-09-13T21:19:56","date_gmt":"2017-09-13T19:19:56","guid":{"rendered":"http:\/\/www.quisted.net\/?p=92"},"modified":"2017-09-13T21:19:56","modified_gmt":"2017-09-13T19:19:56","slug":"ospf-metric-calculations","status":"publish","type":"post","link":"https:\/\/www.quisted.net\/index.php\/2017\/09\/13\/ospf-metric-calculations\/","title":{"rendered":"OSPF Metric Calculations &#038; Tuning"},"content":{"rendered":"<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Analyse the <span style=\"color: #3366ff;\">LSDB<\/span> to find all possible routes to reach the subnet.<\/li>\n<li>Per route, add the <span style=\"color: #ff9900;\">interface cost<\/span> for all outgoing interfaces in that route.<\/li>\n<li>Pick the route with the <span style=\"color: #339966;\">lowest cost.<\/span>\n<ul>\n<li><span style=\"color: #339966;\">Cost <span style=\"color: #000000;\">is derived from the egress interface bandwith.<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quisted.net\/index.php\/2017\/09\/13\/ospf-metric-calculations\/#Intra-Area\" >Intra-Area<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quisted.net\/index.php\/2017\/09\/13\/ospf-metric-calculations\/#Inter-Area_Routes\" >Inter-Area Routes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quisted.net\/index.php\/2017\/09\/13\/ospf-metric-calculations\/#Priority_of_route_Selection\" >Priority of route Selection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quisted.net\/index.php\/2017\/09\/13\/ospf-metric-calculations\/#OSPF_Metric_tuning\" >OSPF Metric tuning<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Intra-Area\"><\/span>Intra-Area<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Locates subnets via interface Type 1 LSA and any Type 2 LSA<\/li>\n<li>Uses SPF to find all paths for each subnet<\/li>\n<li>Calculates the OSPF interface cost for the routes, and picks the <span style=\"color: #ff0000;\">lowest cost<\/span><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Inter-Area_Routes\"><\/span>Inter-Area Routes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>From the router&#8217;s point of view it only knows the subnet via Type 3 LSA. Doesn&#8217;t know the topology<\/li>\n<li>ABR sends the cost of the subnet in the area<\/li>\n<li>With multiple ABRs between area&#8217;s you can modify the cost to control outgoing routing<\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Priority_of_route_Selection\"><\/span>Priority of route Selection<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong>Intra-Area<\/strong>\n<ul>\n<li>within the same area (via Type 1 LSA via Type 2 LSA).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Inter-Area<\/strong>\n<ul>\n<li>From another area (via Type 3 LSA).<\/li>\n<\/ul>\n<\/li>\n<li><strong>External<\/strong>\n<ul>\n<li>Redistribution, doesn&#8217;t live in the OSPF domain (via Type 5 LSA).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Route Hirarchy:<\/strong>\n<ul>\n<li><strong>O &gt; O IA &gt; E1 &gt; E2 &gt; N1 &gt; N2 <\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"OSPF_Metric_tuning\"><\/span>OSPF Metric tuning<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>show ip ospf interface<br \/>\nshow ip ospf interface brief<\/p>\n<ul>\n<li><strong>change reference bandwidth<\/strong>\n<ul>\n<li><span style=\"color: #3366ff;\">Reference-bandwith<\/span> \/ <span style=\"color: #ff9900;\">interface-bandwith<\/span><\/li>\n<li>default reference-bandwith 100Mbps\/\u00a0 (Default is <span style=\"color: #3366ff;\">100<\/span>\/<span style=\"color: #ff9900;\">100<\/span> = 1)<\/li>\n<li><em>auto-cost reference-bandwidth bandwidth<\/em><\/li>\n<\/ul>\n<\/li>\n<li><strong>Setting bandwidth<\/strong>\n<ul>\n<li><em>(config-if)#bandwidth (value)<\/em><\/li>\n<li>Not recommended because of other protocols and QoS.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Config cost directly<\/strong>\n<ul>\n<li><em>(config)#ip ospf cost (value)<br \/>\n<\/em><\/li>\n<li>More controllable but more work<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre>R1#sh ip ospf int loopback 1\nLoopback1 is up, line protocol is up\n Internet Address 1.1.1.1\/24, Area 1\n Process ID 1, Router ID 10.10.10.1, Network Type LOOPBACK, <strong><span style=\"color: #ff0000;\">Cost: 1<\/span><\/strong>\n Enabled by interface config, including secondary ip addresses\n Loopback interface is treated as a stub Host<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Analyse the LSDB to find all possible routes to reach the subnet. Per route, add the interface cost for all outgoing interfaces in that route. Pick the route with the lowest cost. Cost is derived from the egress interface bandwith.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[14,8],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-ospf","category-route"],"_links":{"self":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":0,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}