Community discussions

MikroTik App
 
noib
Member Candidate
Member Candidate
Topic Author
Posts: 291
Joined: Fri Jan 25, 2013 6:04 pm
Location: France
Contact:

Reachable gateway marked as unreachable

Tue May 13, 2014 1:32 pm

Hello
I have to use a gateway which is not on the local network (virtualized environment).
Local ip address is 46.105.62.97 (eth1)
Gateway address is 37.187.139.254, reachable via eth1.

Image

So i put a route to 37.187.139.254 via eth1, then added default route via 37.187.139.254. Problem is that route is not active, marked as unreachable.. It is reachable.
How can i force that route to be active?

Thanks
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Reachable gateway marked as unreachable

Tue May 13, 2014 1:45 pm

The rule can not be active, because the GATEWAY must be directly connected to the same "LAN".

For Ex.

Routerboard 1.1.1.1/24
Router2 1.1.1.2/24
Gateway 3.3.3.3/24

If you want use 3.3.3.3/24 as gateway, you can not directly:
The gateway must be set to 1.1.1.2/24
and inside Router2 must be set to 3.3.3.3/24
 
noib
Member Candidate
Member Candidate
Topic Author
Posts: 291
Joined: Fri Jan 25, 2013 6:04 pm
Location: France
Contact:

Re: Reachable gateway marked as unreachable

Tue May 13, 2014 2:14 pm

I understand that, but that kind of configuration works with Windows or Linux.. as long as you have a route to your gateway, you can use this gateway even if it's not in the local LAN
 
noib
Member Candidate
Member Candidate
Topic Author
Posts: 291
Joined: Fri Jan 25, 2013 6:04 pm
Location: France
Contact:

Re: Reachable gateway marked as unreachable

Tue May 13, 2014 2:45 pm

Fixed!

As stated in http://forum.mikrotik.com/viewtopic.php ... route+%2F3
the trick is to put the gateway as ether1 network, so Routerboard thinks that the gateway is on the LAN...
/ip address
add address=46.105.62.97/32 interface=ether1 network=37.187.139.254

/ip route
add distance=1 gateway=37.187.139.254

 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Reachable gateway marked as unreachable

Tue May 13, 2014 2:48 pm

You need to adjust scope and target scope of default route, so that its gateway is recursively reachable over static route.
 
noib
Member Candidate
Member Candidate
Topic Author
Posts: 291
Joined: Fri Jan 25, 2013 6:04 pm
Location: France
Contact:

Re: Reachable gateway marked as unreachable

Tue May 13, 2014 3:13 pm

Thanks mrz I'm afraid i'm not sure to fully understand your sentence, what do you mean by "adjusting"?

Here is my current routing table
> ip route print 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 
 0 A S  dst-address=0.0.0.0/0 gateway=37.187.139.254 gateway-status=37.187.139.254 reachable via  ether1 distance=1 scope=30 target-scope=10 

.... L2TP & EoIP routes...

20 ADC  dst-address=37.187.139.254/32 pref-src=46.105.62.97 gateway=ether1 gateway-status=ether1 reachable distance=0 scope=10 

 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Reachable gateway marked as unreachable

Tue May 13, 2014 3:32 pm

You can read more in this article with example
http://wiki.mikrotik.com/wiki/Manual:Us ... attributes
 
SimonThomasen
newbie
Posts: 32
Joined: Thu Apr 05, 2012 12:46 am

Re: Reachable gateway marked as unreachable

Mon Oct 26, 2020 9:50 am

Ping it from windows and see what the TTL is.

If it's for example, 30:
On that route, set scope to 64 and target scope also 64. Or try higher. Until it says "reachable recursive".

Windows has automatic scope. Mikrotik does not. So funny. So we have to work extra and do it manually. But it can be dangerous, as you can cause loops.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Reachable gateway marked as unreachable

Tue Apr 27, 2021 6:30 pm

Ping it from windows and see what the TTL is.

If it's for example, 30:
On that route, set scope to 64 and target scope also 64. Or try higher. Until it says "reachable recursive".

Windows has automatic scope. Mikrotik does not. So funny. So we have to work extra and do it manually. But it can be dangerous, as you can cause loops.


Probably after 6-7 years the problem is solved.

Who is online

Users browsing this forum: Amazon [Bot], EmuAGR and 75 guests