;

Subnet Masks in IPv4

Introduction to Subnet Masks and IP Addressing in IPv4

In network management, understanding subnet masks and IP addressing is essential. Subnet masks help distinguish the network part from the host part of an IP address, enabling efficient division and administration of IP space. Below you’ll find an overview of important subnet masks in CIDR notation and their use in IPv4 networks, as well as a brief guide on using the ipcalc tool under Linux for subnet calculations.

Important Subnet Masks and Their Meanings

CIDR Decimal Subnet Mask Theoretical Subnets Available Hosts per Subnet
/32255.255.255.255Single host1
/31255.255.255.254Point-to-Point links2 (No broadcast)
/30255.255.255.2521/4 of a /242
/29255.255.255.2481/8 of a /246
/28255.255.255.2401/16 of a /2414
/27255.255.255.2241/32 of a /2430
/26255.255.255.1921/64 of a /2462
/25255.255.255.1281/128 of a /24126
/24255.255.255.0Base subnet254
/23255.255.254.02x /24 subnets510
/22255.255.252.04x /24 subnets1,022
/21255.255.248.08x /24 subnets2,046
/20255.255.240.016x /24 subnets4,094
/19255.255.224.032x /24 subnets8,190
/18255.255.192.064x /24 subnets16,382
/17255.255.128.0128x /24 subnets32,766
/16255.255.0.0Standard Class B network65,534

Subnet Calculation with ipcalc

Installation

On most Linux distributions, ipcalc can be installed using the package manager. For example:

sudo apt-get install ipcalc – for Debian/Ubuntu
sudo yum install ipcalc – for Fedora/RHEL

Usage

To use ipcalc, simply enter an IP address and subnet mask (in CIDR notation) on the command line. For example:

ipcalc 192.168.1.0/24

This command gives you a summary of the subnet, including the network address, broadcast address, number of available hosts, and other useful information.

Conclusion

Understanding subnet masks and the ability to segment networks efficiently are essential skills for network administrators. Tools like ipcalc significantly simplify planning and managing IPv4 networks. For further information or specific use cases, we recommend exploring the topic in greater depth and consulting comprehensive resources on the subject.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 470