filter (OSPF area view)

Function

The filter export command filters the outgoing Type-3 LSAs of the local area.

The undo filter export command restores the default setting.

The filter import command filters incoming Type-3 LSAs of the local area.

The undo filter import command restores the default setting.

By default, the outgoing Type-3 LSAs of the local area are not filtered.

By default, incoming Type-3 LSAs are not filtered.

Format

filter { acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name | route-filter route-filter-name } export

filter { acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name | route-filter route-filter-name } import [ include-abr-summary ]

filter acl-number export

filter acl-number import [ include-abr-summary ]

undo filter [ acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name | route-filter route-filter-name | acl-number ] export

undo filter [ acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name | route-filter route-filter-name | acl-number ] import

Parameters

Parameter Description Value
acl-name acl-name

Specifies the name of a named basic ACL.

The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive).

ip-prefix ip-prefix-name

Specifies the name of an IP prefix list.

The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

route-policy route-policy-name

Specifies the name of a route-policy.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

route-filter route-filter-name

Specifies the name of route filter policy.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters.

include-abr-summary

Specifies a route-policy for the summarized route on the ABR.

-

acl-number

Specifies the number of a basic ACL.

The value is an integer ranging from 2000 to 2999.

Views

OSPF area view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

The filter export command can be used to filter out the unneeded LSAs that do not need to be sent to neighbors to reduce the size of the LSDB and speed up network convergence.

The filter import command can be used to filter out the unneeded LSAs learned from neighbors to reduce the size of the LSDB and speed up network convergence.

Configuration Impact

After filtering conditions are set for the outgoing Type-3 LSAs to be advertised using the filter export command, only the outgoing Type-3 LSAs that match the filtering conditions can be advertised.

After filtering conditions are set for the incoming Type-3 LSAs using the filter import command, only the incoming Type-3 LSAs that match the filtering conditions can be accepted.

Precautions

  • The command can be configured only on an ABR.
  • Run the filter import command to set filtering conditions for the incoming Type-3 LSAs.
  • Run the filter export command to set filtering conditions for the outgoing Type-3 LSAs to be advertised.

Example

# Configure OSPF to filter outgoing Type-3 LSAs.
<HUAWEI> system-view
[~HUAWEI] ip ip-prefix prefix1 deny 1.1.1.1 24
[*HUAWEI] ospf 1
[*HUAWEI-ospf-1] area 1
[*HUAWEI-ospf-1-area-0.0.0.1] filter ip-prefix prefix1 export
# Configure an ABR to filter incoming Type-3 LSAs of the area where the ABR resides.
<HUAWEI> system-view
[~HUAWEI] ip ip-prefix prefix1 deny 1.1.1.1 24
[*HUAWEI] ospf 100
[*HUAWEI-ospf-100] area 1
[*HUAWEI-ospf-100-area-0.0.0.1] filter ip-prefix prefix1 import
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >