Open Shortest Path First (OSPF) remains a cornerstone of dynamic routing in enterprise networks. As businesses grow and segments become logically separated, engineers often face the challenge of redistributing routes between OSPF areas or into other protocols like EIGRP or RIP. While redistribution provides flexibility, incorrect configuration can lead to routing loops or suboptimal path selection.
Understanding OSPF Redistribution
Redistribution in OSPF is the process of injecting routes learned via other routing protocols—or from another OSPF process—into the current OSPF process. This is common when transitioning between routing domains, integrating legacy areas, or during mergers and acquisitions where different routing protocols are in use.
There are typically two scenarios:
- Inter-protocol Redistribution: Between OSPF and another routing protocol (e.g., EIGRP, RIP, BGP).
- Intra-protocol Redistribution: Between two OSPF processes or areas on the same router.
Walkthrough: Redistributing OSPF into EIGRP
Let’s take a common use case—redistributing OSPF into EIGRP in a Cisco IOS environment.
R1(config)# router ospf 1
R1(config-router)# network 10.10.0.0 0.0.255.255 area 0
R1(config)# router eigrp 100
R1(config-router)# network 192.168.0.0 0.0.255.255
R1(config)# router eigrp 100
R1(config-router)# redistribute ospf 1 metric 10000 100 255 1 1500
In this configuration:
- OSPF is running in Area 0 for 10.10.0.0/16
- EIGRP is configured for 192.168.0.0/16
- The
redistribute
command includes a required metric for EIGRP to accept OSPF routes.
Controlling Redistribution with Route Maps
To prevent importing unnecessary routes, always filter redistributed routes using a route map:
R1(config)# access-list 10 permit 10.10.1.0 0.0.0.255
R1(config)# route-map OSPF_TO_EIGRP permit 10
R1(config-route-map)# match ip address 10
R1(config-route-map)# set metric 10000 100 255 1 1500
R1(config)# router eigrp 100
R1(config-router)# redistribute ospf 1 route-map OSPF_TO_EIGRP
This ensures only 10.10.1.0/24 is injected into EIGRP with a valid metric.
Verifying Redistribution
R1# show ip route eigrp
R1# show ip protocols
Always verify the redistribution path and ensure no default routes or undesired prefixes leak between routing domains.
Common Pitfalls
- Missing metric: EIGRP requires a full metric; OSPF does not.
- Route feedback loops: When both protocols redistribute each other's routes.
- Redistribution without filtering: Brings unnecessary routes and complexity.
When to Use Multiple OSPF Areas vs Redistribution
Prefer areas when staying within OSPF. Use redistribution only when bridging OSPF to non-OSPF routing domains.
Conclusion
OSPF redistribution, when used correctly, bridges protocols and areas cleanly. Misuse, however, leads to major routing issues. Be conservative, filter intelligently, and test thoroughly.