{"id":298,"date":"2017-09-22T10:31:03","date_gmt":"2017-09-22T08:31:03","guid":{"rendered":"http:\/\/www.quisted.net\/?p=298"},"modified":"2017-09-22T10:31:03","modified_gmt":"2017-09-22T08:31:03","slug":"bgp-routing","status":"publish","type":"post","link":"https:\/\/www.quisted.net\/index.php\/2017\/09\/22\/bgp-routing\/","title":{"rendered":"BGP Routing"},"content":{"rendered":"<h3><a href=\"http:\/\/vps.quisted.net\/wp-content\/uploads\/2017\/09\/bgptopolgy2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-302 size-full\" src=\"http:\/\/vps.quisted.net\/wp-content\/uploads\/2017\/09\/bgptopolgy2.png\" alt=\"\" width=\"995\" height=\"424\" srcset=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2017\/09\/bgptopolgy2.png 995w, https:\/\/www.quisted.net\/wp-content\/uploads\/2017\/09\/bgptopolgy2-300x128.png 300w, https:\/\/www.quisted.net\/wp-content\/uploads\/2017\/09\/bgptopolgy2-768x327.png 768w\" sizes=\"auto, (max-width: 995px) 100vw, 995px\" \/><\/a><\/h3>\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-routing\/#Injecting_routes_into_BGP\" >Injecting routes into BGP.<\/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-routing\/#BGP_for_outbound_routing\" >BGP for outbound routing<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Injecting_routes_into_BGP\"><\/span>Injecting routes into BGP.<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>Use the <strong>network<\/strong> command.\n<ul>\n<li>Different than the network command in iGP; it isn&#8217;t used to listen\/active interfaces.<\/li>\n<li>the BGP<strong> network<\/strong> command looks for the <span style=\"color: #008000;\">prefix<\/span> in the routing table and originates that into the BGP table.<\/li>\n<li>If no <span style=\"color: #ff00ff;\">mask<\/span> is defined, IOS assumes a classful network.<\/li>\n<li>Classful route is added if:\n<ul>\n<li>the exact route is in the ip routing table<\/li>\n<li>Any subset of routes are in the routing table (only with <strong>auto-summery<\/strong>)<\/li>\n<\/ul>\n<\/li>\n<li>create a null0 route\n<ul>\n<li>\u00a0ip route 30.30.30.0 255.255.255.0 null0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre>router bgp 20\n bgp log-neighbor-changes\n <strong><span style=\"color: #3366ff;\">network 30.30.30.0 mask 255.255.255.0<\/span><\/strong>\n neighbor 10.10.10.1 remote-as 10\n neighbor 10.10.10.1 ebgp-multihop 255\n neighbor 10.10.10.1 update-source Loopback1\n<\/pre>\n<p><!--more--><\/p>\n<ul>\n<li><strong>Route redistribution.<\/strong>\n<ul>\n<li>redistribute iGP into BGP.<\/li>\n<li>Internal routes are prefered over external routes.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre>R2(config)#router bgp 20\nR2(config-router)#redi\nR2(config-router)#redistribute ? \n    bgp            Border Gateway Protocol (BGP)\n    connected      Connected\n    eigrp          Enhanced Interior Gateway Routing Protocol (EIGRP)\n    isis           ISO IS-IS\n    iso-igrp       IGRP for OSI networks\n    lisp           Locator ID Separation Protocol (LISP)\n    mobile         Mobile routes\n    odr            On Demand stub Routes\n    ospf           Open Shortest Path First (OSPF)\n    ospfv3         OSPFv3\n    rip            Routing Information Protocol (RIP)\n    static         Static routes\n    vrf            Specify a source VRF<\/pre>\n<ul>\n<li><strong>Route summarization\/aggregation<\/strong>\n<ul>\n<li>aggregate-address <span style=\"color: #008000;\">30.30.30.0 255.255.255.0<\/span> [summary-only]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"BGP_for_outbound_routing\"><\/span><span style=\"color: #3366ff;\"><strong>BGP for outbound routing<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><strong><em>Single homed<\/em> <\/strong>( 1 link per ISP, 1 ISP ).\n<ul>\n<li>Default route will suffice.<\/li>\n<li>BGP probably not necessary.<\/li>\n<\/ul>\n<\/li>\n<li><strong><em>Dual homed<\/em> <\/strong>( 2+ links per ISP, 1 ISP ).\n<ul>\n<li>BGP is useful.<\/li>\n<li>Static route can also be used:\n<ul>\n<li>Load share traffic between both circuits<\/li>\n<li>prefer one link over the other<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong><em>Single multihomed<\/em><\/strong> ( 1link per ISP, 2+ ISPs ).\n<ul>\n<li>same concept as <em>dualhomed.<\/em><\/li>\n<\/ul>\n<\/li>\n<li><strong><em>Dual multihomed <\/em><\/strong>(2+ link per ISP, 2+ ISPs).\n<ul>\n<li>Using BGP takes full advantage<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Injecting routes into BGP. Use the network command. Different than the network command in iGP; it isn&#8217;t used to listen\/active interfaces. the BGP network command looks for the prefix in the routing table and originates that into the BGP table. If no mask is defined, IOS assumes a classful network. Classful route is added if: [&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-298","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\/298","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=298"}],"version-history":[{"count":0,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}