{"id":852,"date":"2021-08-20T03:07:57","date_gmt":"2021-08-20T03:07:57","guid":{"rendered":"http:\/\/feralpacket.org\/?p=852"},"modified":"2021-08-20T03:07:57","modified_gmt":"2021-08-20T03:07:57","slug":"static-routing-notes","status":"publish","type":"post","link":"https:\/\/feralpacket.org\/?p=852","title":{"rendered":"Static Routing Notes"},"content":{"rendered":"<p><span style=\"font-weight: bold;\">Static Routing<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route &lt;destination&gt; &lt;direction&gt;<\/span><\/p>\n<p>&nbsp;&#8211; destination<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; network<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; subnet mask<\/p>\n<p>&nbsp;&#8211; direction<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; exit interface<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; next-hop IP<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; or both<\/p>\n<p>Serial interface<\/p>\n<p>&nbsp;&#8211; Using next-hop IP or interface has no difference<\/p>\n<p>&nbsp;&#8211; Since there is only one other IP on the serial link<\/p>\n<p>Multipoint interface<\/p>\n<p>&nbsp;&#8211; Using interface or next-hop IP address has a big difference<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; An ARP request has to be sent<\/p>\n<p>&nbsp;&#8211; Exit interface<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; If a packet arrives at R1 with a destination IP of 50.0.0.1<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Router will do a routing lookup; &nbsp;since the next-hop IP address is missing, an ARP request is sent for 50.0.0.1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/ce25695db78572e1c3c67d8ad5c16675.jpeg\" style=\"\" width=\"2496\" height=\"\"><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; The receiving router (R2) will reply with it&#8217;s own MAC address on that segment if proxy-arp is enabled<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; A new ARP entry is created for each IP packet sent to R2<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; There could be hundreds of ARP entries<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Eventually, the sending router will have a huge ARP table with all IPs &nbsp;in the 50.0.0.0 network mapped to the MAC address of R2<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Proxy-arp is enabled on routers by default<\/p>\n<p>&nbsp;&#8211; Next-hop IP address<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Whenever a packet is received for 50.0.0.0, an ARP request will be sent for the next-hop IP address<\/p>\n<p>&nbsp;&#8211; Next-hop IP address and exit interface<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Whenever a packet is received for 50.0.0.0, an ARP request will be sent for the next-hop IP address<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Scenario based<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; Commonly used with BGP<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; To prevent routing packets through another service provider<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; If both an exit interface and next-hop IP address is used, the network is considered reachable if the exit interface is up<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; An ARP request will be sent for the next-hop IP address<\/p>\n<p><span style=\"font-weight: bold;\">Floating Static Routes<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 50.0.0.0 255.0.0.0 12.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 50.0.0.0 255.0.0.0 12.0.0.3 50<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 50 is the administrative distance<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; First route is installed into the routing table<\/p>\n<p>&nbsp;&#8211; Default administrative distance for static routes is 1<\/p>\n<p><span style=\"font-weight: bold;\">Recursive Static Route<\/span><\/p>\n<p>&nbsp;&#8211; When the next-hop is not directly connected<\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 50.0.0.0 255.0.0.0 20.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 20.0.0.0 255.0.0.0 12.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 20.0.0.0 255.0.0.0 21.0.0.2<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/6cbe0bee75d41225785608569170accb.jpeg\" style=\"\" width=\"2732\" height=\"\"><\/p>\n<p>&nbsp;&#8211; Used with BGP loopback to loopback peer netghborship<\/p>\n<p>&nbsp;&#8211; Will do a recursive lookup for each packet<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Unless CEF is being used<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Cases packets to the load-balanced across the serial links<\/p>\n<p><span style=\"font-weight: bold;\">Unequal cost load-balancing<\/span><\/p>\n<p>&nbsp;&#8211; EIGRP<\/p>\n<p>&nbsp;&#8211; BGP<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/e0472767b0784b623cf110d49c0aa554.jpeg\" style=\"\" width=\"2407\" height=\"\"><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 20.0.0.0 255.0.0.0 12.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 30.0.0.0 255.0.0.0 12.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 40.0.0.0 255.0.0.0 21.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 50.0.0.0 255.0.0.0 20.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 50.0.0.0 255.0.0.0 30.0.0.2<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">ip route 50.0.0.0 255.0.0.0 40.0.0.2<\/span><\/p>\n<p>&nbsp;&#8211; Two packets will be sent to 12.0.0.2 for each packet sent to 21.0.0.2<\/p>\n<p>&nbsp;&#8211; Recursive lookup is used when CEF is not used<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Static Routing<\/p>\n","protected":false},"author":1,"featured_media":849,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[31],"class_list":["post-852","post","type-post","status-publish","format-standard","hentry","category-ccie","tag-published"],"_links":{"self":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=852"}],"version-history":[{"count":1,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/852\/revisions"}],"predecessor-version":[{"id":967,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/852\/revisions\/967"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/media\/849"}],"wp:attachment":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}