OSPF route filtering commands

1       filter import ( ABR , affecting LSA-3 into the area )

The filter import command is used to configure the filtering of Type-3 LSA ( Summary LSA ) in the incoming direction in the area

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

scenes to be used

By filtering the LSAs in the area, you can avoid sending useless LSAs to neighbors , thereby reducing the size of the LSDB and improving the network convergence speed.

Configuration impact

Use the filter import command to set filter conditions for Type3 LSAs in the inbound direction in the area . Only the information that passes the filter can be received and released.

Precautions

This command is only configured on the ABR .

2       filter export ( ABR , affecting LSA-3 out of the area )

Use the filter export command to configure the filtering of Type-3 LSA ( Summary LSA ) in the outbound direction in the area .

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

scenes to be used

By filtering the LSAs in the area, you can avoid sending useless LSAs to neighbors , thereby reducing the size of the LSDB and improving the network convergence speed.

Configuration impact

Use the filter export command to set filter conditions for Type3 LSAs in the outbound direction in the area . Only the information that passes the filter can be received and released.

Precautions

This command is only configured on the ABR .

Filter import is to filter routes when entering an area (affecting the region), does not affect other areas of learning (as in Area 0 do filter import filter Area 1 over LSA3 routing, Area 2 is normally learned), Export routing leave Filtering in a certain area affects learning in other areas, and only LSA3 is filtered.

3       filter-policy import (any, affecting the local routing table , not affecting LSA notification and acceptance , affecting the generation of LSA3 )

Filter-policy import can be used on routers of any role, but when it is applied to ABR , because the route is filtered, the router will not produce LSA3 for the filtered route .

Policy-Impo filter R & lt T command according to the filtering policy , provided OSPF received route filtering.

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | { route-policy route-policy-name | route-filter route-filter-name } [ secondary ] } import

user's guidance

Use the filter-policy import command to set a filtering policy on the received routes. Only the routes that pass the filtering will be added to the routing table and advertised. The routes that fail the filtering will be added to the OSPF routing table but not added to the route. Table RIB ( Routing Information Base ), and will not be released.

Since OSPF is a dynamic routing protocol based on link state, routing information is carried in LSDB ( Link-state Database ), so the filter-policy import command cannot be used to filter the advertised and received LSA ( Link Status Advertisement ). This command actually filters the routes calculated by OSPF , and only the routes that pass the filter are added to the routing table RIB .

Precautions

For a named the ACL , only the source parameter specifies the range of source addresses and time-range parameter specifies the period of time effective filtering rules configuration rules.

4       filter-policy export ( ASBR , affecting external routes become LSA5 advertisements)

filter-policy export command to filter in accordance with policy , arranged to filter incoming routes when publishing outwardly.

filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export [ direct | static | unr | bgp | { rip | isis | ospf } [ process-id ] ]

scenes to be used

After OSPF uses the import-route command to import external routes, in order to avoid routing loops, the filter-policy export command is used to filter the imported routes during advertising, and only the external routes that meet the conditions are converted to Type-5 LSA ( AS -external-LSA ) and publish it.

Filter the routes of a specific protocol or process by specifying the protocol or process-id . If protocol and process-id are not specified , OSPF will filter all imported routing information.

Precautions

Since Type-5 LSA is generated by ABSR , this command is only configured on ASBR .

The use of filter-policy export requires the import of external routes first. The difference between importing external routes and carrying route-policy is as follows: the left is filtering after importing external routes, and the right is filtering when importing external routes. The execution time is different and the effect is the same.

ospf   1

import   rip

filter-policy   2001 export rip

ospf   1

import   rip route-policy abc

 

5       OSPF filter-lsa-out (filter LSA )

The ospf filter-lsa-out command is used to configure the filtering of LSAs in the outbound direction of OSPF interfaces in P2P , broadcast networks, and NBMA networks .

ospf filter-lsa-out { all | { summary [ acl { acl-number | acl-name } ] | ase [ acl { acl-number | acl-name } ] | nssa [ acl { acl-number | acl-name } ] } * }

scenes to be used

In P2P , broadcast networks, and NBMA networks, when there are multiple links between two devices, according to the filtering strategy, the local device is configured to filter LSA on some links through the command ospf filter-lsa-out to reduce Unnecessary retransmissions save bandwidth resources.

Configuration impact

By filtering the LSA in the outbound direction of the OSPF interface, you can avoid sending useless LSA to the neighbor , thereby reducing the size of the neighbor LSDB and improving the network convergence speed. After the ospf filter-lsa-out command is configured on an interface, the OSPF neighbor relationship of the interface will be automatically rebuilt.

Grace LSA is used to notify neighbors of GR ( Graceful Restart ) time, reason, and interface instance ID when starting and exiting GR . This command cannot filter Grace LSA .

For example, if there are multiple links between two routers in the same area, you can add ospf filter-lsa-out all on the interface of a certain link , which reduces the flooding overhead, but does not affect the integrity of the LSDB of each router .

The ospf filter-lsa-out multi-area command configures the filtering of LSAs in the outbound direction of OSPF multi-area adjacent interfaces . ospf filter-lsa-out {all | {summary [acl {acl-number | acl-name}] | ase [acl {acl-number | acl-name}] | nssa [acl {acl-number | acl-name} ]} *} multi-area area-id

#Set the multi-area adjacency interface GigabitEthernet1/0/0 to filter all LSAs in the outbound direction except Grace LSA .

<HUAWEI> system-view

[~HUAWEI] interface gigabitethernet 1/0/0

[~HUAWEI-GigabitEthernet1/0/0] ospf enable 1 area 0

[~HUAWEI-GigabitEthernet1/0/0] ospf enable multi-area 1

[~HUAWEI-GigabitEthernet1/0/0] ospf filter-lsa-out all multi-area 1

6       abr-summary not-advertise ( ABR filtering LSA3 )

The abr-summary command is used to set the area border router ABR to aggregate routes in the area. It can only be used in ABR (the origin of LSA3 ) . abr-summary can aggregate summary-LSA (LSA3) ,

1. When there is no advertise or not-advertise parameter, only the aggregated route is advertised ( LSA3 of the aggregated route )      

2. When the advertise parameter is provided, aggregate and detailed routes ( LSA3 ) will be announced at the same time      

3. When the not-advertise parameter is provided, neither the details nor the aggregated route ( LSA3 ) is advertised , which realizes the function of filtering LSA3 .      

7       asbr-summary not-advertise ( ABR filter LSA5/7 )

Applied to ASBR , the effect is the same as abr-summary , used to filter the aggregation of LSA5/7 generated by ASBR .

 


Guess you like

Origin blog.51cto.com/xxy12345/2608861