Network Engineering, November 2020

IPv4 Subnetting: A Quick Overview

The practice of dividing a network into two or more networks is called subnetting. We steal bits from the hosts to create more subnets.

Public IP range, Used with the public network ex. WAN; Recognized over the internet, assigned by IANA or service provider. globally unique, cost associated with public IP.

CLASSIP Address RangeNetwork MaskPrefixNumber of NetworksNumber of hosts
A1 to 126, Used for huge networks, like those deployed by Internet Service Providers (ISPs).255.0.0.0/812516,777,241
B128 to 191, Used for medium and large-sized networks in enterprises and organizations255.255.0.0/1616,38265,534
C192 to 223, Used for small-sized networks.255.255.255.0/242,097,150254
D224 to 239, Used for multicasting applicationsMulticast Addresses
E240 to 254, Reserved for experimental purposes only for R&D or Study.R&D, Restricted/Experimental

The above table is standard and good to remember but the actual range will look like below after excluding private IP range.

CLASS A1.0.0.0 - 9.255.255.255 11.0.0.0 - 126.255.255.255
CLASS B128.0.0.0 - 172.15.255.255 172.32.0.0 - 191.255.255.255
CLASS C192.0.0.0 - 192.167.255.255 192.169.0.0 - 223.255.255.255

127.0.0.0 is reserved for loopback (localhost).

Private IP range, Used with the private network ex. LAN; Not recognized over the internet, assigned by LAN Admin. unique only in LAN segment. free of charge.

CLASS A10.0.0.0 - 10.255.255.255, Used for private network, local LAN.
CLASS B172.16.0.0 - 172.31.255.255, Used for private network, local LAN.
CLASS C192.168.0.0 - 192.168.255.255, Used for private network, local LAN.

Types of Subnetting

Types of addresses

Subnetting Table (Class A),

NetBitsNetwork MaskSubnetsNumber of Hosts
/8255.0.0.0016,777,214
/9255.128.0.008,388,606
/10255.192.0.024,194,302
/11255.224.0.062,097,150
/12255.240.0.0141,048,574
/13255.248.0.030524,286
/14255.252.0.062262,142
/15255.254.0.0126131,070
/16255.255.0.025465,534
/17255.255.128.051032,766
/18255.255.192.01,02216,382
/19255.255.224.02,0468,190
/20255.255.240.04,0944,094
/21255.255.248.08,1902,046
/22255.255.252.016,3821,022
/23255.255.254.032,766510
/24255.255.255.065,534254
/25255.255.255.128131,070126
/26255.255.255.192262,14262
/27255.255.255.224524,28630
/28255.255.255.2401,048,57414
/29255.255.255.2482,097,1506
/30255.255.255.2524,194,3022

Subnetting Table (Class B),

NetBitsNetwork MaskSubnetsNumber of Hosts
/16255.255.0.0065,534
/17255.255.128.0032,766
/18255.255.192.0216,382
/19255.255.224.068,190
/20255.255.240.0144,094
/21255.255.248.0302,046
/22255.255.252.0621,022
/23255.255.254.0126510
/24255.255.255.0254254
/25255.255.255.128510126
/26255.255.255.1921,02262
/27255.255.255.2242,04630
/28255.255.255.2404,09414
/29255.255.255.2488,1906
/30255.255.255.25216,3822

Subnetting Table (Class C),

NetBitsNetwork MaskSubnetsNumber of Hosts
/24255.255.255.00254
/25255.255.255.1280126
/26255.255.255.192262
/27255.255.255.224630
/28255.255.255.2401414
/29255.255.255.248306
/30255.255.255.252622