Wednesday, February 19, 2020

Introduction to Redistribution

Most networks you encounter will probably only run a single routing protocol like OSPF or EIGRP. Maybe you find some old small networks that are still running RIP that need 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 on 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:
redistribution 3 routing protocols
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 20.0.0.0 /8 there. At the bottom there are two RIP routers in the 30.0.0.0 /8 network. If we want to have 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:
redistribution eigrp rip
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 1.1.1.0 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 3.3.3.0
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
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 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
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/156160] via 192.168.12.1, 00:05:01, FastEthernet0/0
R    3.0.0.0/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

     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
C    192.168.23.0/24 is directly connected, FastEthernet0/0
Here are 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:
  • Redistribution happens outbound. If I configure redistribution on R2 then nothing will change in the routing table of R2.
    • R2 will redistribute EIGRP routing information into RIP and advertise it to R3.
    • R2 will redistribute RIP routing information into EIGRP and advertise it to R1.
    • You need the networks in your local routing table before you can do redistribution. You can’t advertise (or redistribute) what you don’t have…
When we redistribute from one routing protocol into another we have to use a seed metric. Each routing protocols uses a different metric:
  • OSPF: Cost
  • EIGRP: K-Values (bandwidth, delay, load and reliability)
  • RIP: Hop count
Somehow we have to convert the metric from one routing protocol to another. This is something that doesn’t happen automatically…we have to tell the router what metric to use and it’s different for each routing protocol.
ProtocolDefault Seed Metric
RIPInfinity
EIGRPInfinity
OSPF20 except BGP is 1.
BGPBGP metric is set to IGP metric
This table is important to remember. If you redistribute something into RIP then the default seed metric is infinity. What does RIP do with routes that have an infinite metric? That’s right…they don’t show up in your routing table! This means you have to configure a default hop count for everything you redistribute into RIP or it’s not going to work.
The same thing applies to redistributing into EIGRP. You have to configure the K-values yourself otherwise redistribution is not going to work.
OSPF is friendlier…if you redistribute into OSPF then the redistributed routes will have a default cost of 20 unless the routing information comes from BGP…which has a cost of 1.
R2(config)#router rip
R2(config-router)#default-metric 5
R2(config)#router eigrp 12
R2(config-router)#default-metric 1500 100 255 1 1500
Here’s an example how you can configure the default seed metric by using the default-metric command. Default-metric 5 sets the hop count to 5 for everything we redistribute into RIP.
For EIGRP you have to specify the K-values. In my example I’m using a bandwidth of 1500, a delay of 100, reliability 255 (which means 100%), load of 1 (1%) and a MTU of 1500. In case you are wondering these are just values that I made up. Everything we redistribute into EIGRP will have this metric.
Now you have an idea what redistribution is about, in the upcoming lessons I will show you how to redistribute between different routing protocols. Let me know if you have any questions!

No comments:

Post a Comment