How to configure OSPF Summarization

Hi @ReneMolenaar !
I am confused between the NULL interface and discarding of packet to prevent loops.
Why are packets destined for the summarized network being discarded? The summarized route is the only route installed in tables of routing tables outside this area, no one knows the exact longer prefixes within the summarized route outside the area. If you discard the packet destined for summarized route how will communication work?

Not all packets are being discarded, only the ones where the destination IP (described in a packet) is not contained within the summarised route. The null0 interface is used as a “catch-all” mechanism when creating a summarised route. When a route is summarised, the router aggregates multiple specific routes into a single, broader route. The null0 interface is associated with this summarised route to ensure that any traffic destined for a subnet that is not explicitly known in the routing table is discarded, rather than being forwarded, which could potentially create routing loops. HTH Nick

Hello Muhammad

I understand your confusion. It sounds like we’re creating a summary route, and then we’re making all packets that match it be dropped! That sounds counter-intuitive, doesn’t it?

Well, let me explain. Let’s take a look once again at the topology in the lesson:


But this time, let’s say that R1 has only three subnets. The fourth one has not been configured.

When we create a summary route in R1 which is the ABR, we advertise the single summary route of 172.16.0.0/22 to R2 rather than three individual routes. That makes OSPF advertisements more efficient. R2 now has an entry in its routing table that looks something like this:

O IA 172.16.0.0/22 [110/2] via 192.168.12.1, 00:03:26, FastEthernet0/0

At the same time, R1 creates a summary route pointing to the null interface, that looks something like this:

O 172.16.0.0/22 [110/2], 00:03:26, Null0

Now, when R1 wants to send a packet to 172.16.1.5, for example, it will match the summary route in its routing table, and be sent to R1.

Now this is the key to the whole situation: When R1 receives that packet, it looks up the destination in the routing table and it matches the specific 172.16.1.0/24 route, not the null summary route! So routing can take place correctly! Remember, routing table matches will always match the more specific prefix, and a /24 is more specific than a /22.

So why is the null route there? Well, what if R2 wanted to send traffic to 172.16.3.3? That network doesn’t exist on our R1 router, but it is included in the summary route! So, if such a packet reaches R1, we want it to be explicitly handled. It wouldn’t match any more specific routes, but it would match the null route. Since R1 has no route to that destination, it is safest to simply discard the packet.

So you see, a null route will discard only those packets that don’t match a more specific route found within the summary. Does that make sense?

I hope this has been helpful!

Laz

Great great great, understood!
Thank you!
Also, any external area packet being sent would always have an exact prefix in the distance, the summary route is only for the routing tables. Any packet destined for the exact summarized subnet is to be dropped, got it.

1 Like

Hi,

In which command I can see null0 interface that created when we summarize redistribution of external routes?

Thanks

Hello Görgen

The Null0 interface is not an actual interface that you can view as you would with a loopback interface of a physical GigabitEthernet interface. You can only see the Null0 entity as part of the routing table.

The only way to see the Null0 interface that is created when you summarize the redistribution of external routes is by using the show ip route command.

The output will show you something like this:

S 192.168.0.0/16 is directly connected, Null0

This indicates that the 192.168.0.0/16 network is summarized and any traffic to a more specific route within this summary that is not in the routing table will be sent to Null0 interface. In other words, they will be discarded.

I hope this has been helpful!

Laz

1 Like

Hello Team,
In the snippet, I can see that you are stating that there are 4 LSAs for each prefix. Until I saw this statement, I assumed that Type-3 was an LSA for all the individual inter-area prefixes.

So, is each prefix itself an LSA Type-3?

Hello Sathish

First of all, the text should read:

You can see there are 4 LSAs, one for each of the prefixes.


not 4 LSAs for each of the prefixes


In any case, the purpose of a Type 3 LSA is to provide a “summary” of all of the routes that are found in a particular area and advertise it to another area. In other words, it advertises inter-area routes.

Yes, ideally, you want Type 3 LSAs to summarize all of the routes within an area as best as possible in order to make routing tables and OSPF messages smaller and more efficient. In this particular case, each prefix in Area 1 is represented separately. You can change this behavior and make the advertising more efficient by using the area range command that is shown immediately after in the lesson.

To answer your specific question, yes, each individual prefix that appears in the OSPF database is considered a separate Type 3 LSA.

I hope this has been helpful!

Laz