Lab 2.1 - Point-to-Point Addressing with /30 and /31
Introduction
Every link between two routers requires IP addresses on both ends. Traditionally, network engineers reach for a /30 subnet—four addresses, two usable—because it is the smallest subnet that satisfies the classic rule that every subnet must have a distinct network address and broadcast address. On paper this works. In practice, when a network has dozens or hundreds of inter-router links, the overhead accumulates: each /30 permanently retires two addresses that can never be assigned to a host.
RFC 3021, published in 2000, addressed this waste by formally permitting /31 subnets on point-to-point links. A /31 contains exactly two addresses and defines no network or broadcast address—both addresses are usable hosts. For a link that will only ever carry two endpoints, the network and broadcast concepts serve no purpose, and RFC 3021 eliminates them. RouterOS implements RFC 3021 fully: a /31 address is configured identically to any other address, and the router treats the other address in the pair as the directly reachable peer.
The choice between /30 and /31 is not purely theoretical. /30 remains the safer default when peering with equipment that predates or does not implement RFC 3021—some older firmware rejects a /31 or misroutes packets on such a link. /31 is the right choice for modern infrastructure where address conservation matters, for ISP backbone links where hundreds of P2P subnets would otherwise consume a significant portion of an allocated block, and wherever both ends are known to be RFC 3021 compliant.
This lab builds two point-to-point links side by side: R1 connects to R2 over a /30 and to R3 over a /31. You will configure both links, verify connectivity, examine how RouterOS represents each in the routing and ARP tables, observe the address-space constraints that /30 imposes, and practice the mask-mismatch troubleshooting scenario that is the most common P2P addressing failure in production networks.
Terminology Definitions
Point-to-Point Link: A network link connecting exactly two devices. Because only two endpoints exist, no mechanism is needed to distinguish multiple hosts on the same segment, which is why normal subnet overhead (network and broadcast addresses) is unnecessary.
Host Address: An IP address assigned to a network interface that is able to send and receive unicast traffic. Both addresses in a /31 are host addresses. In a /30, only the two middle addresses are host addresses.
Network Address: The lowest address in a subnet, used to identify the subnet itself. In a /30 this is the first address and cannot be assigned to an interface. /31 subnets have no network address.
Broadcast Address: The highest address in a subnet, used to address all hosts on that segment simultaneously. In a /30 this is the last address and cannot be assigned to an interface. /31 subnets have no broadcast address.
/30 Subnet: A subnet with a 30-bit prefix. Contains four addresses: one network address, two usable host addresses, and one broadcast address. The traditional choice for point-to-point links.
/31 Subnet: A subnet with a 31-bit prefix defined by RFC 3021. Contains two addresses, both usable as host addresses. No network or broadcast address exists. The address-efficient choice for point-to-point links between RFC 3021-compliant devices.
RFC 3021: An IETF standard published in December 2000 titled "Using 31-Bit Prefixes on IPv4 Point-to-Point Links." It removes the prohibition on assigning the all-zeros or all-ones address within a /31 subnet to a host interface, making both addresses in the pair valid host addresses.
Connected Route: A route automatically inserted into the routing table when an IP address is configured on an interface. The route covers the entire subnet of that address. Both /30 and /31 addresses generate connected routes; the difference is only the prefix length.
Mask Mismatch: A misconfiguration where the two ends of a point-to-point link are configured with different subnet masks. The two routers compute different subnets from the same address range, causing them to fail to recognise each other as directly connected.
Lab Topology

