Subnet Calculator

Calculate network address, broadcast address, host range, and more for IPv4 networks

Subnet Calculator

Subnet Calculator helps network administrators divide large networks into smaller, more manageable and secure network segments.

IPv4 CIDR Reference Table

CIDR notation offers a more flexible way to specify network addresses than traditional classfull network addressing.

Common IPv4 CIDR Notation Reference
CIDRSubnet MaskHosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/24255.255.255.0254
/27255.255.255.22430
/30255.255.255.2522

Subnet Calculation Results

192.168.1.1 - 192.168.1.254
/24
254 usable hosts
NetworkFirst HostLast HostBroadcast
192.168.1.0192.168.1.1192.168.1.254192.168.1.255
Property Value Copy
IP Address 192.168.1.1
Network Address 192.168.1.0
Broadcast Address 192.168.1.255
First Usable IP 192.168.1.1
Last Usable IP 192.168.1.254
Subnet Mask 255.255.255.0
CIDR Notation /24
Wildcard Mask 0.0.0.255
Number of Hosts 254
IP Class Class C

Binary Representation

IP Address Binary

1
1
0
0
0
0
0
0
.
1
0
1
0
1
0
0
0
.
0
0
0
0
0
0
0
1
.
0
0
0
0
0
0
0
1

Subnet Mask Binary

1
1
1
1
1
1
1
1
.
1
1
1
1
1
1
1
1
.
1
1
1
1
1
1
1
1
.
0
0
0
0
0
0
0
0
Network Part
24 bits
Host Part
8 bits

The green highlighted bits (1's) in the subnet mask represent the network portion, while the non-highlighted bits (0's) represent the host portion of the IP address.

Subnet Address Space Visualization

This visualization shows the first 32 addresses in your subnet:

Network Address
Usable Host
Broadcast Address
Current IP

Understanding IP Subnetting

A comprehensive guide to IPv4 and IPv6 subnetting concepts

What is Subnetting?

Subnetting is the practice of dividing a large IP network into smaller, more manageable logical segments called subnets. This technique is fundamental to modern network design and management, allowing for more efficient use of address space while improving network performance and security.

By implementing subnets, network administrators can:

  • Reduce network congestion by isolating traffic and minimizing broadcast domains
  • Enhance security by segregating sensitive systems and implementing granular security policies
  • Organize networks logically based on function, department, or geographical location
  • Efficiently allocate IP addresses based on specific needs of different network segments
  • Simplify network management by creating smaller, more manageable address blocks

IPv4 vs. IPv6: Understanding the Differences

IPv4

  • 32-bit address space (4.3 billion addresses)
  • Dotted decimal notation (192.168.1.1)
  • Uses subnet masks (255.255.255.0) or CIDR (/24)
  • Includes broadcast addresses
  • Address exhaustion is a major concern

IPv6

  • 128-bit address space (340 undecillion addresses)
  • Hexadecimal notation (2001:0db8::1)
  • Uses prefix length notation (/64)
  • No broadcast addresses (uses multicast)
  • Designed with future growth in mind

IPv4 Subnetting Concepts

Key IPv4 Subnet Components

Network Address

The identifier for a subnet. It's the first address in a subnet range (e.g., 192.168.1.0) and cannot be assigned to any device.

Broadcast Address

The last address in a subnet (e.g., 192.168.1.255). Used to send data to all devices in a subnet simultaneously.

Subnet Mask

A 32-bit value (e.g., 255.255.255.0) that specifies which portion of an IP address refers to the network and which to host devices.

CIDR Notation

Classless Inter-Domain Routing (e.g., /24) represents the number of consecutive 1 bits in the subnet mask, providing a more flexible way to define subnets.

Host Range

The range of valid IP addresses within a subnet (e.g., 192.168.1.1 to 192.168.1.254) that can be assigned to network devices.

Wildcard Mask

The binary inverse of a subnet mask (e.g., 0.0.0.255 for 255.255.255.0), commonly used in routing protocols and access control lists (ACLs).

How IPv4 Subnetting Works

