Posts Tagged ‘redistribution’
Update: Redistribution case studies are now available in the workbook starting here. More will be added to the list before class tomorrow.
If you’re not already an All Access Pass member then you can sign up here for a free trial here. AAP access includes not only access to the live RSv5 ATC class I’m currently running and the streaming playlist of the RSv5 ATC, but also include streaming access to our entire video library of literally thousands of hours of content – and growing.
The direct URL for live class tomorrow is http://live.ine.com. Remember the big advantage of attending the class live is that you get to ask me questions in real-time. I hope to see you there!
What is the major difference in using an E1 route over an E2 route in OSPF?
From what I’ve observed, if you redistribute a route into OSPF either E1 or E2, the upstream router will still use the shortest path to get to the ASBR regardless of what is shown in the routing table.
The more I read about this, the more confused I get. Am I missing something?
This is actually a very common area of confusion and misunderstanding in OSPF. Part of the problem is that the vast majority of CCNA and CCNP texts teach the theory that for OSPF path selection of E1 vs E2 routes, E1 routes use the redistributed cost plus the cost to the ASBR, while with E2 routes only use the redistributed cost. When I just checked the most recent CCNP ROUTE text from Cisco Press, it specifically says that “[w]hen flooded, OSPF has little work to do to calculate the metric for an E2 route, because by definition, the E2 route’s metric is simply the metric listed in the Type 5 LSA. In other words, the OSPF routers do not add any internal OSPF cost to the metric for an E2 route.” While technically true, this statement is an oversimplification. For CCNP level, this might be fine, but for CCIE level it is not.
The key point that I’ll demonstrate in this post is that while it is true that “OSPF routers do not add any internal OSPF cost to the metric for an E2 route”, both the intra-area and inter-area cost is still considered in the OSPF path selection state machine for these routes.
One of the most popular series on this blog site is the Redistribution series by Petr Lapukhov.
I wanted to share a document that helped one of my recent, incredibly dedicated, 12 Day Bootcamp students, Sean Coetzee. Thanks for sharing Sean!
The leading question:
“Is it possible (and if so, how) to redistribute or originate a default route based on time of day?”
The short answer is “Sure, why not?”… But the longer answer has to do with how do we warp the forces of the universe to make that happen???
Well, start with what we know. We know we can do time-ranges in access-lists, right? Can we do them in standard access-lists (what we see used for redistribution all the time)?
Rack1R1(config-if)#exit Rack1R1(config)#access-list 1 permit 172.16.0.0 0.15.255.255 ? log Log matches against this entry <cr> Rack1R1(config)#
Nope. There’s a bummer. So we will need to use EXTENDED ACL’s in order to make this work. So now we are reaching the point of “Yes, it can be done, but it will make my head hurt.” as the answer.
First, as a little review, check out a blog we did last year providing some information on that sort of thing in conjunction with a distribute-list in different routing protocols.
For the benefit of those who do not have access to the lab below is the task and the diagram:
4.11. IGP Redistribution
• Redistribute between RIP and OSPF on SW1.
• Redistribute between OSPF and EIGRP on R2, R3, and R4.
• Ensure that full reachability is maintained throughout the IGP domain when the Frame Relay circuit between R3 and R5 is down.
First off this task is only worth 3 points but will take most people 45 minutes to 1 hour to complete due to the fact the requirements create a routing loop. This means that it’s really not worth 3 points in the real lab due to the fact you’re giving away 1 hour of your 8 hours for just 3 points. In the real lab most people would be better off just getting full IP reachability and moving on. Think about it like this. If you could give up 3 points in every lab and implement you own solution to obtain full IP reachability would you be better off?
When you run across a redistribution task in a lab your first goal is to determine what is the minimum redistribution needed to achieve full reachability. This is your “safety net” in the event you are not able to complete the task as required or do not have the time to fully complete the task as required. You can pass the lab without getting these 3 points but you can’t really expect to pass the lab without having full IP reachability.
Since our first goal is just to determine what is needed to obtain full IP reachability lets look at this network and determine where we need to perform redistribution to achieve this. Obviously we must redistribute between RIP and OSPF on SW1 to provide reachability between the OSPF and RIP domains. Since this will be a single point of redistribution between RIP and OSPF and these protocols are only both run on one router (SW1) we will not have any problems. This means we can just redistribute RIP into OSPF, then OSPF into RIP and finally verify our redistribution by viewing the routing tables and doing some basic pinging. No tagging, filtering, distribute-list, etc is needed on SW1.
Once the RIP and OSPF redistribution is finished and verified we should then move onto the EIGRP and OSPF redistribution. Do not make the mistake of moving onto the EIGRP and OSPF redistribution without first verifying your RIP and OSPF redistribution. You must verify each stage of the network as it’s built. If you wait until the end of the IGP section to test for full IP reachability it will be much harder to determine what the cause of the problems are. Think about it like this. If I gave you a network and told you to find 10 errors in it would it be easier to find the 10 errors after I’ve applied all of the configuration or would it be easier to check for the errors as I apply each part of the configuration? If you didn’t answer the latter I would hope you never have aspirations on becoming an airline engine inspector
First off we need to determine what are the minimum points of redistribution needed between OSPF and EIGRP to obtain full IP reachability. Normally this is easy to determine but in this network we have a backup link being used. In the real lab we don’t need to worry about redundancy or sub-optimal routing unless specified directly or indirectly. In this case we need to take redundancy into consideration since full IP reachability will need to be obtained when the network is in two different states. The first state is when the backup link is in the standby mode. The second state is when the backup interface is active due to the fact the primary link is down. In this case the backup link is the serial between R4 and R5 and the primary link is the Frame Relay connection between R3 and R5.
Now that we know what items to take into consideration for the EIGRP and OSPF redistribution we can determine that at a minimum EIGRP and OSPF will need to be redistributed on R4 and either R2 or R3. R4 is selected for redistribution because when the backup link is active it will need to provide connectivity between R5 and the rest of the network.
Where we start having problems is with the redistribution on R2 or R3 so lets look at what the problem is. OSPF routes going into EIGRP will not present a problem because once the OSPF routes are in EIGRP they will have a higher AD. Remember that the problems with redistribution occur when we take a higher AD protocol and then redistribute it into a lower AD protocol and finally attempt to redistribute it back into the original higher AD protocol (Higher->Lower->Higher). In this case the OSPF routes will have an AD of 170 when redistributed into EIGRP. Since the AD of EIGRP external is 170 these routes will not overtake the original OSPF routes. So lower AD protocol to higher AD protocol isn’t a problem. For those who have always wondered why the external distance of EIGRP is 170 now you know
Now that we know we shouldn’t have any problems with the OSPF routes going into EIGRP we next need to consider if we’ll have any problems with EIGRP routes going into OSPF. By default EIGRP internal routes have an AD of 90 and an AD of 170 for external routes. This being the case we’ll need to consider the higher->lower->higher problem for both types of routes (internal and external). For the internal EIGRP routes there won’t be a problem since we will be going from a lower AD protocol to higher AD protocol. It’s the external EIGRP routes that weren’t originally OSPF routes. In this lab a previous task asked for the Ethernet segments (E0/0 and E0/1) on R5 to be redistributed into EIGRP. These are the routes which we will see that create the routing loop problem.
We should now be able to see what the problem is. It’s the external EIGRP routes being redistributed into OSPF and then possibly back into EIGRP. This is because we have the higher->lower->higher situation. The higher (external EIGRP) going into a lower (OSPF) and finally back into a higher (external EIGRP).
To illustrate the problem I have mutual redistribution configured between EIGRP and OSPF on both R2 and R3. We can see from the output below that R2 and R3 can not reach R5′s E0/0 interface but they can reach R5′s Loopback0 interface. The only difference is the Loopback is an internal EIGRP route while the Ethernet is an external EIGRP route. This is exactly what we expected to happen.
Rack1R2#traceroute 126.96.36.199 ttl 1 10 Type escape sequence to abort. Tracing the route to 188.8.131.52 1 184.108.40.206 16 msec 17 msec 16 msec 2 220.127.116.11 36 msec 32 msec 36 msec 3 18.104.22.168 32 msec 32 msec 32 msec 4 22.214.171.124 52 msec 56 msec 52 msec 5 126.96.36.199 48 msec 48 msec 48 msec 6 188.8.131.52 68 msec 68 msec 68 msec 7 184.108.40.206 64 msec 68 msec 64 msec 8 220.127.116.11 88 msec 88 msec 84 msec 9 18.104.22.168 105 msec 96 msec 96 msec 10 22.214.171.124 120 msec 104 msec 101 msec Rack1R2# Rack1R2#traceroute 126.96.36.199 ttl 1 10 Type escape sequence to abort. Tracing the route to 188.8.131.52 1 184.108.40.206 16 msec 16 msec 16 msec 2 220.127.116.11 44 msec * 44 msec Rack1R2# Rack1R3#traceroute 18.104.22.168 ttl 1 10 Type escape sequence to abort. Tracing the route to 22.214.171.124 1 126.96.36.199 28 msec 32 msec 28 msec 2 * * * 3 188.8.131.52 44 msec 48 msec 44 msec 4 * * * 5 184.108.40.206 60 msec 64 msec 64 msec 6 * * * 7 220.127.116.11 76 msec 84 msec 81 msec 8 * * * 9 18.104.22.168 269 msec 128 msec * 10 * * * Rack1R3# Rack1R3#traceroute 22.214.171.124 ttl 1 10 Type escape sequence to abort. Tracing the route to 126.96.36.199 1 188.8.131.52 32 msec * 28 msec Rack1R3#
Now that we know what the problem is we need to consider all of the possible solutions and implement the simplest solution. First off we could break this potential routing loop by just removing redistribution from R2. The output below shows the traceroutes from R2 and R3 to R5 when redistribution has been removed from R2.
Rack1R2#traceroute 184.108.40.206 ttl 1 10 Type escape sequence to abort. Tracing the route to 220.127.116.11 1 18.104.22.168 16 msec 16 msec 16 msec 2 22.214.171.124 44 msec * 60 msec Rack1R2#traceroute 126.96.36.199 ttl 1 10 Type escape sequence to abort. Tracing the route to 188.8.131.52 1 184.108.40.206 28 msec 32 msec 28 msec 2 220.127.116.11 56 msec * 56 msec Rack1R2# Rack1R3#traceroute 18.104.22.168 ttl 1 10 Type escape sequence to abort. Tracing the route to 22.214.171.124 1 126.96.36.199 28 msec * 28 msec Rack1R3#traceroute 188.8.131.52 ttl 1 10 Type escape sequence to abort. Tracing the route to 184.108.40.206 1 220.127.116.11 32 msec * 28 msec Rack1R3#
It may seem like everything is working now but there is actually another problem that we need to resolve. R6 is not getting the external EIGRP routes originated by R5′s.
Rack1R6#show ip route 18.104.22.168 % Subnet not in table Rack1R6#show ip route 22.214.171.124 Routing entry for 126.96.36.199/24 Known via "eigrp 10", distance 90, metric 21154560, type internal Redistributing via eigrp 10 Last update from 188.8.131.52 on FastEthernet0/0.26, 00:14:03 ago Routing Descriptor Blocks: * 184.108.40.206, from 220.127.116.11, 00:14:03 ago, via FastEthernet0/0.26 Route metric is 21154560, traffic share count is 1 Total delay is 45100 microseconds, minimum bandwidth is 128 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 5/255, Hops 3 Rack1R6#
So lets look back at the first router who should be receiving them and view it’s routing table.
Rack1R3#show ip route 18.104.22.168 Routing entry for 22.214.171.124/24 Known via "eigrp 10", distance 170, metric 2560512256, type external Redistributing via ospf 1, eigrp 10 Advertised by ospf 1 subnets Last update from 126.96.36.199 on Serial1/1.1, 00:43:58 ago Routing Descriptor Blocks: * 188.8.131.52, from 184.108.40.206, 00:43:58 ago, via Serial1/1.1 Route metric is 2560512256, traffic share count is 1 Total delay is 20010 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 1 Rack1R3#show ip route 220.127.116.11 Routing entry for 18.104.22.168/24 Known via "eigrp 10", distance 90, metric 20640000, type internal Redistributing via ospf 1, eigrp 10 Advertised by ospf 1 subnets Last update from 22.214.171.124 on Serial1/1.1, 20:48:19 ago Routing Descriptor Blocks: * 126.96.36.199, from 188.8.131.52, 20:48:19 ago, via Serial1/1.1 Route metric is 20640000, traffic share count is 1 Total delay is 25000 microseconds, minimum bandwidth is 128 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 5/255, Hops 1 Rack1R3#
So R3 has them. Next lets go to R2 and view it’s routing table.
Rack1R2#show ip route 184.108.40.206 Routing entry for 220.127.116.11/24 Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 64 Last update from 18.104.22.168 on Serial0/0, 00:02:36 ago Routing Descriptor Blocks: * 22.214.171.124, from 126.96.36.199, 00:02:36 ago, via Serial0/0 Route metric is 20, traffic share count is 1 Rack1R2#show ip route 188.8.131.52 Routing entry for 184.108.40.206/24 Known via "eigrp 10", distance 90, metric 21152000, type internal Redistributing via eigrp 10 Last update from 220.127.116.11 on Serial0/1, 21:14:51 ago Routing Descriptor Blocks: * 18.104.22.168, from 22.214.171.124, 21:14:51 ago, via Serial0/1 Route metric is 21152000, traffic share count is 1 Total delay is 45000 microseconds, minimum bandwidth is 128 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 5/255, Hops 2 Rack1R2#
R2 has the external EIGRP route (R5′s Ethernet0/0) as an OSPF route and the internal EIGRP route (R5′s Loopback0) still as an internal EIGRP route. This is what we expect to happen since the OSPF route has an AD of 110 and the external EIGRP route has an AD of 170. But why doesn’t R6 get the 126.96.36.199/24 route? R6 doesn’t get the route because EIGRP is not sending it due to the fact the route isn’t in the routing table as an EIGRP route. This is important to understand so let me repeat it. When EIGRP goes to send an update to it’s neighbors it selects the routes from the IP routing table and not the EIGRP topology table. This is the same behavior as RIP in that the route must be in the routing table as a RIP route or a connected route advertised by RIP before it can be sent. So what routes is EIGRP sending? It’s going to send the directly connected routes that EIGRP is advertising from the network statement under the routing process and the dynamically learned EIGRP routes in the routing table. Of course it will not send the EIGRP routes from the routing table back out the same interface they were learned on due to split horizon. So this is why the 188.8.131.52/24 route does not get advertised onto R6 even though EIGRP has the route from R3 in it’s topology table.
Rack1R2#show ip eigrp topology 184.108.40.206/24 IP-EIGRP (AS 10): Topology entry for 220.127.116.11/24 State is Passive, Query origin flag is 1, 0 Successor(s), FD is 4294967295 Routing Descriptor Blocks: 18.104.22.168 (Serial0/1), from 22.214.171.124, Send flag is 0x0 Composite metric is (2561024256/2560512256), Route is External Vector metric: Minimum bandwidth is 1 Kbit Total delay is 40010 microseconds Reliability is 1/255 Load is 1/255 Minimum MTU is 1 Hop count is 2 External data: Originating router is 126.96.36.199 AS number of route is 0 External protocol is Connected, external metric is 0 Administrator tag is 0 (0x00000000) Rack1R2#
The goal of any solution to this problem is to ensure that the 188.8.131.52/24 route is installed into R2′s routing table as an EIGRP route. Basically there are a few standard methods we could use to achieve this goal so lets list them out:
1) Administrative distance
Using administrative distance there are multiple ways to resolve the problem. Below I’ve listed a few of them.
1) Change the administrative distance of the external EIGRP routes to be lower than the OSPF routes on R2.
2) Change the administrative distance of the external OSPF routes to be higher than the external EIGRP routes on R2.
3) Change the administrative distance for all of the OSPF routes to be higher than the external EIGRP routes on R2.
4) Change the administrative distance of just the OSPF routes originated by R3 on R2.
5) Change the administrative distance of just the 184.108.40.206/24 OSPF route on R2.
6) Change the administrative distance of just the 220.127.116.11/24 OSPF route originated by R3 on R2.
As we can see there are a lot of options using AD to ensure the 18.104.22.168/24 gets installed into R2′s routing table as an EIGRP route. If we were to select one of the options, option 6 would be the best. The reason 6 would be the best option is because it’s the most specific option. We normally want to select the most specific solution as we don’t want to implement a solution that could effect other routes. There are actually a couple schools of thought on this and both could be considered correct. The other way of looking at it would be to select the simplest solution regardless of what other routes it effects. Personally I prefer to select the most precise solution assuming that it’s not overly complicated.
Let’s look at what option 6 applied to R2:
Rack1R2(config)#ip access-list standard OSPF_AD Rack1R2(config-std-nacl)#permit 22.214.171.124 Rack1R2(config-std-nacl)#router ospf 1 Rack1R2(config-router)# distance 171 126.96.36.199 0.0.0.0 OSPF_AD Rack1R2(config-router)#^Z Rack1R2# Rack1R2#show ip route 188.8.131.52 Routing entry for 184.108.40.206/24 Known via "eigrp 10", distance 170, metric 2561024256, type external Redistributing via eigrp 10 Last update from 220.127.116.11 on Serial0/1, 00:01:24 ago Routing Descriptor Blocks: * 18.104.22.168, from 22.214.171.124, 00:01:24 ago, via Serial0/1 Route metric is 2561024256, traffic share count is 1 Total delay is 40010 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 2 Rack1R2#show ip ospf database external 126.96.36.199 OSPF Router with ID (188.8.131.52) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 1513 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 184.108.40.206 (External Network Number ) Advertising Router: 220.127.116.11 LS Seq Number: 80000001 Checksum: 0x6F09 Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0 Rack1R2#
Now the route is in R2′s routing table as an EIGRP route R6 should have learned it from R2. R6 should also now be able to reach R5 E0/0.
Rack1R6#show ip route 18.104.22.168 Routing entry for 22.214.171.124/24 Known via "eigrp 10", distance 170, metric 2561026816, type external Redistributing via eigrp 10 Last update from 126.96.36.199 on FastEthernet0/0.26, 00:02:08 ago Routing Descriptor Blocks: * 188.8.131.52, from 184.108.40.206, 00:02:08 ago, via FastEthernet0/0.26 Route metric is 2561026816, traffic share count is 1 Total delay is 40110 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 3 Rack1R6#traceroute 220.127.116.11 Type escape sequence to abort. Tracing the route to 18.104.22.168 1 22.214.171.124 0 msec 4 msec 4 msec 2 126.96.36.199 16 msec 20 msec 16 msec 3 188.8.131.52 48 msec * 44 msec Rack1R6#
We can see that the administrative distance solution works. Now lets look at the filtering option and remove the administrative distance solution. The simplest filtering option would be to not allow R2 to install the 184.108.40.206/24 OSPF route into it’s routing table.
Rack1R2(config)#ip access-list standard OSPF_FILTER Rack1R2(config-std-nacl)#deny 220.127.116.11 Rack1R2(config-std-nacl)#permit any Rack1R2(config-std-nacl)#router ospf 1 Rack1R2(config-router)#distribute-list OSPF_FILTER in Rack1R2(config-router)#^Z Rack1R2#show ip route 18.104.22.168 Routing entry for 22.214.171.124/24 Known via "eigrp 10", distance 170, metric 2561024256, type external Redistributing via eigrp 10 Last update from 126.96.36.199 on Serial0/1, 00:00:06 ago Routing Descriptor Blocks: * 188.8.131.52, from 184.108.40.206, 00:00:06 ago, via Serial0/1 Route metric is 2561024256, traffic share count is 1 Total delay is 40010 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 2 Rack1R2#
The next option we listed was to use summarization. Before we do that I’ll remove the distribute list and then summarize the 220.127.116.11/24 route to 18.104.22.168/23 when it’s advertised by OSPF on R3. By doing this R2 will receive the 22.214.171.124/24 via external EIGRP from R3 over the serial and the 126.96.36.199/23 via OSPF from R3 over the Frame Relay link. Since the external EIGRP route is more specific R2 will use it to reach R5′s E0/0 interface and in turn advertise the route onto R6.
Rack1R3(config)#router ospf 1 Rack1R3(config-router)#summary-address 188.8.131.52 255.255.254.0 Rack1R2#show ip route 184.108.40.206 Routing entry for 220.127.116.11/24 Known via "eigrp 10", distance 170, metric 2561024256, type external Redistributing via eigrp 10 Last update from 18.104.22.168 on Serial0/1, 00:00:21 ago Routing Descriptor Blocks: * 22.214.171.124, from 126.96.36.199, 00:00:21 ago, via Serial0/1 Route metric is 2561024256, traffic share count is 1 Total delay is 40010 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 2 Rack1R2#show ip route 188.8.131.52 Routing entry for 184.108.40.206/23 Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 64 Last update from 220.127.116.11 on Serial0/0, 00:00:26 ago Routing Descriptor Blocks: * 18.104.22.168, from 22.214.171.124, 00:00:26 ago, via Serial0/0 Route metric is 20, traffic share count is 1 Rack1R2# Rack1R6#show ip route 126.96.36.199 Routing entry for 188.8.131.52/24 Known via "eigrp 10", distance 170, metric 2561026816, type external Redistributing via eigrp 10 Last update from 184.108.40.206 on FastEthernet0/0.26, 00:00:39 ago Routing Descriptor Blocks: * 220.127.116.11, from 18.104.22.168, 00:00:39 ago, via FastEthernet0/0.26 Route metric is 2561026816, traffic share count is 1 Total delay is 40110 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 3 Rack1R6#traceroute 22.214.171.124 Type escape sequence to abort. Tracing the route to 126.96.36.199 1 188.8.131.52 0 msec 4 msec 0 msec 2 184.108.40.206 16 msec 16 msec 16 msec 3 220.127.116.11 48 msec * 44 msec Rack1R6#
Technically we could have not allowed the 18.104.22.168/24 route from being redistributed into OSPF on R3 by filtering it with a route-map. Additionally we could have also used the “not-advertise” option on the summary command to summarize the route but not advertise. This is basically just a different way of filtering since the not-advertise option summarizes the routes but doesn’t advertise the summary.
To this point we have achieve full IP reachability but we have not met the requirements of the task. The task stated that redistribution should be done on both R2 and R3. We’ve only done it on R3. Now we need to perform redistribution on R2. We will need to implement whatever solution we used on R3 on R2.
Rack1R2(config)#router ospf 1 Rack1R2(config-router)#redistribute eigrp 10 subnets Rack1R2(config-router)#summary-address 22.214.171.124 255.255.254.0 Rack1R2(config-router)# Rack1R2(config-router)#router eigrp 1 Rack1R2(config-router)#redistribute ospf 1 metric 1 1 1 1 1 Rack1R2(config-router)#
We can now verify that we still have reachability from R6:
Rack1R6#show ip route 126.96.36.199 Routing entry for 188.8.131.52/24 Known via "eigrp 10", distance 170, metric 2561026816, type external Redistributing via eigrp 10 Last update from 184.108.40.206 on FastEthernet0/0.26, 00:00:04 ago Routing Descriptor Blocks: * 220.127.116.11, from 18.104.22.168, 00:00:04 ago, via FastEthernet0/0.26 Route metric is 2561026816, traffic share count is 1 Total delay is 40110 microseconds, minimum bandwidth is 1 Kbit Reliability 1/255, minimum MTU 1 bytes Loading 1/255, Hops 3 Rack1R6#traceroute 22.214.171.124 Type escape sequence to abort. Tracing the route to 126.96.36.199 1 188.8.131.52 4 msec 0 msec 4 msec 2 184.108.40.206 16 msec 16 msec 20 msec 3 220.127.116.11 48 msec * 44 msec Rack1R6#
We can now do a full reachabilty test to ensure everything is reachable. We will also need to do another reachabilty test when the backup link is active. Before we do that we should implement the same solution we used to stop the routing loop on R2 and R3 on R4. We do this because when the Frame Relay link between R3 and R5 is down the 18.104.22.168/24 route will be redistributed into OSPF on R4.
Rack1R4(config)#router ospf 1 Rack1R4(config-router)#redistribute eigrp 10 subnets Rack1R4(config-router)#summary-address 22.214.171.124 255.255.254.0 Rack1R4(config-router)# Rack1R4(config-router)#router eigrp 1 Rack1R4(config-router)#redistribute ospf 1 metric 1 1 1 1 1 Rack1R4(config-router)#
I need to add that for simplicity I only discussed the solution in regards to the 126.96.36.199/24 network but in the full solution we would need to consider the other network that is being redistributed into EIGRP on R5 (188.8.131.52/24). Also you may have noticed that the routing loop problem only occurred because a previous task asked us to redistributed the connected Ethernet interfaces into EIGRP on R5. If we would have just solved that 2 point task by advertising it natively using network statements we wouldn’t have had any routing loop problems and only lost the 2 points
Lastly you will find similar in-depth discussions added to the new IEWB-RS Volume II version 5 in regards to route redistribution. It’s important that everyone understands not only the solution we chose but what problems the solution is resolving along with any other possible solutions.
UPDATE: For more information on Redistribution see the video series Understanding Route Redistribution – Excerpts from CCIE R&S ATC
Simple Redistribution Step-by-Step
We’re going to take our basic topology from the previous post Understanding Redistribution Part I , and configure to provide full connectivity between all devices with the most simple configuration. Then we are going to tweak some settings and see how they affect redistribution and optimal routing. This is going to be an introductory example to illustrate the redistribution control techniques mentioned previously.
UPDATE: For more information on Redistribution see the video series Understanding Route Redistribution – Excerpts from CCIE R&S ATC
Abstract: Describe the purpose of redistribution and the issues involved.
Prerequisites: Good understanding of IGP routing protocols (OSPF, EIGRP, RIPv2).
Let’s start straight with a rolling out a group of definitions. Redistribution is a process of passing the routing information from one routing domain to another. The ultimate goal of redistribution is to provide full IP connectivity between different routing domains. Another goal (not always required, though) is to provide redundant connectivity, i.e. backup paths between routing domains. Routing domain is a set of routers running the same routing protocol. Redistribution process is performed by border routers – i.e. routers belonging to more than one routing domain. On the contrary, internal routers belong just to one routing domain. Redistribution may be one-way (from one domain to another but not vice-versa) or two-way (bi-directional). Next, internal routes are the IGP prefixes native to a routing protocol; i.e. they are originated by IGP’s natural method, and their respective subnets belong to the IGP routing domain. External routes are the IGP prefixes injected into IGP routing domain via a border router – they have no corresponding IP subnets in the routing domain. They appear to be “attached” somehow to the border router that has originated them, and detailed information about their reachability is “compressed” and lost during the redistribution. Transit routing domain is the domain used as path to transport packets between two other routing domains. Domain becomes transit when two border routers perform bi-directional redistribution with two other routing domains. Stub routing domain is configured not to transit packets (effectively by blocking transit redistribution) between two other domains.
Let’s look at a picture to clarify the concepts.
The routing domains on the picture are described in the following table:
Examples of internal routers are R1, R6, BB2. The border routers on the picture are reflected in the following table:
|Protocol||OSPF||EIGRP 356||EIGRP 123||RIPv2|
We will further use the figure and the tables for reference. Note that each domain on Fig 1.1 may be configured to be either transit or stub. For example, if we configure bi-directional redistribution on R3 between RIPv2 and OSPF and also on R2 between EIGRP 123 and OSPF, the OSPF domain will become transit point between two other domains. However, if we take R2 and R3, and configure R2 and R3 to send default routes into EIGRP 123, while redistributing EIGRP 123 into OSPF, we will make EIGRP 123 a stub domain.
What is redistribution needed for?
As we mentioned, the goal is to provide full connectivity between different routing domains. Usually, redistribution is needed when you merge two networks or migrate your network from one routing protocol to another. As such, redistribution is usually deemed to be a temporary solution. However, in reality, we often find that there is nothing more permanent than a temporary solution. And with the respect to CCIE lab exam, you are simply forced to face the redistribution, since the lab scenarios almost anytime involve a number of IGPs running on the topology. Note a very important “functional” property of redistribution: effectively, redistribution is used to “broadcast” the complete routing information among all the routing domain in a given topology.
What are the problems with redistribution?
a) Suboptimal routing
As it has been mentioned already, the external routes have no detailed information about their reachability. Even more, their original routing metric (e.g. cost) has to be converted to the native metric (e.g. to hop count). This is where a concept of seed metric appears. Seed metric is the initial metric assigned to external routes, redistributed into internal protocol (e.g. under RIP routing process: redistribute ospf 1 metric 1). In effect, external prefixes appear to be “attached” to the advertising border router, with “native” seed metric assigned. Due to such “simplifications”, and loss of detailed information, suboptimal routing may occur.
For our example, take EIGRP 123 routing domain. If RIPv2 routes enter EIGRP 123 domain by transiting OSPF and EIGRP 356 domains, packets from R1 to BB2 may take path R1->R2->R4->BB2 (if R2 sets better seed metric). In some worse cases, this route may even take path R1->R2->R3->R5->BB2 (if R2 thinks RIPv2 external routes transiting EIGRP 356 and redistributed into OSPF are better than RIPv2 injected into OSPF by R4) . Sometimes, due to asymmetric redistributions packets may take one path in forward direction and the other in the backward (e.g. packets from R1 to BB2 flow R1->R2->R4->BB2 and packets from BB2 to R1 flow BB2->R5->R3->R1).
b) Routing Loops
The other, more dangerous problem, is possibility that routing loops they may appear due to redistribution. Every routing protocol is able to converge to a loop-free routing only if it has full information on the existing topology. OSPF needs a complete link-state view of the intra-area topologies and star-like connectivity of non-backbone area to Area0. EIGRP requires a to carry out diffusing computations on all the routers in order to provide a loop free routing. RIP slow converges by executing a Bellman-Ford algorithm (gradient-driven optimization) on a whole topology. Since redistribution squashes and hides the original information, no IGP could guarantee a loop-free topology. Loops usually occur when IGP native information (internal routes) re-enter the routing domain as external prefixes due to use of two-way redistribution. The last important thing to note: external routes are always redistributed in a “distance-vector” fashion – i.e. advertised as a vector of prefixes and associated distances, even with link-state protocols.
Imagine that R4, R5 and R3 are configured for bi-directional redistribution between OSPF, RIPv2 and EIGRP 356 respectively. In effect, RIPv2 routes may transit EIGRP and OSPF, and appear on R4 as OSPF routes. Due to OSPF higher AD, they will be preferred at R4 over native routes, and will leak into RIPv2 domain. Further, BB2 may prefer those “looped back” routes (if say R4 is closer to BB2 than R5) and try to reach R5 connected interfaces via R4->R3. But thanks to two-way redistribution R3 will think R5 is better being reached via R4 – a loop is formed.
Is there a way to overcome those issues?
The answer is – “yes, by using a carefully designed redistribution policy”. Since routing protocols could not find and isolate the inter-domain loops, we either need to invent a new “super-routing” protocol, running on top of all IGPs (they call it BGP actually, and use to redistribute routing information between autonomous systems), or configure redistribution so that no routing loops would potentially occur and (hopefully) routing become “somewhat” optimal. We are going to describe a set of heuristics (rules of thumb) that could help us designing loop-less redistribution schemes. We start with the concept of administrative distance.
Administrative distance is a special preference value that allows selection of one protocols prefixes over another. This feature definitely needed on border routers (running multiple IGPs), which may receive the same prefixes via different IGPs. Cisco has assigned some default AD values to it’s IGPs (EIGRP, OSPF, RIPv2: 90, 110, 120), but we’ll see how this should be changed in accordance with policy. For now, we should note that two protocols – OSPF and EIGRP – offer capability to assign different administrative distance values to internal and external prefixes, thanks to their property to distinguish internal and external routes. This is a very powerful feature, which we are going to use extensively during our redistribution policy design.
Here comes our first rule of thumb. Rule 1: Router should always prefer internal prefix information over any external information. Clearly this is because external information is condensed and incomplete. For our example, if R4 receives a native prefix via RIPv2 and the same prefix via OSPF, it should prefer RIPv2 information over OSPF, even though OSPF has better AD than RIPv2 by default. This is easy to implement, thanks to the fact that we can change OSPF external AD independently of OSPF internal AD. The same rule holds true for any internal router: (not just for border routers) always prefer internal information over external for the same prefix. For example if R2 Loopback0 is advertised as native into EIGRP 123 and OSPF, and then redistributed into OSPF via R3 somehow, R4 should be configure so that OSPF external AD is higher than internal AD, and so that internal prefix is always preferred. This rule also eliminates suboptimal routing, by making sure no “dubious” paths are selected to reach a prefix. Effectively it is implemented so that all protocol external ADs are greater than any protocol internal AD (e.g. OSPF External AD > RIP Internal AD, EIGRP External AD > RIP Internal AD etc). However, RIPv2 has no notion of external routes.
So how could we implement this rule with RIPv2? First we should ensure that RIP AD is always greater than any other protocols external AD – on border routers, where this is needed. Next we need to configure so that RIPv2 internal routes have AD less that any other protocols external AD. To do this, we can take an access-list, enumerate all RIPv2 prefixes, and selectively assign a lower AD to those prefixes. Again, note that this procedure is needed on border routers only, and that you can re-use the access-list. Next, we need to make sure that inside a RIPv2 domain external routes are always considered worse than internal. We can effectively implement this by assigning a relatively high seed metric to redistributed (external) routes – say 8 hops. Since RIP topologies of large diameter are rare, it’s safe to assume with our policy that any prefix with metric (hop count) > 8 is an external one. (We may even use this property to distinguish RIPv2 internal prefixes in route-maps, thank to match metric feature).
Next rule of thumb is known as Rule 2: Split-Horizon – Never redistribute a prefix injected from domain A into B back to domain A. This rule is targeted to eliminate “short” loops, by preventing the routing information leaked out of a routing domain to re-enter the same domain via some other point. For out example, it R2 and R3 are doing a two-way redistribution, we may want to prohibit EIGRP routes to transit the OSPF domain and enter the EIGRP domain again. This kind of situations occurs when two routing domains have more than one point of mutual redistribution. While the rule could be implemented playing with AD values or matching only internal routs in route-maps, it’s easier and more generic to use tagged routes and filter based on tag information. For example we may tag EIGRP 123 routes injected into OSPF with the tag value of “123″ and then configure to block routes with this tag, when redistributing from OSPF into EIGRP 123. Additionally, we tag OSPF routes with tag 110 when sending them to EIGRP 123 domain, and block routes with the same tag entering back the OSPF domain. While this rule may seem to be effective on detecting only “short” loops, it could be used to develop a simple, yet loop-free redistribution strategy.
First, recall how OSPF behaves with respect to inter-area routes exchange. In essence, all areas are linked to a backbone and form a star – loop-free – topology. OSPF then safely passes down the areas summary LSA using the distance-vector behavior, and never advertises those LSA back into backbone. This way, the core knows all the routing information and redistributes it down to leaves. And thanks to a loop-free “skeleton” we are guaranteed to never face any routing loops even with distance-vector advertisements. Now we can reuse this idea among the heterogenous routing domains. Take one routing domain and make it the center of the new star – in essence, make it the only transit domain in the topology. The other domains will effectively become “stub” domains, using our previous definitions – i.e. they exchange routes only with the core routing domain. Proceed with configuring two-way redistribution on border routers (enable route prefix exchange). If a given domain has more than one point of attachment to the star core (the backbone), configure to implement Rule 2 on border routers. Next, implement Rule 1 on border routers, to avoid suboptimal routing issues. That does the trick! For our example, we may configure mutual redistribution on R2 (EIGRP 123 and OSPF), R3 (EIGRP 123 and OSPF), R4 (RIPv2 and OSPF). We will then need to implement tag-based filtering on R2 and R3, as well as tune ADs in accordance with Rule 1. The detailed configuration examples will follow in the further publications.
Okay, now what if we don’t have a “central” routing domain attached to all other domains in topology? Let’s say R3 is not running OSPF in our example, and we have all routing domains connected in “ring” fashion. In short, the same idea still may be utilized, by replacing pure “star-like” topology with “tree”. Tree is loop-less too, so there is a guarantee that no loops will form. We are going to discuss this, and other more complicated scenarios in the next publications.
Just a quick question about the “include-connected” command when redistributing IPv6 protocols (especially RIPng and OSPFv3). From the DocCD it says that it allows the quote “target protocol to redistribute routes learned by the source protocol and connected prefixes on those interfaces over which the source protocol is running”. Is there any reason why this is now necessary to do with IPv6 routing protocols, whereas IPv4 routing protocols would automatically advertise the networks of the connected interfaces if the source protocol is running on them. By the way, this blog is a fantastic idea/revison tool. Keep up the excellent work.
In current IOS versions for IPv4 redistribution is a two step process. Let’s suppose that we are trying to redistribute RIPv2 into OSPFv2 by issuing the “redistribute rip subnets” command under the OSPF process. The first thing the router does is to look at the “show ip route rip” output. All of these prefixes are candidate to be redistributed into OSPF. Next the router looks at the “show ip route connected” output. The routes for any connected interfaces from this output running RIPv2 are also candidate to be redistributed into OSPF. In other words, we don’t have to issue the “redistribute connected subnets” to get connected interfaces that run RIP to be sent into the OSPF process.
In previous IOS versions this was not always the case however. In many network designs, especially in service provider environments, transit links themselves are not advertised into the routing domain. Based on this design traffic cannot be sent *to* the network itself, only *through* the network. Over the course of IOS releases however this behavior was mostly updated, and now we see that IPv4 protocols, with the exception of IS-IS, do automatically redistribute their connected interfaces.
For IPv6 whether or not connected links are included in redistribution is up to you at the time of configuration. If we take the previous case for IPv4 and translate it to IPv6 we’ll see that the behavior is not the same. By this I mean that if we issue the “redistribute rip 1” command under the OSPFv3 process, the router will only look at the output of the routes from the “show ipv6 route rip” command, and not the output from the “show ipv6 route connected”. To get connected interfaces to be included in this redistribution we can either issue a separate “redistribute connected” command under OSPFv3, which will take all connected IPv6 interfaces by default, not those just running RIPng, or we can issue the “redistribute rip 1 include-connected” command. This is the preferred design as it gives us more flexibility as to which particular networks we choose to advertise.