06 September 2010

/31 addressing

Mikrotik support /31 addressing across p2p links between 2 Mikrotik interfaces. This is useful for conserving address space. As you probably know, usually a subnet's network and broadcast addresses are unusable. That means for a p2p link, we need 2 x usable addresses - or a /30 which is a chunk of 4 addresses! So for every link we waste 2 valuable addresses. No good if you are using public address space and have a limited number. It's not so critical if you are using a private range obviously - but it does make it nice and tidy :)

For example:

In the above example, it uses 4 addresses - (network) (usable) (usable) (broadcast)

We can split this into 2 x /31 by making the address of the local router the network address and the remote end the broadcast.


/ip address
add address= interface=ether1 network= broadcast=


/ip address
add address= interface=ether1 network= broadcast=

The network address should be set to the remote side IP address.

[EDIT] Note that this isn't great for OSPF networks. One side of the link won't be advertised into the ospf domain.


  1. I had it working on a 750GL with RouterOS 5.24 connected to a Cisco with the following command:

    add address= comment="Public Network" disabled=no interface=\
    ether5 network=

    No broadcast nor /31, just a /32 address with network=THE_OTHER_IP

  2. Good to know :) yea I have since learned you can omit the broadcast address. Also, versions 4 and above don't work with /31 either. I found when upgrading from 3.30 I had to change all addresses to /32 - just like you have said.