Table of Contents
LSA Filter Overview
Route filtering in OSPF works differently than EIGRP/RIP, etc. The distribute-list and prefix-list in OSPF do not filter LSAs that are sent and received between routers.
There is also a way to filter LSAs. There are two types of LSAs that can be filtered
- LSA Type3
- LSA Type5(LSA Type7)
LSA type 3 is an LSA that represents a network address/subnet mask that exists in another area for an area. Also, LSA type 5 and LSA type 7 are LSAs that represent network addresses/subnet masks that exist outside the OSPF domain. Each LSA has a specific router that generates it: LSA type 3 is generated by the Area Border Router (ABR); LSA types 5 and 7 are generated by the Autonomous System Boundary Router (ASBR).
Each LSA can be filtered by the router that generates it. In other words, ABR can filter LSA type 3. Also, LSA type 5 and LSA type 7 can be filtered by ASBR. To filter LSA type 3, use the area filter-list command in ABR. Also, to filter LSA type 5 and LSA type 7, use the distribute-list out command in the ASBR.
Related article
Please also refer to the following article about the types of LSAs in OSPF.
Configuring LSA Type 3 Filters
To filter LSA type 3 in OSPF, use the area filter-list command in ABR. The syntax of the area filter-list command is as follows.
(config)#router ospf ‹process-id›
(config-router)#area ‹area-id› filter-list prefix ‹prefix-list-name› {in|out}
‹process-id›: OSPF process ID
‹area-id›: area ID
‹prefix-list-name›: Prefix-list name
The LSA type 3 contains the network address/subnet mask. The prefix list specifies the network address/subnet mask to permit/deny. In addition, there are in and out to specify the direction.
in filters when generating LSA type 3 in the LSDB of the specified area from the LSDB of another area. On the other hand, out filters when LSA type 3 is generated from the LSDB of the specified area into the LSDB of another area. The following figure illustrates how to specify the direction of the area filter-list.
To verify in which direction the area filter-list command was configured for which area, use the show ip ospf command. Also, to verify the prefix list is the show ip prefix-list command. And to verify whether the LSA type 3 in the LSDB is actually filtered or not, use the show ip ospf database command.
Related article
For a detailed example of LSA Type 3 filter configuration, please see the following article.
Configuring LSA Type 5 Filters
LSA type 5 can be filtered when redistributing to OSPF from other routing processes on ASBR. In other words, the LSA type 5 filter assumes OSPF redistribution. Also, there are two configurations for LSA type 5 filters: one that uses the distribute-list/prefix-list, and one that uses the route map.
For NSSA, the filter is an LSA type 7 filter. The concept is the same as for the LSA type 5 filter.
Filter by distribute-list/prefix-list
The configuration of the filter for LSA type 5 when using the distribute-list/prefix-list is as follows
(config-router)#redistribute ‹protocol› subnets
(config-router)#distribute-list [prefix] {<ACL>|<prefix-list-name>} out ‹protocol›
‹process-id›:OSPFプロセスID
‹protocol›: Routing process of redistribution source
‹ACL›: ACL number
‹prefix-list-name›: prefix-list name
Identify the LSA type 5 to be generated by the ASBR by means of standard access list or prefix list. Note that the application of a standard access list or a prefix list is out direction. After “out”, specify the same redistribute source routing process as the one specified in redistribute command.
Filter by route-map
The configuration of the filter for LSA type 5 when using route maps is as follows
(config)#router ospf ‹process-id›
(config-router)#redistribute ‹protocol› subnets route-map ‹route-map-name›
‹process-id›: OSPF process ID
‹protocol›: Routing process of redistribution source
‹route-map-name›:route-map name
The route map identifies the LSA type 5 to be generated by the ASBR. The route map is applied as an option of the redistribute command. With route-map, you can do filter + alpha: you can not only simply filter LSA type 5, but also change the metric type and metric, and add a route tag.
Related article
For a detailed example of configuring LSA type 5 filters, please see the following article.
How the OSPF works
- OSPF Overview
- OSPF process flow
- OSPF Router ID : Identify OSPF routers
- What if the router ID of the OSPF router is duplicated?
- OSPF Neighbor and Adjacency
- OSPF DR/BDR
- How show ip ospf neighbor looks on Ethernet
- OSPF Network Type : Classification of OSPF-enabled interfaces
- Synchronization process of OSPF LSDB
- Problems with large-scale OSPF network
- OSPF Area – Inside the area, in detail; outside the area, just a summary
- OSPF Router Type
- OSPF LSA Type
- OSPF Area Type
- OSPF Basic Configuration and Verification Commands
- Details of enabling OSPF on the interface
- OSPF Advertising Loopback Interface
- Configuring and Verifying OSPF Hello/Dead interval
- OSPF Cost Configuration and Verification
- Configuring and Verifying OSPF Router Priority
- Configuring OSPF Neighbor Authentication
- Neighbor Authentication over Virtual-link
- OSPF Configuring and Verifying Stub area [Cisco]
- OSPF Stub Area Configuration Example [Cisco]
- OSPF default route generation : default-information originate command
- Configuration Example of OSPF default route generation : stub area
- OSPF Virtual-Link : Virtual area 0 point-to-point link
- Configuring and Verifying OSPF Virtual-link [Cisco]
- OSPF Virtual-link Configuration Example [Cisco]
- OSPF Virtual-link for discontinuous backbone configuration example
- OSPF Route Summary and Configuration
- Cisco OSPF Route Summary Configuration Example
- OSPF Route Type Preference
- Why the OSPF neighbor state gets stuck in Exstart?
- OSPF packet type and header format
- OSPF Hello Packet
- OSPF DD(Database Description) Packet
- OSPF LSR(Link State Request) Packet
- OSPF LSU(Link State Update) Packet
- OSPF LSAck(Link State Acknowledgement) Packet
- Limitation of OSPF redistribution routes – redistribute maximum-prefix command
- Overview of LSA Filters for OSPF – Filter LSA Type 3/Type 5
- Configuration example of LSA type 3 filter
- Configuration example of LSA type 5 filter
- OSPFv3 Configuration Example [Cisco]
- Configuration Example of OSPFv3 Route Summary [Cisco]