Wildcard mask
dondej
Member Posts: 11 ■□□□□□□□□□
in CCNA & CCENT
What would be the right wildcard mask for the address range of 192.168.5.0 to 192.168.17.0?
Will i be right in saying that this is
5.0 0.0.3.255
8.0 0.0.7.255
16.0 0.0.0.255
17.0 0.0.0.255
OR
192.168.5.0 0.0.15.255
I'm leaning towards the first solution, I need a bit of help please
Will i be right in saying that this is
5.0 0.0.3.255
8.0 0.0.7.255
16.0 0.0.0.255
17.0 0.0.0.255
OR
192.168.5.0 0.0.15.255
I'm leaning towards the first solution, I need a bit of help please
The journey of a thousand miles starts with one step
Comments
-
QUIX0TIC Member Posts: 2770.0.15.255 is too many and would go beyond or before the range that you are requesting. I would stick to the first solution."To realize one's destiny is a person's only obligation."
-
Yankee Member Posts: 157In order to cover x.x.5.0 thru x.x.17.0 you need to cover what amounts to 32 /24 networks meaning x.x.0.0 thru x.x.31.0 so none of the answers appear right to me as I read your question. From this info you should be able to get the right answer.
Yankee -
lordy Member Posts: 632 ■■■■□□□□□□The range you specified covers 12 Class C networks.
As 12 is not a power of 2 there simply is no perfectly matching wildcard mask.
Did you make up this question yourself or where did you find this one ?Working on CCNP: [X] SWITCH --- [ ] ROUTE --- [ ] TSHOOT
Goal for 2014: RHCA
Goal for 2015: CCDP -
2lazybutsmart Member Posts: 1,119If the range doesn't perfectly fit into a block size, then you'll always have to go for the next block size in the list. so since you have 12 networks, you'll need a block size of 16 to summarize those addresses.
Of course, a block size of 16 would range from 5.0 - 20.0, but then there's nothing you can do about that. You'll just have to include those three addresses in the summary. so 0.0.15.255 to the rescue!
2lbs.Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
Yankee Member Posts: 157You must stay on the bit boundries. Yes he wants to cover 15 /24s but the borders for 16 are 0-15 and 16-31. Neither of which cover his range entirely so he needs to use the wild card mask of 0.0.31.255
Yankee -
forbesl Member Posts: 454Yankee wrote:You must stay on the bit boundries. Yes he wants to cover 15 /24s but the borders for 16 are 0-15 and 16-31. Neither of which cover his range entirely so he needs to use the wild card mask of 0.0.31.255
Yankee
router(config)#access-list 151 permit ip 192.168.5.0 0.0.15.255 any
router(config)#end
router#sh access-list 151
Extended IP access list 151
permit ip 192.168.0.0 0.0.15.255 any
Notice when you do a "sh access-list" that the router has automatically adjusted the bit boundries and assumed you want to permit 192.168.0.0 through 192.168.15.0....this does not cover through 17.0, so you have to use 0.0.31.255
Here's what is looks like with 0.0.31.255:
router(config)#access-list 151 permit ip 192.168.5.0 0.0.31.255 any
router(config)#end
router#sh access-list 151
Extended IP access list 151
permit ip 192.168.0.0 0.0.31.255 any
This would cover the range you want.
There is no single wildcard mask that will cover only 192.168.5.0 through 192.168.17.0... -
2lazybutsmart Member Posts: 1,119That's cool. I never thought about that actually.
thnx.
2lbs.Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time. -
elcaminoguy Inactive Imported Users Posts: 19 ■□□□□□□□□□That would hold true for the fourth octet as well I assume. So if I had a class C network subnetted of say
192.168.1.64 mask 255.255.255.224
and I wanted 9 networks out of that I would have to use a block of 16 or would it still be 32. I guess my confusion is whether the subnet mask affects the block size you can use.
If so would it be like:
access-list 151 permit ip 192.168.1.64 0.0.0.31 any
because of the subnet mask bits or would it be:
access-list 151 permit ip 192.168.1.64 0.0.0.15 any
because of how big of a chunk of numbers I want. What defines the bit boundary? What if I want a range of networks that are higher numerically? like a network of 192.168.1.128 mask 255.255.255.224?
Just trying to get his straight in my head. I heard about inverting the subnet mask to get your wildcard mask but does that really fit.
255.255.255.224 would invert to 0.0.0.31 but that seems to totally discount the whol group size thing.
:..........If this had been an actual emergency the attention signal you've just heard.................would have been too late -
Yankee Member Posts: 157In your example both masks are valid but the "tighter" one, the .15 would be more correct for your example of needing nine hosts (not networks).
Yankee -
elcaminoguy Inactive Imported Users Posts: 19 ■□□□□□□□□□Oh,
I kept thinking the wildcard mask broke out networks instead of hosts. I guess I was making it harder than it had to be.
Thanks
..........If this had been an actual emergency the attention signal you've just heard.................would have been too late