/31 Subnet

A /31 has 2 addresses. Its netmask is 255.255.255.254. Enter any address below to see its /31 network.

  • Free
  • No Sign-Up
  • Runs in Your Browser

Examples:

IPv4 network

2 usable hosts · 192.168.1.0 to 192.168.1.1

Private (RFC 1918)

Details

Netmask
Wildcard Mask
First Usable
Last Usable
Usable HostsPoint-to-point link (RFC 3021)
Total Addresses
Netmask in Binary

Split Into Subnets

192.168.1.0/32192.168.1.0 – 192.168.1.0
192.168.1.1/32192.168.1.1 – 192.168.1.1

Subnet Calculator

/31 at a glance

CIDR Prefix/31
Netmask255.255.255.254
Wildcard Mask0.0.0.1
Netmask (Hex)0xFFFFFFFE
Total Addresses2
Usable Hosts2
Host Bits1
Fit in a /24128
Binary Mask11111111.11111111.11111111.11111110

A /31 fixes the first 31 bits of the address as the network and leaves 1 bits for hosts, so it holds 2^1 = 2 addresses. On point-to-point links both are usable, as there is no network or broadcast address (RFC 3021).

Two addresses, both usable on point-to-point links (RFC 3021). Saves half the addresses compared with a /30 on router links.

Most networks filter BGP announcements longer than /24, so a block this size cannot be routed on the internet on its own; it is carved out of a larger block by your provider.

Questions

How many usable IP addresses are in a /31?
2. On a point-to-point link both addresses of a /31 are usable.
What is the subnet mask for /31?
255.255.255.254. The wildcard (inverse) mask, used in Cisco ACLs, is 0.0.0.1.
How many /31 subnets fit in a /24?
128, each with 2 addresses.
Is 255.255.255.254 the same as /31?
Yes. 255.255.255.254 written in binary is 31 ones followed by 1 zeros, which is what /31 means.

Every address on your network, watched

Frabs maps each IP to the VM that owns it and stops the abuse coming from it, on Proxmox, Virtualizor, VirtFusion and SolusVM.