A cool trick with wildcard masks !
kaynaan
Member Posts: 30 ■■□□□□□□□□
in CCNA & CCENT
when prepariing 4 any exam i get so scared.. i read anything i can get my handz on... this has a downside. once in a while u get some really good stuff. maybe an easier way around a complex problem, a small trick that saves u alot of time... but u just dont remember where u read it ???. i found this cool trick 4 wild card masks but i have no idea where i read it, if any of u know about it plz give me a source, or add something...
enough with the small talk. letz get to the nitty gritty .....
when doing wildcard masks for ACL,indentifying interesting traffic for DDR,NAT etc. usually u see wildcard masks like these :
- 0.0.0.0 (host)
- 0.255.255.255 (class A network)
- 0.0.255.255 (class B network)
- 0.0.0.225 (Class C network)
** all subnets in class C **
-0.0.0.127(/25 subnet)
-0.0.0.63(/26 subnet)
-0.0.0.31(/27 subnet)
- 0.0.0.15(/2
-0.0.0.7(/29)
-255.255.255.255 (any)
but now lets assume, u'r making a pool of ip addresses for dynamic NAT. configurations and u want to identify ip address 10.0.0.6-10.0.0.20 (only 14 addresses). using the above mentioned wildcard masks only allow u to specify blocks of 4,8,16,32,64,128 etc.
1- write the upper range, and the bottom range ontop of each other.
2-all matching bits equal '0' any non matching bits equal '1'
10.0.0.00010100 (10.0.0.20)
10.0.0.00000110 (10.0.0.6)
0. 0.0.00010010 (0.0.0.1
u'll find the wild card mask '0.0.0.18' will only allow ip address 10.0.0.6 through 10.0.0.20.
if any one knowz an easy way around some particularly tough calculations , or a simpler way of memorising hard to remember facts plz share .....
enough with the small talk. letz get to the nitty gritty .....
when doing wildcard masks for ACL,indentifying interesting traffic for DDR,NAT etc. usually u see wildcard masks like these :
- 0.0.0.0 (host)
- 0.255.255.255 (class A network)
- 0.0.255.255 (class B network)
- 0.0.0.225 (Class C network)
** all subnets in class C **
-0.0.0.127(/25 subnet)
-0.0.0.63(/26 subnet)
-0.0.0.31(/27 subnet)
- 0.0.0.15(/2
-0.0.0.7(/29)
-255.255.255.255 (any)
but now lets assume, u'r making a pool of ip addresses for dynamic NAT. configurations and u want to identify ip address 10.0.0.6-10.0.0.20 (only 14 addresses). using the above mentioned wildcard masks only allow u to specify blocks of 4,8,16,32,64,128 etc.
1- write the upper range, and the bottom range ontop of each other.
2-all matching bits equal '0' any non matching bits equal '1'
10.0.0.00010100 (10.0.0.20)
10.0.0.00000110 (10.0.0.6)
0. 0.0.00010010 (0.0.0.1
u'll find the wild card mask '0.0.0.18' will only allow ip address 10.0.0.6 through 10.0.0.20.
if any one knowz an easy way around some particularly tough calculations , or a simpler way of memorising hard to remember facts plz share .....
God give me the serenity to accept the things that i cannot change...and the courage to change the things i can....and the wisdom to know the difference.
Comments
-
dmaftei Member Posts: 83 ■■□□□□□□□□Your cool trick is incorrect, wildcard 0.0.0.18 matches exactly four addresses.BSEE, MSCS
www.maftei.net -
eurotrash Member Posts: 81710.0.0.6-10.0.0.20 (only 14 addresses)witty comment
-
kaynaan Member Posts: 30 ■■□□□□□□□□Sorry guyz 4 the incorrect info !
but like i said, i just can't find where i got that from, if any one can offer correction on how to specify blcoks of address no in the 2^x range(2,4,8,16,32,64,12.
i will try to search 4 the correct info.... i'll be sure to post it soon.God give me the serenity to accept the things that i cannot change...and the courage to change the things i can....and the wisdom to know the difference.