跳转到主要内容

反掩码计算器

由子网掩码计算反掩码,或由反掩码计算子网掩码。

Inputs

Enter a subnet mask (e.g. 255.255.255.0) or a wildcard mask (e.g. 0.0.0.255)

Mask Details

Results will appear here.

Wildcard masks are the inverse of subnet masks and are used extensively in Cisco ACLs, OSPF network statements, and other router configurations where you want to specify which bits of an address must match. Getting the wildcard mask wrong is one of the most common sources of misconfigured access lists, leading to either over-permissive rules or blocked legitimate traffic.

This tool computes the wildcard mask for any subnet mask or CIDR prefix. It also works in reverse — given a wildcard mask, it derives the corresponding subnet mask — making it useful for both writing new rules and interpreting existing ones in router configurations or audit reports.

如何在线计算通配符掩码

  1. 1

    输入子网掩码或前缀长度

    以点分十进制(例如 255.255.255.0)输入子网掩码,或输入 CIDR 前缀长度(例如 /24)。工具将自动计算对应的通配符掩码。

  2. 2

    查看通配符掩码

    工具即时显示通配符掩码(例如 0.0.0.255),可直接用于 Cisco IOS ACL 或 OSPF 配置。

  3. 3

    复制并应用

    将通配符掩码复制到剪贴板,粘贴到路由器或防火墙配置中。

How Wildcard Masks Work

A wildcard mask is the bitwise complement of the subnet mask. Where the subnet mask has a 1 bit (network portion), the wildcard mask has a 0 (must match); where the subnet mask has a 0 bit (host portion), the wildcard mask has a 1 (any value matches). A wildcard of 0.0.0.255 applied to 192.168.1.0 matches all addresses from 192.168.1.0 to 192.168.1.255.

Unlike subnet masks, wildcard masks do not need to be contiguous. Cisco IOS uses non-contiguous wildcards to match non-contiguous address sets — for example, matching every even-numbered host in a range. This tool focuses on the standard contiguous case, which covers the vast majority of real-world configurations.

为什么选择 FileCrank 通配符掩码计算器

  • ✓ 从子网掩码或 CIDR 前缀长度即时计算通配符掩码
  • ✓ 支持所有标准 IPv4 子网大小
  • ✓ 完全在浏览器中运行——不传输数据
  • ✓ 免费使用,无需注册
  • ✓ 适用于 Cisco ACL、OSPF 和防火墙配置

功能与规格

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

常见问题

How do I use the Wildcard Mask Calculator?

Enter a subnet mask (e.g., 255.255.255.0) or CIDR prefix (e.g., /24) and the tool instantly calculates the equivalent wildcard mask (e.g., 0.0.0.255).

What is a wildcard mask?

A wildcard mask specifies which bits in an address must match and which can vary. In a wildcard mask, 0 = must match, 1 = can vary. It is the bitwise inverse of a subnet mask.

What is the difference between a subnet mask and a wildcard mask?

A subnet mask divides an address into network and host portions (1s = network, 0s = host). A wildcard mask specifies matching rules (0 = must match, 1 = can vary). They are binary inverses of each other.

When do you use wildcard masks in ACLs?

Wildcard masks are used in Cisco access control lists (ACLs) to specify which packets to permit or deny. For example, 'permit tcp any 192.168.1.0 0.0.0.255' permits traffic to any host in the 192.168.1.0/24 network.

Does the calculator send my data anywhere?

No. All wildcard mask calculations run entirely in your browser using binary inversion. Your network configuration data stays on your device.

Is this tool useful for CCNA exam preparation?

Yes. Understanding wildcard masks is essential for CCNA exam success, especially for access list configuration and route filtering. This tool helps you practice mask calculations quickly.

Wildcard Calculator vs. Subnet Calculator

Most subnet calculators include the wildcard mask as one field among many, burying it in output alongside network and broadcast addresses. This tool makes the wildcard mask the primary focus, accepting either a subnet mask or CIDR prefix as input and returning the wildcard immediately — optimised for the specific workflow of writing or reviewing router ACLs.

FileCrank 通配符掩码计算器从子网掩码或 CIDR 前缀长度计算通配符掩码,适用于 Cisco ACL 和 OSPF 配置。计算在浏览器本地完成,不存储数据。免费使用,无需账户。

Advertisement

Ad