This example is very similar to the one shown for RIP, but IGRP has a multitude of metrics (k1-k5) that must be set in order for distribution to work properly. The five IGRP metrics are as follows:
Redistributing Routes Between Domains
Use route maps when you want detailed control over how routes are redistributed between routing processes. The destination routing protocol is the one you specify with the router global configuration command. The source routing protocol is the one you specify with the redistribute router configuration command. See the following example as an illustration of how route maps are configured.
The route map is a method used to control the redistribution of routes between routing domains. The format of a route map is as follows:
route-map map-tag [[permit | deny] | [ sequence-number]]
When you are passing routes through a route map, a route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified or you may use a permit depending upon your requirements.
When redistributing routes into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.
Avoiding Redistribution Loops
Even though trying to avoid this situation is a golden rule for route redistribution, it does happen. To summarize what exactly is occurring, realize that Router A is distributing network 22.214.171.124 into the RIP network. Router B then sees it advertised by RIP as a valid destination, so it tells the OSPF network that it can reach it. This results in a very nasty routing loop as illustrated in Figure 6-4.
The initial configuration of Router A would have been as follows:
Router A (config)# router ospf 10 redistribute rip subnets network 126.96.36.199 0.0.255.255 area 0
As already mentioned, this configuration would result in a routing loop caused by the uncontrolled redistribution. To prevent this, some modifications will have to be made as indicated below, this time to Router B:
Router B (config)# router ospf 10 redistribute rip subnets network 188.8.131.52 0.0.255.255 area 0 distribute-list 1 out rip access-list 1 deny 184.108.40.206 access-list 1 permit any
The distribute-list commands were designed specifically to filter routing updates based upon an access list, in this case access list 1.
But what did these commands actually do? Simply put, the distribute-list 1 command is invoked under the OSPF process and it applies access-list 1 to the outbound updates from OSPF, and rip means all of this is applied if the redistribution source is the RIP network. In summary, this filter (access-list) will prevent the network 220.127.116.11 from being advertised back into the OSPF network. It is recommended that this solution be applied to all routers advertising this network.
E1 & E2 External Routes
The characteristics and definitions of E1 and E2 routes were discussed in Chapter 5, The Fundamentals of OSPF Routing & Design, but heres a review of their operation before how they are redistributed is discussed.
External routes fall under two categories: external type 1 (E1) and external type 2 (E2). The difference between the two is in the way the cost (metric) of the route is calculated, as illustrated in the following bulleted points:
A type 2 route is always preferred over a type 1 route for the same destination as shown in Figure 6-5. You may recognize Figure 6-5 from Chapter 5 (Figure 5-12), where external routes were first discussed.
As Figure 6-5 shows, Router A redistributes two external routes into OSPF. Networks 1 and 2 (N1, N2) both have an external cost of x. The only difference is that N1 is redistributed into OSPF with a metric-type 1, and N2 is redistributed with a metric-type 2. If you follow the routes as they flow from Area 1 to Area 0, the cost to reach N2 as seen from RTB or RTC will always be x. The internal cost along the way is not considered because they are external route type E2.
On the other hand, the cost to reach N1 is incremented by the internal cost. The cost is x+y as seen from RTB and x+y+z as seen from RTC. Type 2 routes are preferred over type 1 routes in case two same cost routes exist to the destination. The default is type 2 (see Figure 6-6).
Example of Redistributing External Routes
Suppose you added two static routes pointing to E0 on Router C: 18.104.22.168 255.255.255.0 (the /24 notation indicates a 24-bit mask starting from the far left) and 22.214.171.124 255.255.0.0. The following example shows the different Area 0 and Area 1 behaviors when different parameters are used in the redistribute command on Router C:
Router C# interface Ethernet0 ip address 126.96.36.199 255.255.255.0 interface Serial1 ip address 188.8.131.52 255.255.255.252 router ospf 10 redistribute static network 184.108.40.206 0.0.0.255 area 2 network 220.127.116.11 0.0.0.255 area 0 ip route 18.104.22.168 255.255.255.0 Ethernet0 ip route 22.214.171.124 255.255.0.0 Ethernet0 Router E# interface Serial0 ip address 126.96.36.199 255.255.255.252 router ospf 10 network 188.8.131.52 0.0.0.255 area 2