Using /31 subnets on point-to-point links

Posted by stretch in Networking on Wednesday, 18 Jun 2008 at 2:18 a.m. GMT

A recent post on /30 and /31 addressing prompted one reader to ask when 31-bit subnet masks are appropriate, or supported. It turns out they've been supported for a while.

Thirty-one-bit subnets were first proposed in RFC 3021, which was primarily motivated by the potential for public address space conservation. Recall that shrinking a /30 subnet to a /31 effectively doubles the number of point-to-point links you can address from a finite range. Cisco IOS has supported /31 subnets for point-to-point links since release 12.2(2)T. A thorough explanation of the feature is presented here.

We can put this theory into practice by addressing a point-to-point connection between two routers as 10.0.0.0/31. Note that this even applies to Ethernet interfaces, technically a broadcast medium.

Router(config)# interface f0/0
Router(config-if)# ip address 10.0.0.0 255.255.255.254
% Warning: use /31 mask on non point-to-point interface cautiously

An ominous warning message, no doubt, but it works just fine. We can successfully ping the far-end interface (10.0.0.1), and the subnet is accurately reflected in the routing table:

Router# ping 10.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/16/20 ms
Router# show ip route
...
     10.0.0.0/31 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, FastEthernet0/0
Kevin Gillick commented on 23 Jun 2008 at 12:55 p.m.

Nice, but I have never seen this in a production network!

Hesham commented on 7 Jul 2008 at 11:05 a.m.

Nice , never knew that Before

Benmoon commented on 8 Jul 2008 at 3:37 a.m.

Cool. But what happens if there is similar route but with a /30 subnet mask in the routing table?

Glitchen commented on 21 Jul 2008 at 3:55 a.m.

I think a directly connected network would win

Leave a comment

(optional) (will not be published)
(optional)