What is route redistribution and why to use it?
Route redistribution is the process of sharing routes from one routing protocol and distribute them into another. By default, routers only advertise and share routes with other routers running the same protocol. As such if one router is configured for OSPF and the other EIGRP and need to share routes, by default, they will not share routing information. To accommodate sharing routes with other routing protocols route redistribution is required.
In the network below there are a total of five routers. Three routers are configured for EIGRP and the others are configured for BGP and OSPF, respectively. In this example EIGRP is redistributed into BGP and OSPF, and BGP and OSPF are redistributed into EIGRP. The most interesting configurations will occur on R3 but we will use R4 and R5 to verify all of the routes are properly being redistributed. The reason why we are using R4 and R5 to verify routes is to also confirm the routes are labeled as external. An external route is defined as any route that is not within the primary routing protocol.
Steps to redistribute routes
Step 1: Configure all applicable router interfaces.
R3(config)#interface FastEthernet0/0 R3(config-if)#ip address 10.3.0.1 255.255.255.0 ! R3(config)#interface FastEthernet1/0 R3(config-if)#ip address 10.253.0.2 255.255.255.252 ! R3(config)#interface FastEthernet1/1 R3(config-if)#ip address 10.252.0.2 255.255.255.252 ! R3(config)#interface FastEthernet2/0 R3(config-if)#ip address 172.16.101.1 255.255.255.0 ! R3(config)#interface FastEthernet2/1 R3(config-if)#ip address 172.16.102.1 255.255.255.0
Step 2: Enable a EIGRP routing process with a common AS number and enable EIGRP routing on all applicable IP networks.
R3(config)#routerrouter eigrp 101 R3(config-router)#network 10.3.0.0 0.0.0.255 R3(config-router)#network 10.252.0.0 0.0.0.3 R3(config-router)#network 10.253.0.0 0.0.0.3
Step 3: Enable a BGP routing process with each router having a unique AS number, enable BGP routing on all applicable IP networks, and configure static neighbors.
R3(config)#router bgp 65013 R3(config-router)#network 172.16.101.0 mask 255.255.255.0 R3(config-router)#neighbor 172.16.101.2 remote-as 65014
Step 4: Enable a OSPF routing process with each router having a unique router-id, enable OSPF routing on all applicable IP networks within one or more OSPF areas.
R3(config)#router ospf 101 R3(config-router)#router-id 172.16.102.1 R3(config-router)#network 172.16.102.0 0.0.0.255 area 0
Step 5: Configure route redistribution from EIGRP into BGP and OSPF, and BGP and OSPF into EIGRP. We will not redistribute BGP into OSPF and vice versa.
R3(config)#router eigrp 101 R3(config-router)#redistribute bgp 65013 metric 100 1 255 1 1500 R3(config-router)#redistribute ospf 101 metric 100 1 255 1 1500 ! R3(config)#router bgp 65013 R3(config-router)#redistribute eigrp 101 ! R3(config)#router ospf 101 R3(config-router)#redistribute eigrp 101 metric 1 subnets
Step 6: Repeat the same steps on all remaining routers with the applicable interface and routing configurations.
Verify the configuration
Now that the configuration is finished lets verify our neighbors and routes. Using the show ip bgp summary, show ip eigrp neighbors, show ip ospf neighbor, and show ip route commands you can verify the remote routers to which your router has formed an adjacency and verify the expected routes are being advertised.We will confirm our neighbors using R3 but we will use R4 and R5 to verify all of the routes are properly being redistributed. Use the ping command to verify connectivity.