Unreachable route that should be reachable

Hi everyone!

I’m using RouterOS v6.46.6 on a CHR VM.
One of my gateways shows as unreachable but I cannot figure out why.

address=80.67.167.169/31 network=80.67.167.168 interface=gre-milkywan actual-interface=gre-milkywan

As you can see the router is on a network with two hosts, .168 (another router) and .169 (my router).
This is the dynamic route for this address:

ADC  dst-address=80.67.167.168/31 pref-src=80.67.167.169 gateway=gre-milkywan gateway-status=gre-milkywan reachable distance=0 scope=10

I can ping, traceroute 80.67.167.168.

But if I set a route with 80.67.167.168 as gateway, it’s unreachable.

  S  dst-address=10.0.42.0/24 gateway=80.67.167.168 gateway-status=80.67.167.168 unreachable distance=1 scope=30 target-scope=10

Any help would be greatly appreciated! I’m a bit lost right now. I have a similar setup for IPv6 and it works very well.

Thanks!

If you use addresses in usual notation, then the smallest usable network on mikrotik is /30: one network address, one broadcast address and two host addresses.

To mimick a point-to-point connection over ethernet, you should set it like this:

add address=80.67.167.169/32 network=80.67.167.168 interface=gre-milkywan

note use of /32 mask for local address. The peer’s address is used as network address. And here’s a candy: local and remote addresses can be completely unrelated, such as

add address=192.168.42.1 interface=ether1 network=192.168.37.1

where both networks use /24 netmasks … Another candy: the local address doesn’t have to be unique on the device, unique on device has to be combination of IP address / network address. The last example is real one (apart from interface name) on one of my routers and its local address is set as 192.168.42.1/23 on another interface (bridge) …

Thank you very much mkx, it works like a charm! Thanks for the candy too.