spf-discuss
[Top] [All Lists]

Re: mail administrator certification example

2004-07-30 10:13:35
On Fri, 30 Jul 2004 12:54:47 -0400, John Keown wrote
I did not make the rule for the notation. That are part of the 
binary number system. The total space is the 32 bit octal address 
space. Therefore there are certain mathematical restrictions imposed 
by both the binary and octal notation. The /xx defines that as some 
power of 2 a /24 is 2 to 8 power. or 256. a / 25 is 2 the 7 and etc.

The range is calculated by the mathematical operators or, and, xor 
and the nor operators. the number must be represented in binary 
format of 0 and 1.

I'm not sure what you're getting at, here.  If I say:
192.168.1.0/24
the /24 means that only the first 24 bits are meaningful.
Therefore
192.168.1.4/24
is exactly the same mask, since the 4 is in the last 8 bits, which are ignored.

This is pretty basic Network Administration 101.

It's not rocket science; it's just a matter of masking out the last 8 bits and
ignoring them, very easily done; for example, you can AND both addresses
against the mask and see if the results are the same.

Proof:
192.168.1.0 is 11000000 10101000 0000001 00000000 in binary.
192.168.1.7 is 11000000 10101000 0000001 00000111 in binary.
A /24 mask  is 11111111 11111111 1111111 00000000.

So we AND 192.168.1.0 against the netmask, and AND 192.168.1.7 against the
netmask:

  11000000 10101000 0000001 00000000
& 11111111 11111111 1111111 00000000
= 11000000 10101000 0000001 00000000

  11000000 10101000 0000001 00000111  
& 11111111 11111111 1111111 00000000
= 11000000 10101000 0000001 00000000

Notice the results are the same.  So we know those two addresses are both in
the subnet.

This is really fast for a computer to do, since it's all bitwise math.  This
exact calculation is done every day, not just for testing addresses against
CIDR notation, but also for determining whether a computer is on the same
subnet during basic routing decisions.  My computer only knows its IP address
and netmask; if it's 192.168.1.23 and the mask is /24, it doesn't need to be
told that the network starts at 192.168.1.0 to figure out what machines it can
reach directly!

I hope you aren't planning on writing those certification tests you keep
calling for.