cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2184
Views
25
Helpful
18
Replies

OSPF CONFIGURATION

microcisconet
Level 1
Level 1

I expect interface configuration with the following address mask

152.1.10.1/24

152.1.1.1/30

to be configured under OSPF process as

network 152.1.1.0 0.0.0.255 area 0

network 152.1.1.0 0.0.0.252 area 0

BUT i saw it differently in a book as

network 152.1.1.0 0.0.0.3 area 0

network 152.1.10.0 0.0.0.16 area 0

Can someone therefore please help to resolve my confusion on this subject, considering the mask /24 and 30 given in the IP addresses respectfully.

Thanks wishing you all a blissful year

18 Replies 18

Kevin Dorrell
Level 10
Level 10

Either of these will work. In fact the wildcards in the network command do not necessarily have to correspond to the mask on the interface address. It is enough that that address of the interface - 152.1.10.1 and 152.1.1.1 in your case - falls within the wildcards in your network commands.

If you wanted, you could even have done it like this:

network 152.1.1.1 0.0.0.0 area 0

network 152.1.10.1 0.0.0.0 area 0

Or even like this:

network 152.1.0.1 0.0.15.0

The last one would have activated both interfaces with a single command. That is because if you interpreted the natwork command as you would an access-list, then it would include the addresses of both interfaces.

Have a very happy 2008!

Kevin Dorrell

Luxembourg

Hi Kevin,

Thank you very much for the prompt response that resolved my confusion on the inverse mask.

I wish i can have your email for future help/correspondence, mine is my username as seen here @yahoo.com i live in Belgium currently.

Have a terrific 2008

Hi,

Yes sure -- my email is in my NetPro profile, suitably encoded to prevent spam.

Cheers

Kevin

Hi Kevin

Can I please ask a question on this please.

Firstly I would like to point out that the original poster was incorrect in his proposed OSPF configuration.

He wrote

"I expect interface configuration with the following address mask

152.1.10.1/24

152.1.1.1/30

to be configured under OSPF process as

network 152.1.1.0 0.0.0.255 area 0

network 152.1.1.0 0.0.0.252 area 0 "

The configuration for the 152.1.10.0/24 subnet is correct. However his configuration for the 152.1.1.0/30 subnet is incorrect!

++ Output from my lab ++

MK_Access(config-router)#network 152.1.1.0 0.0.0.252 area 0

OSPF: Invalid address/mask combination (discontiguous mask)

============================================

Next what he said was reported in what ever book he is using is also incorrect for the /24 subnet.

OP wrote

"BUT i saw it differently in a book as

network 152.1.1.0 0.0.0.3 area 0

network 152.1.10.0 0.0.0.16 area 0 "

In this output the configuration for the subnet 152.1.1.0/30 is correct. However the configuration given for the subnet 152.1.10.0/24 is incorrect on a number of levels.

1. 0.0.0.16 is not a valid wldcard mask

+++ Again from my lab +++

MK_Access(config-router)#network 152.1.10.0 0.0.0.16 area 0

OSPF: Invalid address/mask combination (discontiguous mask)

==========================================

2. 0.0.0.16 even if it were a correct wildcard mask does not correspond to a /24 subnet

3. Even if the OP made a typo and meant to write 0.0.0.15, this is still does not cover a /24 subnet but rather matches a /28 subnet.

The correct wildcard mask for advertising the 152.1.10.0/24 subnet into OSPF is 0.0.0.255, so what ever book the OP is using is decidedly suspect.

In your post you advised that he could have used

network 152.1.1.1 0.0.0.0 area 0

network 152.1.10.1 0.0.0.0 area 0

Does the wildcard mask 0.0.0.0 not equate to a host subnet mask (255.255.255.255)? therefore this would only advertise those specific interface addresses into OSPF and not the /24 and /30 subnets that were mentioned in the original post.

Also is the configuration "network 152.1.0.1 0.0.15.0" valid??

From my lab I tried this and received the following,

+++ From my Lab ++++

MK_Access(config-router)#network 152.1.0.1 0.0.15.0

