Visual Subnet Calculator

Design your IP subnets visually, export IaC code for all cloud providers, and share with your team

IPv4 Subnet Calculator

/
Select a network type for accurate IP address calculations.

Understanding IP Subnets

What is Subnetting?

Subnetting is the process of dividing a single network into smaller network segments. It helps optimize network performance, improve security, and manage IP address allocation. By breaking down a large network into smaller, more manageable pieces, network administrators can create more efficient routing, isolate network traffic, and implement better security controls.

CIDR Notation

CIDR (Classless Inter-Domain Routing) notation is a method for allocating IP addresses and routing Internet Protocol packets. It replaced the older classful network addressing architecture on the Internet. Its goal was to slow the growth of routing tables on routers across the Internet, and to help slow the rapid exhaustion of IPv4 addresses.

For a complete reference of CIDR notation, subnet masks, and usable IPs, see our CIDR Reference page.

IPv4 CIDR Notation

In IPv4, CIDR notation uses a suffix like /24 to indicate the number of bits in the network portion of an IP address. For example, an IPv4 address like 192.168.1.0 with a /24 suffix means that the first 24 bits (three octets) define the network, leaving the remaining 8 bits for host addresses within that network. This allows for more flexible allocation of IP address blocks compared to the old classful system.

Reserved IPs by Cloud Providers

When planning your cloud infrastructure, it's important to understand that cloud providers reserve certain IP addresses within each subnet for their own use. This affects the number of usable IP addresses available for your resources.

AWS

AWS reserves the first 4 IP addresses and the last IP address in each subnet:

  • The first address is the network address
  • The second address (.1) is used for the VPC router
  • The third address (.2) is for AWS DNS
  • The fourth address (.3) is reserved for future use
  • The last address is the broadcast address

Azure

Azure reserves the first 5 IP addresses and the last IP address in each subnet:

  • The first address is the network address
  • The second address (.1) is reserved for the default gateway
  • The third and fourth addresses (.2, .3) are reserved for Azure DNS
  • The fifth address (.4) is reserved for future use
  • The last address is the broadcast address

Google Cloud

Google Cloud Platform reserves 4 IP addresses in each subnet:

  • The first address is the network address
  • The second address (.1) is reserved as the default gateway
  • The second-to-last address is for future use
  • The last address is the broadcast address

Understanding these reserved addresses is crucial when planning your network architecture, especially when working with smaller subnet sizes where every available IP address counts. Our subnet calculator automatically accounts for these reserved addresses when you select the appropriate cloud provider mode.