Ko-fiSupport

Subnet Calculator Technical Overview

Calculate IPv4 network ranges, CIDR prefixes (/0 to /32), subnet masks, ACL wildcard masks, and usable host counts instantly. Includes 22+ pre-calculated CIDR reference tables and CCNA worked examples. Verified against RFC 950, RFC 4632 (CIDR), and RFC 3021 (/31 point-to-point) using unsigned 32-bit bitwise arithmetic.

Instant CIDR (/0 to /32) subnet mask and wildcard mask computationNetwork address, broadcast address, and first/last usable host calculation22+ pre-calculated CIDR and RFC 1918 subnet reference breakdown pagesOne-click copy for router and switch configurationEnter Base IPv4 Address: Type any IPv4 host or network address (e.g., 192.168.1.1 or 10.0.0.0) into the IP input field.Select CIDR Prefix (/0 to /32): Choose the CIDR prefix length (such as /24, /26, or /30) from the dropdown selector.
CCNA Exam Drill ExamplesMask: 255.255.248.0Usable Hosts: 2,046

172.16.45.19/21 Third-Octet CCNA Subnetting Example (Network 172.16.40.0/21)

Prefixes between /17 and /23 split on the third octet rather than the fourth. A /21 block aggregates eight contiguous /24 networks (2,048 total addresses; 2,046 usable hosts), making it popular for campus distribution switches and cloud availability zones.

Calculated IPv4 Parameters for 172.16.45.19/21

Network Address (ID)172.16.40.0/21All host bits set to 0
Directed Broadcast IP172.16.47.255All host bits set to 1
Subnet Mask255.255.248.021 network bits
ACL / OSPF Wildcard Mask0.0.7.255255.255.255.255 − mask
First Usable Host IP172.16.40.1Typical Default Gateway (.1)
Last Usable Host IP172.16.47.254Broadcast IP − 1
Usable Host Capacity2,0462^11 − 2 usable hosts
Interesting Octet & Block SizeOctet 3 (Block: 8)2,048 total IPv4 addresses

32-Bit Binary Bitwise Breakdown

Routers determine the Network Address by performing a bitwise AND between the 32-bit IPv4 address and the 21-bit Subnet Mask, and compute the Broadcast Address by setting the remaining 11 host bits to 1.

Input IPv4 (172.16.45.19)
10101100.00010000.00101101.00010011
Subnet Mask (255.255.248.0 / 21)
11111111.11111111.11111000.00000000
Bitwise AND → Network ID (172.16.40.0)
10101100.00010000.00101000.00000000
Host Bits = 1 → Broadcast IP (172.16.47.255)
10101100.00010000.00101111.11111111
CCNA 200-301 Speed-Solving Note

How to Solve 172.16.45.19/21 in Under 15 Seconds

For /21, the interesting octet is the 3rd octet (since 16 < 21 <= 24). Five network bits are active in the 3rd octet (128+64+32+16+8 = 248), giving mask 255.255.248.0 and block size 256 - 248 = 8. Multiples of 8 near 45 are 40 and 48, so the subnet spans 172.16.40.0 through 172.16.47.255.

Sample Cisco IOS Interface & Routing Configuration

interface Vlan100
 description Campus_Distribution_Block
 ip address 172.16.40.1 255.255.248.0
 no shutdown

Adjacent /21 Subnet Blocks in the Same Octet Boundary

Each /21 block advances by the magic block size of 8 in octet 3. The active block containing 172.16.45.19 is highlighted below.

Block #Subnet ID / CIDRUsable Host RangeDirected Broadcast
#1 172.16.0.0/21172.16.0.1 – 172.16.7.254172.16.7.255
#2 172.16.8.0/21172.16.8.1 – 172.16.15.254172.16.15.255
#3 172.16.16.0/21172.16.16.1 – 172.16.23.254172.16.23.255
#4 172.16.24.0/21172.16.24.1 – 172.16.31.254172.16.31.255
#5 172.16.32.0/21172.16.32.1 – 172.16.39.254172.16.39.255
#6 Match172.16.40.0/21172.16.40.1 – 172.16.47.254172.16.47.255
#7 172.16.48.0/21172.16.48.1 – 172.16.55.254172.16.55.255
#8 172.16.56.0/21172.16.56.1 – 172.16.63.254172.16.63.255

Explore Other Pre-Calculated IPv4 Subnet & CIDR Reference Guides

Jump to another worked CIDR prefix or RFC 1918 enterprise subnet breakdown:

Sponsored