Redistributing Routes into EIGRP
Problem
You want to redistribute routes learned with another means into the EIGRP routing process.
Solution
The simplest way to redistribute routes into EIGRP uses the redistribute command, as follows:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ip route 192.168.10.0 255.255.255.0 192.168.20.5
Router1(config)#router eigrp 55
Router1(config-router)#redistribute static
Router1(config-router)#exit
Router1(config)#end
Router1#
You can set the properties of the routes that are redistributed from another routing protocol with the default-metric command:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#router eigrp 55
Router1(config-router)#redistribute rip
Router1(config-router)#default-metric 1000 100 250 100 1500
Router1(config-router)#exit
Router1(config)#end
Router1#
Discussion
The show ip protocols command tells you about any route redistribution that the protocol is doing:
Router1#show ip protocols
Routing Protocol is "eigrp 55"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Serial0.1 filtered by 34 (per-user), default is 34
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: static, eigrp 55
Automatic network summarization is in effect
Automatic address summarization:
192.168.20.0/24 for Loopback0, Serial0.1
172.25.0.0/16 for Ethernet0
Summarizing with metric 128256
Maximum path: 4
Routing for Networks:
172.25.0.0
192.168.20.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:05:00
172.25.2.1 90 00:01:57
Distance: internal 90 external 170
Router1#
If you look at the routing table of a downstream router, you can see that EIGRP has forwarded information about this static route:
Router2#show ip route eigrp
D 192.168.30.0/24 [90/156160] via 172.22.1.4, 00:00:02, FastEthernet0/1
D EX 192.168.10.0/24 [170/2195456] via 172.25.2.2, 00:00:01, Serial0/0.2
Router2#
There are two extremely important things to note in this output. The first is that the redistributed route is tagged as external, which is signified by the EX near the start of the line. An external route is any route that didn't originate with this routing protocol. This makes the information inherently less reliable than any internal route. So EIGRP also sets a higher administrative distance to ensure that internal EIGRP routes are always preferred over redistributed routes. This becomes extremely important when you have two or more redistribution points in your network that might be injecting the same routing information.
In this case, you can see that the administrative distance for the redistributed static route is 170 instead of the default EIGRP distance of 90. Recall from Chapter 5 that the default administrative distance for static routes is 1.
The second example in this recipe shows how to redistribute routes from a foreign routing protocol, instead of just static routes. The key difference is the default-metric command:
Router1(config-router)#redistribute rip
Router1(config-router)#default-metric 1000 100 250 100 1500
|
The parameters in the default-metric command allow EIGRP to construct an appropriate metric. Since none of this information is available from the foreign protocol, you have to specify it manually. The parameters are, in order:
Bandwidth
-
This value specifies the minimum bandwidth along the path in Kilobits per second. It can have any value between 1 and 4294967295.
Delay
-
This value defines the mean latency for the path in 10 microsecond units. It can be anything between 0 and 4294967295.
Reliability
-
The reliability parameter is a numerical estimate of how likely the route and the path are to be available at any given moment. You can specify any value between 0 and 255, where 255 represents perfect 100 percent reliability.
Effective bandwidth (loading)
-
This value is intended to provide a way of shifting traffic off heavily loaded network links. You can give it a value between 0 and 255, where 255 represents 100 percent utilization.
Maximum Transmission Unit (MTU)
-
You can use this value to specify a path MTU to reach the foreign routing protocol. The range of values for this metric is between 0 and 4294967295.
As it turns out, however, EIGRP doesn't use most of this information by default. If you look at the output of any show IP protocols command in this chapter, you will see a line that specifies the EIGRP metric weights:
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP uses these K values as coefficients in an involved equation that specifies how to combine all of these different individual metrics into a single numerical value, the composite EIGRP metric. You will notice that only K1 and K3 are nonzero. The result is that, by default, EIGRP uses only bandwidth and delay when computing its metric. So, in fact, you can generally fill in just about anything for the other parameters in the default-metric command, and it won't make any difference.
We note as an aside that while you can change these different K values by using the metric weights command, we strongly advise against changing the defaults. These values were of some use in IGRP, and when Cisco introduced EIGRP, with its superior DUAL algorithm, they carried the parameters forward. However, it was discovered that in practice it was relatively easy to make routing extremely unstable by changing them. And it's almost impossible to make things any better by changing these weight values in EIGRP.
The default-metric command sets the metric values for all external routing protocols. If you need to specify different metrics for different protocols, you can put the same information on the redistribute command line as follows:
Router1(config-router)#redistribute rip metric 1000 100 250 100 1500
Router1(config-router)#redistribute ospf 99 metric 1500 10 255 10 1500
Table 7-1 shows all of the different protocols that you can redistribute into EIGRP by using this method. You must specify each redistributed protocol separately.
Type | Description |
---|---|
bgp | Border Gateway Protocol |
connected | Directly connected routes |
egp | Exterior Gateway Protocol |
eigrp | Enhanced IGRP |
igrp | Interior Gateway Routing Protocol |
isis | ISO IS-IS Routing Protocol |
mobile | Mobile routes |
odr | On Demand stub routes |
ospf | Open Shortest Path First |
rip | Routing Information Protocol |
static | Static routes |
Actually, there is an important exception in this list. If a router has EIGRP and IGRP, both sharing the same process ID number, it will automatically redistribute between them. This is a convenient feature because it makes it relatively easy to migrate an IGRP network to EIGRP. However, if the EIGRP process number is not the same as the one used for IGRP, you need to explicitly configure the redistribution. However, as Cisco has dropped IGRP support from all IOS images starting in 12.2T and 12.3, this older protocol is no longer available. If you are still running IGRP in any parts of your network, we strongly recommend migrating to EIGRP.
Sometimes you don't want to redistribute all of the routes from a particular external routing protocol, just some of them. In this case, you can apply a distribute-list as in Recipe 7.2 to only the routes that are redistributed from a particular protocol. For example, you might have several static routes on your router, and you want to redistribute only some of them. In that case, you can apply a distribute-list to only the static routes as follows:
Router1(config)#router eigrp 55
Router1(config-router)#redistribute static
Router1(config-router)#distribute-list 7 out static
This will apply access list number 7 to all of the static routes before distributing them. You can also use this technique when redistributing routes learned from other routing protocols. For example, you might want to filter the routes learned from OSPF before redistributing them into EIGRP. You can do this as follows:
Router1(config)#router eigrp 55
Router1(config-router)#redistribute ospf 99
Router1(config-router)#distribute-list 7 out ospf 99