Network bitsHost bits

Split into subnets

Summarize ranges

Subnet mask table

Double-check addresses and permissions before applying them to production networks or servers.

Unix permissions are three octal digits for owner, group and others, each the sum of read 4, write 2 and execute 1: rwxr-x--- is 750. A fourth leading digit adds setuid 4, setgid 2 or the sticky bit 1, as in 1777 for /tmp. Tick boxes or type a number to get the command.

How to use

  1. IPv4: type an address with a prefix (192.168.1.10/24) or a mask (192.168.1.10 255.255.255.0), or move the slider. Every value can be tapped to copy.
  2. Split the network into equal smaller subnets, then copy the list or download a CSV.
  3. Summarize: paste CIDRs, single addresses or ranges to get the smallest set of CIDR blocks that covers them.
  4. IPv6: enter an address with a prefix to see the compressed and expanded forms, the range and the exact number of addresses.
  5. chmod: tick boxes, type an octal number or an rwx string; the command updates as you go.
  • /31 networks have two usable addresses (RFC 3021) and /32 one; broadcast does not apply to them.
  • A mask written in reverse (a wildcard such as 0.0.0.255) is understood too.
  • IPv6 counts use exact big-integer math, so even a /0 shows all 2^128 addresses.
  • Recursive -R applies the same mode to folders and files; for folders you usually want 755 and for files 644.

How CIDR notation works

An IPv4 address has 32 bits. The prefix after the slash says how many of them identify the network; the rest number the hosts. A /24 leaves 8 host bits, so 2^8 = 256 addresses. The first is the network address and the last the broadcast address, which leaves 254 usable hosts. The general rule is 2^(32 − prefix) − 2.

Example: 192.168.1.10/24 has mask 255.255.255.0, network 192.168.1.0, hosts 192.168.1.1 to 192.168.1.254 and broadcast 192.168.1.255. A /26 of the same network gives four blocks of 64 addresses with 62 hosts each. Point-to-point links can use /31 with two usable addresses (RFC 3021), and /32 is a single host.

Masks, wildcards and private ranges

The subnet mask writes the prefix as dotted decimal: /20 is 255.255.240.0. The wildcard mask is its inverse, 0.0.15.255, and is what Cisco ACLs and OSPF expect. Private networks use the RFC 1918 ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; 100.64.0.0/10 is reserved for carrier-grade NAT and 169.254.0.0/16 for link-local addresses.

IPv6 is counted differently

IPv6 addresses have 128 bits and no broadcast. The standard LAN subnet is a /64, which holds 2^64 (about 18.4 quintillion) addresses; a /48 site allocation contains 65,536 such /64 networks. Leading zeros in each group may be dropped and one run of zero groups shortened to ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 is written 2001:db8::1 (RFC 5952).

Frequently asked questions

How many hosts are in a /24?

256 addresses, of which 254 are usable for hosts: the first (.0) is the network address and the last (.255) the broadcast. The mask is 255.255.255.0.

How do I calculate the number of usable hosts?

Subtract the prefix from 32, raise 2 to that power and subtract 2. A /27 gives 2^5 − 2 = 30 hosts, a /22 gives 2^10 − 2 = 1,022. /31 and /32 are the exceptions with 2 and 1 usable addresses.

What is a wildcard mask?

The bitwise inverse of the subnet mask: 255.255.255.0 becomes 0.0.0.255. Routers such as Cisco IOS use it in access lists and OSPF to say which bits must match.

Which IP ranges are private?

10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16, defined in RFC 1918. They are not routed on the public internet.

How do I split a network into smaller subnets?

Each extra prefix bit doubles the number of subnets and halves their size. Splitting 10.0.0.0/24 into /26 gives four subnets of 64 addresses: .0, .64, .128 and .192. The Split tool lists them and exports CSV.

Why is an IPv6 subnet usually /64?

Stateless address autoconfiguration (SLAAC) builds the last 64 bits from the device itself, so LAN segments are /64 by convention. Smaller prefixes such as /56 or /48 are what providers hand to customers.

Often used with

How to use

Steps

  1. IPv4: type an address with a prefix (192.168.1.10/24) or a mask (192.168.1.10 255.255.255.0), or move the slider. Every value can be tapped to copy.
  2. Split the network into equal smaller subnets, then copy the list or download a CSV.
  3. Summarize: paste CIDRs, single addresses or ranges to get the smallest set of CIDR blocks that covers them.
  4. IPv6: enter an address with a prefix to see the compressed and expanded forms, the range and the exact number of addresses.
  5. chmod: tick boxes, type an octal number or an rwx string; the command updates as you go.

Shortcuts

Ctrl + EnterCopy the first result

Good to know

Runs in your browser. Files and text never leave your device.