子网计算
UpBox优盒工具箱,免费在线子网计算器:输入 IPv4 与前缀长度或掩码,得出网络地址、可用地址范围、广播地址、CIDR、通配符掩码与可用主机数。
无需注册 · 数据不上传No sign-up · nothing uploaded
地址与掩码Address and mask
网络地址-
可用地址范围-
广播地址-
可用主机数-
- CIDR
- -
- 子网掩码
- -
- 反掩码(通配符)
- -
已计算
只处理 IPv4,前缀 0–32;/31 用于点对点链路、/32 为单个主机,这两种不预留网络与广播地址;掩码必须是连续的 1,否则会被判为非法;不做 CIDR 合并与路由汇总
本工具所有运算在本地浏览器完成,你的文件、文本不会上传到服务器
工具介绍
配路由、划分网段、排查「这台机器跟网关是不是同一个网段」,都要先算出网络地址和范围。填 IP 加前缀就有了。 Routing, segmenting and checking whether a host sits in the gateway subnet all start from the network address and range. Enter an IP plus a prefix and there they are.
前缀和掩码双向联动,填哪个另一个自动跟着变,不用心算 255.255.255.192 到底是 /26 还是 /27。 Prefix and mask stay in sync in both directions, so you never have to work out by hand whether 255.255.255.192 means /26 or /27.
- 双向联动Two-way sync
- 可用范围Usable range
- 通配符掩码Wildcard mask
- 非法提示Validation
使用说明
- 填 IPv4。Enter the IPv4.
- 填前缀或掩码。Set prefix or mask.
- 读网络与范围。Read network and range.
- 核对主机数。Check the host count.
常见问题
/31 和 /32 怎么算?How are /31 and /32 handled?
/31 两点互联不预留网络与广播,/32 只有一个地址,可用主机数都按 0 处理。/31 is a point-to-point pair with no reserved addresses and /32 is a single host, so usable hosts are 0.
为什么掩码填 255.0.255.0 会报错?Why is 255.0.255.0 rejected?
那是非连续掩码,实际网络中不可用。That mask is not contiguous and is not usable on real networks.
支持 IPv6 吗?IPv6 support?
暂不支持,只做 IPv4。Not yet — IPv4 only.
能算网段合并吗?Can it summarise routes?
不能,这里是单网段换算,不做 CIDR 合并。No — this converts a single block and does no CIDR merging.