OSPF CONFIGURATION

Unanswered Question
Jan 1st, 2008
User Badges:

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


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Loading.
Kevin Dorrell Tue, 01/01/2008 - 06:00
User Badges:
  • Green, 3000 points or more

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

microcisconet Tue, 01/01/2008 - 06:23
User Badges:

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

Kevin Dorrell Tue, 01/01/2008 - 08:19
User Badges:
  • Green, 3000 points or more

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

microcisconet Tue, 01/01/2008 - 08:41
User Badges:

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


Jon Marshall Tue, 01/01/2008 - 10:56
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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


Richard Burts Tue, 01/01/2008 - 11:59
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

microcisconet Tue, 01/01/2008 - 12:37
User Badges:

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 [email protected]

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

Richard Burts Tue, 01/01/2008 - 12:47
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

microcisconet Tue, 01/01/2008 - 13:12
User Badges:

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

Richard Burts Tue, 01/01/2008 - 16:46
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

Hi Rick


Once again I would like to say a big thank you for the clarification. As I read you post I remembered back to my CCNA studies where I was taught that the network statement under an IGP does indeed designate which interfaces will participate in the routing protocol.


My error I suppose comes from the fact that the material I studied always used the same mask as was applied to the interface and never mentioned that you did not have to use the same mask as the interface. I suppose that may have been implied, however it is not something that I picked up on, though I do see now how this is the case.


Again thanks a million for the clarification, it helps enormously.


Best Regards & Best Wishes for 2008 and beyond,



Michael

Richard Burts Tue, 01/01/2008 - 17:02
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Michael


First let me say that I did not feel that your first post was coming across as quite arrogant. I had noted most of the issues that you raised in the previous parts of the thread. I feel that you raised some issues and supported them with output that shows that you had researched them in your lab. I feel that this is a very legitimate approach. And your points were not personal - you did not comment on the people or cast aspersion on the people but raised questions about some things that had been said. I believe that this is a very positive way to make contributions. I hope that the others feel the same way that I do.


In their defense I believe that several of the early contributions to this thread were focused on the "big picture" aspect of the question and were a bit careless about some details. I have sometimes done this and been careless about some parts of a contribution because I was focused on some other aspect of it.


I commented (and I do believe) that this point of the useage of the network statement is misunderstood by many people. And much of the course material available, and many of the examples are not helpful in understanding the subtlties of the network statement. They do freequently show a configuration in which the mask in the network statement is the inverse of the subnet mask. At one point I helped to develop a course in the configuration of OSPF. We spent quite a while in the course explaining the various options in using the network statement and mask - for example that the network statements:

network 152.1.1.1 0.0.0.3 area 0

network 152.1.0.0 0.0.255.255 area 0

and

network 0.0.0.0 255.255.255.0

might all produce the same result of including the interfaces into the protocol and not influence the subnets and masks that would be advertised. If you understand the ways in which these 3 statements are similar and the ways in which they are different, then you will have achieved a good understanding of the network statement and its mask.


If we are going to effectively use OSPF then I believe that we should understand this usage.


HTH


Rick

Hi Rick


Thanks for the comments and information. When I read back through my initial post I felt that I had not worded it inappropriately. I wrote statemetns like "This is incorrect" when what I should have wrote was that "I think this is incorrect". I just felt that it could be construed as an attack on a previous post, which is not what was intended. I will make an effort to be more careful with my future postings.


Can I just ask if my understanding of the 3 network statemetns you provided is correct please?


1. network 152.1.1.0 0.0.0.3 area 0 -- Place the interface on which this subnet is configured into OSPF area 0.


2. network 152.1.0.0 0.0.255.255 area 0 -- Place any interface which is configured with an address 152.1.x.x into OSPF area 0


3. network 0.0.0.0 255.255.255.0 -- Place all interfaces into OSPF


The third one is the one I am least sure about. Should there not be an "area x" at the end and should the last octet not be "255" also as in my lab this gives an "Incomplete command" error without the "area 0" and an "Invalid address/mask combination" error with the "area 0".


===== From a Lab Router ========


R_ACCESS_1(config)#router ospf 1

R_ACCESS_1(config-router)#network 0.0.0.0 255.255.255.0

% Incomplete command.


R_ACCESS_1(config-router)#network 0.0.0.0 255.255.255.0 area 0

OSPF: Invalid address/mask combination

R_ACCESS_1(config-router)#


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


I also tried "network 0.0.0.0 0.255.255.255.255 area 0" and received the same Invalid address/mask combination message


====== From a Lab router ========

R_ACCESS_1(config-router)#network 0.0.0.0 0.255.255.255 area 0

OSPF: Invalid address/mask combination


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


But I could enter "network 0.0.0.0 255.255.255.255 area 0" with no issues.


======== From a Lab router =======

R_ACCESS_1(config-router)#network 0.0.0.0 255.255.255.255 area 0

R_ACCESS_1(config-router)#


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


Best Regards,


Michael

Richard Burts Wed, 01/02/2008 - 04:43
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Michael


Your comments about phrasing are very perceptive and appropriate.


Your understanding of the functions of the three network statements is correct. And your questioning of my third network statement is correct on both aspects: yes the mask should have been 255.255.255.255 and the area 0 should have been in the statement. Having just engaged in comments about inaccurate things in posts I am disappointed that I did not proof read my post better. Thanks for catching it. You deserve the rating that I gave it. I look forward to seeing more of your activity in the forum.


HTH


Rick

Actions

This Discussion