Network administration is a fundamental skill in any IT environment, and understanding how IP addresses and subnetting work is essential to managing networks efficiently. In this article, we’ll break down the key elements of IPv4 addressing and subnetting.
What is an IPv4 Address?
An IPv4 address is a numeric label assigned to each device connected to a network that uses Internet Protocol version 4 (IPv4). These addresses allow devices to identify and communicate with each other. The IPv4 system uses a 32-bit scheme, which allows it to generate around 4.3 billion unique addresses.
CIDR and Subnet Mask
CIDR (Classless Inter-Domain Routing) is a method of assigning IP addresses and routing them more efficiently than traditional IP classes. The table shows how subnet masks vary depending on the number of bits allocated to the network and hosts:
- /32 CIDR: Assigned to a single device, with a subnet mask of 255.255.255.255, which means that no other addresses can be assigned to the subnet.
- /24 CIDR: Allows 256 IP addresses (254 usable for hosts), using a subnet mask of 255.255.255.0. It is one of the most common ranges for local networks.
- CIDR /16: Covers a much larger range of 65,536 addresses, with a subnet mask of 255.255.0.0.
The “Wildcard Mask” field in the table is used in routing, primarily to configure policies and rules on routers and firewalls. The Wildcard Mask represents the mismatched parts of the IP address, i.e., the parts that can change within a subnet.
Types of IPv4 Addresses
IPv4 addresses are divided into five main classes:
- Class A: Range from 0.0.0.0 to 127.255.255.255. They are used for very large networks.
- Class B: From 128.0.0.0 to 191.255.255.255. For medium-sized networks.
- Class C: From 192.0.0.0 to 223.255.255.255. For small networks.
- Class D: Used for multicast, range 224.0.0.0 to 239.255.255.255.
- Class E: Reserved for future use (240.0.0.0 to 255.255.255.255).

Private Addresses and Special Addresses
Some IPv4 addresses are reserved for specific uses:
- Private addresses: They are not routed over the Internet and are used on internal networks, such as classes 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
- Localhost: The address 127.0.0.1 is reserved for the loopback interface of any device, allowing applications to communicate with themselves.
- APIPA: Addresses such as 169.254.0.0/16 are automatically assigned when a device is unable to obtain an IP address from a DHCP server.
What is Subnetting?
Subnetting is the process of dividing a network into smaller subnets, improving the efficiency and security of networks. By modifying the length of the subnet mask, you control how many directions are available to hosts and how many are available to identify subnets. The higher the number of bits in the subnet mask, the smaller the subnets.
For example:
- A /24 allows for 256 directions, where 254 are assignable to hosts.
- A /30 reduces this to only 4 directions, of which 2 are assignable, which is useful for point-to-point links.
Conclusion
Understanding how IPv4 addresses, subnet masks, and IP classes work is crucial to optimizing network design and management. Using CIDR and subnetting allows network administrators to efficiently leverage address space, reduce address waste, and improve overall network performance.