IPv4 Subnet Calculator
CIDR couples an address with a prefix length separating network bits from host bits. From that pair you can enumerate first/last usable hosts, broadcast, and total span—critical for right-sized subnets and non-overlapping VPC peering.
How to use
- Enter an IPv4 address and prefix (or classic dotted netmask) from your design template or cloud console.
- Read network and broadcast addresses, usable host counts, and whether the provider reserves gateway/metadata slots.
- Feed aligned ranges into DHCP scopes, security groups, and infrastructure-as-code modules; document slash notation consistently.
FAQ
- Why are usable hosts less than 2^(32-prefix)?
- Network and broadcast were traditionally reserved; many clouds also hold addresses for routers or NAT—check provider docs before assuming every host bit is allocatable.
- Can I carve multiple /26 networks inside one /24?
- Yes—four /26 blocks fit without overlap if boundaries align. Verify aggregate advertisements and ACL coverage for each slice.
- What is a wildcard mask?
- Common in Cisco ACLs, it is the bitwise inverse of the subnet mask—translate carefully when copying rules between vendors.
IP 子网计算器
输入任意 IPv4 地址与 CIDR 前缀,即刻求出网络掩码、主机网段及广播地址。对齐显示网络位与主机位。
Share Tool & Configuration
You can copy the configuration link of this page or share this tool with your friends.
subnet_inputs.conf
/24
# 说明:计算完全由前端 JS 完成,支持 A/B/C 类标准网络和无类别域间路由 (CIDR) 的精确拆分。
subnet_results.log
子网掩码 (Subnet Mask)
255.255.255.0
网络地址 (Network Address)
192.168.1.0
可用 IP 范围 (Usable IP Range)
192.168.1.1 - 192.168.1.254
广播地址 (Broadcast Address)
192.168.1.255
可用主机数 (Total Usable Hosts)
254 个可用 IP 节点 (8 位主机位)
binary_alignment_matrix.bin
💡 图示高亮说明:绿色 代表网络号 (Network Bits); 蓝色 代表主机号 (Host Bits)。
IP 地址二进制表示 (IP Binary)192.168.1.1
11000000.10101000.00000001.00000001
子网掩码二进制表示 (Mask Binary)255.255.255.0
11111111.11111111.11111111.00000000