How to configure OSPF Summarization

If you are studying OSPF you will learn that OSPF uses LSA type 3 for inter-area routers and LSA type 5 for external prefixes that are redistributed into OSPF.

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 LSA type 3 and 5.

If you want summarization for OSPF you will have to configure it yourself. I will show you how to do this for inter-area prefixes and external prefixes. Let’s start with an example:

OSPF summarization LSA Type 3

Look at the topology above. If we don’t use summarization (which is the default) there will be a LSA for every specific prefix. If we have a link failure in area 1 then R1 (our ABR) will flood a new type 3 summary LSA and this change has to be propagated throughout all our OSPF areas. Since the LSDB will change our OSPF routers they will have to re-run the SPF algorithm which takes time and CPU power.

If we use summarization things will be different. I can create a summary on R1 to summarize the different type 3 summary LSAs. Instead of sending a LSA for 4.4.4.0 /24 and 4.5.5.0 /24 I could send 4.0.0.0 /8 or something alike.

If a link failure occurs in area 1 nothing will change for area 0 and area 2 since they don’t have the specific 4.4.4.0 /24 prefix in their LSDB but the 4.0.0.0 /8 summary. Nothing will change in their LSDB so we don’t have to re-run the SPF algorithm.

Summarization of type 3 summary LSAs means we are creating a summary of all the interarea routes. This is why we call it interarea route summarization. There are a couple of things to be aware of:

  • A summary route will only be advertised if you have at least one subnet that falls within the summary range.
  • A summary route will have the cost of the subnet with the lowest cost that falls within the summary range.
  • Your ABR that creates the summary route will create a null0 interface to prevent loops.
  • OSPF is a classless routing protocol so you can pick any subnet mask you like for prefixes.

If you look at my picture you can see that 4.4.4.0 /24 and 4.5.5.0 /24 both fall within the 4.0.0.0 /8 summary. If we have a link failure for the 4.4.4.0 /24 prefix we will still advertise the summary. If 4.5.5.0 /24 would fail as well then the summary will be withdrawn since there is no subnet left that falls within the 4.0.0.0 /8 range.

Enough theory let’s take a look at the configuration of inter-area summarization. This is the topology we’ll use:

ospf summarization inter area

I’m going to show you an example of interarea route summarization. I’m going to use routers R1 and R2. R1 will have 4 loopback interfaces which are in area 0. The link between R1 and R2 is in area 1 which turns R1 into an ABR that can do summarization.

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 651 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

555 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. Rohan,
    Yes. The only way to get networks into OSPF is either to redistribute them (from locally connections or from another routing protocol), or to explicitly add them to OSPF via a “network” statement. Since using the network state would not result in the routes being seen as external (the purpose of the exercise), there is no other option than redistribution of some form.

  2. Hello Sims,

    I tried a different example from the one which are shown in the lesson, just to make sure that I understand OSPF summarization well enough. But unfortunately, I couldn’t make it work. Can you please review and let me know what’s done wrong? Thank you for your support.

    R1-R3-R5 (Area 1)
    R1-R2 (Area 0 - Gbps link* and reference bandwidth has been adapted to all routers to 1000)
    R2-R4-R6 (Area 2 - but it’s not configured / used in this example)

    R1 f1/0 and g0/0 interfaces have “ip ospf priority 2” to make the R1 the DR for all the segments.
    R3 router-i

    ... Continue reading in our forum

  3. Hi @tsirgogik

    Which area range command did you use? On R1, this should work:

    router ospf 1
    area 0 range 10.10.8.0 255.255.248.0
    

    You can make your summary a bit more specific btw, 255.255.252.0 will cover 10.10.8.0/24 - 10.10.11.0/24

    Rene

  4. hello lagapides

    thanks for your feedback ,your clearfication is helpfull

  5. The problem here is, he is trying to summarize area 1 but using area 0 in summarization command. Instead of area 0 range , you should use area 1 range

    router ospf 1
    area 1 range 10.10.8.0 255.255.248.0
    

    Also the summary address 172.16.16.0 255.255.248.0 (R3 loopbacks) won’t cover all loopbacks in R3.

    Thanks,
    M

52 more replies! Ask a question or join the discussion by visiting our Community Forum