What are subnets and subnet masks in computer networks?

A subnet (short for sub-network) is a smaller network created by dividing a larger IP network into multiple segments. Subnet masks are used to determine which portion of an IP address identifies the network and which portion identifies the host within that network.

Subnetting allows network administrators to efficiently manage IP address allocation, reduce network congestion, and improve security by creating logical boundaries within a larger network.

How Subnet Masks Work

A subnet mask consists of a series of consecutive 1s followed by consecutive 0s in binary format. The 1s represent the network portion, while the 0s represent the host portion of an IP address.

Example

Consider the subnet address 192.168.1.0 with a subnet mask of 255.255.255.0:

IP Address:    192.168.1.0   ? 11000000.10101000.00000001.00000000
Subnet Mask:   255.255.255.0 ? 11111111.11111111.11111111.00000000

The first three octets (24 bits of 1s) identify the network, while the last octet (8 bits of 0s) identifies the host portion.

Subnetting Example: Class C Network Original Network: 192.168.1.0/24 (256 hosts) 192.168.1.0/26 192.168.1.64/26 192.168.1.128/26 192.168.1.192/26 4 Subnets, each with 64 hosts (62 usable) Network divided into 4 smaller subnets using /26 mask (255.255.255.192)

Benefits of Subnetting

  • Reduced network congestion − Limits broadcast traffic to individual subnets

  • Improved security − Creates logical boundaries for access control

  • Efficient IP address utilization − Allocates appropriate address space for different network segments

  • Easier network management − Simplifies administration of large networks

  • Enhanced performance − Reduces collision domains and improves network efficiency

Common Subnet Masks

CIDR Notation Subnet Mask Usable Hosts Common Use
/24 255.255.255.0 254 Small office networks
/25 255.255.255.128 126 Small departments
/26 255.255.255.192 62 Small workgroups
/30 255.255.255.252 2 Point-to-point links

Key Points

Within each subnet, two IP addresses are reserved: the network address (all host bits set to 0) and the broadcast address (all host bits set to 1). These cannot be assigned to hosts.

For example, in subnet 192.168.1.0/26:

  • Network address: 192.168.1.0
  • Broadcast address: 192.168.1.63
  • Usable host range: 192.168.1.1 to 192.168.1.62

Conclusion

Subnetting is essential for efficient network design, allowing administrators to divide large networks into manageable segments while optimizing IP address usage and improving network performance and security.

Updated on: 2026-03-16T23:36:12+05:30

13K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements