OSPF 'network' Command Wildcard Mask

Unanswered Question
May 2nd, 2007
User Badges:

Can anyone please clarify how the 'wildcard mask' in the 'network' command works with OSPF.

I am confused by the answer given to question 7 at the start of Chapter 6 of the Cisco Press ICND Exam Cert Guide book by Wendell Odom.

This question asks if the command :-

network area 0

will match interface IP addresses,, and

What is the right answer here ?

As I understand it means first and last octets must match, so does this mean the IP address themselves must match this, or can it be sufficient that the network in which these IP addresses reside match it ? For example all the above IP addresses are in, but does this mean they match in the above command ?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (5 ratings)
luqmankondeth Wed, 05/02/2007 - 08:37
User Badges:

Your understanding of the command is correct. in the wildcard mask means the second and third octet can be any number from 0-255.

the last and first octets must be exactly as specified in the network command. now your network command says

this means, the first octet must be 10 and the last octet must be 0. however,the last octet in your config could be the network number , so any interface with an ip address inside this network number qualifies.

royalblues Wed, 05/02/2007 - 09:25
User Badges:
  • Green, 3000 points or more


Though your understanding is correct, these type of masks cannot be used with OSPF. You will get the following error when you try to do so.

Router(config)#router ospf 100


Router(config-router)#network are

Router(config-router)#network area 0

OSPF: Invalid address/mask combination (discontiguous mask)


These type of wildcard masks can be used with access-lists though

HTH, rate if it does


Richard Burts Wed, 05/02/2007 - 09:51
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN


Actually this is a function where the behavior of IOS changed. There are versions of code (older versions) where the network mask of the OSPF network command did support discontiguous masks and there are versions of code (newer) which do not support it. So you have to be careful about which version of code when considering this question (and I believe that the question should be updated or removed to conform to current behavior of IOS).



get_shanu Wed, 05/02/2007 - 22:59
User Badges:


I strongly agree with the above replies, because the OSPF will not allow discontigous masks.

rossua994 Sat, 05/19/2007 - 07:33
User Badges:

Thanks for all replies, this has clarified the matter.


This Discussion