Most networks you encounter will probably only run a single routing protocol like OSPF or EIGRP. Maybe you find some old small networks still running RIP that needs migration to OSPF or EIGRP. What if you have a company that is running OSPF and you just bought another company, and their network is running EIGRP?
It’s possible that we have multiple routing protocols on our network and we’ll need some method to exchange routing information between the different protocols. This is called redistribution. We’ll look into some of the issues that we encounter. What are we going to do with our metrics? OSPF uses cost and EIGRP uses K-values and they are not compatible with each other….RIP uses hop count.
Redistribution also adds another problem. If you “import” routing information from one routing protocol into another, it’s possible to create routing loops.
If you don’t feel 100% confident about your knowledge of OSPF and EIGRP, then I suggest you stop reading now and read more about OSPF / EIGRP or do some labs. One routing protocol can be difficult but when you mix a couple of them the fun really starts…
Having said that, let’s take a look at a possible redistribution scenario:
Look at the topology picture above. We have routers running EIGRP in AS 1 with the 10.0.0.0 /8 network. OSPF has multiple areas, and we have 184.108.40.206 /8 there. At the bottom, there are two RIP routers in the 220.127.116.11 /8 network. If we want full connectivity in this network, we’ll have to do some redistribution.
Redistribution is not just for between routing protocols. We have multiple options:
- Between routing protocols (RIP, OSPF, EIGRP, BGP).
- Static routes can be redistributed into a routing protocol.
- Directly connected routes can be redistributed into a routing protocol.
Normally you use the network command to advertise directly connected routes into your routing protocol. You can also use the redistribute connected command, which will redistribute it into the routing protocol. Let’s take a look at some real routers:
In the topology picture above, I have three routers. R1 is running EIGRP, and R3 is running RIP. R2 is in the middle and is running EIGRP and RIP. If we want to do redistribution, we’ll have to do it on R2. Let’s take a look, shall we?
R1(config)#router eigrp 12 R1(config-router)#no auto-summary R1(config-router)#network 192.168.12.0 R1(config-router)#network 18.104.22.168 0.0.0.255
R2(config)#router eigrp 12 R2(config-router)#no auto-summary R2(config-router)#network 192.168.12.0 R2(config-router)#exit R2(config)#router rip R2(config-router)#version 2 R2(config-router)#no auto-summary R2(config-router)#network 192.168.23.0
R3(config)#router rip R3(config-router)#version 2 R3(config-router)#no auto-summary R3(config-router)#network 192.168.23.0 R3(config-router)#network 22.214.171.124
Here are the router configurations, nothing special…I only advertised the links to get EIGRP and RIP up and running.
R1#show ip route Gateway of last resort is not set C 192.168.12.0/24 is directly connected, FastEthernet0/0 126.96.36.199/24 is subnetted, 1 subnets C 188.8.131.52 is directly connected, Loopback0
R2#show ip route Gateway of last resort is not set C 192.168.12.0/24 is directly connected, FastEthernet0/0 184.108.40.206/24 is subnetted, 1 subnets D 220.127.116.11 [90/156160] via 192.168.12.1, 00:05:01, FastEthernet0/0 R 18.104.22.168/8 [120/1] via 192.168.23.3, 00:00:12, FastEthernet1/0 C 192.168.23.0/24 is directly connected, FastEthernet1/0
R3#show ip route Gateway of last resort is not set 22.214.171.124/24 is subnetted, 1 subnets C 126.96.36.199 is directly connected, Loopback0 C 192.168.23.0/24 is directly connected, FastEthernet0/0
Here is the routing table of all three routers after configuring RIP and EIGRP. You can see R2 has learned the loopback interfaces of R3 and R1. R1 and R3 don’t have anything in their routing table because R2 is not advertising anything. As you can see, redistribution is not done automatically.
Before I show you the redistribution configurations, there are two things you should be aware of:
you missed something in the command syntax. After I have read your lesson, I tried the example. With the shown syntax John still doesn’t advertise the Loopback addresses and the connected network. You probably wrote it in the lesson, but I had to complete:
With this syntax, John started to advertise the Loopback and his directly connec... Continue reading in our forum
That’s right, this tutorial is just an overview of redistribution but I didn’t show the full config. Here’s the configuration example for those 3 routers:
You don’t have to use “redistribute connected” in this example. The 192.168.12.0 /24 network has been advertised in EIGRP so it will be redistributed into RIP. The 192.168.23.0 /24 network has been advertised in RIP so it will be redistributed into EIGRP. If we don’t use the “network” command for these netwo... Continue reading in our forum
I have a question, maybe it’s a little silly, but what happen when both routing protocols (EIGRP, OSPF) have the same IP networks, for instance 10.0.0.0, and you redistribute between protocols?
How the routers can distinguish between one network or another?
When two routing protocols advertise the same prefix (network + subnet mask) then the administrative distance decides which one we will use:
Rene in your example of Router Jack, John and James – Redistribution occurs in John. John has both EIGRP and RIP. This single router is running 2 protocols thus redistribution is done on it. What if Router 1 was running RIP only. Router 2 is running EIGRP only. Router 1 is connected to Router 2. R1--------R2. Is that possible? That link connecting R1 to R2 has to be either running EIGRP or RIP? -Thus R1 or R2 has to be running two protocols right?