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