OSPF - route summarization

OSPF can do summarization, but it’s impossible to summarize within an area. This means we have to configure summarization on an ABR or ASBR. OSPF can only summarize our types 3 and 5.

Summarization is applied using the range keyword under the OSPF configuration. For example:

router ospf 1 area 1 range

The area range command can only be applied at an ABR and it is used to perform route summarization. In the above example, it takes all learned prefixes from within area 1 that fall within the range, and summarizes them before advertising them to other areas. This way you can consolidate multiple OSPF LSAs into a single summarized LSA making OSPF more efficient.

The reason for this is that as a link-state protocol, every router within the same area must by definition have an identical link-state database (LSDB) for shortest path first (SPF) calculations. If you filter LSAs within an area, it would break this uniformity.

Similarly route filtering in OSPF can only take place at an ABR.

For information about the cost used by OSPF in summarized routes, take a look at the OSPF - Cost of summarized routes note.