Skip to the content

/31 Subnet (255.255.255.254)

A /31 network has just 2 addresses and the subnet mask 255.255.255.254. Both are usable, but only on a point-to-point link (RFC 3021).

With or without a prefix: 192.168.1.10/24

/31

Network in CIDR notation

10.0.0.0/31

Two addresses, both usable: 10.0.0.0 and 10.0.0.1.

Network address
10.0.0.0
Broadcast address
None (point-to-point link)
First usable host
10.0.0.0
Last usable host
10.0.0.1
Usable hosts
2
Total addresses
2
Subnet mask
255.255.255.254
Wildcard mask
0.0.0.1
IP class
A, default mask /8
Address type
Private (RFC 1918), in 10.0.0.0/8

In binary

Address
00001010.00000000.00000000.00000000
Mask
11111111.11111111.11111111.11111110
Network
00001010.00000000.00000000.00000000

The line marks where the network part ends: 31 network bits to its left, 1 host bit to its right.

Split into smaller subnets

2 subnets of /32, 1 usable host each.

  1. 10.0.0.0/32Hosts 10.0.0.0Broadcast none
  2. 10.0.0.1/32Hosts 10.0.0.1Broadcast none
Share this tool:TwitterFacebookLinkedInWhatsAppEmail

/31 at a glance

Subnet mask
255.255.255.254
Mask in binary
11111111.11111111.11111111.11111110
Wildcard mask
0.0.0.1
Addresses in one network
2
Usable for hosts
2, on a point-to-point link only
Networks of this size
128 in a /24, 32,768 in a /16

Where /31 networks begin

One network covers 2 addresses, so a new network begins wherever the last number of the address is a multiple of 2: 0, 2, 4, 6 and so on up to 254.

10.0.0.0/29 divided into 4 networks of /31

  1. 10.0.0.0/31Hosts 10.0.0.0 – 10.0.0.1Broadcast none
  2. 10.0.0.2/31Hosts 10.0.0.2 – 10.0.0.3Broadcast none
  3. 10.0.0.4/31Hosts 10.0.0.4 – 10.0.0.5Broadcast none
  4. 10.0.0.6/31Hosts 10.0.0.6 – 10.0.0.7Broadcast none

In practice

By the ordinary rule a /31 would have no usable address at all: one would be the network address and the other the broadcast address. RFC 3021, published in 2000, makes an exception for links with exactly two ends, where neither is needed. Both addresses then go to the two routers.

A /31 always consists of an even address and the odd one after it: 10.0.0.0 and 10.0.0.1, or 10.0.0.6 and 10.0.0.7. Compared with /30 it halves the addresses spent on router links.

It is for point-to-point links only. A network with more than two devices needs a broadcast address, and not every device or operating system accepts this mask.

The subnet calculator takes any address with any prefix or mask, explains the address classes and the private ranges, and splits a network into subnets.