23

With a /31 subnet, we are left with zero usable hosts. The /31 subnet only has two hosts - one for network and another for broadcast.

I am wondering why would someone ever use this subnet.

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
Bali Vinayak
  • 431
  • 1
  • 6
  • 10
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer. – Ron Maupin Jan 03 '21 at 01:47

1 Answers1

28

A /31 network actually has two usable hosts for a point-to-point link. See the Standards Track RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links (published in December 2000):

Abstract

With ever-increasing pressure to conserve IP address space on the Internet, it makes sense to consider where relatively minor changes can be made to fielded practice to improve numbering efficiency. One such change, proposed by this document, is to halve the amount of address space assigned to point-to-point links (common throughout the Internet infrastructure) by allowing the use of 31-bit subnet masks in a very limited way.

-and-

This document is based on the idea that conserving IP addresses on point-to-point links (using longer than a 30-bit subnet mask) while maintaining manageability and standard interaction is possible. Existing documentation [RFC950] has already hinted at the possible use of a 1-bit wide host-number field.

The savings in address space resulting from this change is easily seen--each point-to-point link in a large network would consume two addresses instead of four. In a network with 500 point-to-point links, for example, this practice would amount to a savings of 1000 addresses (the equivalent of four class C address spaces).

Understand that not every vendor (Microsoft in particular) supports the standard, although many vendors, e.g. Cisco, fully support the standard.

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
  • 2
    Why use a /30 when a /31 will do the job fine (assuming both ends support it) – Criggie Jul 22 '18 at 23:33
  • 15
    Good question. There are simply people who do not believe in `/31` addressing, despite the standard. For example, all the carriers we deal with will only support `/30`, and not `/31`, for point-to-point links between a customer and the carrier, even though the customer and carrier equipment support it. IPv6 has a similar RFC for `/127` point-to-point links (IPv6 has no problem using every address in a network because it has no broadcast), but the carriers require `/126` networks for point-to-point links between the customer and the carrier. Basically, it boils down to ignorance and inertia. – Ron Maupin Jul 22 '18 at 23:38
  • 4
    There's also a legacy concern - some older gear and firmware definitely didn't support /31's. It was easier to just stick to the older standard and there isn't a huge impetus to change existing networks and provisioning/deployment schemes. That said, I try to use /31's for p-t-p networks on anything newly designed. – rnxrx Jul 23 '18 at 03:05
  • 1
    @rnxrx, I understand that, but the comment asked about using it for equipment that does support it. Also, there is no good excuse for not supporting IPv6 `/127` point-to-point links (hello, Verizon, AT&T, Century Link, etc.). At least Microsoft got it right for IPv6, even if they will never support IPv4 `/31` networks. – Ron Maupin Jul 23 '18 at 03:19
  • "There are simply people who do not believe in /31 addressing, despite the standard." — that would be perfectly fine on P-t-P links, but not on a broadcasting media such as the Ethernet. Although on P-t-P links one doesn't need using netmask at all, it's /32 just for sake of being filled in. – poige Jun 06 '20 at 09:39
  • 2
    Well, `/31` networks work just fine on ethernet. If you connect two routers with ethernet, it is a simple matter to configure a `/31` network between them. The IPv4 addressing is at layer-3, and it is independent of the layer-1/2 protocols, e.g. ethernet. – Ron Maupin Jun 06 '20 at 15:37
  • Why do P-t-P links need IP addresses? – Effie Sep 09 '21 at 08:55
  • Because the whole path may extend beyond the point-to-point link. PPP (Point-to-Point Protocol) is often used between a site and an ISP, and traffic from the site must travel farther than the ISP to reach the destination. Some devices, e.g. Cisco routers, can use unnumbered interface for the PPP link, but that is just borrowing an IP address from a different interface. – Ron Maupin Sep 09 '21 at 12:37