While IP addressing schemes have had to adapt, the basic IP
address structure for IPv4 remains the same. To send and receive
messages on an IP network, every network host must be assigned a
unique 32-bit IP address. Because large binary numbers are difficult
for people to read and understand, IP addresses are usually
displayed in dotted-decimal notation. In dotted-decimal notation,
each of the four octets is converted to a decimal number separated
by a decimal point
IP addresses are hierarchical. A hierarchy is like a family
tree with parents at the top and children connected to
them below. For a network, this means that part of the
32-bit number identifies the network (parent), while the rest
of the bits identify the host (child). In the early days of
the Internet, there were so few organizations needing to
connect to the Internet, that networks were assigned by
only the first 8 bits (first octet) of the IP address. This
left the remaining 24 bits to be used for local host
addresses.
To create more possible network designations, the
32-bit address space was organized into five
classes. Three of these classes, A, B, and C,
provide addresses that can be assigned to
individual hosts or networks. The other two
classes, D and E, are reserved for multicast and
experimental use.
In addition to creating separate classes, the Internet Engineering Task
Force (IETF) decided to reserve some of the Internet address space
for use by private networks. Private networks have no connection to
public networks. Private network addresses are not to be routed across
the Internet. This allows multiple networks in various locations to use
the same private addressing scheme without creating addressing
conflicts.
Subnetting a
Network
In the original IP address hierarchy, there are two levels: a network
and a host. In a classful addressing scheme, the first three leading
bit values are used to determine that an IP address is either a
Class A, B, or C. When an address is identified by class, the
number of bits that make up the network ID and the number of bits
that make up the host ID are known.
A single Class A, B, or C network address space can be divided into
multiple subnetworks by using bits from the host address space to
designate the subnet ID. As an example, an organization using a
Class C address space has two offices in different buildings. To
make the network easier to manage, the network administrators want
each location to have a logically separate network. Taking two bits
from the host address increases the subnet mask length from the
default 24 bits to 26 bits, or 255.255.255.192.
Custom Subnet
Mask
A default subnet mask and a custom subnet mask differ
from each other in that the default subnet masks only
change on octet boundaries. For instance, the default subnet
mask for a Class A network is 255.0.0.0. Custom subnet
masks take bits from the host ID portion of the IP address
and add them to the default subnet mask.