R1 has two point-to-point uplinks. ether1 connects to R2 using a traditional /30 subnet. ether2 connects to R3 using a /31 subnet. R2 and R3 each have a loopback address used to verify end-to-end reachability over each link type.
Network summary:
| Device | Interface | Address | Purpose |
|---|---|---|---|
| R1 | ether1 | 10.0.12.1/30 | /30 link to R2 |
| R1 | ether2 | 10.0.13.0/31 | /31 link to R3 |
| R2 | ether1 | 10.0.12.2/30 | /30 link to R1 |
| R2 | loopback | 192.168.2.1/32 | R2 reachability target |
| R3 | ether1 | 10.0.13.1/31 | /31 link to R1 |
| R3 | loopback | 192.168.3.1/32 | R3 reachability target |
Prerequisites and Starting Configuration
Complete Starting Configuration
Configure R1:
/system identity set name=R1
/ip address
add address=10.0.12.1/30 interface=ether1 comment="to R2 /30"
add address=10.0.13.0/31 interface=ether2 comment="to R3 /31"
Configure R2:
/system identity set name=R2
/interface bridge add name=loopback comment="R2 loopback"
/ip address add address=192.168.2.1/32 interface=loopback comment="R2 target"
/ip address add address=10.0.12.2/30 interface=ether1 comment="to R1 /30"
/ip route add dst-address=0.0.0.0/0 gateway=10.0.12.1 comment="default via R1"
Configure R3:
/system identity set name=R3
/interface bridge add name=loopback comment="R3 loopback"
/ip address add address=192.168.3.1/32 interface=loopback comment="R3 target"
/ip address add address=10.0.13.1/31 interface=ether1 comment="to R1 /31"
/ip route add dst-address=0.0.0.0/0 gateway=10.0.13.0 comment="default via R1"
Note on R3's default gateway: R3 uses 10.0.13.0 as its gateway. In a /31, the first address is a valid host address—not a network address—so routing toward it is correct.
Verification:
Confirm both links are up from R1:
/ping 10.0.12.2 count=4
/ping 10.0.13.1 count=4
Both should succeed before proceeding.
Lab Exercises: Point-to-Point Addressing
Step 1: Understanding /30 Subnets
A /30 subnet has a 30-bit prefix, leaving 2 host bits. Two host bits produce 2² = 4 addresses. Under traditional IPv4 rules, the first address is reserved as the network address and the last as the broadcast address, leaving exactly two usable host addresses.
For the subnet 10.0.12.0/30:
| Address | Role |
|---|---|
| 10.0.12.0 | Network address — not assignable |
| 10.0.12.1 | Host address (R1) |
| 10.0.12.2 | Host address (R2) |
| 10.0.12.3 | Broadcast address — not assignable |
This is why /30 became the standard for point-to-point links: it is the smallest subnet that satisfies the traditional network/broadcast constraint while still providing two host addresses.
View the configured address and its connected route on R1:
/ip address print where interface=ether1
/ip route print where dst-address=10.0.12.0/30
The connected route 10.0.12.0/30 is added automatically when the address is configured. Any packet R1 receives destined for an address in 10.0.12.0/30 is forwarded directly on ether1 without consulting a gateway.
Step 2: Verifying the /30 Link
Confirm R1 can reach R2 and R2's loopback. First, add a static route on R1 toward R2's loopback:
/ip route add dst-address=192.168.2.0/24 gateway=10.0.12.2 comment="to R2 loopback"
Ping R2's link address and loopback from R1:
/ping 10.0.12.2 count=4
/ping 192.168.2.1 count=4
Both should succeed. Check the ARP table to confirm R1 has resolved R2's MAC address:
/ip arp print where interface=ether1
You should see an entry mapping 10.0.12.2 to R2's MAC address on ether1. ARP is required for /30 links because the subnet contains more than two addresses and the router must resolve which MAC corresponds to the target IP.
Attempting to use reserved addresses:
Try pinging the network address from R1:
/ping 10.0.12.0 count=4
This fails — 10.0.12.0 is the network address and is not assigned to any interface. No device will respond.
Try pinging the broadcast address:
/ping 10.0.12.3 count=4
This also fails or receives no unicast reply — 10.0.12.3 is the directed broadcast address for this subnet. RouterOS does not respond to broadcast pings by default. These two addresses are permanently unavailable for host use on a /30 link, representing a 50% overhead on a subnet that only needed to support two hosts.
Step 3: Understanding /31 Subnets
A /31 subnet has a 31-bit prefix, leaving 1 host bit. One host bit produces 2¹ = 2 addresses. RFC 3021 removes the requirement for a network address and broadcast address on point-to-point links, making both addresses usable as host addresses.
For the subnet 10.0.13.0/31:
| Address | Role |
|---|---|
| 10.0.13.0 | Host address (R1) |
| 10.0.13.1 | Host address (R3) |
There is no network address and no broadcast address. The address that would traditionally be the network address (10.0.13.0) and the address that would traditionally be the broadcast address (10.0.13.1) are both valid host addresses under RFC 3021.
View the configured address and its connected route on R1:
/ip address print where interface=ether2
/ip route print where dst-address=10.0.13.0/31
RouterOS creates the connected route 10.0.13.0/31 and treats both addresses in the pair as valid hosts. No special configuration is required to enable /31 support — RouterOS implements RFC 3021 natively.
Step 4: Verifying the /31 Link
Add a static route on R1 toward R3's loopback:
/ip route add dst-address=192.168.3.0/24 gateway=10.0.13.1 comment="to R3 loopback"
Ping R3's link address and loopback from R1:
/ping 10.0.13.1 count=4
/ping 192.168.3.1 count=4
Both should succeed. Check the ARP table:
/ip arp print where interface=ether2
RouterOS still uses ARP to resolve the peer's MAC address on a /31 link. An entry mapping 10.0.13.1 to R3's MAC should appear.
Confirming both /31 addresses are valid hosts:
Ping R1's own /31 address from R3 to confirm 10.0.13.0 is reachable as a host:
# On R3:
/ping 10.0.13.0 count=4
This succeeds — 10.0.13.0 is a valid host address under RFC 3021, not a network address. This is the fundamental difference from /30 behaviour.
Step 5: Comparing /30 and /31
View both interfaces and their addresses side by side:
/ip address print
Output:
# ADDRESS NETWORK INTERFACE
;;; to R2 /30
0 10.0.12.1/30 10.0.12.0 ether1
;;; to R3 /31
1 10.0.13.0/31 10.0.13.0 ether2
Address efficiency comparison:
| Metric | /30 | /31 |
|---|---|---|
| Total addresses | 4 | 2 |
| Usable host addresses | 2 | 2 |
| Wasted addresses | 2 | 0 |
| Efficiency | 50% | 100% |
For a network with 50 point-to-point links, /30 consumes 200 addresses while /31 consumes 100 — a saving of an entire /24 block. For ISP backbone networks with thousands of P2P links, the saving is substantial.
When to use each:
| Scenario | Recommendation |
|---|---|
| Both ends are RouterOS or modern IOS/NX-OS | /31 — more efficient, fully supported |
| Peering with unknown or older vendor equipment | /30 — safer, universally supported |
| Address space is constrained | /31 — conserves addresses |
| Lab or test environment | Either — /30 is more familiar to beginners |
Step 6: Troubleshooting
Check 1: Mask mismatch
The most common P2P addressing failure is configuring different masks on the two ends of the same link. Each router computes a different connected subnet and does not recognise the other as a directly reachable peer.
Reproduce the failure:
# On R2, change ether1 to a /29
/ip address set [find interface=ether1] address=10.0.12.2/29
Test from R1:
/ping 10.0.12.2 count=4
Fails — R1's connected route covers 10.0.12.0/30, but R2 now believes it is on 10.0.12.0/29. R2 does not consider 10.0.12.1 a directly connected peer from its perspective. Check both sides:
# On R1:
/ip address print where interface=ether1
# On R2:
/ip address print where interface=ether1
The masks differ. This is the diagnostic: whenever a direct ping fails on a P2P link, compare the masks on both ends before investigating anything else.
Fix:
# On R2:
/ip address set [find interface=ether1] address=10.0.12.2/30
Confirm the ping succeeds again.
Check 2: Using a reserved /30 address as a host address
Attempting to assign the network or broadcast address of a /30 to an interface produces either a rejection or unexpected behaviour.
Reproduce the failure:
# On R1, attempt to use the broadcast address
/ip address set [find interface=ether1] address=10.0.12.3/30
RouterOS will accept this but R1 has now taken the broadcast address. R2 will not accept ARP replies from this address as a valid peer and the link will fail to pass traffic.
Test from R1:
/ping 10.0.12.2 count=4
Fails. The broadcast address is not a valid host address in a /30.
Fix:
/ip address set [find interface=ether1] address=10.0.12.1/30
Check 3: /31 peer unreachable after mask change
If one end of a /31 link is reconfigured to /30 without updating the peer, the /30 end will treat the link's lower address as its network address and consider the other address (the .1) as a host address — but it now expects the peer to be .2, which does not exist.
Reproduce the failure:
# On R1, change ether2 to /30
/ip address set [find interface=ether2] address=10.0.13.0/30
Test from R1:
/ping 10.0.13.1 count=4
R1 now has the network address 10.0.13.0/30. Even if R1 accepts the configuration, the link fails because R1 considers 10.0.13.0 a non-host address and R3 still believes it is on a /31. Check the routes and addresses on each side to identify the discrepancy.
Fix:
/ip address set [find interface=ether2] address=10.0.13.0/31
Diagnostic summary
| Symptom | Most likely cause | Command to check |
|---|---|---|
| Direct peer ping fails, link physically up | Mask mismatch | /ip address print on both ends |
| Peer ping fails after reconfiguration | Network or broadcast address assigned as host | /ip address print — check the address value |
| /31 link fails, one end is non-RouterOS | Remote end does not support RFC 3021 | Change to /30 on both ends |
| Route to peer's loopback fails, ping to link address works | Missing static route or incorrect gateway | /ip route print |
Step 7: Cleanup
Remove the static routes added during the lab:
/ip route remove [find comment~"R2 loopback|R3 loopback"]
Restore original addresses if modified during troubleshooting:
/ip address set [find interface=ether1] address=10.0.12.1/30
/ip address set [find interface=ether2] address=10.0.13.0/31
Verify the restored state on R1:
/ip address print
/ping 10.0.12.2 count=4
/ping 10.0.13.1 count=4
Summary
In this lab you configured and compared /30 and /31 point-to-point links in MikroTik RouterOS, verified connectivity and address behaviour on each, and practised the most common P2P misconfiguration.
Key takeaways:
- A /30 subnet has four addresses, two usable: The network address (first) and broadcast address (last) are permanently reserved and cannot be assigned to interfaces. This 50% overhead is acceptable but wasteful on large numbers of P2P links.
- A /31 subnet has two addresses, both usable: RFC 3021 removes the network and broadcast address requirement for point-to-point links. Both the .0 and .1 addresses are valid host addresses. RouterOS supports this natively without any special configuration.
- Both types produce connected routes automatically: Configuring an address on an interface creates a connected route for its subnet. The routing and forwarding behaviour is identical for /30 and /31 once the addresses are assigned.
- Mask mismatch is the most common P2P failure: When a direct peer ping fails on a physically up link, compare the subnet masks on both ends before investigating anything else. A single-bit difference is enough to break connectivity.
- ARP is used on both /30 and /31 links: RouterOS resolves the peer's MAC address via ARP on both link types. The absence of a broadcast address on /31 does not affect ARP behaviour in RouterOS — the ARP request is sent as a broadcast within the /31 subnet.
- Use /31 for modern infrastructure, /30 for compatibility: When both ends are known to be RFC 3021 compliant, /31 is the better choice. When peering with older or unknown equipment, /30 is the safer default.
For MTCRE candidates, point-to-point addressing appears in subnetting and interface configuration tasks. Expect to be tested on the valid host range for both /30 and /31 subnets, the ability to identify whether the .0 address is a valid host (it is, in a /31), and the ability to diagnose a mask mismatch from interface and route output alone.
Knowledge Check Questions
Question 1: A /30 subnet is allocated for a point-to-point link. How many addresses are in the subnet, and how many can be assigned to router interfaces?
A) 4 total, 4 assignable
B) 4 total, 2 assignable
C) 2 total, 2 assignable
D) 6 total, 4 assignable
Click to reveal answer
Answer: B — 4 total, 2 assignable
Explanation: A /30 prefix leaves 2 host bits: 2² = 4 addresses. The first address is the network address and the last is the broadcast address; neither can be assigned to a host interface. The two middle addresses are the only valid host addresses. This is the defining constraint that makes /30 the smallest traditional subnet suitable for a point-to-point link — and the source of its 50% address waste.
Question 2: You configure address=10.0.0.0/31 on R1's ether1 and address=10.0.0.1/31 on R2's ether1. A colleague argues that 10.0.0.0 is a network address and the configuration on R1 is invalid. Are they correct?
A) Yes — the all-zeros address in any subnet is always the network address and cannot be assigned to a host
B) Yes — RouterOS rejects addresses ending in .0 on any interface
C) No — RFC 3021 defines no network or broadcast address for /31 subnets; both 10.0.0.0 and 10.0.0.1 are valid host addresses
D) No — the all-zeros address is only invalid in subnets larger than /30; /31 is exempt from all subnet rules
Click to reveal answer
Answer: C — RFC 3021 defines no network or broadcast address for /31 subnets
Explanation: RFC 3021 specifically removes the prohibition on assigning the first and last address of a /31 to host interfaces. In a /31, there are only two addresses and both are host addresses. The traditional roles of network address and broadcast address do not exist. RouterOS implements RFC 3021 fully: address=10.0.0.0/31 is valid and functional. Option D is incorrect because the exception is specific to /31 and is defined by RFC 3021, not a general rule about address size.
Question 3: R1 has 10.0.12.1/30 on ether1. R2 has 10.0.12.2/29 on ether1. Both interfaces are physically up. A ping from R1 to 10.0.12.2 fails. What is the most likely cause?
A) The addresses are on different subnets because of the mask mismatch; neither router considers the other a directly connected peer
B) 10.0.12.2 is the broadcast address of the /30 subnet and cannot be pinged
C) RouterOS requires both ends of a point-to-point link to use identical IP addresses
D) The /29 mask on R2 is too large for a point-to-point link and RouterOS rejects it
Click to reveal answer
Answer: A — the mask mismatch means the routers compute different connected subnets
Explanation: R1 with 10.0.12.1/30 has a connected route for 10.0.12.0/30 and considers any address in that range directly reachable on ether1. R2 with 10.0.12.2/29 has a connected route for 10.0.12.0/29 and considers a different (larger) range directly reachable. From R1's perspective, 10.0.12.2 should be on ether1 — but R2 is computing its own subnet differently, producing inconsistent ARP and routing behaviour. The diagnostic is simple: compare /ip address print output on both ends and look for a mask difference. Option B is incorrect — 10.0.12.2 is a valid host address in a /30 (the broadcast is 10.0.12.3).
Question 4: A network has 200 point-to-point inter-router links, currently addressed with /30 subnets. A network engineer proposes migrating all links to /31. How many IPv4 addresses would be saved, and what is the minimum prefix length of the block that represents that saving?
A) 200 addresses saved; fits in a /24
B) 400 addresses saved; fits in a /23
C) 400 addresses saved; fits in a /22
D) 200 addresses saved; fits in a /25
Click to reveal answer
Answer: B — 400 addresses saved; fits in a /23
Explanation: Each /30 subnet uses 4 addresses (2 hosts + 1 network + 1 broadcast). Each /31 subnet uses 2 addresses (2 hosts). The saving per link is 2 addresses. For 200 links: 200 × 2 = 400 addresses saved. A /23 subnet contains 2⁹ = 512 addresses, which is the smallest power-of-two block that can contain all 400 reclaimed addresses (a /24 only holds 256). This calculation illustrates why ISPs and large enterprise networks strongly prefer /31 for backbone links — the address savings are large enough to matter for address planning.