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

wildcard mask question

arianto.wibowo
Level 1
Level 1

Hi,

Just a little confuse about wildcard mask.

There are two questions, but the same point about WM.

  • if we want to allow IP 10.1.1.1, 10.1.100.1, and 10.1.120.1 to ospf routing, how it should be ?

          someone says : network 10.1.1.1 0.0.255.0 area 0, and the other says : network 10.1.1.1 0.0.255.255 area 0

          I thought WM 0.0.255.0 is not valid one so I assume that WM 0.0.255.255 is the right one.

  • if I want to allow 192.168.1.1, .2, .3, .16, .17, .18, and .19 using ACL, how should I config this ?

          is it true using WM 0.0.0.19 ?? I think it's not valid because 19 (0001011) is not contigues bit checking.

Need some explanation from you guys.

Thanks and regards,

Arianto W

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

arianto.wibowo wrote:

Hi,

Just a little confuse about wildcard mask.

There are two questions, but the same point about WM.

  • if we want to allow IP 10.1.1.1, 10.1.100.1, and 10.1.120.1 to ospf routing, how it should be ?

          someone says : network 10.1.1.1 0.0.255.0 area 0, and the other says : network 10.1.1.1 0.0.255.255 area 0

          I thought WM 0.0.255.0 is not valid one so I assume that WM 0.0.255.255 is the right one.

  • if I want to allow 192.168.1.1, .2, .3, .16, .17, .18, and .19 using ACL, how should I config this ?

          is it true using WM 0.0.0.19 ?? I think it's not valid because 19 (0001011) is not contigues bit checking.

Need some explanation from you guys.

Thanks and regards,

Arianto W

Arianto

0.0.255.0 is a valid wildcard mask. Wildcard masks do not have to be contiguous as subnet masks do.

0.0.255.0  means ->  exact match first octet, exact match second octet, can be anything in 3rd octet, exact match 4th octet

so the correct answer to above is  for 10.1.1.1, 10.1.100.1 and 10.1.120.1 a wildcard mask of 0.0.255.0 would be the correct one ie.

first octet must be 10

2nd octet must be 1

3rd octet can be any value from 0 -> 255

4th octet must be 1

note that with 0.0.255.0 wildcard mask it doesn't just include those 3 networks, it actually covers

10.1.0.1  -> 10.1.255.1

As for your second question - what 192.168.1.x range do you want to specify ie. 192.168.1.1 -> 19 or just the specific IPs listed above ?

Jon

View solution in original post

4 Replies 4

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hi Arianto,

A wildcard mask is necessary because OSPF supports CIDR and VLSM,unlike RIPv1 and IGRP.

so if you see the belwo example you will clear with your query!!

RouterA(config-router)#network 192.168.1.0 0.0.0.255 area 0

this will enable OSPF on all the interfaces whose ip address's fall in between 192.168.1.0-255


RouterA(config-router)#network 192.168.1.1 0.0.0.0 area 0

This will enable OSPF only on this specific Interface 192.168.1.1

Hope this clears out your query !!

If helpful do rate the valuable post.

Regards

Ganesh.H

Jon Marshall
Hall of Fame
Hall of Fame

arianto.wibowo wrote:

Hi,

Just a little confuse about wildcard mask.

There are two questions, but the same point about WM.

  • if we want to allow IP 10.1.1.1, 10.1.100.1, and 10.1.120.1 to ospf routing, how it should be ?

          someone says : network 10.1.1.1 0.0.255.0 area 0, and the other says : network 10.1.1.1 0.0.255.255 area 0

          I thought WM 0.0.255.0 is not valid one so I assume that WM 0.0.255.255 is the right one.

  • if I want to allow 192.168.1.1, .2, .3, .16, .17, .18, and .19 using ACL, how should I config this ?

          is it true using WM 0.0.0.19 ?? I think it's not valid because 19 (0001011) is not contigues bit checking.

Need some explanation from you guys.

Thanks and regards,

Arianto W

Arianto

0.0.255.0 is a valid wildcard mask. Wildcard masks do not have to be contiguous as subnet masks do.

0.0.255.0  means ->  exact match first octet, exact match second octet, can be anything in 3rd octet, exact match 4th octet

so the correct answer to above is  for 10.1.1.1, 10.1.100.1 and 10.1.120.1 a wildcard mask of 0.0.255.0 would be the correct one ie.

first octet must be 10

2nd octet must be 1

3rd octet can be any value from 0 -> 255

4th octet must be 1

note that with 0.0.255.0 wildcard mask it doesn't just include those 3 networks, it actually covers

10.1.0.1  -> 10.1.255.1

As for your second question - what 192.168.1.x range do you want to specify ie. 192.168.1.1 -> 19 or just the specific IPs listed above ?

Jon

Only the specific that I listed.

But i got your point now.

And for 2nd question IPs : 192.168.1.1, 192.168.1.2, 192.168.1.3, 192.168.1.16, 192.168.1.17, 192.168.1.18, 192.168.1.19

Is it could be like this ?

192.168.1.1       00000001

192.168.1.2       00000010

192.168.1.3       00000011

192.168.1.16     00010000

192.168.1.17     00010001

192.168.1.18     00010010

192.168.1.19     00010011

last octet that changed are 4th, 7th, 8th

so WM is 00010011 = 19, its mean 0.0.0.19

Did my explanation correct ?

thanks.

You could understand it that way.

Regards,

jerry

Review Cisco Networking for a $25 gift card