To redistribute
routes from one routing domain into Open Shortest Path First Version 3
(OSPFv3), use the
redistribute
command in an appropriate configuration mode. To remove the
redistribute
command from the configuration file and restore the system to
its default condition in which the software does not redistribute routes, use
the
no form of this
command.
Border Gateway
Protocol (BGP)
redistribute bgp process-id [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
no redistribute bgp process-id [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
Local
Interface Routes
redistribute connected [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
no redistribute connected [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
Enhanced
Interior Gateway Routing Protocol (EIGRP)
redistribute eigrp process-id [match {external [1 | 2] | internal}] [metric metric-value] [metric-type {1 | 2}] [route-policy policy-name] [tag tag-value]
no redistribute eigrp process-id [match {external [1 | 2] | internal}] [metric metric-value] [metric-type {1 | 2}] [route-policy policy-name] [tag tag-value]
Intermediate
System-to-Intermediate System (IS-IS)
redistribute isis process-id [level-1 | level-2 | level-1-2] [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
no redistribute isis process-id [level-1 | level-2 | level-1-2] [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
Open
Shortest Path First Version 3 (OSPFv3)
redistribute
ospfv3 process-id match {external | 1 | 2 | internal | nssa-external | [1 | 2]} [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
no redistribute
ospfv3 process-id [match | {external | internal | nssa-external}] [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
Static
redistribute static [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
no redistribute static [metric metric-value] [metric-type {1 | 2}] [policy policy-name] [tag tag-value]
Syntax Description
bgp
|
Distributes routes from the BGP protocol.
|
process-id
|
For the
bgp
keyword, an autonomous system number has the following
ranges:
- Range for 2-byte Autonomous
system numbers (ASNs) is 1 to 65535.
- Range for 4-byte Autonomous
system numbers (ASNs) in asplain format is 1 to 4294967295.
- Range for 4-byte Autonomous
system numbers (ASNs) is asdot format is 1.0 to 65535.65535.
For the
isis
keyword, an IS-IS instance name from which routes are
to be redistributed. The value takes the form of a string. A decimal number can
be entered, but it is stored internally as a string.
For the
ospf
keyword, an OSPF instance name from which routes are
to be redistributed. The value takes the form of a string. A decimal number can
be entered, but it is stored internally as a string.
|
metric
metric-value
|
(Optional)
Specifies the metric used for the redistributed route. Range is 1 to 16777214.
Use a value consistent with the destination protocol.
|
metric-type
{
1
|
2
}
|
(Optional)
Specifies the external link type associated with the 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 no
metric-type
is specified, the default is Type 2 external routes.
|
tag
t
ag-value
|
(Optional)
Specifies the 32-bit dotted-decimal value attached to each external route. This
value is not used by the OSPF protocol itself, but is carried in the External
LSAs. Range is 0 to 4294967295.
|
policy
policy-name
|
(Optional)
Specifies the identifier of a configured policy. A policy is used to filter the
importation of routes from this source routing protocol to OSPF.
|
connected
|
Distributes routes that are established automatically by virtue
of having enabled IP on an interface.
|
eigrp
|
Distributes routes from the EIGRP protocol.
|
isis
|
Distributes routes from the IS-IS protocol.
|
level-1
|
(Optional)
Redistributes Level 1 routes into other IP routing protocols independently.
|
level-1-
2
|
(Optional)
Redistributes both Level 1 and Level 2 routes into other IP routing protocols.
|
level-2
|
(Optional)
Redistributes Level 2 routes into other IP routing protocols independently.
|
ospf
|
Distributes routes from the OSPF protocol.
|
match
{
internal
|
external
[
1
|
2
] |
nssa-external
[
1
|
2
]}
|
(Optional)
Specifies the criteria by which OSPF routes are redistributed into other
routing domains. It can be one or more of the following:
-
internal
—Routes that are internal to a specific autonomous
system (intra- and inter-area OSPF routes).
-
external
[
1
| 2
]—Routes that are external to the autonomous system,
but are imported into OSPF as Type 1 or Type 2 external routes.
-
nssa-external
[
1
| 2
]—Routes that are external to the autonomous system,
but are imported into OSPF as Type 1 or Type 2 not-so-stubby area (NSSA)
external routes.
For the
external
and
nssa-external
options, if a type is not specified, then both Type 1
and Type 2 are assumed.
If no
match is specified, the default is no filtering.
|
static
|
Redistributes IP static routes.
|
Command Default
Route
redistribution is disabled.
metric
metric-value:
Default is 20 for routes from all protocols except BGP routes,
in which the default is 1.
metric-type
type-value
: Type 2 external route
All routes from
the OSPFv3 routing protocol are redistributed.
tag
tag-value
: If no value is specified, the remote autonomous system number
is used for routes from Border Gateway Protocol (BGP); for other protocols, the
default is 0.
Command Modes
Router OSPFv3 configuration
OSPFv3 VRF configuration
Command History
Release
|
Modification
|
Release 3.7.2
|
This
command was introduced.
|
Release 3.9.0
|
Asplain
format for 4-byte Autonomous system numbers notation was supported.
|
Release 4.1.0
|
This
command was supported under OSPFv3 VRF configuration submode.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user
group assignment is preventing you from using a command, contact your AAA administrator for assistance.
 Note |
When
redistributing routes (into OSPF) using both command keywords for setting or
matching of attributes and a route policy, the routes are run through the route
policy first, followed by the keyword matching and setting.
|
Disabling or
changing the arguments of any keyword does not affect the state of other
keywords.
In general, route
redistribution from Level 1 to Level 2 is automatic. You might want to use this
command to better control which Level 1 routes can be redistributed into Level
2.
The redistibution
of Level 2 routes into Level 1 is called
route
leaking. Route leaking is disabled by default. That is, Level 2 routes are
not automatically included in Level 1 link-state protocols. If you want to leak
Level 2 routes into Level 1, you must enable that behavior by using this
command.
Redistribution
from Level 1 into Level 1 and from Level 2 into Level 2 is not allowed.
A router receiving
a link-state packet with an internal metric considers the cost of the route
from itself to the redistributing router plus the advertised cost to reach the
destination. An external metric considers only the advertised metric to reach
the destination.
Redistributed
routing information should always be filtered by the
distribute-list prefix-list out
command. Use of this command ensures that only those routes
intended by the administrator are passed along to the receiving routing
protocol.
OSPFv3 Considerations
Whenever you use
the
redistribute
or the
default-information
command to redistribute routes into an OSPFv3 routing domain,
the router automatically becomes an ASBR. However, an ASBR does not, by
default, generate a default route into the OSPFv3 routing domain.
When routes are
redistributed between OSPFv3 processes, no OSPFv3 metrics are preserved.
When routes are
redistributed into OSPF and no metric is specified with the
metric
keyword, OSPF uses 20 as the default metric for routes from
all protocols except BGP routes, which get a metric of 1. Furthermore, when the
router redistributes from one OSPFv3 process to another OSPFv3 process on the
same router, and if no default metric is specified, the metrics in one process
are carried to the redistributing process.
BGP Considerations
The only connected
routes affected by this command are the routes not specified by the
network
(BGP) command.
Task ID
Task ID
|
Operations
|
ospf
|
read,
write
|
The following
example shows how to cause static routes to be redistributed into an OSPFv3
domain:
RP/0/RSP0/CPU0:router(config)# router ospfv3 109
RP/0/RSP0/CPU0:router(config-ospfv3)# redistribute isis level-1