In Cisco IOS software, route redistribution is configured via the redistribute [protocol] [process ID] [autonomous-system-number] [metric <value>] [metric-type <type>] [match <internal | external 1 | external 2>] [tag <tag>] [route-map <name>] [subnets] [nssa-only] router configuration command. Table 4-3 lists and describes the functions of these included keywords:
|
Keyword |
Description |
|---|---|
|
protocol |
This specifies the protocol which is to be redistributed. Options include connected, static, EIGRP, OSPF and BGP, for example |
|
process ID |
This specifies the process ID of the external route source. This is applicable only if the protocol being redistributed is OSPF |
|
autonomous-system-number |
This specifies the autonomous system number of the external route source. This is applicable with EIGRP and BGP |
|
metric-type <type> |
This specifies the metric type and is applicable when redistributing into OSPF. A metric type of Type 1 or Type 2 can be specified with the default being Type 2 for external OSPF routes |
|
match <internal | external 1 | external 2> |
This is used when redistributing OSPF into BGP. By default, only OSPF internal and external Type 1 routes are redistributed. EIGRP will redistribute all OSPF routes |
|
tag <tag> |
This is used to specify a route tag for the redistributed routes. If a route tag is not specified, then the remote autonomous system number is used for routes from BGP. For other protocols, a value of zero is used |
|
route-map <name> |
This is used to specify the route map the route map that will be used during redistribution. If not specified, all routes are redistributed. If you specify that a route map should be used but do not specify the route map name, no routes will be imported |
|
subnets |
This keyword is applicable only with OSPF. By default, OSPF will only redistribute Classful networks unless this keyword is included in the redistribution configuration |
|
nssa-only |
This keyword is applicable only with OSPF. It sets the NSSA-only attribute for all routes redistributed into OSPF |
Tab. 4-3. Route Redistribution Configuration Keywords
The sections that follow will describe the route redistribution configuration and verification tasks for both OSPF and EIGRP. These sections describe the following scenarios:
- EIGRP Redistribution Metrics
- Redistributing between two EIGRP Autonomous Systems
- Redistributing OSPF Routes into EIGRP
- Redistributing Connected and Static Routes into EIGRP
- OSPF Redistribution Metrics
- Redistributing Classful and Classless Subnets into OSPF
- Redistributing between two OSPF Processes
- Redistributing EIGRP Routes into OSPF
- Redistributing Connected and Static Routes into OSPF
- OSPF NSSA Type 1 and Type 2 External Routes
- Troubleshooting OSPF Route Redistribution Issues
EIGRP Redistribution Metrics
By default, when external routing information is redistributed into EIGRP, the external routes are assigned a default metric of infinity. The only three exceptions to this rule are:
- When redistributing between two EIGRP autonomous systems
- When redistributing static routes into EIGRP
- When redistributing connected interfaces (subnets) into EIGRP
EIGRP preserves all metrics when redistributing between the two EIGRP autonomous systems. When connected subnets (interfaces) and static routes are redistributed into EIGRP, the redistributed routes are assigned a default external metric value of 0. This default behavior will be illustrated in detail later in the following sections.
When redistributing any other external route source, OSPF, or BGP, for example, a metric must be manually specified for those external routes. In Cisco IOS software, this can be performed using one of three methods:
- By specifying the seed (default) EIGRP metric for redistributed routes
- By indirectly specifying the EIGRP metric during redistribution using a route map
- By directly specifying the EIGRP metric during route redistribution
The seed metric is the metric value that will be assigned to all the redistributed routes. In other words, this is the initial metric that will be assigned to the external routing information when redistribution into EIGRP is configured. The seed metric is configured using the default-metric [bandwidth] [delay] [reliability] [loading] [mtu] router configuration command. The following configuration example illustrates how to configure the seed metric using a bandwidth value of 10000 Kbps, a delay value of 1000 microseconds, a reliability value of 255/255, a loading value of 1/255, and finally, an MTU value of 1500 bytes:
| R4(config)#router eigrp 4 R4(config-router)#default-metric 10000 100 255 1 1500 R4(config-router)#exit |
NOTE: As was stated in Chapter 2, the delay value used in EIGRP metric calculation is in tens of microseconds. Therefore, the delay value in microseconds must be divided by 10 to be used to compute the EIGRP metric
This configuration can be verified using the show ip protocols command as follows:
| R4#show ip protocols Routing Protocol is “eigrp 4” Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set 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 Default redistribution metric is 10000 100 255 1 1500 Redistributing: eigrp 4 EIGRP NSF-aware route hold timer is 240s Automatic network summarization is not in effect[Truncated Output] |
The second method of specifying the initial route metric for redistributed routes is to use a route map during route redistribution. This option provides greater flexibility in that different metrics can be assigned to different route sources. Within a route map, the EIGRP metric is specified using the set metric [bandwidth] [delay] [reliability] [loading] [mtu] route map configuration command. The following configuration example illustrates how to set the EIGRP metric for different external OSPF routes using a route map:
| R4(config)#route-map OSPF-into-EIGRP permit 10 R4(config-route-map)#description ‘Match OSPF Internal Routes Only’ R4(config-route-map)#match route-type internal R4(config-route-map)#set metric 10000 100 255 1 1500 R4(config-route-map)#exit R4(config)#route-map OSPF-into-EIGRP permit 20 R4(config-route-map)#description ‘Match OSPF External Type 1 Routes Only’ R4(config-route-map)#set metric 100000 10 255 1 1500 R4(config-route-map)#exit R4(config)#route-map OSPF-into-EIGRP permit 30 R4(config-route-map)#description ‘Match OSPF External Type 2 Routes Only’ R4(config-route-map)#match route-type external type-2 R4(config-route-map)#set metric 1544 2000 255 1 1500 R4(config-route-map)#exit R4(config)#router eigrp 4 R4(config-router)#redistribute ospf 4 route-map OSPF-into-EIGRP R4(config-router)#exit |
Referencing the configuration above, redistributed OSPF routes are assigned an initial metric based on the metric values specified for each route type in the route map configuration. This configuration can be validated by looking at any specific OSPF route simply by using the show ip route command as shown below:
| R4#show ip route 10.11.11.0 255.255.255.0 Routing entry for 10.11.11.0/24 Known via “ospf 4”, distance 110, metric 65, type inter area Redistributing via eigrp 4 Advertised by eigrp 150 route-map OSPF-into-EIGRP Last update from 10.99.99.1 on Serial0/0, 00:02:05 ago Routing Descriptor Blocks: * 10.99.99.1, from 1.1.1.1, 00:02:05 ago, via Serial0/0 Route metric is 65, traffic share count is 1 |
The EIGRP values used for the metric assigned to the route, which in internal (inter-area) in this example, can then be validated using the show ip eigrp topology command as follows:
| R4#show ip eigrp topology 10.11.11.0 255.255.255.0 IP-EIGRP (AS 4): Topology entry for 10.11.11.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 281600 Routing Descriptor Blocks: 10.99.99.1, from Redistributed, Send flag is 0x0 Composite metric is (281600/0), Route is External Vector metric: Minimum bandwidth is 10000 Kbit Total delay is 1000 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 0 External data: Originating router is 172.16.1.4 (this system) AS number of route is 4 External protocol is OSPF, external metric is 65 Administrator tag is 0 (0x00000000) |
The values used to derive the initial metric are those specified for internal OSPF routes in the route map as can be seen in the output of the show route-map command:
| R4# show route-map OSPF-into-EIGRP route-map OSPF-into-EIGRP, permit, sequence 10 Match clauses: route-type internal Set clauses: metric 10000 100 255 1 1500 Policy routing matches: 0 packets, 0 bytes[Truncated Output] |
Finally, the third method of specifying the initial EIGRP metric to be used for imported routes (redistributed routes) is directly during redistribution configuration using the redistribute [protocol] metric [bandwidth] [delay] [reliability] [loading] [mtu] router configuration command. Different values can be used for different route sources, as is shown in the following configuration example:
| R4(config)#router eigrp 4 R4(config-router)#redistribute ospf 4 metric 10000 100 255 1 1500 R4(config-router)#redistribute bgp 4 metric 100000 10 255 1 1500 R4(config-router)#redistribute static metric 1544 2000 255 1 1500 R4(config-router)#exit |
Redistributing between two EIGRP Autonomous Systems
When redistributing between two EIGRP autonomous systems, EIGRP simply uses the metric value of the other EIGRP autonomous system and a metric does not have to be configured during the redistribution process. Consider the network topology illustrated in Figure 4-7 which shows a basic EIGRP network. R1 and R2 reside in autonomous system 1, while R2 and R3 reside in autonomous system 2. Because R2 resides in both autonomous systems, it is considered the ASBR. This is the router on which redistribution will be performed. Because one EIGRP process is being redistributed into another, the redistribution configuration will be straightforward as there is no need to manually specify a metric for the redistributed routes.
Fig. 4-7. Redistributing Between Two EIGRP Autonomous Systems
The redistribution of EIGRP 1 into EIGRP 2 is performed as follows on R2:
| R2(config)#router eigrp 2 R2(config-router)#redistribute eigrp 1 R2(config-router)#exit |
The initial metric value assigned to the 172.16.1.0/24 subnet advertised via EIGRP autonomous system 1 on R1 to R2 can be validated using the show ip eigrp topology command:
| R2#show ip eigrp topology 1 172.16.1.0 255.255.255.0 IP-EIGRP (AS 1): Topology entry for 172.16.1.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2172416 Routing Descriptor Blocks: 10.0.0.1 (Serial0/0), from 10.0.0.1, Send flag is 0x0 Composite metric is (2172416/28160), Route is Internal Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 20100 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 1 |
Because no explicit metric was specified during the redistribution of EIGRP 1 into EIGRP 2, the same metric value is assigned to the external route under EIGRP autonomous system 2:
| R2#show ip eigrp topology 2 172.16.1.0 255.255.255.0 IP-EIGRP (AS 2): Topology entry for 172.16.1.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2172416 Routing Descriptor Blocks: 10.0.0.1, from Redistributed, Send flag is 0x0 Composite metric is (2172416/0), Route is External Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 20100 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 1 External data: Originating router is 10.0.1.2 (this system) AS number of route is 1 External protocol is EIGRP, external metric is 2172416 Administrator tag is 0 (0x00000000) |
This routing information is propagated downstream to R3 as illustrated below:
| R3#show ip eigrp topology 2 172.16.1.0 255.255.255.0 IP-EIGRP (AS 2): Topology entry for 172.16.1.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2174976 Routing Descriptor Blocks: 10.0.1.2 (FastEthernet0/0), from 10.0.1.2, Send flag is 0x0 Composite metric is (2174976/2172416), Route is External Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 20200 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 2 External data: Originating router is 10.0.1.2 AS number of route is 1 External protocol is EIGRP, external metric is 2172416 Administrator tag is 0 (0x00000000) |
NOTE: Although the Topology Table on R3 shows the original metric of the external EIGRP route, the metric assigned during redistribution will change just as any EIGRP metric would as EIGRP routes are propagated to downstream routers in the autonomous system. R3s metric includes the delay for the link between itself and R2.
Redistributing OSPF Routes into EIGRP
When redistributing OSPF routes into EIGRP, a metric must be manually specified because the two routing protocols use different metrics and EIGRP does not assign a default metric. In addition to this, while Cisco IOS software allows the configuration to be implemented, the routes will not be redistributed by the router. As an example, consider the topology illustrated in Figure 4-8 which shows a basic network running both EIGRP and OSPF:
Fig. 4-8. Redistributing Between Two EIGRP Autonomous Systems
Referencing Figure 4-8, R1 and R2 are both running OSPF, while R2 and R3 both are running EIGRP. Assuming that the network is correctly configured, R2 shows the following routes:
| R2#show ip route ospf 172.16.0.0/24 is subnetted, 1 subnets O 172.16.1.0 [110/65] via 10.0.0.1, 00:05:04, Serial0/0 |
Next, router R2 is configured to redistribute the OSPF routes into EIGRP as follows:
| R2(config)#router eigrp 2 R2(config-router)#redistribute ospf 2 R2(config-router)#exit |
Following this configuration, the output of the show ip route command for the 172.16.1.0/24 subnet shows that the route is being redistributed via EIGRP as was configured:
| R2#show ip route 172.16.1.0 255.255.255.0 Routing entry for 172.16.1.0/24 Known via “ospf 2”, distance 110, metric 65, type intra area Redistributing via eigrp 2 Last update from 10.0.0.1 on Serial0/0, 00:00:01 ago Routing Descriptor Blocks: * 10.0.0.1, from 1.1.1.1, 00:00:01 ago, via Serial0/0 Route metric is 65, traffic share count is 1 |
However, because no metric was specified, the route is actually not being redistributed and is not present in the EIGRP Topology Table; instead, only the connected subnet is present since this does not require a metric to be specified when being redistributed into EIGRP:
| R2#show ip eigrp 2 topology IP-EIGRP Topology Table for AS(2)/ID(10.0.1.2) Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply, r – reply Status, s – sia StatusP 10.0.0.0/24, 1 successors, FD is 2169856 via Redistributed (2169856/0) |
In order to redistribute the 172.16.1.0/24 subnet into EIGRP, the metric must be specified using any one of the three methods described earlier in this section. The following illustrates how to set the metric directly using the redistribute router configuration command:
| R2(config)#router eigrp 2 R2(config-router)#redistribute ospf 2 metric 1544 2000 255 1 1500 R2(config-router)#exit |
Following this configuration, the route is now included in the EIGRP Topology Table:
| R2#show ip eigrp 2 topology 172.16.1.0 255.255.255.0 IP-EIGRP (AS 2): Topology entry for 172.16.1.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2169856 Routing Descriptor Blocks: 10.0.0.1, from Redistributed, Send flag is 0x0 Composite metric is (2169856/0), Route is External Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 20000 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 0 External data: Originating router is 10.0.1.2 (this system) AS number of route is 2 External protocol is OSPF, external metric is 65 Administrator tag is 0 (0x00000000) |
And finally, the output of the show ip route command shows the EIGRP is redistributing the subnet; however, this time, the metric used during redistribution is included:
| R2#show ip route 172.16.1.0 255.255.255.0 Routing entry for 172.16.1.0/24 Known via “ospf 2”, distance 110, metric 65, type intra area Redistributing via eigrp 2 Advertised by eigrp 2 metric 1544 2000 255 1 1500 Last update from 10.0.0.1 on Serial0/0, 00:00:01 ago Routing Descriptor Blocks: * 10.0.0.1, from 1.1.1.1, 00:00:01 ago, via Serial0/0 Route metric is 65, traffic share count is 1 |
R2 advertises the route downstream to R3 which shows the following in the Topology Table:
| R3#show ip eigrp 2 topology 172.16.1.0 255.255.255.0 IP-EIGRP (AS 2): Topology entry for 172.16.1.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2172416 Routing Descriptor Blocks: 10.0.1.2 (FastEthernet0/0), from 10.0.1.2, Send flag is 0x0 Composite metric is (2172416/2169856), Route is External Vector metric: Minimum bandwidth is 1544 Kbit Total delay is 20100 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1500 Hop count is 1 External data: Originating router is 10.0.1.2 AS number of route is 2 External protocol is OSPF, external metric is 65 Administrator tag is 0 (0x00000000) |
Redistributing Connected and Static Routes into EIGRP
As was stated earlier in this section, by default EIGRP redistributes connected and static routes with a metric value of 0. Therefore a metric does not have to be explicitly configured when redistributing connected routes into EIGRP.
Figure 4-9 shows a basic EIGRP network comprised of two routers. R2 and R3 reside in EIGRP autonomous system 2. R2 has two additional Loopback interfaces, Loopback 253, with the IP address 192.168.253.2/24 and Loopback 254, with the IP address 192.168.254.2/24. These subnets will be redistributed into EIGRP on R2. In addition to this, two static routes are also configured on R2. The two static routes for the 172.16.253.0/24 and 172.16.254.0/24 subnets both point to the Null0 interface. These static routes will also be redistributed into EIGRP.
Fig. 4-9. Redistributing Connected and Static Routes into EIGRP
Assuming that EIGRP has been configured correctly between R2 and R3, the redistribution of the connected subnets is performed as follows:
| R2(config)#router eigrp 2 R2(config-router)#redistribute connected R2(config-router)#redistribute static R2(config-router)#end |
Following this configuration, the show ip eigrp topology command can be used to view the EIGRP metric values assigned to each of these routes which are derived from the interfaces:
| R2#show ip eigrp 2 topology 192.168.253.0/24 IP-EIGRP (AS 2): Topology entry for 192.168.253.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 128256 Routing Descriptor Blocks: 0.0.0.0, from Rconnected, Send flag is 0x0 Composite metric is (128256/0), Route is External Vector metric: Minimum bandwidth is 10000000 Kbit Total delay is 5000 microseconds Reliability is 255/255 Load is 1/255 Minimum MTU is 1514 Hop count is 0 External data: Originating router is 10.0.1.2 (this system) AS number of route is 0 External protocol is Connected, external metric is 0 Administrator tag is 0 (0x00000000) |
The same command, when used for any one of the static routes, shows the following:
| R2#show ip eigrp 2 topology 172.16.254.0/24 IP-EIGRP (AS 2): Topology entry for 172.16.254.0/24 State is Passive, Query origin flag is 1, 1 Successor(s), FD is 256 Routing Descriptor Blocks: 0.0.0.0, from Rstatic, Send flag is 0x0 Composite metric is (256/0), Route is External Vector metric: Minimum bandwidth is 10000000 Kbit Total delay is 0 microseconds Reliability is 0/255 Load is 0/255 Minimum MTU is 1500 Hop count is 0 External data: Originating router is 10.0.1.2 (this system) AS number of route is 0 External protocol is Static, external metric is 0 Administrator tag is 0 (0x00000000) |
When redistributing connected and static routes it is always considered good practice to use a route map to ensure that only the routes that should be imported are redistributed into EIGRP. For example, let us assume that only the 192.168.254.0/24 and the 172.16.254.0/24 prefixes should be redistributed into EIGRP. Based on the configuration implemented on R2 in the previous example, a distribute list could be used to filter these prefixes so that they would not be advertised to R3. However, this requires additional unnecessary configuration. The recommended solution, therefore, is to use a route map with route redistribution as follows:
| R2(config)#route-map CONNECTED-into-EIGRP permit 10 R2(config-route-map)#description ‘Only Loopback 254 Should Be Redistributed’ R2(config-route-map)#match interface loopback 254 R2(config-route-map)#exit R2(config)#route-map STATIC-into-EIGRP permit 10 R2(config-route-map)#description ‘Only 172.16.254.0 Should Be Redistributed’ R2(config-route-map)#match ip address 1 R2(config-route-map)#exit R2(config)#access-list 1 permit 172.16.254.0 R2(config)#router eigrp 2 R2(config-router)#redistribute connected route-map CONNECTED-into-EIGRP R2(config-router)#redistribute static route-map STATIC-into-EIGRP R2(config-router)#exit |
Following this configuration, the EIGRP Topology Table on R2 shows the following:
| R2#show ip eigrp 2 topology IP-EIGRP Topology Table for AS(2)/ID(10.0.1.2) Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply, r – reply Status, s – sia StatusP 10.0.1.0/24, 1 successors, FD is 28160 via Connected, FastEthernet0/0 P 172.16.254.0/24, 1 successors, FD is 256 via Rstatic (256/0) P 192.168.254.0/24, 1 successors, FD is 128256 via Rconnected (128256/0) |
NOTE: An alternative approach when redistributing static routes is to assign each static route a route tag. This can then be matched during redistribution. This negates the need to manually add to the ACL used to match static subnets when redistributing routes. The use of route tags is illustrated in the following configuration example:
| R2(config)#ip route 172.16.250.0 255.255.255.0 Null0 tag 888 R2(config)#ip route 172.16.251.0 255.255.255.0 Null0 tag 999 R2(config)#ip route 172.16.252.0 255.255.255.0 Null0 tag 888 R2(config)#ip route 172.16.253.0 255.255.255.0 Null0 tag 999 R2(config)#ip route 172.16.254.0 255.255.255.0 Null0 tag 888 R2(config)#ip route 172.16.255.0 255.255.255.0 Null0 tag 999 R2(config)#route-map STATIC-into-EIGRP permit 10 R2(config-route-map)#match tag 888 R2(config-route-map)#exit R2(config)#router eigrp 2 R2(config-router)#redistribute static route-map STATIC-into-EIGRP R2(config-router)#exit |
In the configuration above, six static routes have been configured on R2. The static routes with an even third octet have been assigned a route tag of 888, while those with an odd third octet have been assigned a route tag of 999. EIGRP has been configured to redistribute static routes based on the specified route map. The route map, in turn, has only been configured to match routes with a route tag of 888. Following this configuration, the EIGRP Topology Table on R2 shows the following route entries:
| R2#show ip eigrp 2 topology IP-EIGRP Topology Table for AS(2)/ID(10.0.1.2) Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply, r – reply Status, s – sia StatusP 172.16.252.0/24, 1 successors, FD is 256, tag is 888 via Rstatic (256/0) P 172.16.254.0/24, 1 successors, FD is 256, tag is 888 via Rstatic (256/0) P 172.16.250.0/24, 1 successors, FD is 256, tag is 888 via Rstatic (256/0) |


