cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2273
Views
0
Helpful
4
Replies

Ospf network command

I configured a interface ip address 192.168.1.1/24

And configured 

Router ospf 1

Network 192.168.1.0 255.255.255.0 area 0

In short, by mistake,i configured subnet mask instead of wildcard mask

 

But still ospf is enabled on that interface and...other end router become an ospf neighbour

 

How is this possible?

 

2 Accepted Solutions

Accepted Solutions

Hello,

 

how does that show up in your running configuration ? When I configure:

 

network 192.168.1.0 255.255.255.0 area 0

 

It shows up as:

 

router ospf 1
router-id 1.1.1.1
network 192.168.1.0 0.0.0.255 area 0

 

It looks like OSPF automatically converts that into a wildcard. Never seen that to be honest...

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Aniketdey9804@gmail.com ,

the OSPF command reference

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/command/iro-cr-book/m_ospf-i1.html#wp2261032279

 

specifies the network area command expects a wildcard and not a subnet mask

 

>>"The Cisco IOS software sequentially evaluates the ip-address wildcard-mask pair for each interface as follows:

  1. The wildcard-mask argument is logically ORed with the interface IP address.

  2. The wildcard-mask argument is logically ORed with the ip-address argument in the network command.

  3. The software compares the two resulting values. If they match, OSPF is enabled on the associated interface and this interface is attached to the OSPF area specified."it is possible in your specific case that the binary math provides the same result as the first three bytes are the same in the IP address and in the network command and 0 exor 1 provides 1 but 0 exor 0 is 0 !Well, probably what Georg has found in his tests explains what you have seen an auto-correction in CLI parser.

Hope to help

Giuseppe

 

View solution in original post

4 Replies 4

Hello,

 

how does that show up in your running configuration ? When I configure:

 

network 192.168.1.0 255.255.255.0 area 0

 

It shows up as:

 

router ospf 1
router-id 1.1.1.1
network 192.168.1.0 0.0.0.255 area 0

 

It looks like OSPF automatically converts that into a wildcard. Never seen that to be honest...

Ummm... I understand.... thank you sir😇

Reza Sharifi
Hall of Fame
Hall of Fame

I think that command depends on the version of IOS you use. Some support and take the subnet mask and some don't.

HTH

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Aniketdey9804@gmail.com ,

the OSPF command reference

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/command/iro-cr-book/m_ospf-i1.html#wp2261032279

 

specifies the network area command expects a wildcard and not a subnet mask

 

>>"The Cisco IOS software sequentially evaluates the ip-address wildcard-mask pair for each interface as follows:

  1. The wildcard-mask argument is logically ORed with the interface IP address.

  2. The wildcard-mask argument is logically ORed with the ip-address argument in the network command.

  3. The software compares the two resulting values. If they match, OSPF is enabled on the associated interface and this interface is attached to the OSPF area specified."it is possible in your specific case that the binary math provides the same result as the first three bytes are the same in the IP address and in the network command and 0 exor 1 provides 1 but 0 exor 0 is 0 !Well, probably what Georg has found in his tests explains what you have seen an auto-correction in CLI parser.

Hope to help

Giuseppe

 

Review Cisco Networking for a $25 gift card