IP address or CIDR block
Result

IPv4 subnet mask reference

Prefix length against mask, wildcard mask and usable host count. Most LAN planning lands on /8, /16, /24, /25 or /26. /31 and /32 are special: the first is a point-to-point link (RFC 3021), the second is a single host.

IPv4 Subnet & CIDR Calculator

Drop in something like 192.168.1.130/26 and you immediately see which block it belongs to, where the broadcast address sits and how many hosts are left. Subnet planning, firewall allow-lists and "why can these two machines on the same switch not reach each other" all start from these numbers.

Dotted masks work too (10.0.0.0/255.255.0.0) and are checked for contiguity: a mask whose bits read 1, then 0, then 1 again will be rejected by routers and operating systems alike.

Features

How to use

  1. Enter an IP or a block on the left, for example 192.168.1.130/26.
  2. The result table updates on every keystroke.
  3. Use the mask reference below to look up any other prefix.

FAQ

Why does a /24 only have 254 usable hosts?

A /24 holds 256 addresses. The first has all host bits zero (network address) and the last has all host bits one (broadcast address); neither can be assigned. That leaves 254. /31 is the exception: RFC 3021 lets both addresses be used on point-to-point links.

What is a wildcard mask for?

It is the subnet mask inverted bit by bit. Cisco ACLs, the OSPF network command and many firewall rules expect it: for a /24 the mask is 255.255.255.0 and the wildcard is 0.0.0.255.

Why classify the address type?

It tells you at a glance whether an address is private, loopback, link-local (169.254.x.x) or carrier-grade NAT. When a service is unreachable, checking which range the address falls into often saves half the debugging.

Related tools & reading

Commentaires

Ce site est uniquement frontal : pas de backend ni de compte. Les commentaires vont sur GitHub Issues, Discussions ou par e-mail.

Collez ceci dans l'issue ou l'e-mail pour m'aider à localiser le problème ; cela n'inclut rien de ce que vous avez saisi

Aussi :Voir les commentaires existants · Commentaires par e-mail (sans compte GitHub) :278975598@qq.com