The problem is that the class C network 203.250.15.0 is variably subnetted; it has two different masks: 255.255.255.252 and 255.255.255.192. Here are the configuration and the routing tables of both Router A and Router C: Router A# interface Ethernet0 ip address 203.250.15.68 255.255.255.192 router rip network 203.250.15.0 Router C# interface Ethernet0 ip address 203.250.15.67 255.255.255.192 interface Serial1 ip address 203.250.15.1 255.255.255.252 router ospf 10 redistribute rip metric 10 subnets network 203.250.15.0 0.0.0.255 area 0 router rip redistribute ospf 10 metric 2 network 203.250.15.0 Router A# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default Gateway of last resort is not set 203.250.15.0 255.255.255.192 is subnetted, 1 subnets C 203.250.15.64 is directly connected, Ethernet0 Router E# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default Gateway of last resort is not set 203.250.15.0 is variably subnetted, 2 subnets, 2 masks C 203.250.15.0 255.255.255.252 is directly connected, Serial0 O 203.250.15.64 255.255.255.192 [110/74] via 203.250.15.1, 00:15:55, Serial0 Notice that Router E has recognized that 203.250.15.0 has two subnets while Router A thinks that it has only one subnet (the one configured on its Ethernet interface). Information about subnet 203.250.15.0 255.255.255.252 is lost in the RIP domain. To reach that subnet, a static route needs to be configured on Router A as follows: Router A# interface Ethernet0 ip address 203.250.15.68 255.255.255.192 router rip network 203.250.15.0 ip route 203.250.15.0 255.255.255.0 203.250.15.67 With the addition of the static route as shown above, Router A will now be able to reach the other subnets within the OSPF network. Mutual Route RedistributionMutual route redistribution between multiple routing protocols should be done very carefully and in a controlled manner. As previously mentioned, incorrect configuration could lead to routing loops. A golden rule for mutual redistribution is not to allow information learned from a protocol to be injected back into the same protocol.
The distribute-list out command works on the ASBR to filter redistributed routes into other protocols. The distribute-list in command works on any router to prevent routes from being put in the routing table, but it does not prevent link-state packets (LSPs) from being propagated; downstream routers would still have the routes. It is better to avoid OSPF filtering as much as possible if filters can be applied on the other protocols to prevent loops. To demonstrate this, suppose Router A, Router C, and Router E are all running RIP. Router C and Router A are also running OSPF. This network configuration is shown in Figure 6-8. Both Router C and Router A are doing mutual redistribution between RIP and OSPF. Assume that you do not want the RIP coming from Router E to be injected into the OSPF domain, so you put a passive interface for RIP on the Ethernet 0 interface of Router C. However, you allow the RIP coming from Router A to be injected into OSPF. The routers would need to be configured as follows in order for this to occur, but as you review the following configurations, review them closely. Router E# interface Ethernet0 ip address 203.250.15.130 255.255.255.192 interface Serial0 ip address 203.250.15.2 255.255.255.192 router rip network 203.250.15.0 Router C# interface Ethernet0 ip address 203.250.15.67 255.255.255.192 interface Serial1 ip address 203.250.15.1 255.255.255.192 router ospf 10 redistribute rip metric 10 subnets network 203.250.15.0 0.0.0.255 area 0 router rip redistribute ospf 10 metric 2 passive-interface Ethernet0 network 203.250.15.0 Router A# interface Ethernet0 ip address 203.250.15.68 255.255.255.192 router ospf 10 redistribute rip metric 10 subnets network 203.250.15.0 0.0.0.255 area 0 router rip redistribute ospf 10 metric 1 network 203.250.15.0 Did you see the routing loop? Well, looking at the routes as seen from Router C clearly shows the routing loop. Please do not use the preceding configuration! Router C# show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default Gateway of last resort is not set 203.250.15.0 255.255.255.192 is subnetted, 4 subnets C 203.250.15.0 is directly connected, Serial1 C 203.250.15.64 is directly connected, Ethernet0 R 203.250.15.128 [120/1] via 203.250.15.68, 00:01:08, Ethernet0 [120/1] via 203.250.15.2, 00:00:11, Serial1 Q 203.250.15.192 [110/20] via 203.250.15.68, 00:21:41, Ethernet0 Notice that Router C has two paths to reach the 203.250.15.128 subnet: Serial1 and Ethernet0 (E0 is obviously the wrong path). This happened because Router C gave that entry to Router A via OSPF, and Router A gave it back via RIP because Router A did not learn it via RIP. This is a very small example of the loops that can occur because of an incorrect configuration or partial configuration. In larger networks, this situation gets even more aggravated.
|