Page 1 of 1

IP Unnumbered for IPv6?

Posted: Tue Dec 14, 2021 10:33 am
by eduplant
Is anyone aware of a good way to approximate Cisco/Juniper `ip unnumbered` behavior with IPv6 in RouterOS?

For those not aware (there are only a couple of mentions of the concept on the forums and they're quite old) the point of `ip unnumbered` is to avoid having to assign unique IP prefixes to links between routers and instead borrow the address off of another interface (usually a loopback). Though the Cisco/Juniper version is done by configuring an interface such that you link it to another interface, there is a way to fake the behavior manually for IPv4 in RouterOS. This is accomplished by setting a duplicate address on the interface in question and manipulating the `network=` of the address. For example:

ROUTER 1:
interface bridge add name=loopback0 protocol-mode=none

ip address add interface=loopback0 address=10.0.0.1/32
ip address add interface=ether1 address=10.0.0.1/32 network=10.0.0.2

ROUTER 2:
interface bridge add name=loopback0 protocol-mode=none

ip address add interface=loopback0 address=10.0.0.2/32
ip address add interface=ether1 address=10.0.0.2/32 network=10.0.0.1

This will work and allow both routers to reach each other at their corresponding addresses. Strictly speaking the loopback bridge and address isn't even needed, but in most cases that's what you're duplicating anyway so I left it for context.

Unfortunately, it doesn't appear that there is a similar option for IPv6. It may not even be necessary if it can be kludged together with a combination of link-local addresses and advertising the loopback address explicitly in a router advertisement with the on-link flag set to off. Unfortunately, I haven't had a lot of luck getting this to work in the main circumstance that I would care: tunnel interfaces. I'll report back if I can get it to work.

In the meantime: does anybody else know a way to get this type of behavior in IPv6 on RouterOS?