{"id":5083,"date":"2015-03-19T07:28:00","date_gmt":"2015-03-19T13:28:00","guid":{"rendered":"http:\/\/gregsowell.com\/?p=5083"},"modified":"2015-03-18T19:30:34","modified_gmt":"2015-03-19T01:30:34","slug":"mikrotik-view-large-routing-tables-bgp-full-feed","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=5083","title":{"rendered":"Mikrotik &#8211; View Large Routing Tables &#8211; BGP Full Feed"},"content":{"rendered":"<p>If you are connecting your Internet routers to your providers via BGP, you will quickly notice that it is difficult to view the route table&#8230;and when a normal feed is 510K+ routes, I&#8217;m sure you can imagine why.  A single full feed consumes somewhere around 256MB of RAM&#8230;so don&#8217;t try this with an RB750!  As Tom would say, &#8220;Get bigger rooters B*****s!&#8221;<\/p>\n<p>At any rate, when you open winbox, go to ip route, you see this:<br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes.png\" alt=\"iproutes\" width=\"598\" height=\"308\" class=\"aligncenter size-full wp-image-5084\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes.png 598w, https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes-300x155.png 300w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><\/p>\n<p>What you want to do is use some filtering.  You will find this just above the list of routes&#8230;or lack there of:<br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes21.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes21.png\" alt=\"iproutes2\" width=\"596\" height=\"150\" class=\"aligncenter size-full wp-image-5086\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes21.png 596w, https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes21-300x76.png 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/a><br \/>\nNotice that I used the &#8220;is&#8221; condition.  This means it will look for this EXACT route.<\/p>\n<p>If we want to put in a subnet and find all routes that are contained within it we would switch to the &#8220;in&#8221; keyword:<br \/>\n<figure id=\"attachment_5087\" aria-describedby=\"caption-attachment-5087\" style=\"width: 361px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes3.png\" alt=\"Notice it found 275 routes.\" width=\"361\" height=\"397\" class=\"size-full wp-image-5087\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes3.png 361w, https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes3-273x300.png 273w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/a><figcaption id=\"caption-attachment-5087\" class=\"wp-caption-text\">Notice it found 275 routes.<\/figcaption><\/figure><\/p>\n<p>We can accomplish the same via CLI&#8230;with even more functionality actually, but we will keep it simple.<br \/>\nExact match:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">\/ip route print where dst-address=0.0.0.0\/0<\/code><\/pre>\n<p><a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes4.png\" alt=\"iproutes4\" width=\"507\" height=\"99\" class=\"aligncenter size-full wp-image-5088\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes4.png 507w, https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes4-300x59.png 300w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/><\/a><\/p>\n<p>Match subordinate routes:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">\/ip route print where dst-address in 8.0.0.0\/8<\/code><\/pre>\n<p><a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes5.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes5.png\" alt=\"iproutes5\" width=\"508\" height=\"378\" class=\"aligncenter size-full wp-image-5089\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes5.png 508w, https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes5-300x223.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/a><\/p>\n<p>On the CLI we can add some additional keywords&#8230;like detail!<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">\/ip route print detail where dst-address=0.0.0.0\/0<\/code><\/pre>\n<p><a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes6.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes6.png\" alt=\"iproutes6\" width=\"523\" height=\"127\" class=\"aligncenter size-full wp-image-5090\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes6.png 523w, https:\/\/gregsowell.com\/wp-content\/uploads\/2015\/03\/iproutes6-300x73.png 300w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><br \/>\nAs you can see, adding the detail option gives us the BGP peer that we learned it from, their AS#, and gateway information.  All extremely useful information.<\/p>\n<p>Let me know about your route table tricks in the comments, and as always, happy routing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are connecting your Internet routers to your providers via BGP, you will quickly notice that it is difficult to view the route\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[],"class_list":["post-5083","post","type-post","status-publish","format-standard","hentry","category-mikrotik","category-networking"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/5083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5083"}],"version-history":[{"count":2,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/5083\/revisions"}],"predecessor-version":[{"id":5092,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/5083\/revisions\/5092"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}