Command Manual – Routing Protocol
Quidway S3900 Series Ethernet Switches-Release 1510
Chapter 3 OSPF Configuration Commands
Huawei Technologies Proprietary
3-34
conditions for the routing information to be received. Only the routing information
passing the filter can be received.
The
filter-policy import
command filters the routes calculated by OSPF. Only the
routes passing the filter can be added to the routing table. The routes can be filtered
based on next hop and destination address.
OSPF is a dynamic routing protocol based on link state, with routing information hidden
in LSAs. Therefore, OSPF cannot filter any advertised or received LSA. This command
is used much less in OSPF than in distance-vector routing protocols.
Example
# Filter the received routing information according to the rule defined by ACL 2000.
<Quidway> system-view
System View: return to User View with Ctrl+Z.
[Quidway] acl number 2000
[Quidway-acl-basic-2000] rule permit source 20.0.0.0 0.255.255.255
[Quidway-acl-basic-2000] rule deny source any
[Quidway-ospf-1] filter-policy 2000 import
3.1.28 import-route
Syntax
import-route protocol
[
cost
value
|
type
value
|
tag
value
|
route-policy
route-policy-name
]*
undo import-route protocol
View
OSPF view
Parameter
protocol
: Source routing protocol whose routes will be imported. At present, it can be
direct
,
mip
,
rip
,
static
,
ospf-ase
,
and
ospf-nssa
.
route-policy
route-policy-name
: Imports only the routes matching the specified
route-policy.
cost value
: Specifies the cost of imported external routes.
type value
: Specifies the cost type of imported external routes. The value ranges from
1 to 2.
tag value
: Specifies the tag of imported external routes.
Description
Use the
import-route
command to import external routes.