IP Subnet Calculator

IP Subnet Calculator

IPv4 Subnet Calculator


IPv6 Subnet Calculator

What is a Subnet?

A subnet refers to a smaller, segmented portion of an IP network. An IP network itself is a collection of communication protocols commonly known as TCP/IP (Transmission Control Protocol/Internet Protocol), used on the Internet and other similar networks.

The process of splitting a network into two or more separate, smaller networks is known as subnetting. Devices called routers manage the traffic between these subnetworks, acting as physical boundaries. While IPv4 remains the most widely used protocol for network addressing, the adoption of IPv6 has been steadily increasing since 2006.

Understanding IP Addresses and Subnetting

An IP address consists of two parts:

  • Network Number (Routing Prefix)
  • Host Identifier (Rest Field)

The host identifier is unique to each device within the network, whereas the network prefix is shared among all devices in a subnet. Typically, the network prefix is written using CIDR (Classless Inter-Domain Routing) notation for both IPv4 and IPv6 addresses.

CIDR allows more flexible allocation of IP addresses and efficient routing compared to the older class-based system. In IPv4 networks, a subnet mask is also used, usually shown in dot-decimal notation (e.g., 255.255.255.0), to distinguish the network and host parts of an IP address. In IPv6, the prefix length serves a similar role, indicating how many bits are designated for the network portion.

Before CIDR was introduced, network prefixes in IPv4 were determined based on the address class (A, B, or C), each covering a specific IP range. However, with CIDR, defining an IP address requires specifying both the address and its subnet mask, offering greater flexibility and more efficient use of IP address space.

Common IPv4 Subnet Sizes

Below is a table showing typical IPv4 subnet configurations, including their prefix size, corresponding network mask, and the number of usable hosts per subnet:

Prefix SizeNetwork MaskUsable Hosts per Subnet
/1128.0.0.02,147,483,646
/2192.0.0.01,073,741,822
/3224.0.0.0536,870,910
/4240.0.0.0268,435,454
/5248.0.0.0134,217,726
/6252.0.0.067,108,862
/7254.0.0.033,554,430
Class A
/8255.0.0.016,777,214
/9255.128.0.08,388,606
/10255.192.0.04,194,302
/11255.224.0.02,097,150
/12255.240.0.01,048,574
/13255.248.0.0524,286
/14255.252.0.0262,142
/15255.254.0.0131,070
Class B
/16255.255.0.065,534
/17255.255.128.032,766
/18255.255.192.016,382
/19255.255.224.08,190
/20255.255.240.04,094
/21255.255.248.02,046
/22255.255.252.01,022
/23255.255.254.0510
Class C
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2540
/32255.255.255.2550

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top