31 subnet - Not finding an answer to default gateway.

I was just given and IP address from an ISP of x.x.x.31/31 with a gateway of x.x.x.30

I have tried multiple things ( using a /32 IP with a .30 address ), but nothing is working for me.

I keep getting unreachable in my default gateway ( 0.0.0.0/0 > x.x.x.30)

There is a dynamic route in there of x.x.x.30/31 that is reachable, but that doesn’t do me any good.

I have searched the forums and the net and not figuring this out.

Help.

Tom

Provide export of the routes

Hello,

I’ve read somewhere (forum, wiki???) that MikroTik does not support /31 :frowning:

Try a few searches on the forum to validate this.

Regards,

Sent from Tapatalk

/ip address
add address=x.x.x.31/31 interface=ether1

/ip route
add distance=11 gateway=x.x.x.30

/ip route pr detail
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit

1 S dst-address=0.0.0.0/0 gateway=x.x.x.30
gateway-status=x.x.x.30 unreachable distance=11 scope=30 target-scope=10


Tom

I also read that it wasn’t supported, but I also read multiple times, that it can be made to work with an IP of /32, but this hasn’t worked for me either.

Tom


You can’t use /32 at home if your isp has given you a /31. :frowning:


Sent from Tapatalk

Here is what I found in another thread:

"Mon Jan 22, 2018 12:06 am

routeros doesn’t support /31s
you can use /32s to achieve the same address saving effect.

/ip address add interface=gre1 address=1.1.1.0 network=1.1.1.1

and do the opposite on the other end."

This isn’t the only reference to making it work with a /32 for an address and a network address of one number different which is also the gateway.

Although this doesn’t seem to work for me.

I hate the thought of having to have this customer buy a new router for something so simple.

Tom

Is the MAC address for x.x.x.30 in your ARP table?

Yes, the mac is in the arp table. It is also pingable, but still shows as unreachable.

Tom

I spent a few minutes testing. Unfortunately my tests did not result in connectivity either.

First I tried my Windows PC. It didn’t like a /31 at all and wouldn’t let me use it.

Then I used a Cisco router and Mikrotik on the same LAN network. I added 10.99.99.0/31 on the Cisco, and 10.99.99.1/31 on the MT. The MAC addresses do indeed show up in the ARP table. However the packet sniffer on the MT never showed my pings arriving. Unfortunately that’s all the time I have right now.

It may have already been suggested, but you might try a /30 on the Mikrotik.

No go on the /30, but thanks for the effort you are putting forth and your ideas.

Tom

/31 is a no-go (does not work)

I was trying to turn up a /31 BGP network for up-stream peering and it flat-out did not work no matter what I tried.
However , my Cisco router did support a /31 doing BGP.
To make my Mikrotik work , I ended up using 4-IPs (aka /30) on the BGP-WAN because for some reason a Mikrotik using 2-IPs (aka /31) on on a BGP-WAN would not work.

So , with the limited number of IP V4 addresses available , having to burn up 4-IPs on /30 interfaces instead of 2-IPs on a /31 interfaces is a huge waste of IPs , especially when you have hundreds of /30 networks that could be twice as many /31 networks. :frowning:

North Idaho Tom Jones

In testing, I have been able to get it to work with a /32 if I’m going Mikrotik to Mikrotik.

However, I’m being given this /31 from a provider with an UBNT Edgerouter, and we have not be able to get it to work.

So, any suggestions for a competing router to the Mikrotik, must do /31, must do VPN, can’t cost $500 per router?

I didn’t like the early Edgerouters, I’m sure they have improved significantly, but I’m open to anything.

Tom

Re: “… I have been able to get it to work with a /32 …” , not sure I undersdand:
/30 = 4 IP v4 IP addresses
/31 = 2 IP v4 IP addresses
/32 = 1 IP v4 IP address


