Parameters
protocol
: Redistributes routes from the specified protocol, which can be
bgp
,
direct
,
isis
,
ospf
,
rip
,
or
static
.
process-id
: Process ID, in the range of 1 to 65535. The default is 1. It is available only when the
protocol
is
rip
,
ospf
, or
isis
.
all-processes
: Redistributes routes from all the processes of the specified routing protocol. This
keyword takes effect only when the protocol is
rip
,
ospf
, or
isis
.
allow-ibgp
: Allows IBGP routes redistribution. It is optional only when the
protocol
is
bgp
.
cost cost
: Specifies a route cost, in the range of 0 to 16777214. The default is 1.
type
type
: Specifies a cost type, 1 or 2. The default is 2.
tag
tag
: Specifies a tag for external LSAs. The default is 1.
route-policy route-policy-name
: Specifies a routing policy to redistribute qualified routes only. A
routing policy name is a string of up to 63 case-sensitive characters.
Description
Use
import-route
to redistribute routes from another protocol.
Use
undo import-route
to disable route redistribution from a protocol.
Route redistribution from another protocol is not configured by default.
OSPF prioritize routes into the following levels:
•
Intra-area route
•
Inter-area route
•
Type1 External route
•
Type2 External route
An intra-area route is a route in an OSPF area. An inter-area route is between any two OSPF areas.
Both of them are internal routes.
An external route is a route to a destination outside the OSPF AS.
A Type-1 external route has high reliability. Its cost is comparable with the cost of OSPF internal
routes. The cost from an OSPF router to a Type-1 external route’s destination equals the cost from
the router to the ASBR plus the cost from the ASBR to the external route’s destination.
A Type-2 external route has low credibility, so OSPF considers the cost from the ASBR to a Type-2
external route is much bigger than the cost from the ASBR to an OSPF internal router. The cost from
an internal router to a Type-2 external route’s destination equals the cost from the ASBR to the
Type-2 external route’s destination.
The
import-route
command cannot redistribute default routes.
Use the
import-route bgp allow-ibgp
command with care, because it redistributes both EBGP and
IBGP routes that may cause routing loops.
Only active routes can be redistributed. Use the
display ip routing-table
protocol
command to
display route state information.
The
undo import-route protocol
all-processes
command cancels the configuration made by the
import-route protocol
all-processes
command, rather than the
import-route protocol
process-id
command.
Related commands:
default-route-advertise.
Examples
# Redistribute routes from RIP process 40 and specify the type, tag, and cost as 2, 33 and 50 for
redistributed routes.
98