% Incomplete command.

MK_Access(config-router)#network 152.1.0.1 0.0.15.0 area 0

OSPF: Invalid address/mask combination (discontiguous mask)

MK_Access(config-router)#

===========================================

If you meant to type 0.0.15.255 is this not advertising a much bigger subnet into OSPF then what was requested in the original post?

For myeslf as a CCNP student I would have used the folowing,

network 152.1.1.0 0.0.0.3 area 0

network 152.1.10.0 0.0.0.255 area 0

This gives no errors in my lab,

+++ From my Lab +++

MK_Access(config-router)#network 152.1.1.0 0.0.0.3 area 0

MK_Access(config-router)#network 152.1.10.0 0.0.0.255 area 0

=============================================

Here is a link for the original poster to a table which shows the wildcard masks available

http://www.speedguide.net/read_articles.php?id=1883

Best Regards & Best Wishes for 2008 and beyond,

Michael

Hi Michael,

I am most grateful for your detailed contribution to help further clarify my confusion. To aggregate all we have said so far

should i assumed that the followings are correct?

network 152.1.1.0 0.0.0.255 area 0

network 152.1.10.0 0.0.0.255 area 0

AND

network 152.1.1.0 0.0.0.3 area 0

network 152.1.10.0 0.0.0.255 area 0

Because both of these commands were actually accepted by router even though the original mask were different. Don't you think that the SPF algorithm should be able to decipher the difference since these are initial configured on the physical interfaces?.

Looking forward for further help where it could still be given.

Welcome to the best year you ever had.

Regards

Hi There

In your original post you wrote

"I expect interface configuration with the following address mask

152.1.10.1/24

152.1.1.1/30

to be configured under OSPF process as

network 152.1.1.0 0.0.0.255 area 0

network 152.1.1.0 0.0.0.252 area 0"

Here there appears to be a typo when you type the config for the /24 subnet as you typed 152.1.1.0 for both entries.

IMHO you are correct with your configuration of the 152.1.10.0/24 subnet as again in my opinion to advertise this subnet (range 152.1.10.0 to 152.1.10.255) into OSPF you would use the command

network 152.1.10.0 0.0.0.255 area x

You were incorrect IMHO with your proposed configuration of the 152.1.1.0/30 subnet as (in my lab) the wildcard mask of 0.0.0.252 is reported as "Invalid" and is not what I have learned in my studies to date. IMHO the correct configuration to advertise the 152.1.1.0/30 subnet (range 152.1.1.0 to 152.1.1.3) into OSPF is

network 152.1.1.0 0.0.0.3 area x

In your last post you asked

"should i assumed that the followings are correct?

network 152.1.1.0 0.0.0.255 area 0

network 152.1.10.0 0.0.0.255 area 0

AND

network 152.1.1.0 0.0.0.3 area 0

network 152.1.10.0 0.0.0.255 area 0 "

In my opinion, No this is not correct.

When you type "network 152.1.1.0 0.0.0.255" you are not advertising 152.1.1.0 into OSPF as a /30 subnet. You are advertising this subnet into OSPF as a /24, which is much larger than required.

Although this command will not produce an error you have advertised your /30 network incorrectly IMHO.

Again, I am a CCNP student, so no expert. But this is my understanding of how you should go about advertising your subnets into OSPF,

network 152.1.1.0 0.0.0.3 area 0

network 152.1.10.0 0.0.0.255 area 0

Best Regards & Best wishes for 2008 and beyond,

Michael

Michael

I'm not CCNA/CCNP or anything but i agree with what you say if that helps. As you rightly point out OSPF deals with inverse masks and so 0.0.0.252 is a mish mash of

0.0.0.3

&

255.255.255.252

As you correctly point out the mask is 0.0.0.3.

And yes there is no such mask as 0.0.0.16 - the closest would be 0.0.0.15 altho as you say this would not meet the OP's requirements.

Rated post and best wishes for New Year too

Jon

Hi Jon

Thank you for the rating and the supporting information.

