ip ospf database-filter

Configures filters for different types of outgoing Link State Advertisements (LSAs).
Syntax
ip ospf database-filter all out
ip ospf database-filter all-external { allow-default out | allow-default-and-type-4 out | out }
ip ospf database-filter all-summary-external { allow-default out | allow-default-and-type-4 out | out }
no ip ospf database-filter all out
no ip ospf database-filter all-external
no ip ospf database-filter all-summary-external
Command Default

All filters are disabled.

Parameters
all out
Blocks all LSAs.
all-external
Blocks all external LSAs.
allow-default-and-type-4
Allows default-route LSAs and Type 4 LSAs, but block all other LSAs.
allow-default-out
Allows default-route LSAs, but block all other LSAs.
out
Filters outgoing LSAs.
all-summary-external
Blocks all summary (Type 3) and external (type 5) LSAs.
Modes

Interface subtype configuration mode

Usage Guidelines

By default, the device floods all outbound LSAs on all the OSPFv2 interfaces within an area. You can configure a filter to block outbound LSAs on an OSPF interface. This feature is particularly useful when you want to block LSAs from some, but not all, of the interfaces attached to the area. When enabled, this command blocks the specified outgoing LSAs on the interface. Some cases where you might want to enable filters are:

  • To control the information being advertised to the network.
  • To use a passive router for debugging only.

Enter no ip ospf database-filter followed by the appropriate operands to disable this configuration.

Note: You cannot block LSAs on virtual links and LSA filtering is not supported on sham links.
Examples

The following example applies a filter to block flooding of all LSAs on a specific OSPF Ethernet interface.

device# configure terminal
device(config)# interface ethernet 1/1/1
device(config-if-e1000-1/1/1)# ip ospf database-filter all-out