RFC 3021 defines the use of /31 prefixes for point-to-point IPv4 links, allowing both addresses in a two-host subnet to be assigned rather than reserving one for the network and one for broadcast. This approach doubles the number of available subnets compared to the traditional /30 method while conserving IPv4 address space.
RFC 3021 /31 Prefixes
RFC 3021 outlines how we can use 31-bit prefixes.
Many times we only need two IP addresses. Here we have two links, one right here and one right here, that really only have two interfaces on those links, so each one of these networks only needs two IP addresses.
When we're subnetting addresses we can use a /30. In the case of a Class C we would borrow six bits, and then we would have a subnet mask of 255.255.255.252. This would give us 64 networks, it would give us four hosts per network and two usable hosts, because we have one for the network and one for the broadcast address. So by the time you remove the network and broadcast address, you only have two assignable addresses. So this is what we'd use for our WAN links.
It's pretty typical that we use the /30 for these WAN links, but it is a little wasteful, because we only need two IP addresses and the network and broadcast addresses may not be as important.
This is where RFC 3021 comes into play. RFC 3021 allows us to start using 31-bit prefixes for IP version 4 addresses for things like point-to-point links.
What this standard allows us to do is use this /31 for two addresses. So now instead we can use both addresses that are found on this link, and it doubles how many networks we have, from 64 to 128. So it's a lot less wasteful when it comes to our IP version 4 addresses.
Let's do a little example here. Let's say we have a 10101010 network that we're working with. Converted into binary, this is what it looks like right here. Then we use the subnet mask right here, and we have just a zero right here, which means that all the other bits here are network bits but this last one is a host bit, and that host bit can be a one or a zero. So those are the two IP addresses within this network. The two addresses that are assignable in this range would be 10.10.10 .10 that we would assign on one side, and then the 10101011 on the other side.
One of the questions that arises is, what would be the network address for this? Well, it would be this network right here, 10101010 31, but it doesn't really interfere with anything, because this router right here could still have this network installed on the route, send the traffic this way to this router, and then this router knows it's a directly connected network and then can send it on to — if it's pinging 10101010, send it on to this interface right here. So it still works out. The network address can overlap with this interface address right here.
So then the question is, what about the broadcast address? As far as the local network is concerned, for things like ARP, it uses the broadcast address of 255.255.255.255, and so this doesn't change at all. In this network right here we still have this broadcast being used between these two interfaces right here.
But we also have the broadcast address for the network. So for instance, let's say I want to broadcast something from this laptop to this network right here, I would use the network broadcast for this network right here. However, if we're using a /31 and we have one address assigned to here and one address assigned to here, those are both being used, and we no longer have a directed broadcast. This is not as common though; we don't really utilize these directed broadcasts as much.
The configuration for these routes is really quite simple. What we're going to do is just implement a route into one of these RFC 3021 networks. So what I'm going to do is get into the global configuration mode, and then I'm going to use my ip route statement. I'm going to choose the destination network, which happens also to be the interface — so this is an interface IP address, but it also represents the whole network. Then I'm going to enter in the subnet mask. This is the only difference here: we're just going to specify 254. And then what is the next hop — in this case maybe the next hop is a 10.240.21 — and then we'd hit enter at this point. Simple as that.
If we wanted to remove this, then we do the same statement, but we would add a no at the front of it.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →