Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

OPSF network statements

I am currently working on a scenario involving three OSPF areas, area 0, and two areas attached to area 0. The other two areas actually share a router at the end of each area. I know this might break the rules of OSPF design, but it's only a scenario.

My question is, if I configure a network statement representing the entire network in one area, net 172.30.16.24 0.0.0.3 area 10, I get a virtual-link needed error. But on the other hand, if I configure OSPF with a host route, net 172.16.30.25 0.0.0.0 area 10, I do not get the error message.

Could someone explain to me the rules/guidelines for configuring host routes versus whole networks? When to use one and not the other for example.

Regards to all,

Joe

5 REPLIES
Cisco Employee

Re: OPSF network statements

The network command has for only purpose to determine which network interfaces will be in one area or another. by specifying 172.30.16.24 0.0.0.3 you might be including another interface in area 10 that is actually expected to be in area 0. Do a "sho ip ospf interface" and see if this is the case. By specifying 172.30.15.25 0.0.0.0, you make sure that only the interface with ip address 172.30.16.25 will be included in area 10.

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: OPSF network statements

Thanks for the reply.

So what you are saying is that I could use a separate network statement for every interface I had on a router with no impact to OSPF? Or I could use an "aggregated" network statement to represent more than one interface if for example I was using many /30 networks? OSPF does not treat these staements differently? Other than using fewer network statements, are there any advantages to using broader network statments? Just wondering why I would ever use the broader network statments. Seems a whole lot simpler, and less prone to errors (calculating subnet masks, etc.) to just use host route statements.

As always comments welcome.

Regards to all,

Joe

Cisco Employee

Re: OPSF network statements

This is correct. You could indeed use one network statement per interface or one for all interfaces. I certainly prefer to use the least number of statement as possible when I can. Other than making your configuration smaller, there is no real advantage to using one network statement for all interfaces. I certainly prefer to use as few statement as possible when I can (ie: all interfaces belong to the same area) but care must be taken when using network statement covering wide ranges. I have seen many getting bitten by specifying a wide range network statement for one area followed by more specific network statements for other areas. What happens in that case is that the first statement covers all of the interfaces and the other statements are never used.

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: OPSF network statements

So what happens if they overlap?

For example, if I have

network 172.30.0.0 0.0.255.255 area 0, and

network 172.30.100.0 0.0.0.255 area 1.

Second network is included in area 0, but yet, it is being advertised as a separate area as well.

sp

New Member

Re: OPSF network statements

statements are evaluated in order..once an interface is matched to an area, the interface won't be considered in subsequent evaluations..

so once an interface(even 172.30.100.X) is put in area 0 by the first statement, the second network/area won't affect that interface.

now, if you did it backwards, the more specific network/area first, it would match an interface 172.30.100.X to area 1.

109
Views
0
Helpful
5
Replies
CreatePlease to create content