To redistribute routes from a Border Gateway Protocol (BGP) autonomous system into an International Organization for Standardization (ISO) Intermediate System-to-Intermediate System (IS-IS) routing process, use the redistribute command in router configuration mode. To remove the redistribute command from the configuration file and restore the system to its default condition where the software does not redistribute routes, use the no form of this command.
redistribute protocol as-number [route-type] [route-map map-tag]
no redistribute protocol as-number [route-type] [route-map map-tag]
Route redistribution is disabled.
protocol: No source protocol is defined.
route-type: ip
route-map map-tag: If the route-map argument is not entered, all routes are redistributed; if no
map-tag value is entered, no routes are imported.
Router configuration
The clns keyword must be specified to redistribute NSAP prefix routes from BGP into an ISO IS-IS routing process. This version of the redistribute command is used only under router configuration mode for IS-IS processes.
The following example configures NSAP prefix routes from BGP autonomous system 64500 to be redistributed into the IS-IS routing process called osi-proc-17:
router isis osi-proc-17
redistribute bgp 64500 clns
To redistribute routes from one routing domain into another routing domain, use the redistribute command in router configuration mode. To disable redistribution, use the no form of this command.
redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [as-number] [metric metric-value] [metric-type type-value] [match {internal | external 1 | external 2}]
[tag tag-value] [route-map map-tag] [subnets]
no redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [as-number] [metric metric-value] [metric-type type-value] [match {internal | external 1 | external 2}]
[tag tag-value] [route-map map-tag] [subnets]
Route redistribution is disabled.
protocol: No source protocol is defined.
process-id: No process ID is defined.
metric metric-value: 0
metric-type type-value: Type 2 external route
match internal | external: Internal, external 1, external 2
external: Internal
tag tag-value: If no value is specified, the remote autonomous system number is used for routes from BGP and EGP; for other protocols, the default is 0.
route-map map-tag: If the route-map keyword is not entered, all routes are redistributed; if no map-tag value is entered, no routes are imported.
subnets: No subnets are defined.
Router configuration
Address family configuration
Changing or disabling any keyword will not affect the state of other keywords.
A router receiving a link-state protocol 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.
Routes learned from IP routing protocols can be redistributed at Level 1 into an attached area or at Level 2. The level-1-2 keyword allows both Level 1 and Level 2 routes in a single command.
Redistributed routing information must be filtered by the distribute-list out router configuration command. This guideline ensures that only those routes intended by the administrator are passed along to the receiving routing protocol.
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 ASBR. However, an ASBR does not, by default, generate a default route into the OSPF routing domain.
When routes are redistributed into OSPF from protocols other than OSPF or BGP, and no metric has been specified with the metric-type keyword and type-value argument, OSPF will use 20 as the default metric. When routes are redistributed into OSPF from BGP, OSPF will use 1 as the default metric. When routes are redistributed from one OSPF process to another OSPF process, Autonomous system (AS) external and not-so-stubby-area (NSSA) routes will use 20 as the default metric. When intra-area and inter-area routes are redistributed between OSPF processes, the internal OSPF metric from the redistribution source process is advertised as the external metric in the redistribution destination process. (This is the only case in which the routing table metric will be preserved when routes are redistributed into OSPF.)
When routes are redistributed into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.
Routes configured with the connected keyword affected by this redistribute command are the routes not specified by the network router configuration command.
You cannot use the default-metric command to affect the metric used to advertise connected routes.

Note
The metric value specified in the redistribute command supersedes the metric value specified using the default-metric command.
Default redistribution of IGPs or EGP into BGP is not allowed unless the default-information originate router configuration command is specified.
The following example shows how OSPF routes are redistributed into a BGP domain:
router bgp 109
redistribute ospf
The following example causes Enhanced Interior Gateway Routing Protocol (EIGRP) routes to be redistributed into an OSPF domain:
router ospf 110
redistribute eigrp
The following example causes the specified EIGRP process routes to be redistributed into an OSPF domain. The EIGRP-derived metric will be remapped to 100 and RIP routes to 200.
router ospf 109
redistribute eigrp 108 metric 100 subnets
redistribute rip metric 200 subnets
The following example configures BGP routes to be redistributed into IS-IS. The link-state cost is specified as 5, and the metric type will be set to external, indicating that it has lower priority than internal metrics.
router isis
redistribute bgp 120 metric 5 metric-type external
In the following example, network 172.16.0.0 will appear as an external link-state advertisement (LSA) in OSPF 1 with a cost of 100 (the cost is preserved):
interface ethernet 0
ip address 172.16.0.1 255.0.0.0
ip ospf cost 100
interface ethernet 1
ip address 10.0.0.1 255.0.0.0
!
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
redistribute ospf 2 subnet
router ospf 2
network 172.16.0.0 0.255.255.255 area 0