Internet Protocol (IP) IP Addressing and Subnetting
By Stephen Bucaro
Today, many different kinds of devices can communicate on a network. A network device
might be a computer, a router, a printer, or any number of unusual devices. Every device
on a network that uses the Internet protocol (IP) needs a unique IP address.
An IP address is composed of two parts, the network ID part and the host ID part.
The network ID is used to reference a specific network. The host ID is used to identify
a specific device on that network. Every device on a single network shares a common
network ID, but has a unique host ID.
An IP address is 32 bits long. For human readability, they are broken into 4 segments
separated by dots. Each segment is 8 bits. Each of the 8 bit segments can represent
a binary number from 00000000 to 11111111, or a decimal number from 0 to 255. Below
is an example of an IP address.
192.122.19.215
An IP address has two parts, the network ID part, and the host ID part. There are several
different classes of IP addresses. The class of an IP address defines how many bits are
allocated to the network part of the address, and how many bits are allocated for the
host part of the address.
Classes of IP Addresses
class A
The network address is 7 bits of the first segment (the first binary bit will always be 0)
The remaining three segments (24 bits) are the host address.
Number of network addresses 127
Number of hosts 16,777,216 *
* Two of these addresses are reserved for specific functions, leaving 16,277,214 hosts.
Class B
The network address is 14 bits of the first two segments (the first two binary bits will always be 10)
The remaining two segments (16 bits) are the host address.
Number of network addresses 65,383
Number of hosts 65,534
Class C
The network address is 21 bits of the first three segments (the first three binary bits will always be 110)
The remaining segment (8 bits) are the host address.
Number of network addresses 2,097,152
Number of hosts 255
The two reserved addresses are "broadcast" and "subnet" addresses. A host ID with all ones
specifies a broadcast address. For example, packets with the address 198.122.19.255 will be sent
to all hosts on the network 198.122.19.0. A host ID with all zeros specifies a subnet address.
For example, packets with the address 198.122.19.0 specifies the subnetwork 198.122.19.0,
not any specific device. A device should never be assigned an IP address with a host ID of either
all zeros or all ones.
|