[CST-2] Digi Comms
Andy Wilson
adw28@cam.ac.uk
Thu, 30 May 2002 22:39:18 +0100 (BST)
On Thu, 30 May 2002, Matej Pfajfar wrote:
> > No, you are mistaken. My answer is more plausible to me, since it is
> > the correct answer.
> Well that's a good enough indication of plausibility if ever I saw one
> ;-).
To explain further, 128.232.2 in binary is
10000000 11101000 00000010 00000000.
and the netmask specified by the /18 is
11111111 11111111 11000000 00000000.
Bitwise AND the netmask with the binary for 128.232.2 to give the portion
of the address that specifies the network:
10000000 11101000 00xxxxxx xxxxxxxx,
the remaining bits (shown here as x) specify the host.
Thus 128.232.2/18 specifies the netblock (range of addresses) that Barnaby
said (128.232.0.0 to 128.232.63.255). For specifying the netblock, the
".2" is in this case redundant, because it's masked away by the netmask.
The "host" is the identification of an individual machine within a
netblock, thus 128.232.2/18 specifies the host 128.232.2.0, which is why
Barnaby said the the 2 defines the host portion...
So, 128.232.2/18 specifies either a netblock or host depending on the
context. (Is this right -- are they used to denote hosts as well as
netblocks?)
This notation is usually used to specify CIDR (classless inter-domain
routing) netblocks in routing tables. This is, the netmask is nothing to
do with which IP class (A, B or C) the address is in, but is instead
explicitly specified.
HTH,
Andy.
--
\ Andy Wilson adw28@cam.ac.uk Mobile: 07880 500409 ICQ: 94415551
\-- College: Room 38D, Churchill College, CAMBRIDGE CB3 0DS, 01223 331555