{"id":308,"date":"2017-09-22T12:53:04","date_gmt":"2017-09-22T10:53:04","guid":{"rendered":"http:\/\/www.quisted.net\/?p=308"},"modified":"2017-09-22T12:53:04","modified_gmt":"2017-09-22T10:53:04","slug":"bgp-next-hop-ibgp-switching","status":"publish","type":"post","link":"https:\/\/www.quisted.net\/index.php\/2017\/09\/22\/bgp-next-hop-ibgp-switching\/","title":{"rendered":"BGP Next-hop &#038; iBGP switching"},"content":{"rendered":"<p>sh ip bgp<\/p>\n<pre>R1#sh ip bgp\nBGP table version is 6, local router ID is 10.10.10.1\nStatus codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,\n              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,\n              x best-external, a additional-path, c RIB-compressed,\nOrigin codes: i - IGP, e - EGP, ? - incomplete\nRPKI validation codes: V valid, I invalid, N Not found\n\n     Network          Next Hop            Metric LocPrf Weight Path\n     0.0.0.0          0.0.0.0                                0 i\n r&gt;  1.1.1.0\/30       20.20.20.1               0             0 20 ?\n r&gt;  20.20.20.0\/24    20.20.20.1               0             0 20 ?\n *&gt;  30.30.30.0\/24    20.20.20.1               0             0 20 ?\n *&gt;i 40.40.40.0\/24    1.1.2.2                  0    100      0 i\n<\/pre>\n<p><!--more--><\/p>\n<ul>\n<li>routes starting with <strong>*<\/strong> is a good route. can be advertized<\/li>\n<li>routes starting wth<strong> r&gt;<\/strong> RIB-failure. (Routing information Base failure)\n<ul>\n<li>Route already in routing table<\/li>\n<li>Memory problem<\/li>\n<li>Administrative boundries on table size<\/li>\n<\/ul>\n<\/li>\n<li>routes with <strong>&gt;<\/strong> is best route for that prefix<\/li>\n<li>routes with <strong>i <\/strong>is via iBGP (internal)<\/li>\n<li>the next-hop with 0.0.0.0 means <strong>this router<\/strong> has that route (non-BGP) called a <em>locally-originated route<\/em>.<\/li>\n<\/ul>\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\/22\/bgp-next-hop-ibgp-switching\/#BGP_rules_for_advertising_of_routes\" >BGP rules for advertising of routes<\/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\/22\/bgp-next-hop-ibgp-switching\/#iBGP_peers_must_have_IGP_reachability_to_the_next-hops_if_not\" >iBGP peers must have IGP reachability to the next-hops, if not:<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"BGP_rules_for_advertising_of_routes\"><\/span>BGP rules for advertising of routes<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Only advertise the best route in any BGP update.<\/li>\n<li>Do <strong>not<\/strong> advertise iBGP-learned routes to iBGP peers.\n<ul>\n<li>\u00a0(Prevents routing loops).<\/li>\n<li>Must be full mesh because of this.\n<ul>\n<li>1 &lt;-&gt; 2 &lt;-&gt;3\u00a0\u00a0 (2 can&#8217;t update to 3)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Local AS is not prepended.<\/li>\n<li>eBGP: next-hop is updated.<\/li>\n<li>iBGP: next-hop is not updated.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"iBGP_peers_must_have_IGP_reachability_to_the_next-hops_if_not\"><\/span>iBGP peers must have IGP reachability to the next-hops, if not:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>iBGP-learned routes will not be installed in the IP Routing Table.<\/li>\n<li>iBGP-learned routes will not be advertised to any other BGP peer.<\/li>\n<li>Viewable via &#8220;<strong><span style=\"color: #008000;\">show ip bgp 30.30.30.0\/24<\/span><\/strong>&#8221; as &#8220;<em>inaccessible<\/em>&#8220;.<\/li>\n<\/ul>\n<pre>     Network          Next Hop            Metric LocPrf Weight Path\n *&gt;i 1.1.1.0\/30       <span style=\"color: #ff0000;\">20.20.20.1<\/span>               0    100      0 20 ?\n *&gt;i 20.20.20.0\/24    <span style=\"color: #ff0000;\">20.20.20.1<\/span>               0    100      0 20 ?\n *&gt;i 30.30.30.0\/24   <span style=\"color: #ff0000;\"> 20.20.20.1<\/span>               0    100      0 20 ?\n\nR3#sh ip bgp 30.30.30.0\nBGP routing table entry for 30.30.30.0\/24, version 6\nPaths: (1 available, no best path)\n  Not advertised to any peer\n  Refresh Epoch 1\n  20, (received &amp; used)\n    <span style=\"color: #ff0000;\"><strong>20.20.20.1 (inaccessible)<\/strong><\/span> from 1.1.2.1 (10.10.10.1)\n      Origin incomplete, metric 0, localpref 100, valid, internal\n      rx pathid: 0, tx pathid: 0\n<\/pre>\n<p><strong>R1(config-router)#neighbor 1.1.2.2 next-hop-self<\/strong><\/p>\n<pre>     Network          Next Hop            Metric LocPrf Weight Path\n *&gt;i 1.1.1.0\/30       <span style=\"color: #ff0000;\">1.1.2.1<\/span>                  0    100      0 20 ?\n *&gt;i 20.20.20.0\/24    <span style=\"color: #ff0000;\">1.1.2.1 <\/span>                 0    100      0 20 ?\n *&gt;i 30.30.30.0\/24    <span style=\"color: #ff0000;\">1.1.2.1<\/span>                  0    100      0 20 ?\n\nTotal number of prefixes 3\nR3#\nR3#sh ip bgp 30.30.30.0\nBGP routing table entry for 30.30.30.0\/24, version 4\nPaths: (1 available, best #1, table default)\n  Not advertised to any peer\n  Refresh Epoch 1\n  20, (received &amp; used)\n   <span style=\"color: #ff0000;\"> 1.1.2.1 from 1.1.2.1 (10.10.10.1)<\/span>\n      Origin incomplete, metric 0, localpref 100, valid, internal, best\n      rx pathid: 0, tx pathid: 0x0\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sh ip bgp R1#sh ip bgp BGP table version is 6, local router ID is 10.10.10.1 Status codes: s suppressed, d damped, h history, * valid, &gt; best, i &#8211; internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i &#8211; IGP, e &#8211; EGP, [&hellip;]<\/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":[12,8],"tags":[],"class_list":["post-308","post","type-post","status-publish","format-standard","hentry","category-bgp","category-route"],"_links":{"self":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/308","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=308"}],"version-history":[{"count":0,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/308\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media?parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/categories?post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/tags?post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}