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

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

OSPF 'network' Command Wildcard Mask

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 ?

New Member

Re: OSPF 'network' Command Wildcard Mask

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.

Re: OSPF 'network' Command Wildcard Mask


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


Hall of Fame Super Silver

Re: OSPF 'network' Command Wildcard Mask


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).



New Member

Re: OSPF 'network' Command Wildcard Mask


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

New Member

Re: OSPF 'network' Command Wildcard Mask

Thanks for all replies, this has clarified the matter.

CreatePlease login to create content