Point-to-point (/31) addresses

I’ve tried with several devices now, but there’s absolutely no way, I can get /31 addresses working. Is this a bug, or is it a missing feature?

For the reference:
R1 (RB450):
/ip address add interface=ether1 address=10.10.10.2/31 disabled=no
R2 (RB450)::
/ip address add interface=ether1 address=10.10.10.3/31 disabled=no

Ping times out.

10.10.10.2/31 covers 10.10.10.1 and 10.10.10.2
So change the IP from 3 to 1 or use /30

No.
10.10.10.1/31 covers 10.10.10.0-10.10.10.1.
You will get a nice no route to host error with 10.10.10.1-10.10.10.2 netmask 255.255.255.254

my bad :slight_smile:

A /31 isnt even valid is it ? Dont you need a subnet and broadcast address? TCP 101 …

Normally true, but RFC3021 refers to a way of conserving addresses by using /31 networks on links that do not require the broadcast capability, ie. point-to-point links. If you to take two machines and connect them directly to each other, they do not need to broadcast to find each other, there are two addresses, one for each end of the cable.
This currently works with most network vendor equipment (cisco, juniper, foundry, etc.) as well as linux and BSDs, so I’m really wondering why it doesn’t work with MikroTik.

i see…

what does RouterOS show as the network and broadcast when you do an /ip address print (terse) command ? Did it set the network and broadcast correctly? If not, if you set them manually, does that work?

Sam

address=10.10.10.2/31 network=10.10.10.2 broadcast=10.10.10.3 interface=ether3 actual-interface=ether3
Seems correct to me.

try to force broadcast on 10.10.10.1 address (manually).

regards

No no, 10.10.10.1 is still in another subnet. Since it’s a point-to-point network, there is no broadcast. The network 10.10.10.2/31 consists of 10.10.10.2-10.10.10.3. Please read the RFC if you’ve never dealt with /31’s before… It’s an easy read.
http://www.faqs.org/rfcs/rfc3021.html

I would skip using an actual /31, and just use two /32s. Specify the remote address as the “network”, and you should be good to go.

This mechanism is more flexible than using /31s, as the addresses don’t need to be adjacent; and more efficient since you can re-use the same address for multiple links on a router.

In your particular case:

R1: /ip add add interface=ether1 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether1 address=10.10.10.3/32 network=10.10.10.2

Will do the trick.

In a more complex hypothetical setup, with four routers connected to each other in a full-mesh of point-to-point ethernets:

R1: /ip add add interface=ether1-to-R2 address=10.10.10.1/32 network=10.10.10.2
R1: /ip add add interface=ether2-to-R3 address=10.10.10.1/32 network=10.10.10.3
R1: /ip add add interface=ether3-to-R4 address=10.10.10.1/32 network=10.10.10.4

R2: /ip add add interface=ether1-to-R1 address=10.10.10.2/32 network=10.10.10.1
R2: /ip add add interface=ether2-to-R3 address=10.10.10.2/32 network=10.10.10.3
R2: /ip add add interface=ether3-to-R4 address=10.10.10.2/32 network=10.10.10.4

R3: /ip add add interface=ether1-to-R1 address=10.10.10.3/32 network=10.10.10.1
R3: /ip add add interface=ether2-to-R2 address=10.10.10.3/32 network=10.10.10.2
R3: /ip add add interface=ether3-to-R4 address=10.10.10.3/32 network=10.10.10.4

R4: /ip add add interface=ether1-to-R1 address=10.10.10.4/32 network=10.10.10.1
R4: /ip add add interface=ether2-to-R2 address=10.10.10.4/32 network=10.10.10.2
R4: /ip add add interface=ether3-to-R3 address=10.10.10.4/32 network=10.10.10.3

Would fully interconnect them, using only 4 addresses. In this particular case, we get 3 times the address utilization efficiency of /31 addressing.

In an 8 router full-mesh the efficiency is even more spectacular, with only 8 addresses needed for /32 addressing, while a whopping 56 addresses would be needed for /31 addressing.

–Eric

exelent!

Interesting concept, quite a hack!
I’m pretty sure I can’t use that when the other end of the device is a cisco router, so I’m still very much wanting real /31 support. But thanks for your suggestion, it’s a really cool hack :slight_smile:

on Cisco you should simply use it’s /31, I think

While Ciscos won’t allow /32 addressing on broadcasty interfaces, you can use /31 on the Cisco side, and /32 on the MT side.

Cisco: ip address 10.10.10.2 255.255.255.254
MT: /ip add add int=foo add=10.10.10.3/32 network=10.10.10.2

The only problem you may run into is with routing protocols that expect matching subnet masks, such as OSPF. Static routing and BGP will be fine, don’t know about other IGPs.

–Eric

I’m relying on OSPF as IGP, as well as BGP and MPLS, so I’m not going to do this…
Would be nice if MikroTik fixed this. It shouldn’t be that hard.

Just change the address to .2/32 and network/brdcast to .3 manually.
ip ro pr = .3 :smiley:

All that’s needed is a route to the other side!

For point-to-point interfaces this is a non-issue all together.
For a point-to-point interfaces there is no such thing as a subnet or subnet mask. Only IP addresses on both sides.
It is perfectly legal for tunnel terminator to only have one IP on the loopback which every ptp tunnel sees as the “servers IP”.
In other words; Network masks smaller than /32 is a hack for limited stacks.

Can IPIP on top of a /30 be used as a solution?
Or does IPIP also need a broadcast and network? (i’ve never used it before) and is just a thought!

the poster wasnt talking about true PPP… he’s talking about two ethernet endpoints on a single ethernet wire basically.