FILTERING TYPE 3 LSA IN OSPF

HomeRoute FilteringFILTERING TYPE 3 LSA IN OSPF

This blog explains various ways of FILTERING TYPE 3 LSA IN OSPF along with config examples. Three of the methods to Filter LSA3 in OSPF are listed below.

  • Block LSA 3 for 9.9.0.4 using a filter-list on ABR R3 at area 1 to reach area 0 in out direction.  
  • Block LSA 3  for 9.9.0.4 using a filter-list  on  ABR R3 at area 0  in  the in direction.
  • Block LSA 3 for 9.9.0.4  in inward direction using a distribute-list on ABR R3. But  in this scenario we won’t be able to block the LSA3 flow completely.

Consider the diagram below:


FILTERING TYPE 3 LSA IN OSPF  – Method 1

R3#ip prefix-list BLOCK_INTER_AREA_PREFIX deny 9.9.0.4/32ip prefix-list BLOCK_INTER_AREA_PREFIX permit 0.0.0.0/0 le 32 router OSPF 1area 1 filter-list prefix BLOCK_INTER_AREA_PREFIX outWe see now that R3 will have route to 9.9.0.4/32 as LSA1 (under area 1) but has no LSA3 for 9.9.0.4/32. Additionally, We will also not see the 9.9.0.4/32 route on R1 and R2 in Area 0 and also not the summary LSA for 9.9.0.4.R3#show ip ospf database summary 9.9.0.4OSPF Router with ID (9.9.0.3) (Process ID 1) R2#show ip route 9.9.0.4% Subnet not in table 

FILTERING TYPE 3 LSA IN OSPF  – Method 2

R3#ip prefix-list BLOCK_INTER_AREA_PREFIX deny 9.9.0.4/32ip prefix-list BLOCK_INTER_AREA_PREFIX permit 0.0.0.0/0 le 32router OSPF 1area 0 filter-list prefix BLOCK_INTER_AREA_PREFIX inWe see now that R3 will have route to 9.9.0.4/32 as LSA1 (under area 1) but has no LSA3 for 9.9.0.4. We’ll also not see the 9.9.0.4/32 route on R1 and R2 in Area 0 and also not the summary LSA for 9.9.0.4.R3#show ip ospf database summary 9.9.0.4OSPF Router with ID (9.9.0.3) (Process ID 1)R2#show ip route 9.9.0.4% Subnet not in table

FILTERING TYPE 3 LSA IN OSPF  – Method 3

R3#ip prefix-list BLOCK_INTER_AREA_PREFIX  deny 9.9.0.4/32ip prefix-list BLOCK_INTER_AREA_PREFIX permit 0.0.0.0/0 le 32router OSPF 1distribute-list prefix BLOCK_INTER_AREA_PREFIX inClear the OSPF process after this configuration.You will not be seeing 9.9.0.4/32 route learned on ABR R3 but you will see the LSA3 for 9.9.0.4 present in R3. R3 will also not be able to ping 9.9.0.4/32. R3# show ip ospf database summary 9.9.0.4OSPF Router with ID (9.9.0.3) (Process ID 1)Summary Net Link States (Area 0)LS age: 11Options: (No TOS-capability, DC, Upward)LS Type: Summary Links(Network)Link State ID: 9.9.0.4 (summary Network Number)Advertising Router: 9.9.0.3LS Seq Number: 80000001Checksum: 0xE728Length: 28Network Mask: /32MTID: 0 Metric: 2R3#show ip route 9.9.0.4% Subnet not in tableOn R1 and R2  you will see the LSA 3 (9.9.0.4) and route in the routing table but you will not able to ping the prefix 9.9.0.4/32 from R1 and R2.R2#show ip route 9.9.0.4Routing entry for 9.9.0.4/32Known via “ospf 1”, distance 110, metric 3, type inter areaLast update from 9.9.23.3 on FastEthernet0/1, 00:05:05 agoRouting Descriptor Blocks:* 9.9.23.3, from 9.9.0.3, 00:05:05 ago, via FastEthernet0/1Route metric is 3, traffic share count is 1R2#ping 9.9.0.4Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 9.9.0.4, timeout is 2 seconds:UUUUUSuccess rate is 0 percent (0/5) 

Imp Note:  Distribute-lists do not work for outbound OSPF filtering (Command may be accepted) because OSPF is a link-state protocol and all routers within an area must flood all LSAs.

Click Here for other useful OSPF articles