Neil Croft wrote in a message to Mike Bilow:
MB> 10.0.0.0 - 10.255.255.255 (10/8 prefix)
MB> 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
MB> 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
NC> OK Mike, I have to admit a gaping hole in my knowledge of IP
NC> here. What is the difference between a class A, B and C
NC> address?
In the old days, a Class A was the term for an 8-bit mask, a Class B was the
term for a 16-bit mask, and a Class C was the term for a 24-bit mask.
NC> Also, how exactly does subnetting down work out? I know my
NC> employer has 10.16 addresses on a 255.255.248.0 subnet mask
NC> which gives 10.16.72.0=10.16.79 on my site and I know it's
NC> something to do with bitmasks but I start to lose it a bit
NC> here which could prove embarrasing if anyone asks.
IP addresses are simply 32-bit numbers. They are by convention split into
some number of network bits on the most significant side and some number of
host bits on the least significant side. The idea was that any host can be
reached through the router responsible for its network, although that is no
longer true.
Each group of eight bits is called an "octet," and each octet is respresented
as a decimal number in "dotted quad" notation. The IP address 10.16.72.19 is
just the binary number 00001010'00010000'01001000'00010011. It is often
easier to represent this in hexadecimal: 0x0A104813. All are equivalent.
If we now define a netmask of 255.0.0.0, which is 0xFF000000, then all we
mean is that the most significant eight bits are used to denote the network
and the rest are used to denote a particular host on that network. The
network number is, by definition, the bitwise-and of any host on the network
and the netmask:
0x0A104813 & 0xFF000000 = 0x0A000000
In dotted quad notation, the network number is just 10.0.0.0.
Also by definition, the broadcast addess is the bitwise-or of the network
number and the one's-complement of the netmask:
0x0A000000 | 0x00FFFFFF = 0x0AFFFFFF
In dotted quad notation, this network's broadcast address is 10.255.255.255.
As less bits are assigned to the network part of the address, there is room
for more hosts in the network. For example, with a 24-bit mask, there are
only 256 possible host addresses (including the reserved zero and broadcast
addresses). With a 16-bit mask, there are 65536 possible host addresses.
With an 8-bit mask, there are 16.7 million possible host addresses.
-- Mike
---
---------------
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
|