Configuring OSPF to Filter the Routes to Be Advertised
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 } export [ protocol [ process-id ] ]
OSPF is configured to filter the routes imported through the import-route command. Only the routes that pass the filtering criteria are advertised.
- 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.
You can specify the parameter protocol [ process-id ] to filter the routes of a certain routing protocol or a certain OSPF process. If the parameter protocol [ process-id ] is not specified, OSPF filters all imported routes.
- The import-route command cannot be used to import external default routes.
- Only the external routes that passing the filtering criteria are advertised through Type 5 LSAs generated by OSPF.
- Run commit
The configuration is committed.