跳转到主要内容

IPv4子网计算器

根据任意IPv4 CIDR地址块计算网络地址、广播地址、可用主机范围、子网掩码、反掩码及主机数量。

Inputs

Enter any valid IPv4 address

Subnet Details

Results will appear here.

Subnet calculation is a daily task for network engineers designing address plans, cloud architects partitioning VPC address space, and sysadmins configuring static IP assignments. Getting the network address, broadcast address, and usable host range right is critical — an off-by-one error can route traffic to the wrong host or leave an address range unreachable.

This tool takes any IPv4 address and CIDR prefix (or subnet mask) and instantly computes every derived value: network address, broadcast address, first and last usable host, subnet mask, wildcard mask, and total host count. It supports all prefix lengths from /0 to /32, including point-to-point /30 and /31 links.

如何在线计算 IPv4 子网

  1. 1

    输入网络地址

    以 CIDR 格式(例如 192.168.1.0/24)或分别输入 IP 地址和子网掩码。工具接受点分十进制和 CIDR 前缀长度两种格式。

  2. 2

    计算子网参数

    工具自动计算网络地址、广播地址、可用主机范围、主机数量和子网掩码。

  3. 3

    查看并使用结果

    将计算结果用于网络规划、路由器配置、防火墙规则或子网划分工作。

How IPv4 Subnet Calculation Works

An IPv4 address is a 32-bit integer. The prefix length defines a bitmask where the top N bits are 1 and the remaining bits are 0. The network address is the bitwise AND of the host address and the mask; the broadcast address is the bitwise OR of the network address and the inverted mask (wildcard mask). Usable hosts are all addresses strictly between these two values.

For /31 networks (RFC 3021), used on point-to-point links, there is no traditional network or broadcast address — both addresses are usable. For /32, the address represents a single host with no range. These edge cases are important to handle correctly in routing and firewall configurations.

为什么选择 FileCrank IPv4 子网计算器

  • ✓ 计算网络地址、广播地址、主机范围和可用主机数
  • ✓ 支持 CIDR 表示法和点分十进制子网掩码
  • ✓ 显示通配符掩码和二进制表示
  • ✓ 完全在浏览器中运行——不传输数据
  • ✓ 免费使用,适用于网络工程师、学生和系统管理员

功能与规格

最大文件大小
最大 100 MB
隐私
文件在约一小时后删除
价格
免费,无需注册
处理方式
服务器端
支持协议
IPv4
处理方式
浏览器本地
数据保留
无
费用
免费
计算在您的浏览器中本地完成——不向服务器发送数据。无需注册。免费——无隐藏费用。

常见问题

How do I use the IPv4 Subnet Calculator?

Enter an IPv4 address and either a CIDR prefix (e.g., /24) or a dotted-decimal subnet mask (e.g., 255.255.255.0). The tool instantly calculates all subnet values.

What is a subnet mask?

A subnet mask is a 32-bit value that divides an IPv4 address into a network portion and a host portion. For example, 255.255.255.0 means the first 24 bits are the network and the last 8 bits are for hosts.

How is the broadcast address calculated?

The broadcast address is calculated by setting all host bits (the bits after the network portion) to 1. For a /24 network ending in .0, the broadcast address ends in .255.

How many usable hosts are in a /24 subnet?

A /24 subnet has 256 total addresses. Subtracting the network and broadcast addresses leaves 254 usable host addresses.

Does any IP data I enter leave my browser?

No. All subnet calculations run entirely client-side. Your IP addresses and network data never leave your device or contact any server.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask. It is used in access control lists (ACLs) and routing to specify which address bits must match. 0 = must match, 1 = can vary. For a subnet mask 255.255.255.0, the wildcard is 0.0.0.255.

Is this calculator useful for CCNA exam preparation?

Yes. Subnet calculation is a core CCNA skill. This tool helps you learn the math, verify your calculations, and understand network addressing in depth.

IPv4 Subnet Calculator vs. ipcalc

ipcalc is the classic command-line reference but requires shell access and produces plain-text output that must be parsed manually. This tool delivers the same calculations in a structured, copy-friendly web interface with clearly labelled fields — ideal when working in documentation, a ticketing system, or a browser-based cloud console where a terminal is not available.

FileCrank IPv4 子网计算器计算网络地址、广播地址、主机范围、可用主机数、通配符掩码和二进制表示。计算在浏览器本地完成,不存储数据。免费使用,无需账户。

Advertisement

Ad