Ip Adresses
Ip Adresses
IP addresses are 32-bit numbers in IPv4, divided into four 8-bit octets and usually represented in
dotted decimal notation (e.g., 192.168.1.1).
Structure of an IP Address:
An IP address is divided into two parts:
1. Network ID: Identifies the specific network.
2. Host ID: Identifies the specific device (host) on that network.
Types of IP Addressing:
1. Classful Addressing
2. Classless Addressing (CIDR) – introduced later to deal with the inefficiencies of
classful addressing.
Here, we focus on Classful Addressing, which was the original scheme used in IP networking.
Classful IP Addressing:
Introduction:
Classful addressing divides the IP address space into five classes: Class A, B, C, D, and E. This
method was designed to accommodate networks of different sizes.
Class A addresses are designed for extremely large networks such as multinational corporations
and internet service providers. The first bit in a Class A address is always set to 0, which leaves 7
bits in the first octet to represent the network portion. This results in a total of 2⁷ = 128 possible
networks. However, out of these, two are reserved: 0.0.0.0 is used to represent the default route
or an unknown network, and 127.0.0.0 to 127.255.255.255 is reserved for loopback testing.
Therefore, only 1.0.0.0 to 126.255.255.255 are usable as Class A network addresses.
The address range for Class A extends from 0.0.0.0 to 127.255.255.255, with a default subnet
mask of 255.0.0.0, also written as /8 in CIDR notation. This means the first 8 bits (one octet)
are used for the network, and the remaining 24 bits are used for hosts. Consequently, each Class
A network can support up to 2²⁴ - 2 = 16,777,214 usable host addresses (subtracting 2 for the
network and broadcast addresses). This makes Class A suitable for networks requiring a vast
number of host addresses.
Class B IP Address
The address range of Class B spans from 128.0.0.0 to 191.255.255.255, and the default subnet
mask is 255.255.0.0, which is /16 in CIDR notation. This implies that the first 16 bits represent
the network portion, and the remaining 16 bits are allocated for host identification.
As a result, each Class B network can accommodate 2¹⁶ - 2 = 65,534 usable host addresses. The
“-2” accounts for the network address (all host bits 0) and the broadcast address (all host bits 1).
Class B offers a balance between the number of networks and the number of hosts per network,
making it a practical choice for many enterprise-level networks.
Class C IP Address
Class C addresses are the most commonly used class in smaller networks, such as those in small
businesses or within departments of larger organizations. The first three bits of a Class C IP
address are always 110, allowing for 21 bits to define individual networks.
This gives a total of 2²¹ = 2,097,152 possible networks. The address range of Class C is from
192.0.0.0 to 223.255.255.255, and the default subnet mask is 255.255.255.0, or /24 in CIDR
notation. This means that the first 24 bits identify the network, while the remaining 8 bits are
used for host identification.
Because only 8 bits are available for hosts, each Class C network can support a maximum of 2⁸ -
2 = 254 usable hosts. The network address (all zeros) and the broadcast address (all ones) are
excluded. Class C is ideal for smaller networks where a large number of hosts are not required
but many subnet divisions are needed.
Class D IP Address
Class D addresses are not used for standard host-to-host communication. Instead, they are
reserved for multicasting, which is the transmission of data to multiple hosts simultaneously.
The first four bits in a Class D address are fixed as 1110, leaving the remaining 28 bits to define
multicast groups.
The address range for Class D is from 224.0.0.0 to 239.255.255.255. Since these addresses are
used to identify groups of receivers rather than individual devices or hosts, Class D does not
have a subnet mask and is not divided into network and host portions. Instead, it represents
multicast group IDs.
Applications of Class D include streaming media, conferencing, and broadcasting services over
the network where the same data needs to be delivered to multiple users efficiently.
⚫Class E IP Address
Class E addresses are reserved for experimental and future use, and they are not assigned to
any hosts or organizations. The first four bits of a Class E IP address are always 1111, which
restricts the address range to 240.0.0.0 to 255.255.255.255.
These addresses are not usable for general networking or internet communication. There is no
default subnet mask for Class E, and IPs in this range are typically blocked by routers and
operating systems. They are primarily set aside for experimental protocols, research, and testing
purposes by the Internet Engineering Task Force (IETF) or other authorized organizations.