Configuring OSPF to Filter Received Routes
Procedure
- Run system-view
The system view is displayed.
- Run ospf [ process-id ]
The OSPF process view is displayed.
- Run filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name [ secondary ] } import
OSPF is configured to filter received routes.
- The parameter acl-number specifies the number of a basic ACL.
- The parameter acl-name acl-name specifies the name of an ACL.
- The parameter ip-prefix ip-prefix-name specifies the name of an IP prefix list.
OSPF is a link-state dynamic routing protocol, with routing information carried in LSAs. Therefore, the filter-policy import command cannot be used to filter advertised or received LSAs.
The filter-policy import command is used to filter the routes calculated by OSPF. Only routes that pass the filtering criteria are added to the routing table. Routes that do not pass the filtering criteria are not added to the OSPF routing table but can be advertised.
- Run commit
The configuration is committed.