As for the CCNA/NP it's clear from your other posts that you have a high level of experience in the networking field. Your posted responses are always extremely helpful.

Best Regards, & Best Wishes for 2008 and beyond,

Michael

Hi All

I have just re-read my original post in this topic which I addresses to Kevin and it comes across quite arrogantly which was NOT my intention. I sincerely hope that is not how that post was perceived. If it was then I offer my sincere apologies.

I was simply curious as to the response Kevin made was was looking for clarification and trying explain my thought process and my findings from my lab.

It is my intention to contribute to these forums where I can and learn as much as I can from them. In no way do I wish to appear and I am certainly not qualified to shoot someone else's responses down.

Best Regards & Best Wishes for 2008 and beyond,

Michael

Michael

I would like to go back to part of your post which says:

Does the wildcard mask 0.0.0.0 not equate to a host subnet mask (255.255.255.255)? therefore this would only advertise those specific interface addresses into OSPF and not the /24 and /30 subnets that were mentioned in the original post.

This is a point that is misunderstood by many people and I would like to address and clarify this point. Yes you are correct that the 0.0.0.0 wildcard mask does equate to a 255.255.255.255 host mask. But this does not control what OSPF will advertise.

To clarify this there is an important principle that we need to understand: in the IGPs (OSPF, EIGRP, etc) the network statement is used to identify which interfaces to include in the protocol but does not control what subnet(s) and subnet mask(s) will be advertised. The routing protocol uses the network statement to evaluate all the interfaces and determine which interface(s) match the network statement and should be included in the routing protocol. Once the routing protocol has decided to include an interface then it looks at the configured address and mask and determines what subnet and subnet mask should be advertised to its neighbors. So there is not really any relationship between the mask used in the network statement and the mask that will be advertised by the routing protocol. We can choose whatever mask to use in the network statement that will make our configuration do what we want it to do. Many of us do choose to use a mask in the network statement that is the inverse of the subnet mask of the interface, but that is not necessary. For me that makes it logically consistent and is easy. But there does not need to be any relationship between the network statement mask and the mask on the interface.

note that BGP is different. In BGP the network statement is used to control what should be advertised and does not include any interfaces into the protocol.

HTH

Rick

HTH

Rick

Hello Kevin, Michael,Rick and others,

Words cannot express enough of my appreciation as your contributions has been an invaluable help into my studies.

This confusion actually came up from three sources of my learning, a cisco press book, CBT and a respected CCIE materials, i don't want to mention any name here to avoid debasing anyone's effort.

To summed things up, should i then conclude that whatever inverse mask is used is irrelevant, that the will advertise the rightful subnets since it's configured on the physical interfaces correctly?. (This is my understanding of Rick' contribution).

Willing to help me further? I can be reached on Microcisconet@yahoo.com

Just finished my CCNP and stylishly aiming for CCIE before the year runs out.

Thanks to you all and wish you the best year you ever had.

Regards

Olu

Where you say: To summed things up, should i then conclude that whatever inverse mask is used is irrelevant, that the will advertise the rightful subnets since it's configured on the physical interfaces correctly?. (This is my understanding of Rick' contribution).

I would say that your understanding is essentially correct. The mask used in the network statement does not control what mask is advertised by OSPF.

So long as the mask used on the network statement does select the correct interface(s) then the correct subnets and correct subnet masks will be advertised by OSPF.

HTH

Rick

HTH

Rick

Rick,

I live in UK but currently in Belgium.

I am "Terabytetically" grateful for still taken more pain to respond once again after your comprehensive contribution before this last message.

Its' just that i am trying to play save because i have dodging operations relating to calculation but to my comprehension it seems there is no place to hide again.

Once again thanks a lot,

Regards

Olu

I appreciate your compliment about my contribution. You stated an understanding which I thought was essentially correct. I restated the way it works with a slight qualification to try to achieve a bit more precision and to make sure that we were both describing the same thing in slightly different ways.

This forum is a great place to learn. I encourage you to continue your participation in the forum, to continue asking questions, and to answer some questions as your knowledge and understanding increase.

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco