askvity

How many IPs are in a /23 subnet?

Published in IP Subnetting 2 mins read

A /23 subnet contains exactly 512 IP addresses.

Understanding subnetting is key to efficiently managing network address space. The /23 notation is known as CIDR (Classless Inter-Domain Routing) notation, which specifies the number of bits used for the network portion of an IP address. In a /23 subnet mask, 23 bits are used for the network prefix, leaving the remaining bits for host addresses.

For IPv4 addresses, which are 32 bits long, a /23 subnet mask means that 32 - 23 = 9 bits are available for defining host addresses within that subnet. The total number of possible addresses in a subnet is calculated as 2 raised to the power of the number of host bits.

Number of Addresses = 2 ^ (Number of host bits)
Number of Addresses = 2 ^ 9
Number of Addresses = 512

This calculation aligns with the information provided in the Subnet Mask Cheat Sheet reference:

Subnet Mask (CIDR) Total Addresses Usable Hosts
/23 512 510
/22 1024 1022
/21 2048 2046
/20 4096 4094

As shown in the table, a /23 subnet encompasses 512 total IP addresses. It's worth noting that typically two addresses within a subnet are reserved: the network address (first address) and the broadcast address (last address), which is why the reference shows 510 "Usable Hosts". However, the question asks for the total number of "IPS" (IP addresses), which is 512.

Knowing the number of addresses in different subnet sizes helps network administrators plan IP allocations effectively.

Related Articles