RevealTheme logo

CIDR计算器

找出能容纳N台主机的最小CIDR块。高效规划IP地址分配。

可容纳的最小 CIDR 50 主机/26
总地址数 /2664
可用主机62
浪费的地址空间12

如何使用本工具

  1. 1

    Type the number of hosts you need to address into the 'Hosts needed' field.

  2. 2

    Read the 'Smallest CIDR fitting' row to get the prefix length (for example /26).

  3. 3

    Check the 'Total addresses' and 'Usable hosts' rows to confirm the block is big enough.

  4. 4

    Look at the 'Address space wasted' row to see how many addresses you would leave unused at that prefix.

什么是CIDR计算器?

在规划网络时,你从主机数量出发,反推出一个CIDR前缀。划分子网需要使用2的幂次:要容纳50台主机,至少需要64个地址(其中2个保留给网络地址和广播地址),即对应一个/26。本工具会计算出满足你主机数量需求的最小CIDR。

常见使用场景

  • Sizing a new office VLAN by entering the expected device count and picking the prefix that leaves a little headroom.

  • Quickly checking whether a /24 is overkill for a subnet that only needs 30 hosts.

  • Comparing the wasted-address count across host estimates before you carve up a parent block.

  • Teaching subnetting students why 50 hosts needs 64 addresses and not 50.

  • Planning IP allocation for a fleet of IoT devices and confirming the block will not run out as you scale.

  • Sanity-checking a colleague's subnet proposal by reproducing the host-to-prefix math in seconds.

常见问题

为什么要减去2?
每个IPv4子网都会保留第一个地址(网络地址)和最后一个地址(广播地址)。只有中间的地址才能分配给主机。

相关工具