These commands allow Router A to advertise one route, 220.127.116.11 255.255.248.0 that covers all subnets in Area 1, into Area 0. Without the range keyword in the area command, Router A would advertise each subnet individually; for example, one route for 18.104.22.168 255.255.255.0, one route for 22.214.171.124 255.255.255.0, and so forth.
Because Router A no longer needs to redistribute RIP routes, the router rip command can now be removed from the configuration file; however, it is common in some environments for hosts to use RIP to discover routers. When RIP is removed from the routers, the hosts must use an alternate technique to find the routers. Cisco routers support the IRDP and ARP alternatives to RIP.
The ICMP Router Discovery Protocol (IRDP) technique is illustrated in the example at the end of this section. IRDP is the recommended method for discovering routers. The ip irdp command enables IRDP on the router. Hosts must also run IRDP.
With proxy Address Resolution Protocol (ARP), if the router receives an ARP request for a host that is not on the same network as the ARP request sender, and if the router has the best route to that host, then the router sends an ARP reply packet giving the routers own local data link address. The host that sent the ARP request then sends its packets to the router, which forwards these packets to the intended host. Proxy ARP is enabled on routers by default. Proxy ARP is transparent to hosts.
The proxy ARP alternative is not illustrated in this case study. See the Cisco IOS command references for details on this feature.
Configuration File Examples
The following configuration files reflect the presence of OSPF within the network and on the routers.
Full Configuration for Router A
interface serial 0 ip address 126.96.36.199 255.255.255.248 interface serial 1 ip address 188.8.131.52 255.255.255.248 interface ethernet 0 ip address 184.108.40.206 255.255.255.0 ip irdp interface tokenring 0 ip address 220.127.116.11 255.255.255.0 ip irdp router ospf 109 network 18.104.22.168 0.0.0.255 area 0 network 22.214.171.124 0.0.0.255 area 0 network 126.96.36.199 0.0.7.255 area 1 area 1 range 188.8.131.52 255.255.248.0
Full Configuration for Router B
interface serial 0 ip address 184.108.40.206 255.255.255.248 interface serial 1 ip address 220.127.116.11 255.255.255.248 interface ethernet 0 ip address 18.104.22.168 255.255.255.0 ip irdp interface tokenring 0 ip address 22.214.171.124 255.255.255.0 ip irdp router ospf 109 network 126.96.36.199 0.0.0.255 area 0 network 188.8.131.52 0.0.0.255 area 0 network 184.108.40.206 0.0.7.255 area 2 area 2 range 220.127.116.11 255.255.248.0
Full Configuration for Router C
interface serial 0 ip address 18.104.22.168 255.255.255.248 interface serial 1 ip address 22.214.171.124 255.255.255.248 interface ethernet 0 ip address 126.96.36.199 255.255.255.0 ip irdp router ospf 109 network 188.8.131.52 0.0.0.255 area 0 network 184.108.40.206 0.0.0.255 area 0 network 220.127.116.11 0.0.0.255 area 3 area 3 range 18.104.22.168 255.255.248.0
Setting Up Mutual Redistribution
It is sometimes necessary to accommodate more complex network topologies such as independent RIP and OSPF clouds that must perform mutual redistribution. In this scenario, it is critically important to prevent potential routing loops by filtering routes. The router in Figure 6-17 is running both OSPF and RIP.
With the following commands, OSPF routes will be redistributed into RIP. You must specify the default metric to designate the cost of the redistributed route in RIP updates. All routes redistributed into RIP will have this default metric:
! passive interface subcommand from previous example is left out for clarity! router rip default-metric 10 network 22.214.171.124 redistribute ospf 109
It is a good practice to strictly control which routes are advertised when redistribution is configured. In the following example, a distribute-list out command causes RIP to ignore routes coming from the OSPF that originated from the RIP domain:
router rip distribute-list 10 out ospf 109 ! access-list 10 deny 126.96.36.199 0.0.7.255 access-list 10 permit 0.0.0.0 255.255.255.255
Full Configuration for Router A
interface serial 0 ip add 188.8.131.52 255.255.255.0 ! interface serial 1 ip add 184.108.40.206 255.255.255.0 ! interface ethernet 0 ip add 220.127.116.11 255.255.255.0 ! interface tokenring 0 ip add 18.104.22.168 255.255.255.0 ! router rip default-metric 10 network 22.214.171.124 passive-interface serial 0 passive-interface serial 1 redistribute ospf 109 distribute-list 10 out ospf 109 ! router ospf 109 network 126.96.36.199 0.0.0.255 area 0 network 188.8.131.52 0.0.0.255 area 0 redistribute rip subnets distribute-list 11 out rip ! access-list 10 deny 184.108.40.206 0.0.7.255 access-list 10 permit 0.0.0.0 255.255.255.255 access-list 11 permit 220.127.116.11 0.0.7.255 access-list 11 deny 0.0.0.0 255.255.255.255
Case Study Conclusion
Because it is common for OSPF and RIP to be used together, it is important to use the practices described here in order to provide functionality for both protocols on an internetwork. You can configure ASBRs that run both RIP and OSPF and redistribute RIP routes into the OSPF and vice versa. You can also create OSPF areas using ABRs that provide route summarizations. Use VLSM to conserve address space.