In my past , a /30 (4 IPs) has always been used for ISP router to Customer router , where the 4 IPs are used for (#1 - Network IP , #2 - ISP router IP , #3 - Customer router IP , #4 - Broadcast IP) - ((( and/or a /30 is often used when routing 4 IPs )))

In my limited experience , a /31 (2 IPs) has always been used for ISP router to Customer router , where 2 IPs are used (#1 ISP router IP , #2 - Customer router IP – where there really is no Network or Broadcast IP address). ((( and/or a /31 is often used when routing 2 IPs )))

And yes - I know that ISP layer 3 network hand-offs to customer routers can also use /29s and /28s and larger IP blocks.

However , I do now know how to do a layer 3 hand-off from an ISP router to a customer router using a /32 (only a single IP). ???

Of note - I kinda remember 20 years ago there was a Cisco way to do a NO-IP address route from an ISP router to a customer router. I’ve forgotten how it worked but I think it was more like MAC/ARP communications where routes were just sent to an Interface and not to a specific IP router address.

So on to my question for you re “In testing, I have been able to get it to work with a /32 if I’m going Mikrotik to Mikrotik”. Are you trying to route a /32 (single IP v4 address) between routers -or- are you trying to make layer 3 network between two routers using a /32 on the router WAN-2-WAN network -or- are you trying to make a VPN (VPN-Tunnel / EoIP / private IP tunnel ) configuration which uses use a /32 IP address (from your ISP) and aside from the VPN configuration the router network is already built and running between you and your ISP ?

North Idaho Tom Jones

What I was doing was to create a address with a /32, but setting the network for the 2nd IP in the subnet. No VPN yet.

R1: Ether1 IP address: x.x.x.31/32; Network: x.x.x.30; Gateway: x.x.x.30
R2: Ether1 IP address: x.x.x.30/32; Network: x.x.x.31

This worked in testing between mikrotiks, but I’m trying to connect to a UBNT device.

I think I’m going to buy two Edgerouter-X devices for this customer.

I LOVE Mikrotiks, and it is a rare day that they can’t do something, but this might be one of them.

Tom

Hmmm , a /32 IP v4

  • A /32 IP v4 address can be used as a loop-back IP address (an interface that does not directly talk to anything - the IP block is a single IP address)
  • If a /32 IP v4 address is used on an ethernet interface then that IP address will not directly talk to anything - the IP block is a single IP address)
    In both cases above , you can remotely ping the /32 IP v4 address and telnet/ssh/http/winbox/ftp to the single IP v4 address but that /32 IPv4 address is a single IP address and not part of any network. (Example , you do not route through that interface with the /32 IP v4 address to another router)
  • However , there is something you can also do , a secondary IP address on an interface (loop-back or ethernet or any other interface). Example , let say router1-ethernet1 is 192.168.0.1/30 and it is connected to router2-ethernet2 and it is 192.168.0.2/30. The two routers can route to each other and ping each other. Now it is possible to also do this … On router1-ethernet1 you can add a second IP address of 10.0.0.1/32 -and- on router2-ethernet you can add a second IP address of 172.16.0.1/23 , and you have routes for both of the two /32 IP address on each router so that they know where to route to get to the other /32 IP address , then both routers can ping the other routers /32 IP v4 address using the /30 network and routes between the routers.


    With what you are describing:
    R1: Ether1 IP address: x.x.x.31/32; Network: x.x.x.30; Gateway: x.x.x.30
    R2: Ether1 IP address: x.x.x.30/32; Network: x.x.x.31

I think a Cisco router can do something more like this (using a /31 network between the two routers) (this is assumming both router Ether1 interfaces are connected together):
R1: Ether1 IP address: x.x.x.31/31; Network: x.x.x.30; Gateway: x.x.x.30
R2: Ether1 IP address: x.x.x.30/31; Network: x.x.x.31

I know what you are getting at Tom.

AFAIK, the /31 is a special beast, different RFC. Using the /32 is a “workaround” for Mikrotik not supporting that RFC 3021

https://tools.ietf.org/html/rfc3021

I can’t explain this, but today, when I looked, my route says it is reachable.

I have no idea how sitting overnight allowed it to be reachable. Nothing changed that I know of.

I just changed the IP address to x.x.x.31/31 and it properly filled in the network address as x.x.x.30 and it is still labeled as “reachable”

It pings, but with that uncertainty, I’ll probably not stay with it and replace this router and the new one with Edgerouter-X’s.

Tom

As of 6.46.2, this still doesnt work.

I think /31 might be supported for cisco devices. Anyways
considering your example " ISP of x.x.x.31/31 with a gateway of x.x.x.30"

-i would try extending the subnet for those two ips to fit inside (and not to fall in broadcast one) to /26 → 255.255.255.192
-assign the router the ip x.x.x.31/26
-and configure 0.0.0.0/0.0.0.0 to x.x.x.30

hope it helps someone

regards

Have config at a WISP client of mine where I am using /31 between them and their upstream provider.

My client side is a MT and upstream prover side is Cisco, using the Cisco as GW