How to configure OSPF Summarization

Hi Jason,

172.16.0.0 0.0.3.255 is an exact match for these four networks:

  • 172.16.0.0
  • 172.16.1.0
  • 172.16.2.0
  • 172.16.3.0

You could have used the 0.0.0.255 wildcard but then you would require a network statement for each 172.16.x.0 network. Another option could be 172.16.0.0 0.0.255.255 but that means any interface in the 172.16.x.x range would be advertised.

Rene

2 Likes

Brilliant Article.

Hello Rene,

Is there anything special that needs to be done with redistributing OSPF summary routes into EIGRP. I can redistribute into OSPF, I can see my summary route fine on OSPF side. But on the EIGRP side I still see individual OSPF routes, even after I did the following command on my ASBR:

router ospf 500
 log-adjacency-changes
 summary-address 172.16.32.0 255.255.0.0  <---these are loopback interfaces on my ASBR
 redistribute eigrp 100 subnets
 network 172.32.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
Router#

Thank you!

Hi Fabian,
I think we are going to need more information. Specifically, could you post what your EIGRP configuration is? In your question you listed what was posted for the OSPF process, but not EIGRP. It is also not clear to me what topology you are using–the one in this network lesson didn’t talk about EIGRP, so you have modified it, or created your own topology.

Some general thoughts:

  1. You are only allowed to redistribute what is in the router’s routing table. So, check to see if the summary route you expect the EIGRP side to see exists in your ASBR’s routing table. If not, this would explain why EIGRP doesn’t see a summary.

  2. Is your ASBR also an ABR? For OSPF the “summary-address” command is only valid for routes external to OSPF. In other words, if you create a bunch of loopbacks, and advertise their networks within OSPF, you can’t summarize them via “summary-address.” You could do an “area range” summary, but only if your ASBR is also an ABR.

One interesting thing I found when trying out my understanding of what you are asking is this

  1. Advertise your loopbacks in EIGRP directly
  2. Redistribute those addresses into OSPF
  3. From the ASBR issue a “summary-address” command to create a summary address for the redistributed EIGRP loopbacks
  4. Redistribute OSPF into EIGRP

If you do that, your EIGRP routers will see not only all the individual loopback networks via EIGRP (D), but they will also see a new summary address for those loopbacks via EIGRP External (D-EX) because the ASBR’s OSPF summary address was redistributed back into EIGRP!

--Andrew

Hi Andrew,

I took Rene’s external route summerization topology and basically made this: r1------r2------r3

Where are r1 and r2 are EIGRP neighbors and r2 and r3 are OSPF neighbors in same area 0. I summarized my EIGRP routes and redistributed them to OSPF I think I made my mistake in creating loopbacks on r2 and thinking I can just redistribute them into EIGRP. The lesson states that we can’t summarize an area. Sorry I dont have the EIGRP config on hand now.

Looking at this now if I placed r3 in a different area, I think we can summarize my OSPF routes on my ABR R3. I’ll try this out.

Thanks

As per rfc2328, 12.4.3. Summary-LSAs section: “and cost equal to the largest cost of any of the component networks.” But you have mentioned as “A summary route will have the cost of the subnet with the lowest cost that falls within the summary range.” Which one is correct ?

1 Like

Harmeet,
The answer is both are correct! :slight_smile: Cisco’s default behavior (even in IOS 15.x) is to calculate the cost on the lowest cost component network. This is associated with the following default command:

(config-router)#compatible rfc1583

You can see that this command is a default in Cisco’s implementation of OSPF by running the following (which shows you all the default options explicitly):

#show run all | section router ospf
 priority 64
 queue-depth update 200
 queue-depth hello unlimited
 compatible rfc1583
 no compatible rfc1587

…

To have OSPF calculate the cost of the summary based on the highest cost network, simply turn this off via:

(config-router)#no compatible rfc1583

Here is the Cisco command reference about this:

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/command/iro-cr-book/ospf-a1.html#wp1286887253

3 Likes

Hi Rene,
If I donot summarize routes initially, then I will see all the IA routes in the other router.
But if I summarize, then will it be that in the other router, I will only see the summarized routes ? and not the previously learnt specific routes ?

Hi Rene,

I have a question about summarization with virtual link

I have this topology :

Area 0 -> R1 -> Area 10 -> R2 -> Area 20

I create a virtual link with R1 and R2.

I make summarization for area 0 on the router R1 and also on the router R2 (is it okay ?)

In the Area 10, I have another router (R3) and the summarization doesn’t work.

