{"id":629,"date":"2014-11-10T10:34:29","date_gmt":"2014-11-10T09:34:29","guid":{"rendered":""},"modified":"2018-10-31T22:27:11","modified_gmt":"2018-10-31T21:27:11","slug":"ccnp-route-redistribution-simulating-routing-loops","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/ccnp-route-redistribution-simulating-routing-loops\/","title":{"rendered":"CCNP &#8211; Route redistribution &#8211; Simulating routing loops"},"content":{"rendered":"<h1>\n\tObjective<\/h1>\n<p>\n\tTeaching CCNP ROUTE courses and describing the problematic of two-way routing redistribution I need an example describing the case which point out to the process of creating a routing loop. This example shows how such routing loop may arise using badly configured redistribution process andusing bad seed metric. The topology with two redisitributing routers&nbsp;creates routing feedback (two way, multipoint redistribution). The loop is created for packets routed from the ospf network to the 3.0.0.0\/8 destination network.<\/p>\n<h1>\n\tTopology<\/h1>\n<p>\n\tThree routers with two routing domains, EIGRP AS 1 and OSPF area 0.<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"\/wp-content\/uploads\/files\/image\/Netacad\/ccnp\/route-642-902\/routing-loop.png\" style=\"width: 400px; height: 327px;\" \/><\/p>\n<h1>\n\tDynamips\/GNS3 topology<\/h1>\n<pre>\r\n        [[ROUTER R1.1]]\r\n                model = 2691\r\n                console = 3411\r\n                f0\/0 = R1.2 f0\/0\r\n                f0\/1 = R1.2 f0\/1\r\n\r\n        [[ROUTER R1.2]]\r\n                model = 2691\r\n                console = 3412\r\n\r\n        [[ROUTER R1.3]]\r\n                model = 2691\r\n                console = 3413\r\n                s1\/0 = R1.1 s1\/0\r\n                s1\/1 = R1.2 s1\/1\r\n<\/pre>\n<h1>\n\tIPv4 addressing<\/h1>\n<p>\n\tR3 loop: 3.0.0.0\/8: EIGRP external network<\/p>\n<p>\n\tR3-R1: 10.0.31.0\/24, serial line s1\/0 to s1\/0 &nbsp;, (EIGRP RD)<\/p>\n<p>\n\tR3-R2: 10.0.32.0\/\/24, serial line s1\/1 to s1\/1 &nbsp;(EIGRP RD)<\/p>\n<p>\n\tR1-R2: 10.0.12.0\/\/24, fastEthernet line fa0\/1 to fa0\/1&nbsp;(OSPF RD)<\/p>\n<p>\n\tR1-R2: 10.0.21.0\/\/24, fastEthernet line fa0\/0 to fa0\/0&nbsp; (EIGRP RD)<\/p>\n<p>\n\tR1 loop: 1.0.0.0\/8&nbsp;&nbsp;(OSPF RD)<\/p>\n<h1>\n\tPrerequisities<\/h1>\n<p>\n\tFully configured and worked:<\/p>\n<ul>\n<li>\n\t\tEIGRP routing within EIGRP routing domain AS 1<\/li>\n<li>\n\t\tRedistriution of 1.0.0.0\/8 nework as the external net (seen within EIGRP as D EX)<\/li>\n<li>\n\t\tOSPF routing within OSPF routing domain with single area 0<\/li>\n<\/ul>\n<p>\n\tThe configuration still does not solve the redistribution between EIGRP and OSPF. The 3.0.0.0\/8 network is seen within R1 and R2 routing table as D EX (EIGRP <strong>external<\/strong>):<\/p>\n<pre>\r\nR1# <strong>sh ip route 3.0.0.0<\/strong>\r\nRouting entry for 3.0.0.0\/8\r\n  Known via &quot;eigrp 1&quot;, distance 170, metric 2297856, type <span style=\"background-color:#ffff00;\">external<\/span>\r\n  Redistributing via eigrp 1\r\n  Last update from <span style=\"background-color:#ffff00;\">10.0.31.3<\/span> on <span style=\"background-color:#ffff00;\">Serial1\/0<\/span>, 00:03:04 ago\r\n  Routing Descriptor Blocks:\r\n  *<span style=\"background-color:#ffff00;\"> 10.0.31.3, from 10.0.31.3, 00:03:04 ago, via Serial1\/0<\/span>\r\n      Route metric is 2297856, traffic share count is 1\r\n      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit\r\n      Reliability 255\/255, minimum MTU 1500 bytes\r\n      Loading 1\/255, Hops 1<\/pre>\n<div>\n\t&nbsp;<\/div>\n<h1>\n\tConfiguration of mutual two-way\/multi-point redistribution &#8211; creating the loop<\/h1>\n<p>\n\tNow &nbsp;I will configure mutual both-way redistribution on R1\/R2 routers. The configuration is similar for both R1 and R2 routers and looks like the following from R1:<\/p>\n<pre>\r\nrouter eigrp 1\r\nredistribute ospf 1 metric 1544 2000 255 1 1500\r\nrouter ospf 1\r\nredistribute eigrp 1 subnets<\/pre>\n<p>\n\tAs the EIGRP seed metric I have configured the EIGRP metrics of Serial line, i.e. BW 1544Kbps, delay 2000 mikroseconds, reliability 255, load 1 and MTU 1500.&nbsp;<\/p>\n<p>\n\tAfter choosing that bad EIGRP seed metric I <strong>easily&nbsp;did a loop!<\/strong><\/p>\n<p>\n\tWhy? It works following. The R1 had the 3.0.0.0\/8 route within its routing table as D EX learned from R3 over the S1\/0 interface, and it is marked as an EIGR D EX route. The redistribution process is searching for Eigrp routes within the R1 routing table. Once it find them, it will redistribute them into OSPF. And that the R1 router exactly do. It sent the 3.0.0.0\/8 route as LSA5 (R1 becomes an ASBR) into the OSPF area 0.<\/p>\n<p>\n\tThe R2 router has therefore&nbsp;two choices, an EIGRP update saying that the 3.0.0.0\/8 route is reachable over S1\/1 interface (sending the packets correctly to R3) or an update over OSPF saying that the route for 3.0.0.0\/8 network is reachable over the R1 OSPF neighbor. The R2 will select the route over R2 thanks to better <em>Administrative distance<\/em> of internal OSPF (110) compared to External EIGRP (170).<\/p>\n<pre>\r\nR2#sh ip route 3.0.0.0\r\nRouting entry for 3.0.0.0\/8\r\n  Known via &quot;<span style=\"background-color:#ffff00;\">ospf 1<\/span>&quot;, distance 110, metric 20, type extern 2, forward metric 10\r\n  Redistributing via eigrp 1\r\n  Advertised by eigrp 1 metric 1544 2000 255 1 1500\r\n  Last update from <span style=\"background-color:#ffff00;\">10.0.12.1<\/span> on <span style=\"background-color:#ffff00;\">FastEthernet0\/1,<\/span> 00:23:40 ago\r\n  Routing Descriptor Blocks:\r\n <span style=\"background-color:#ffff00;\"> * 10.0.12.1, from 10.0.31.1, 00:23:40 ago, via FastEthernet0\/1<\/span>\r\n      Route metric is 20, traffic share count is 1<\/pre>\n<div>\n\tNow the redistrution process of R2 will do the routing feedback which will create the routing loop. The redistribution from EIGRP to OSPF will insert the link bettween R3 to R1 as the R2 now about it over EIGRP, and the fa0\/0 link R1 to R2 as it is insert into EIGRP routing and the link is part of EIGRP routing domain.<\/div>\n<div>\n\tBut not 3.0.0.0\/8 route itself, because the R2 router does not have 3.0.0.0\/8 as the EIGRP route within its routing table.&nbsp;<\/div>\n<div>\n<pre>\r\nR2# sh ip route eigrp\r\n     10.0.0.0\/24 is subnetted, 4 subnets\r\nD       10.0.31.0 [90\/2195456] via 10.0.21.1, 00:52:23, FastEthernet0\/0<\/pre>\n<div>\n\t\t&nbsp;<\/div>\n<\/div>\n<div>\n\tBut the redistribution from OSPF to EIGRP insert three routes as the router has some OSPF routes and one directly connected ospf network. And among them is our 3.0.0.0\/8 route which comes over R3 to R1 to R2 path.<\/div>\n<div>\n<pre>\r\nR2#sh ip route ospf\r\nO    1.0.0.0\/8 [110\/11] via 10.0.12.1, 00:41:25, FastEthernet0\/1\r\n<span style=\"background-color:#ffff00;\">O E2 3.0.0.0\/8 [110\/20] via 10.0.12.1, 00:38:48, FastEthernet0\/1<\/span><\/pre>\n<div>\n\t\t&nbsp;<\/div>\n<\/div>\n<div>\n\tSo the redistribution process will takes the 3.0.0.0\/8 route and insert it again into EIGRP process (a norigin network), but with bad defined seed metric. Next the R2 router sent the EGIRP update to both of its neighbors, R3 and R1.<\/div>\n<div>\n\t&nbsp;<\/div>\n<div>\n\tR3 does not accept the update as the R3 is inserting the 3.0.0.0\/8 route into eigrp and the net is seen as router directly connected network.<\/div>\n<div>\n<pre>\r\n<span style=\"background-color:#ffa500;\">R3<\/span>#sh ip route\r\n\r\nGateway of last resort is not set\r\n\r\nD EX 1.0.0.0\/8 [170\/2681856] via 10.0.32.2, 00:11:13, Serial1\/1\r\n               [170\/2681856] via 10.0.31.1, 00:11:13, Serial1\/0\r\n<span style=\"background-color:#ffff00;\">C    3.0.0.0\/8 is directly connected, Loopback0<\/span>\r\n     10.0.0.0\/24 is subnetted, 4 subnets\r\nD EX    10.0.12.0 [170\/2681856] via 10.0.32.2, 00:11:13, Serial1\/1\r\n                  [170\/2681856] via 10.0.31.1, 00:11:13, Serial1\/0\r\nC       10.0.31.0 is directly connected, Serial1\/0\r\nD       10.0.21.0 [90\/2195456] via 10.0.32.2, 00:11:13, Serial1\/1\r\n                  [90\/2195456] via 10.0.31.1, 00:11:13, Serial1\/0\r\nC       10.0.32.0 is directly connected, Serial1\/1<\/pre>\n<div>\n\t\t&nbsp;<\/div>\n<div>\n\t\tBut the situation is different on the R1 router. Now the R1 has two sources saying that the 3.0.0.0\/8 route is accesible over them. We can observe it showing the Eigrp topology database:<\/div>\n<div>\n\t\t&nbsp;<\/div>\n<div>\n<pre>\r\nR1#sh ip eigrp topology\r\nIP-EIGRP Topology Table for AS(1)\/ID(10.0.31.1)\r\n...\r\nP 3.0.0.0\/8, 1 successors, FD is 2195456\r\n        via 10.0.21.2 (<span style=\"background-color:#ffff00;\">2195456<\/span>\/2169856), FastEthernet0\/0\r\n        via 10.0.31.3 (<span style=\"background-color:#00ff00;\">2297856<\/span>\/128256), Serial1\/0\r\n... <\/pre>\n<div>\n\t\t\tor a better view<\/div>\n<\/p><\/div>\n<div>\n<pre>\r\nR1# <strong>sh ip eigrp topology 3.0.0.0<\/strong>\r\nIP-EIGRP (AS 1): Topology entry for 3.0.0.0\/8\r\n  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2195456\r\n  Routing Descriptor Blocks:\r\n  1<span style=\"background-color:#ffff00;\">0.0.21.2 (FastEthernet0\/0), from 10.0.21.2, Send flag is 0x0<\/span>\r\n      Composite metric is (2195456\/2169856), Route is External\r\n      Vector metric:\r\n        Minimum bandwidth is 1544 Kbit\r\n        Total delay is 21000 microseconds\r\n        Reliability is 255\/255\r\n        Load is 1\/255\r\n        Minimum MTU is 1500\r\n        Hop count is 1\r\n      External data:\r\n        Originating router is 10.0.32.2\r\n        AS number of route is 1\r\n        External protocol is OSPF, external metric is 20\r\n        Administrator tag is 0 (0x00000000)\r\n  1<span style=\"background-color:#00ff00;\">0.0.31.3 (Serial1\/0), from 10.0.31.3, Send flag is 0x0<\/span>\r\n      Composite metric is (2297856\/128256), Route is External\r\n      Vector metric:\r\n        Minimum bandwidth is 1544 Kbit\r\n        Total delay is 25000 microseconds\r\n        Reliability is 255\/255\r\n        Load is 1\/255\r\n        Minimum MTU is 1500\r\n        Hop count is 1\r\n      External data:\r\n        Originating router is 1.0.0.3\r\n        AS number of route is 0\r\n        External protocol is Connected, external metric is 0\r\n        Administrator tag is 0 (0x00000000)<\/pre>\n<div>\n\t\t\tThe database shows that from the R1 router point of view it may choose tha path over&nbsp;<span style=\"font-size: 12px; background-color: rgb(238, 238, 238);\">10.0.21.2, ie. R2<\/span>&nbsp;or over &nbsp;<span style=\"font-size: 12px; background-color: rgb(238, 238, 238);\">10.0.31.3, ie R3.<\/span>&nbsp;The R1 router will use the route with better metric (<span style=\"font-size: 12px; background-color: rgb(255, 255, 0);\">2195456<\/span>) and it is the route back over R2, which is than inserted into its routing table:<\/div>\n<div>\n<pre>\r\nR1#sh ip route\r\n\r\nGateway of last resort is not set\r\nC&nbsp;&nbsp;&nbsp; 1.0.0.0\/8 is directly connected, Loopback0\r\n<span style=\"background-color:#ffff00;\">D EX 3.0.0.0\/8 [170\/2195456] via 10.0.21.2, 01:02:02, FastEthernet0\/0<\/span>\r\n<span style=\"background-color:#ffff00;\">&nbsp;&nbsp;&nbsp;&nbsp; 10.0.0.0\/24 is subnetted, 4 subnets<\/span>\r\nC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.0.12.0 is directly connected, FastEthernet0\/1\r\nC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.0.31.0 is directly connected, Serial1\/0\r\nC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.0.21.0 is directly connected, FastEthernet0\/0\r\nD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.0.32.0 [90\/2195456] via 10.0.21.2, 00:18:41, FastEthernet0\/0<\/pre>\n<div>\n<h1>\n\t\t\t\t\tThe&nbsp;<span style=\"line-height: 1em;\">Proof<\/span><\/h1>\n<p>\n\t\t\t\t\tFollowing these steps we realize the loop. Te loop is created for packets originate within OSPF routing domain and targetted only to the 3.0.0.0\/8 destinations.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<p>\n\tAs a proof we will do ping and traceroute from the R1 loop interface.<\/p>\n<pre>\r\nR1#ping 3.0.0.1 sour loop 0\r\nType escape sequence to abort.\r\nSending 5, 100-byte ICMP Echos to 3.0.0.1, timeout is 2 seconds:\r\nPacket sent with a source address of 1.0.0.1\r\n.....\r\nSuccess rate is 0 percent (0\/5)<\/pre>\n<p>\n\tor better description using the traceroute:<\/p>\n<pre>\r\nR1#traceroute 3.0.0.1 source lo 0\r\n\r\nType escape sequence to abort.\r\nTracing the route to 3.0.0.1\r\n  <span style=\"background-color:#ffff00;\">1 10.0.21.2 20 msec 20 msec 20 msec<\/span>\r\n  <span style=\"background-color:#00ff00;\">2 10.0.12.1 20 msec 36 msec 20 msec<\/span>\r\n  <span style=\"background-color:#ffff00;\">3 10.0.21.2 40 msec 48 msec 36 msec<\/span>\r\n  <span style=\"background-color:#00ff00;\">4 10.0.12.1 40 msec 52 msec 40 msec<\/span>\r\n  <span style=\"background-color:#ffff00;\">5 10.0.21.2 56 msec 56 msec 60 msec<\/span>\r\n  <span style=\"background-color:#00ff00;\">6 10.0.12.1 64 msec 76 msec 60 msec<\/span>\r\n  <span style=\"background-color:#ffff00;\">7 10.0.21.2 80 msec 76 msec 80 msec<\/span>\r\n... &lt;continues&gt;<\/pre>\n<div>\n\tWhere we can observe that the ICMP Packet is going arround within the loop between R1 (<span style=\"background-color:#00ff00;\">IP address 10.0.12.1<\/span>) and R2 (<span style=\"background-color:#ffff00;\">IP address 10.0.21.2<\/span>) routers.<\/div>\n<p>\n\t&nbsp;<\/p>\n<h1>\n\tProtection<\/h1>\n<p>\n\tProtection is achieved using correct seed metric values or using a kind or routes filtering.<\/p>","protected":false},"excerpt":{"rendered":"<h1>\n\tObjective<\/h1>\n<p>\n\tTeaching CCNP ROUTE courses and describing the problematic of two-way routing redistribution I need an example describing the case which point out to the process of creating a routing loop. This example shows how such routing loop may arise using badly configured redistribution process andusing bad seed metric. The topology with two redisitributing routers&nbsp;creates routing feedback (two way, multipoint redistribution). The loop is created for packets routed from the ospf network to the 3.0.0.0\/8 destination network.<\/p>","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[701],"tags":[],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-ccnp-en"],"taxonomy_info":{"category":[{"value":701,"label":"CCNP"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":3,"category_info":[{"term_id":701,"name":"CCNP","slug":"ccnp-en","term_group":0,"term_taxonomy_id":699,"taxonomy":"category","description":"","parent":695,"count":8,"filter":"raw","cat_ID":701,"category_count":8,"category_description":"","cat_name":"CCNP","category_nicename":"ccnp-en","category_parent":695}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=629"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/629\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}