H3C S7500 Series Ethernet Switches Command Manual

Table Of Contents
Command Manual – Routing Protocol
H3C S7500 Series Ethernet Switches Chapter 3 OSPF Configuration Commands
3-32
ip-prefix-name: Name of the address prefix list used for routing information filtering
based on destination addresses, a string of 1 to 19 characters.
gateway ip-prefix-name: Specifies the name of the address prefix list used for filtering
the addresses of the neighbor routers advertising the routing information.
Description
Use the filter-policy import command to configure the OSPF rules for filtering the
routing information received.
Use the undo filter-policy import command to cancel the filtering of the routing
information received.
By default, no filtering of the received routing information is performed.
In some situations, it may be required that only the routing information meeting some
conditions can be received. You can use the filter-policy command to set the filtering
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.
Examples
# Filter the received routing information according to the rule defined by ACL 2000.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] acl number 2000
[H3C-acl-basic-2000] rule permit source 20.0.0.0 0.255.255.255
[H3C-acl-basic-2000] rule deny source any
[H3C-ospf-1] filter-policy 2000 import
3.1.27 import-route
Syntax
import-route protocol [ process-id | allow-ibgp ] [ cost value | type value | tag value |
route-policy route-policy-name ]*
undo import-route protocol [ process-id ]
View
OSPF view