cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1614
Views
25
Helpful
4
Replies

OSPF Network Advertisment

hmc2500
Level 1
Level 1

Why when I advertise a network 192.168.0.0 with mask 255.255.254.0 it will get advertised as 192.168.0.0/24 and 192.168.1.0/24 on neighbor routers in a single area? Is there anyway this can be summarized in in a single area in OSPF? 

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Henry,

Why when I advertise a network 192.168.0.0 with mask 255.255.254.0 it will get advertised as 192.168.0.0/24 and 192.168.1.0/24 on neighbor routers in a single area?

Most likely, you have entered the command network 192.168.0.0 0.0.1.255 area X and you expect the router to advertise the network 192.168.0.0/23 even though the directly connected interfaces are 192.168.0.0/24 and 192.168.1.0/24 - is my assumption correct?

If so, you have to always keep in mind that the network command does not directly specify the network that should be advertised to other routers. Instead, it defines a range of addresses, and if any interface's own IP address falls into that range, the protocol will advertise the whole network of that interface as-is. This is true both for OSPF and EIGRP. In your case, you appear to have a network command that defines a range of IP addresses that covers two interfaces, so the OSPF advertises both interfaces' networks - but it advertises them exactly as they are, with no summarization. The network command never, ever, performs summarization on its own.

Is there anyway this can be summarized in in a single area in OSPF?

No. There is no way to perform network summarization inside a single area. This is a fundamental property of all link-state protocols, OSPF and IS-IS.

Best regards,
Peter

View solution in original post

4 Replies 4

Hi,

In OSPF, You can summarize a network on ABR/ABRS routers only using the command:

area <area id> range <summarized network> <summarized subnet mask>

Please check this link:

https://geek-university.com/ccna/ospf-route-summarization/

 

 Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Peter Paluch
Cisco Employee
Cisco Employee

Hi Henry,

Why when I advertise a network 192.168.0.0 with mask 255.255.254.0 it will get advertised as 192.168.0.0/24 and 192.168.1.0/24 on neighbor routers in a single area?

Most likely, you have entered the command network 192.168.0.0 0.0.1.255 area X and you expect the router to advertise the network 192.168.0.0/23 even though the directly connected interfaces are 192.168.0.0/24 and 192.168.1.0/24 - is my assumption correct?

If so, you have to always keep in mind that the network command does not directly specify the network that should be advertised to other routers. Instead, it defines a range of addresses, and if any interface's own IP address falls into that range, the protocol will advertise the whole network of that interface as-is. This is true both for OSPF and EIGRP. In your case, you appear to have a network command that defines a range of IP addresses that covers two interfaces, so the OSPF advertises both interfaces' networks - but it advertises them exactly as they are, with no summarization. The network command never, ever, performs summarization on its own.

Is there anyway this can be summarized in in a single area in OSPF?

No. There is no way to perform network summarization inside a single area. This is a fundamental property of all link-state protocols, OSPF and IS-IS.

Best regards,
Peter

THanks. Peter, the OSPF device is actually an L3 swith and we configured /24 vlan interfaces for subnets 192.168.0.0 and 192.168.1.0. I thought it would summarize the subnets by configuring a /23 network statement under router ospf. I've tried it in a lab now and I think you are right it does not summarize it. IS it not a concern if you have lots of /24 networks in the routing table? I thought summarizing in general is preferred to reduce the routing overhead.

Hi Henry,

I've tried it in a lab now and I think you are right it does not summarize it.

Thank you for double-confirming. Yes, this behavior is entirely expected. As a side note, a "lazy" style of configuring the network command is network 0.0.0.0 255.255.255.255 area area-id - you have probably seen this before. However, this merely states: Activate OSPF on all interfaces, and advertise all directly attached networks; it does not mean summarizing everything into a default route.

IS it not a concern if you have lots of /24 networks in the routing table? I thought summarizing in general is preferred to reduce the routing overhead.

You are very correct here. However, the advantages and savings brought in by summarization only make sense if you summarize a significant number of routes. Nowadays, having hundreds or even thousands of routing table entries, depending on the particular device type, is not a reason for capacity or overhead concerns. What is the approximate scale of your network? How many routes do you expect to have in your routing tables? And what is the exact type of your equipment that is supposed to have these routes in their routing tables? Perhaps we are trying to overoptimize something that does not need it at all.

In OSPF, proper summarization first requires a proper network design: You first must have a cleanly delineated backbone, then additional areas directly attached to the backbone, and only then can OSPF start summarizing the non-backbone areas into the backbone. Without this, OSPF cannot be forced to do summarization.

Please feel welcome to ask further!

Best regards,
Peter

Review Cisco Networking products for a $25 gift card