|
|
< Day Day Up > |
|
Case Study: RedistributionYou often want to redistribute routes from EIGRP into other protocols and routes from other protocols into EIGRP. The main problem with redistribution between protocols is that it is easy to create redistribution routing loops. Look at Figure 3-23 to see why. Figure 3-23. Redistribution Routing Loop
The list that follows describes the sequence of transactions depicted in Figure 3-23.
With the EIGRP use of an administrative distance of 170 for external sites, the preceding problem should not happen, should it? The example is simplified to make it clear. In reality, when Router D gets the route from Router A, Router D should prefer the route it had already received from RIP because it has an administrative distance of 120. What is the problem? The problem occurs if Router E temporarily loses the route to 172.16.20.0/24 and withdraws it from Router D. If this happens, Router D advertises to Router E the route to 172.16.20.0/24 because of the redistribution from EIGRP. This means that the alternative path is working fine. Unfortunately, because the hop count on the redistribution is set to 1 because of the default metric, when Router E receives the real route back from Router B, it does not use it because the one it received from Router D is better. This is not what you want to happen. This is a classic redistribution routing loop. How do you solve it? The easiest thing to do is to filter the destinations that are redistributed from RIP into EIGRP and from EIGRP into RIP. Using Distribute Lists to Prevent Redistribution Routing LoopsThe first, and simplest, way to handle this problem is to set up a distribute list specifically blocking the routes that you do not want to redistribute. For example, on Router D, you could build the distribute list in Example 3-25. Example 3-25. Using a Distribution List to Block Redistribution Routing Loopsaccess-list 10 deny 172.16.20.0 0.0.0.255 access-list 10 permit any ! router rip redistribute eigrp 100 distribute-list 10 out serial 0 Assuming that Serial 0 is the link between Router D and Router E, this resolves the problem. RIP does not advertise the 172.16.20.0/24 route from Router D to Router E. If you have more than one connection back into the RIP side of the network, it can be difficult to manage the distribution lists that must be maintained. Using Route Maps to Prevent Redistribution Routing LoopsAn alternative to using a distribute list is to configure a route map on Router D, as demonstrated in Example 3-26. Example 3-26. Using a Route Map to Stop a Redistribution Routing Loopaccess-list 10 deny 172.16.20.0 0.0.0.255 access-list 10 permit any ! route-map kill-loops permit 10 match ip address 10 ! router rip redistribute eigrp 100 route-map kill-loops This configuration allows only those networks that are permitted by access list 10 to be redistributed into RIP. This has the same effect as the distribute list used in the preceding solution, but it applies the filter in the redistribution rather than in the advertisement to Router D. Another alternative is to match all external EIGRP routes in the route map, as demonstrated in Example 3-27. Example 3-27. Using a Route Map to Filter External Routesroute-map kill-loops deny 10 match route-type external route-map kill-loops permit 20 However, this approach also destroys any external EIGRP routes that are learned from a protocol other than RIP. In other words, it prevents external destinations elsewhere in the EIGRP network from being reached by the hosts that are attached on the RIP side of the network. Using Prefix Lists to Prevent Redistribution Routing LoopsIn addition to using distribute lists and route maps to troubleshoot redistribution routing loops, you can use prefix lists. For example, you can configure Router D with the prefix lists in Example 3-28. Example 3-28. Using Prefix Lists to Prevent Redistribution Routing Loopsip prefix-list loop-list 10 deny 172.16.20.0/24 ip prefix-list loop-list 20 permit 0.0.0.0/0 le 32 ! route-map kill-loops permit 10 match prefix-list loop-list ! router rip redistribute eigrp 100 route-map kill-loops Prefix lists allow you to match based on prefix length (the subnet mask) and the actual prefix (destination network). Many possibilities for filtering exist when this application is considered, but they are not covered here. Setting the Administrative Distance to Troubleshoot Redistribution Routing LoopsWhereas all the previous mechanisms rely on the configuration (and maintenance) of an access list to prevent a redistribution routing loop, setting the administrative distance of all external routes learned by Router D from Router A does not rely on access lists. You can configure this technique using the distance command. On Router D, you would configure the following: router eigrp 100 distance 255 172.16.21.1 0.0.0.0 If the Router A address is 172.16.21.1, Router D assigns an administrative distance of 255 to any routes that it receives from Router A. A route that has an administrative distance of 255 is never inserted into the routing table; therefore, it is not redistributed into RIP from EIGRP. (Redistribution always occurs from the routing table rather than any private databases that the various routing protocols use.) The only problem with this approach is that Router D refuses all routes learned from Router A, including legitimate ones. You can remedy this by adding the access list back into the equation, as demonstrated in Example 3-29. Example 3-29. Using the distance Command with an Access List to Block Redistribution Loopsaccess-list 10 permit 172.16.20.0 0.0.0.255 ! router eigrp 100 distance 255 172.16.21.1 0.0.0.0 10 By providing an access list that identifies a particular range of addresses and blocks all others from this neighbor, you can accomplish slightly more selective filtering. One additional limitation of this approach is that the distance command is applied to both internal and external routes. Therefore, if you are trying to limit the filtering to stop the receipt of external routes, you cannot use the distance command to accomplish it. Using External Flags to Prevent Redistribution Routing LoopsAll of the previously mentioned troubleshooting methods work, but they require either configuring a list of networks or removing the alternative route through the other protocol as a possible backdoor route in the case of failure. Tagging EIGRP externals to block routing loops resolves these two problems and is fairly straightforward to configure. Connecting Router A to Router B and Router C to Router D has recently merged the two networks in Figure 3-24. At some point in the future, the network administrators intend to replace RIP with EIGRP; for now, they are redistributing between RIP and EIGRP on Routers A and C. Figure 3-24. Complex Redistribution Routing Loop
This setup produces a classic redistribution routing loop:
Almost all of the EIGRP network in this figure uses addresses from the 10.1.0.0/16 address space, and almost all of the RIP network uses addresses from the 10.2.0.0/16 address space. However, some exceptions exist, such as the 10.1.4.0/24 network. If it were not for the exceptions, this redistribution routing loop would be easy to resolve. You would simply prevent Router A and Router C from advertising routes in the 10.2.0.0/16 address range to Router B and Router D and prevent Router B and Router D from advertising routes in the 10.1.0.0/16 address range to Router A and Router C. Distribution lists combined with summarization would make this configuration easy. Because of the exceptions, though, preventing this redistribution routing loop is more difficult. You could build distribution lists around the subnets present on each side and apply them on Router A, Router B, Router C, and Router D, but this adds some serious administrative overhead if many exceptions exist. Specific distribution lists would also require modification for each new exception added. It is easier to use an automatic method to flag the routes learned through RIP on Router A and Router C. Then you can prevent any route that is flagged from being redistributed back into RIP. For example, Router A still learns about the 10.1.100.0/24 network through EIGRP and advertises this destination to Router B through RIP. Router B still advertises 10.1.4.0/24 to Router A, which redistributes it into EIGRP and advertises it to Router C. However, Router A flags this route as coming from the RIP domain so that Router C does not advertise it back into RIP. Using some sort of tag like this means that adding a new network in the RIP AS should not require reconfiguration on the routers that are doing the redistribution. This type of routing loop is a good use for EIGRP administrator tags. Administrator tags are applied and matched using route maps. On Router A and Router C, you create the route maps and then apply them to the redistribution between EIGRP and RIP by issuing the commands in Example 3-30. Example 3-30. Setting Administrative Tags on Redistributionroute-map setflag permit 10 set tag 1 route-map denyflag deny 10 match tag 1 route-map denyflag permit 20 The setflag route map sets the administrator tag on any route to 1, whereas the denyflag route map denies routes with a flag of 1 and permits all others. On Router A and Router C, you apply these route maps to the redistribution between EIGRP and RIP by issuing the commands in Example 3-31. Example 3-31. Applying Tag Filtering on Redistributionrouter eigrp 4000 redistribute rip route-map setflag router rip redistribute eigrp 4000 route-map denyflag As routes are redistributed from RIP to EIGRP, the setflag route map is applied, setting the EIGRP administrative tag to 1. As the routes are redistributed from EIGRP to RIP, the administrative tag is checked; if it is 1, the route is denied so that it is not redistributed. |
|
|
< Day Day Up > |
|