The system view is displayed.
Step 2
Run:
ospf
[
process-id
]
The OSPF process view is displayed.
Step 3
Run:
import-route
{
limit
limit-number
| {
bgp
[
permit-ibgp
] |
direct
|
unr
|
rip
[
process-id-rip
] |
static
|
isis
[
process-id-isis
] |
ospf
[
process-id-ospf
] }
[
cost
cost
|
type
type
|
tag
tag
|
route-policy
route-policy-name
]
*
}
Routes are imported from another protocol.
Step 4
(Optional) Run:
default
{
cost
{
cost
|
inherit-metric
} |
limit
limit
|
tag
tag
|
type
type
}
*
The default values of parameters (the cost, number of routes, tag, and type) are set for imported
routes.
When OSPF imports external routes, you can set default values for some additional parameters,
such as the cost, number of routes to be imported, route tag, and route type. The route tag is used
to identify the protocol-related information. For example, it can be used to differentiate AS
numbers carried in BGP routes imported by OSPF.
By default, the cost of the external routes imported by OSPF is 1; a maximum of 2147483647
routes can be imported each time; the type of the imported external routes is Type 2; the default
tag value of the imported routes is 1.
NOTE
You can run one of the following commands to set the cost of the imported route. The following commands
are listed in descending order of priorities.
l
Run the
apply cost
command to set the cost of a route.
l
Run the
import-route
command to set the cost of the imported route.
l
Run the
default
command to set the default cost of the imported route.
Step 5
(Optional) Run any of the following commands as required:
filter-policy
{
acl-number
|
acl-name
acl-name
|
ip-prefix
ip-prefix-name
|
route-
policy
route-policy-name
}
export
[
protocol
[
process-id
] ]
l
Based on the basic ACL:
1.
Run:
filter-policy
{
acl-number
|
acl-name
acl-name
}
export
[
protocol
[
process-
id
] ]
Routes imported using
can be advertised only when meeting filtering conditions.
2.
Run:
quit
Return to the system view.
3.
Run:
acl
{ [
number
]
acl-number1
|
name
acl-name
basic
[
number
acl-number2
] }
[
match-order
{
auto
|
config
} ]
The basic ACL view is displayed.
4.
Run:
HUAWEI NetEngine80E/40E Router
Configuration Guide - IP Routing
5 OSPF Configuration
Issue 02 (2014-09-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
293