TechKnowSurge
Cisco CCNA 1.6 Cisco CCNA 1.7 Cisco CCNA 3.3
VideoNetworkFree

DEMO: 31 Bit Prefixes (RFC 3021)

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.

Complete this video to capture a CTF flag worth 1 point.

About this video

RFC 3021 standardizes the use of 31-bit prefixes for IPv4 point-to-point links, addressing a longstanding inefficiency in how WAN interfaces are addressed. The traditional approach uses a /30 subnet, which provides four addresses per network but reserves two of them for the network and broadcast addresses, leaving only two assignable host addresses. While functional, this wastes half of every subnet allocated to a link that by definition connects only two interfaces. A /31 subnet eliminates the dedicated network and broadcast addresses entirely, making both addresses in the block available for assignment. Applied to a Class C address space, this shifts the available subnet count from 64 under a /30 to 128 under a /31, effectively doubling the efficiency of address allocation for point-to-point segments. The network address under a /31 overlaps with one of the interface addresses, but this does not disrupt routing behavior since each router treats the link as a directly connected network and forwards traffic accordingly. Broadcast behavior also changes under RFC 3021. The link-local broadcast address of 255.255.255.255 continues to function normally between the two interfaces for protocols such as ARP. However, because both addresses in the subnet are assigned to interfaces, there is no directed broadcast address for the /31 network itself. In practice this is rarely a concern, as directed broadcasts on point-to-point WAN links serve little operational purpose. Configuration follows standard static routing syntax, with the only notable difference being the specification of a 255.255.255.254 subnet mask in the route statement.

What you'll learn

What's covered

RFC 3021 /31 Prefixes

Aligned to

Cisco CCNA
1.6 Configure and verify IPv4 addressing and subnetting
1.7 Describe private IPv4 addressing
3.3 Configure and verify IPv4 and IPv6 static routing

Key terms

Wide Area Network
WAN
A network that spans a large geographic area, connecting multiple local area networks.
Subnet
A logical subdivision of an IP network, used to organize and segment network traffic.
Subnet Mask
A 32-bit number that divides an IP address into network and host portions.
Router
A network device that forwards data packets between networks based on IP addresses.
RFC 3021
A standard that permits the use of /31 prefixes on point-to-point links, allowing both addresses in the subnet to be assigned to interfaces and eliminating the need for a separate network and broadcast address.
Static Route
A routing table entry manually configured by an administrator that specifies a fixed path to a destination network and never changes unless the administrator modifies it. Static routes are simple and predictable but do not adapt automatically to network topology changes.

Topics

Ipv4 Addressing Subnetting Rfc 3021 Point To Point Links Static Routing Cisco Ios Networking

Transcript

RFC 3021 outlines how we can use 31-bit prefixes.

Why /30 is wasteful on WAN links

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.

What RFC 3021 allows

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.

Working through an example

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.

What about broadcast?

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.

Configuring the route

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.

About TechKnowSurge

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 →