Route redistribution in OSPF (Open Shortest Path First) allows routes learned from one routing protocol to be advertised and used in another routing protocol. Redistribution can be useful in scenarios where multiple routing protocols are used within an enterprise network. Here’s a basic guide on how to configure route redistribution in OSPF:
Basic Redistribution Configuration:
Let’s assume we have OSPF running, and we want to redistribute routes learned from another routing protocol (e.g., EIGRP) into OSPF.
- Access OSPF Configuration Mode: Enter global configuration mode and OSPF configuration mode:
bash
router(config)# router ospf <process-id>
- Configure Redistribution: Specify the routing protocol from which you want to redistribute routes into OSPF:
bash
router(config-router)# redistribute <source-protocol> <source-id> [metric <metric-values>]
<source-protocol>
: The routing protocol from which routes are being redistributed (e.g.,eigrp
,bgp
,static
).<source-id>
: The process ID, AS number, or identifier of the source routing protocol.[metric <metric-values>]
: (Optional) Adjust the metric of the redistributed routes.
Example for redistributing routes from EIGRP:
bashrouter(config-router)# redistribute eigrp 1 metric 100 10 255 1 1500
- Adjust OSPF Metrics (Optional): If you want to adjust the metric of redistributed routes, you can do so within OSPF configuration:
bash
router(config-router)# default-metric <metric-values>
Example:
bashrouter(config-router)# default-metric 100 10 255 1 1500
This sets the default OSPF metric for redistributed routes.
- Verify Redistribution: Check the OSPF database and routing table to verify that routes are being redistributed:
bash
router# show ip ospf database
router# show ip route ospf
Filtering Redistributed Routes:
You might want to filter which routes are redistributed. Here’s a basic example:
router(config-router)# distribute-list <access-list-number> <in/out>
<access-list-number>
: The number of an access list that defines which routes to include or exclude.<in/out>
: Specify whether the access list is applied on incoming or outgoing routes.
Example:
router(config)# access-list 10 permit 192.168.1.0 0.0.0.255
router(config-router)# distribute-list 10 in
In this example, only routes matching the access list 10 will be redistributed into OSPF.
Warning:
Be cautious when redistributing routes, as it can introduce routing loops or other issues if not done carefully. Ensure that you understand the implications of redistribution and consider implementing route filtering to control which routes are redistributed.
Always refer to the specific documentation for your router platform and software version for accurate and detailed information. This is quite important as route redistribution can blow up your network if not implemented correctly.