IPv4 CIDR 与 IPv6 /64 计算9 分钟阅读最后更新于
IPv4 与 IPv6 子网掩码计算器:CIDR 网络架构指南
解析二进制子网掩码原理,计算网络地址与广播地址,理解 IPv6 /64 标准前缀规划。
W
WEBioDD 工程团队•100% 浏览器本地运行 & 零信任
核心要点
- IPv4 地址由 32 位二进制构成,CIDR 前缀定义了固定网络位的长度。
- 网络地址的主机位全为 0,广播地址的主机位全为 1。
- 有效可用主机数由公式 2^(32 - CIDR) - 2 计算得出。
- IPv6 采用 128 位地址,/64 是全球公认的标准终端子网前缀。
100% In-Browser & Local Execution
计算子网与 CIDR 地址范围
即时获取子网掩码、广播地址、可用主机总数及二进制位图表示。
- IPv4 CIDR prefixes /8 to /32
- Network & broadcast address math
- Usable IP host range calculator
- Binary bitwise mask visualizer
01.Binary Arithmetic & Bitwise Masking in IPv4 Networks
An IPv4 address consists of 32 binary bits. Subnet masks (e.g., 255.255.255.0 or /24) perform a bitwise logical AND with the IP address to isolate the Network ID from the Host ID. For example, 192.168.1.55 AND 255.255.255.0 yields the network address 192.168.1.0.
02.Calculating Usable Hosts, Wildcard Masks & Ranges
For a given prefix length N, the host bit count is H = 32 - N. Total addresses equal 2^H, while usable host addresses equal 2^H - 2. The Wildcard Mask is the bitwise inverse of the subnet mask (e.g., 0.0.0.255 for /24), commonly used in Cisco ACLs and OSPF configurations.
How to Calculate Subnets and IP Ranges
Step-by-step subnet calculation workflow.
1
Enter IP Address
Type your target IPv4 address (e.g., 10.0.0.1 or 192.168.10.0).
2
Select CIDR Prefix or Mask
Choose the subnet mask from the CIDR dropdown (/8 to /32).
3
Inspect Network Coordinates
Review the calculated Network Address, Broadcast Address, and Subnet Mask.
4
Check Usable Host Range
View the exact first usable IP, last usable IP, and total assignable host count.
Frequently Asked Questions
The first address is reserved as the Network ID (all host bits 0), and the last address is reserved as the Broadcast address (all host bits 1).