Redistributing External Routes into OSPF
Problem
You want OSPF to distribute routes from another routing protocol.
Solution
The redistribute configuration command allows you to redistribute routes from another dynamic routing protocol into an OSPF process:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#router ospfRouter1(config-router)#55redistribute eigrp11subnetsRouter1(config-router)#exitRouter1(config)#endRouter1#
One of the dangers when redistributing between routing protocols is that you will accidentally import more information than your routers can handle. In Version 12.3(2)T, Cisco added a feature to protect against this issue:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#router ospfRouter1(config-router)#55redistribute eigrp11subnetsRouter1(config-router)#redistribute maximum-prefixRouter1(config-router)#1000 80exitRouter1(config)#endRouter1#
Discussion
Redistributing external routes from another routing protocol is similar to redistributing static routes, as we did in Recipe 8.5. In the example above, all of the routes that this router learns through EIGRP process number 11 will be propagated into OSPF as Type 2 external routes. Also, as shown in the following output from the show ip protocols command, because we also included the subnets keyword, every route will be redistributed. If we had not included this keyword, OSPF would only redistribute ...