Is there any best practices for that situation ?

Thank you

Hi Rota,
I labbed up your scenario to test it out, and here’s what I discovered:

When R1 creates the summarization, it is visible by R2 (because the summary is being advertised to Area 10). However, as expected, no routers in Area 20 (other than R2) can see the summarization.

When the virtual link is created between R2 and R1, the routers in Area 20 still do not see the summarization. This is because, again, the summarization was created by R1 for Area 10. Instead, all the routers in Area 20 see all the individual networks inside Area 0. Once you have created the virtual link, R2 is now able to summarize Area 0, and this summary will replace all the individual routes seen by the routers inside Area 20.

So the answer to your question is: Yes, R2 (with a virtual link) is able to summarize for Area 0 for Area 20.

As for your router R3, I will need more information. You say it is inside Area 10, but remember that only ABRs or ASBRs are allowed to do summarization. You cannot summarize inside an area as this violates the rule that all routers in the same area must have identical LSDBs. First question: Is your router R3 an ABR or ASBR?

--Andrew

1 Like

Hi Andrew,

Thanks for your help.

I have 4 routers in the area 10

In Area 1 :

O3 (ABR for area 0 and 10)
O4 (ABR for Area 20 and 10)
O5 connected to 03 and connected to O6 (not ABR or ASBR) ==> Summarization does’nt work
O6 connected to 04 and connected to O5 (not ABR or ASBR) ==> Summarization does’nt work too

There are no problems in the area 20.

Look at topology.png not capture.png

Thanks again.

Rota

Mansi,
Correct. Without a summary, routers in the other area will see all the individual routes as Inter-Area routes. Once you summarize at the ABR, all of the individual Inter-Area routes that are part of that summarization will disappear and be replaced by the summary for all routers (except the ABR) in the area where the summary is presented.

1 Like

Rota,
Ok, so Router 03 is an ABR between Area 0 and Area 10 (I am guessing Area 0 must be just above 03 and cut off the in diagram). Summarization should work for Router 03. Could you answer the following questions:

  1. What networks are present in Area 0?
  2. What summary are you trying to create with Router 03?
  3. What is the syntax you are using on Router 03 to create the summary?
  4. Could you give me the output of the following command on Router 03 both before and after you create the summary?
    03#show ip route ospf
  5. How are you determining that summarization isn’t working? Is Router 05 not seeing the summary address? It would be good to see this as well:
    05#show ip route ospf

Andrew,

I want to summarize every networks of the area 0

O3#sh run | section router ospf
router ospf 100
 router-id 30.30.30.30
 area 0 range 192.168.3.0 255.255.255.240
 area 10 range 192.168.3.16 255.255.255.240
 area 10 virtual-link 40.40.40.40
 network 192.168.3.6 0.0.0.0 area 0
 network 192.168.3.14 0.0.0.0 area 0
 network 192.168.3.17 0.0.0.0 area 10
 network 192.168.3.25 0.0.0.0 area 10
O4#sh run | section router ospf
router ospf 100
 router-id 40.40.40.40
 area 0 range 192.168.3.0 255.255.255.240
 area 10 range 192.168.3.16 255.255.255.240
 area 10 virtual-link 30.30.30.30
 area 20 range 192.168.3.32 255.255.255.248
 network 192.168.3.18 0.0.0.0 area 10
 network 192.168.3.21 0.0.0.0 area 10
 network 192.168.3.33 0.0.0.0 area 20
O3 # Sh ip route      
192.168.3.0/24 is variably subnetted, 15 subnets, 4 masks
O        192.168.3.0/28 is a summary, 05:05:13, Null0
O        192.168.3.0/30 [110/65] via 192.168.3.5, 05:05:13, GigabitEthernet1/0
O        192.168.3.8/30
           [110/65] via 192.168.3.13, 05:05:13, GigabitEthernet2/0
O        192.168.3.16/28 is a summary, 05:05:13, Null0
O        192.168.3.20/30
           [110/2] via 192.168.3.18, 05:05:13, GigabitEthernet3/0
O        192.168.3.28/30
           [110/2] via 192.168.3.26, 05:05:13, GigabitEthernet4/0
O IA     192.168.3.32/29
           [110/65] via 192.168.3.18, 05:05:13, GigabitEthernet3/0
O5 # Sh ip route
O*E2  0.0.0.0/0 [110/1] via 192.168.3.25, 06:26:01, GigabitEthernet4/0
      192.168.3.0/24 is variably subnetted, 11 subnets, 3 masks
