redistribute protocol [process-id] [metric metric-value] [metric-type type-value] [match {internal | external 1 | external 2}] [tag tag-value] [route-map map-tag] [weight weight] [subnets]

no redistribute protocol [process-id] [metric metric-value] [metric-type type-value] [match {internal | external 1 | external 2}] [tag tag-value] [route-map map-tag] [weight weight] [subnets]

Syntax Description:


The routing protocol that is being "brought into" or redistributed into another routing protocol. For example, if bringing RIP routes into OSPF, the commands used would be as follows:

Router(config)#router ospf 1
Router(config-router)#redistribute rip

The following keywords can be used with the redistribute command: bgp, egp, eigrp, igrp, iso-igrp, isis, odr, ospf, mobile, static, connected, and rip.

The keyword static is used to redistribute IP static routes.

The keyword connected refers to routes which are established automatically by virtue of having enabled IP on an interface. For routing protocols such as OSPF, these routes will be redistributed as external to the autonomous system.


For bgp, eigrp, egp, igrp, or eigrp this is an autonomous system number, which is a 16-bit decimal number. For ospf, this is an appropriate OSPF process ID from which routes are to be redistributed. This identifies the routing process. This value takes the form of a nonzero decimal number. For rip, no process-id value is needed.

metric metric-value

Metric used for the redistributed route. If a value is not specified for this option, and no value is specified using the default-metric command, the default metric value is 0. Use a value consistent with the destination protocol. For example, if redistributing RIP into OSPF, use OSPF metrics in the redistribution statement:
Router(config)#router ospf 1
Router(config-router)#redistribute igrp 77 metric 100

OSPF's metric is cost. IGRP uses the combination of bandwidth, delay, reliability, load, and MTU. Since OSPF routers only understand cost, you must translate IGRP's metrics into one that OSPF understands.

metric-type type-value

When used with OSPF, the metric-type type-value defines the external link type associated with the default route advertised into the OSPF routing domain. It can be one of two values:

1�Type 1 external route

2�Type 2 external route

If a metric-type is not specified, the Cisco IOS software adopts a Type 2 external route.

match {internal | external 1 | external 2}

For OPSF, the criteria by which OSPF routes are redistributed into other routing domains. It an be one of the following:

internal�Routes that are internal to a specific autonomous system.

external 1�Routes that are external to the autonomous system, but are imported into OSPF as type 1 external routes.

external 2�Routes that are external to the autonomous system, but are imported into OSPF as type 2 external routes.

tag tag-value

32-bit decimal value attached to each external route. This is not used by the OSPF protocol itself. It may be used to communicate information between Autonomous System Boundary Routers. If none is specified, then the remote autonomous system number is used for routes from BGP and EGP. For other protocols, zero (0) is used.


Route map should be interrogated to filter the importation of routes from this source routing protocol to the current routing protocol. If not specified, all routes are redistributed. If this keyword is specified, but no route map tags are listed, no routes will be imported.


A route map is used to filter the importation of routes. If not specified, all routes are redistributed. The map-tag identifies by a number or name which route map to use. If the route-map keyword is specified, but no route map tags are listed, no routes will be imported.

weight weight

Defines the network weight when redistributing routes into BGP. Weight is an integer from 0 to 65535.


Allows subnetworks to be redistributed into OSPF. By default, subnetworks are not redistributed into OSPF, only routes that are not subnetted.


Command Description:

To redistribute routes from one routing domain into another routing domain, use the redistribute router configuration command. To disable redistribution, use the no form of this command.

A router receiving a link-state protocol such as OSPF with an internal metric will consider the cost of the route from itself to the redistributing router plus the advertised cost to reach the destination. An external metric only considers the advertised metric to reach the destination.

Whenever you use the redistribute or the default-information router configuration commands to redistribute routes into an OSPF routing domain, the router automatically becomes an Autonomous System Boundary Router (ASBR). An ASBR does not, by default, generate a default route into the OSPF routing domain.

When routes are redistributed between OSPF processes, no OSPF metrics are preserved. When routes are redistributed into OSPF and no metric is specified in the metric keyword, the default metric that OSPF uses is 20 for routes from all protocols except a BGP route, which gets a metric of 1. Furthermore, when the router redistributes from one OSPF process to another OSPF process on the same router, and if no default metric is specified, the metrics in one process are carried to the redistributing process.

The only directly connected routes affected by the redistribute command are the routes not specified by the network command.

You cannot use the default-metric command to affect the metric used to advertise connected routes.


The following example causes OSPF routes to be redistributed into a BGP domain:

Router(config)#router bgp 109
 Router(config-router)#redistribute ospf 1 match internal

The following example causes IGRP routes (for Autonomous System 1) to be redistributed into an OSPF domain. Subnets are also redistributed. The metric for these routes is converted from an IGRP metric to an OSPF cost of 100:

Router(config)#router ospf 110
Router(config-router)#redistribute igrp 1 metric 100 subnets

The following example causes the specified IGRP process routes to be redistributed into an OSPF domain. The IGRP-derived metric will be converted to an OSPF cost of 100 and RIP routes to a cost value of 200.

Router(config)#router ospf 109 Router(config-router)#redistribute igrp 108 metric 100 subnets
Router(config-router)#redistribute rip metric 200 subnets

In the following example, network will appear as an external LSA in OSPF 1 with a cost of 100 (the cost is preserved):

Router(config)#interface ethernet 0
Router(config-if)#ip address
Router(config-if)#ip ospf cost 100
Router(config-if)#interface ethernet 1
Router(config-if)#ip address
Router(config)#router ospf 1
Router(config-router)#network area 0
Router(config-if)#redistribute ospf 2 subnet
Router(config)#router ospf 2
Router(config-router)#network area 0

The metric value specified in the redistribute command supercedes the metric value specified using the default-metric command.

When redistributing one protocol into another, each protocol's metrics play an important role in redistribution. RIP uses hop count as its metric while IGRP/EIGRP uses bandwidth and delay. When routes are redistributed, a metric must be defined that is understood by the protocol into which the routes are going. There are two methods for defining metrics during redistribution: (1) use the metric parameter in conjunction with the redistribute command or (2) use the default-metric router configuration command. The metric metric-value specified in the redistribute command supersedes the metric value specified by the default-metric command. For example, when defining the metric for a specific redistribution, the redistribute...metric command is used:


Router(config)#router rip

Router(config-router)#redistribute static metric 1

Router(config-router)#redistribute ospf 1 metric 2


The other option is to assign all redistributed routes the same metric using the default-metric command. When this is done all redistributions receive the same metric. In the example shown below, all redistributions receive the metric of one hop count:

Router(config)#router rip

Router(config-router)#redistribute static

Router(config-router)#redistribute ospf 1



Related Commands:


show ip route


show ip protocols




default-information originate


� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)