cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
761
Views
12
Helpful
7
Replies

Wildcard masks question

milkdroogy
Level 1
Level 1

if i have this wildcard mask:

0.0.0.15

does it mean that the "do-care" bits are the last 15 bits? so in binary its:

10000000.00000000?

and how i interpret this wildcard mask:

0.0.15.255

?

7 Replies 7

GillieLucent
Level 1
Level 1

Hi,

0.0.0.15 doesn't mean last 15 bits, here 15 means decimal value 15 for last octet.

for 0.0.15.255, binary is below :

00000000.00000000.00001111.11111111

if you want to know how 00001111 becomes 15, here comes

0 x 128

0 x 64

0 x 32

0 x 16

1 x 8

1 x 4

1 x 2

1 x 1

---------

15

-------

Only in subnet mask you can represent in bits as like below :

130.100.200.10/24 and

130.100.200.10 255.255.255.0 are same.

If you are not clear feel free to ask more.

Thanks,

Vijaybabu

well ok so 15 means decimal value - but what does it represent? what does this 15 mean?

As said in the revious post 15 is the decimal value of the octet

for eg. 0.0.0.15

This means the last octet is having a decimal value of 15 i.e 00001111 or (0F in hex). When using wildcard masks the 1's bit are dont care bits.

hence 172.16.100.0 0.0.0.15 would match all address between 172.16.100.1 - 14

Similary 0.0.15.255 would mean the last 12 bits are dont care bit.

10.10.0.0 0.0.15.255 would match all addresses from 10.10.0.1 - 10.10.15.254

HTH, rate if it does

Narayan

IP address is 4 octets.In every octet there are 8 bits, when converting an octet into decimal value, each bit is associated some value as below :

1st bit ( from left) - 128

2nd -64

3rd -32

4th -16

5th -8

6th -4

7th -2

8th -1

so for 00001111

0 x 128

0 x 64

0 x 32

0 x 16

1 x 8

1 x 4

1 x 2

1 x 1

---------

15

-------

Hope this helps.

Pls rate the posts.

Thanks,

Vijaybabu

if you got into binary then i have a question:

i know that

10000

-

01111

=

1

but how do i do that on paper?

i mean -

1-1 = 0

0-0 = 0

1-0 = 0

0-1 = 1(?)

how do i do that?

Well it goes something like this

since you cannot subtract 1 from 0 you borrow the digits ..something similar what you do with decimals

say for eg you need to subtract 28 from 52

i.e 52-28 (here you borrow one from 5 which makes it 4 and the carried digit with 2 becomes 12 and so 12-8=4 & 4-2=2 i.e 52-28=24

Similarly to do subtraction in binary 10000-01111 you will borrow the digit

1 - borrowed over & hence becomes 0

0 - becomes 10(i.e 2) again 1 gets borrowed over leaving 10-1 = 1 (ie 2-1=1)

this continues till you reach the last digit

where you have 10-1=1 and rests cancel out.

There is another method where you use the 2's component to achieve the same

10000 - 01111

complement 01111 -- becomes 10000 (just

reverse the digits)

add one to get the 2's complement

10000+1=10001

Add this to 10000 i.e 10000+10001=100001

Remove the higher order digit to get 00001

You got me back to engg days :-)

Easy method now would be to use calculator

Narayan

Thanks man!

its just that I'm studying now for my CCNA-ICND exam, that's why i have all this silly questions

:-)

Review Cisco Networking for a $25 gift card