O IA     192.168.3.0/30
           [110/66] via 192.168.3.25, 05:21:22, GigabitEthernet4/0
O IA     192.168.3.4/30 [110/2] via 192.168.3.25, 05:21:27, GigabitEthernet4/0
O IA     192.168.3.8/30
           [110/66] via 192.168.3.25, 05:21:27, GigabitEthernet4/0
O IA     192.168.3.12/30
           [110/2] via 192.168.3.25, 05:21:27, GigabitEthernet4/0</strong>
O        192.168.3.16/30
           [110/2] via 192.168.3.25, 05:25:47, GigabitEthernet4/0
O        192.168.3.20/30
           [110/2] via 192.168.3.30, 05:21:32, GigabitEthernet2/0
C        192.168.3.24/30 is directly connected, GigabitEthernet4/0
L        192.168.3.26/32 is directly connected, GigabitEthernet4/0
C        192.168.3.28/30 is directly connected, GigabitEthernet2/0
L        192.168.3.29/32 is directly connected, GigabitEthernet2/0
O IA     192.168.3.32/29
           [110/66] via 192.168.3.30, 05:06:26, GigabitEthernet2/0
           [110/66] via 192.168.3.25, 05:06:26, GigabitEthernet4/0

You can see the entire topology.

Thanks

Rota

Rota,
I modified my network to behave more closely to yours now that I can see your diagram. I can confirm I get the same behavior which was very puzzling to me. I noticed that as soon as I tore down the Virtual Link, the summary appeared for Router 05. I believe you have stumbled upon an obscure corner case where the OSPF RFC (2328) states that any area through which a virtual link is formed is not allowed to summarize. The RFC is huge, but if you search for the term “TransitCapability” you will find this:
---------------------------------------------------------------------------
If an area is capable of carrying transit traffic (i.e.,
its TransitCapability is set to TRUE), routing
information concerning backbone networks should not be
condensed before being summarized into the area. Nor
should the advertisement of backbone networks into
transit areas be suppressed
. In other words, the
backbone’s configured ranges should be ignored when
originating summary-LSAs into transit areas.
---------------------------------------------------------------------------
A transit area is defined as an area that can carry traffic that is neither originated from nor destined to routers within that area. Once you enable a virtual link, you transform Area 10 into a transit area. Therefore, summarization is not allowed per the RFC.

I believe the intent here is to prevent the possibility of a routing loop being introduced by the endpoint of the Virtual Link. Any router that is forming a Virtual Link is technically also an ABR for area 0.

I found a discussion about this exact issue here, if you want to read about it further.

2 Likes

As per RFC 2328, section

  1. Virtual Links

o Just as the virtual link’s cost and viability are determined by
the routing table build process (through construction of the
routing table entry for the other endpoint), so are the IP
interface address for the virtual interface and the virtual
neighbor’s IP address. These are used when sending OSPF
protocol packets over the virtual link. Note that when one (or
both) of the virtual link endpoints connect to the Transit area
via an unnumbered point-to-point link, it may be impossible to
calculate either the virtual interface’s IP address and/or the
virtual neighbor’s IP address, thereby causing the virtual link
to fail.

All of our links in transit area are unnumbered point-to-point. Only our loopback interface is numbered and its IP address
is RouterID. Due to above mentioned reason our virtual link is not coming up. Do we have any workaround to above problem or
Do we have any configuration parameter (which indicates the IP address to be used for virtual links, if all the links in
transit area are unnumbered.) ?

Due to IP address shortage, we can not convert our unnumbered links to numbered. Any help would be of great help.

Rene, In the external route summarization example, did you have to use distribution in order to advertise those networks into area 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.

1 Like

19 posts were merged into an existing topic: How to configure OSPF Summarization

Renee

Hopelijk alles goed is in nederland …

I am looking at your summarisation of your connected interfaces into OSPF which looks really cool - well straight forward since you immediately put all your connected interfaces into ospf right with a single command instead of specifying any network statements under your ospf process ???

So, from an overall ‘good standard practice’ perspective … would you recommend this INSTEAD of enabling or specifying your connected netowrks (lets take a number of SVI’s on a layer 3 switch as an example) as a network statement under the OSPF process … or are both methods equally valid … ??? The main reason prompting this question is the generation of Type 5 LSA into OSPF when redistrbuting your connected interfaces (or networks) and in doing so would this create any potential problems in general ospf operation across your network in that there may be some limitations on the behaviour of type 5 LSA’s and how they are interpreted when traversing a multi-area network … ??

Many Thanks hartelijk dank
Will V