Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use the distribute-list in/out command with OSPF to filter routes?

Core Issue

Configuring distribute-list commands that utilize route maps is not achieving desired Link State Advertisement (LSA) filtering. Open Shortest Path First Protocol (OSPF) routes cannot be filtered from entering the OSPF database. The distribute-list in command only filters routes from entering the routing table, and it does not prevent LSA packets from being propagated.

Resolution

In the route map, the user can match on any attribute of the OSPF route. The route map could be based on these match options:

  • match interface
  • match ip address 
  • match ip next-hop
  • match ip route-source 
  • match metric
  • match route-type 
  • match tag

To define a route map to prevent OSPF routes from being added to the routing table, refer to OSPF Inbound Filtering Using Route Maps with a Distribute List.

The updates or LSA can be blocked with the following command. This works for ipv6 addresses:

distribute-list prefix-list list-name {in [interface-type interface- number]|out routing-process [as-number]}

For information about the blocking the updates or LSA that are received or sent on an interface, refer to the distribute-list prefix-list (IPv6 OSPF) section of the Cisco IOS IPv6 Command Reference.

Comments
Cisco Employee

Here is an example for people interested:

https://supportforums.cisco.com/docs/DOC-22839

Regards,

Pulkit

4067
Views
0
Helpful
1
Comments