Setting up MikroTik Router with /31 Subnet

Modified on Tue, 19 Dec, 2017 at 4:58 PM

Issue:

Our ISP has provided us with an IP Address with a /31 Subnet.

How do I configure the MikroTik for this?

I can configure the IP Address with the /31 Subnet but when I add the Internet Route and put the Gateway address is shows as unreachable and won't connect.


Example:

Your IP - 192.0.2.177/31

Gateway IP - 192.0.2.176/31


Obviously the reason that the ISP's are giving out these addresses is to limit the number of IP Addresses required.
Works in Cisco, Juniper etc....



Solution:


You need to use a /32 mask on the IP Address and set the Network Address to be the assigned gateway 


eg:

/ip address add address=192.0.2.177/32 interface=ether1 network=192.0.2.176



You could also try the following


/ip address add address=192.0.2.177/32 interface=ether1

/ip route add dst=192.0.2.176/32 gateway=ether1

/ip route add dst=0.0.0.0/0 gateway=192.0.2.176





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article