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 seven routers. Five routers are configured for BGP and the others are configured for EIGRP and OSPF, respectively. In this example BGP is redistributed into EIGRP and OSPF, and EGIRP and OSPF are redistributed into BGP. 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 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 10.3.0.0 mask 255.255.255.0 R3(config-router)#network 10.252.0.0 mask 255.255.255.252 R3(config-router)#network 10.253.0.0 mask 255.255.255.252 R3(config-router)#neighbor 10.252.0.1 remote-as 65012 R3(config-router)#neighbor 10.253.0.1 remote-as 65011
Step 3: Enable a maximum of two paths to be installed into the routing table when multiple paths are available.
R3(config)#router bgp 65013 R3(config-router)#bgp bestpath as-path multipath-relax R3(config-router)#maximum-paths 2
Step 4: Enable a EIGRP routing process with a common AS number and enable EIGRP routing on all applicable IP networks.
R3(config)#router eigrp 101 R3(config-router)#network 172.16.101.0 0.0.0.255
Step 5: 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 6: Configure route redistribution from BGP into EIGRP and OSPF, and EIGRP and OSPF into BGP. We will not redistribute EIGRP 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 ospf 101 R3(config-router)#redistribute bgp 65013 metric 100 metric-type 1 subnets ! R3(config)#router bgp 65013 R3(config-router)#redistribute eigrp 101 R3(config-router)#redistribute ospf 101
Step 7: 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.