cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11080
Views
0
Helpful
3
Replies

Why OSPF use wildcard mask? Not subnet mask?

lifebook567
Level 1
Level 1

Why OSPF use wildcard mask? Not subnet mask? Any advantage of using wildcard in OSPF? How wildcard in OSPF work? I saw some OSPF configuration for class b network use 0.0.0.255 as an OSPF wildcard mask. What does it mean? Is that mean to exchange only route information for the subnetwork?

3 Replies 3

janesh_abey
Level 1
Level 1

hello,

with the use of a wild-card mask we can gain control over route update propagation.So we can define which networks should receive updates and which networks should not receive routing updates.Its just like wildcard masks used in ACLs.this is my view

cheers,

Hi @lifebook567 

 

As of "why" OSPF uses wildcard bits instead of subnet mask i honestly don't have the answer... it is what it is.

Now, just as @janesh_abey mentioned, the logic is the same as in ACLs...

So for example:

network 172.20.10.0 0.0.0.255
This is a class b private ip prefix but OSPF is a "classless" protocol which means that you can use VLSM or "custom" subnet masks regardless of the class the ip belongs to.

That being said, in this case, the router will advertise (and send hello's) out of any interface that is configured with any ip address in the 172.20.10.x subnet because the wildcard bits is the opposite of subnet mask... in the subnet mask /24 means the first 24 bits are 1s and, same as in the case of ACLs, thats where the comparision will take place and look for a match in the first 24 bits of the prefix (172.20.10.x) and the rest of the ip prefix (which is "masked" with a 255 on the wildcard mask) will be ignored.




 

 

Joseph W. Doherty
Hall of Fame
Hall of Fame
As the other posters have noted, the OSPF mask works like an ACL, (although perhaps not clear) matching against interface addresses.

So, for example if you had a class B interface address of:

10.1.1.1
10.1.1.127
10.1.1.250
10.1.2.1

an OSPF network address of 10.1.1.0 0.0.0.255 would match the 1st three interface addresses, above, but not the 4th, even thought they are all class B addresses.