Subnetting divides the host portion of an IP address to create multiple network segments. The process involves:

  1. Determine requirements: How many subnets and hosts per subnet are needed
  2. Calculate subnet mask/prefix: Based on the number of subnets required
  3. Identify network and broadcast addresses: These cannot be assigned to devices
  4. Calculate usable host range: All addresses between network and broadcast

Example: A /24 network (255.255.255.0) has 256 total addresses, with 254 usable for hosts after excluding the network and broadcast addresses.

IPv6 Subnetting Concepts

IPv6 subnetting follows different principles than IPv4, primarily due to the vastly larger address space and the absence of broadcast addresses. IPv6 addresses are 128 bits long, typically written as eight groups of four hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

Prefix Length

Similar to CIDR notation in IPv4, prefix length (e.g., /64) denotes the network portion of an IPv6 address. A /64 prefix is standard for most end-user networks.

Address Compression

IPv6 addresses can be shortened by omitting leading zeros in groups and replacing consecutive zero groups with a double colon (::) once in an address.

Interface ID

The last 64 bits of an IPv6 address typically form the interface identifier, often auto-generated using the device's MAC address or randomly assigned.

Address Types

IPv6 includes various address types like Global Unicast (public internet), Unique Local (private networks), and Link-Local (single-link communication).

Subnet Structure

A typical IPv6 addressing scheme uses a /48 prefix for an organization, with 16 bits for subnets (allowing 65,536 subnets) and 64 bits for host interfaces.

No Broadcast

IPv6 eliminates broadcast addresses entirely, instead relying on multicast addresses for one-to-many communication, which reduces network traffic.

Common IPv6 Prefixes and Their Uses

PrefixTypical UseNotes
/32ISP allocationAssigned to large providers
/48OrganizationStandard for enterprise networks
/56Small organization/homeCommon for residential customers
/64Single subnetStandard for end networks
/128Single hostEquivalent to a /32 in IPv4

Practical Subnet Applications

IPv4 Network Design Example

Corporate network segmentation:

  • Management: 192.168.1.0/24 (254 hosts)
  • Sales: 192.168.2.0/24 (254 hosts)
  • Engineering: 192.168.3.0/24 (254 hosts)
  • IT Support: 192.168.4.0/24 (254 hosts)
  • Guest Network: 192.168.5.0/24 (254 hosts)

IPv6 Network Design Example

Modern corporate IPv6 segmentation:

  • Site Prefix: 2001:db8::/48 (organization)
  • Management: 2001:db8:1::/64
  • Sales: 2001:db8:2::/64
  • Engineering: 2001:db8:3::/64
  • Guest Network: 2001:db8:ffff::/64

Best Practices for IPv4 and IPv6 Subnetting

  • Plan for growth: Always allocate more IP addresses than currently needed to accommodate future expansion
  • Document meticulously: Maintain detailed records of all subnet allocations, including purpose and VLAN assignments
  • Use hierarchical design: Implement a logical hierarchy in your addressing scheme for easier management
  • Consider dual-stack: During IPv6 transition, maintain both IPv4 and IPv6 addressing where necessary
  • Implement VLANs: Combine subnetting with VLANs for enhanced network segmentation and security
  • Standardize addressing: Create consistent addressing schemes across your organization
  • Set up proper DNS: Ensure DNS records are maintained for both forward and reverse lookups
  • Monitor utilization: Regularly check IP address usage to identify potential issues or address exhaustion

Common Subnetting Pitfalls to Avoid

  • Insufficient planning: Not allocating enough address space for future growth
  • Overlapping subnets: Creating subnets with overlapping address ranges that cause routing conflicts
  • Inconsistent addressing: Using different subnetting schemes across similar network segments
  • Poor documentation: Failing to document subnet allocations and VLAN assignments
  • Ignoring IPv6: Not preparing for the transition to IPv6, especially in new network deployments
Ratings

Ready to Dive Deeper into Network Tools?

Discover our complete range of internet and networking calculators to help you design, optimize, and troubleshoot your networks.