Friday, March 25, 2011

Using /31 Prefixes on IPv4 Point-to-Point Links

The 31-bit prefix length improves IP address numbering efficiency by allowing the use of only 2 IP addresses on point-to-point links, compared to using 4 IP addresses with the /30 prefix or unnumbered interfaces for point-to-point links. This helps to conserve the Internet IP address space, as point-to-point links is very common throughout the Internet infrastructure.
Note: Unnumbered interfaces could be difficult to manage and troubleshoot.

The 30-bit prefix length requires 4 addresses per point-to-point link – 2 host addresses, 1 all-0s network address, and 1 all-1s broadcast address. Point-to-point links can only have 2 endpoints and don’t require and use broadcast – any packet transmitted by one end is always intended to be received by the other end.

The 31-bit prefix length leaves only 2 numbering possibilities – 0 and 1, hence these 2 IP addresses must be interpreted as host addresses. Directed broadcast to the link will be eliminated, and limited (or link local) broadcast must be used for all broadcast traffic on a point-to-point link.
Note: Directed broadcast is being used when a host would like to communicate with all other hosts on the same subnet. The packet destination address is set to the subnet broadcast address.

Below shows a sample configuration of 31-bit prefix on a point-to-point link:
Router(config)#int s0/0
Router(config-if)#ip add
Router(config-if)#ip directed-broadcast
IP directed broadcast not allowed with 31 bit mask
Router(config-if)#no ip directed-broadcast
Router#sh run int s0/0
Building configuration...

Current configuration : 64 bytes
interface Serial1/1
 ip address

Router#sh ip int s0/0 | in Serial|Internet|Directed
Serial0 is up, line protocol is up
  Internet address is
  Directed broadcast forwarding is disabled
Note: The no ip directed-broadcast interface subcommand is enabled by default in Cisco IOS Release 12.0 and later, and is not shown in the configurations by default.

The % Warning: use /31 mask on non point-to-point interface cautiously warning message will be received when configuring 31-bit prefixes on broadcast interfaces, eg: Ethernet.

The 31-bit prefixes have no impact on most currently deployed routing protocols, as most of them have been designed as classless routing protocols, and unicast (BGP), limited broadcast (RIP), and multicast (OSPF and EIGRP) are used for the communication between them – directed broadcast is not being used.

No comments:

Post a Comment