Community discussions

MikroTik App
 
RcRaCk2k
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Mon May 07, 2012 10:40 pm

Recursive Routes - Need Help

Fri Mar 01, 2019 11:47 am

Hi Guys,

i have two networks on the same LAN:

#1 192.168.0.0/29 (The Router is .1)
#2 192.168.1.5/29 (All IPs are useable 1-7)


There is only one default-gateway on LAN#1 but both networks are on the same LAN (so no VLAN is configured).

My Router is 192.168.1.5 and i can do an arp-ping to 192.168.0.1 (Default-Gateway) on the same Interface.
When i add the route 192.168.0.0/29 via interface ether1 i can ping the router on Network #1.

But when i install default route 0.0.0.0/0 via 192.168.0.1 it tells me that the route is unreachable.
When i install default route via interface route ether1 it tells me that the route is reachable, but ping to 8.8.8.8 wont work.
When i install default route via 192.168.0.1%ether1 it tells me that the route is unreachable and ping to 8.8.8.8 also want work.

So, how can i install a recursive default-route?

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

Re: Recursive Routes - Need Help

Fri Mar 01, 2019 3:28 pm

 
RcRaCk2k
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Mon May 07, 2012 10:40 pm

Re: Recursive Routes - Need Help

Mon Mar 04, 2019 9:43 am

Hi,

i have done the scope-settings, but it will not work as expected.
Can you please have a look on that?
[admin@MikroTik] > 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   S  dst-address=0.0.0.0/0 pref-src=93.240.147.69 gateway=87.190.23.57 
        gateway-status=87.190.23.57 unreachable distance=1 scope=30 target-scope=30 

 1 ADC  dst-address=10.198.10.0/24 pref-src=10.198.10.150 gateway=ether8-to-private-network 
        gateway-status=ether8-to-private-network reachable distance=0 scope=10 

 2 A S  dst-address=87.190.23.57/32 gateway=ether1-telekom-glasfaser 
        gateway-status=ether1-telekom-glasfaser reachable distance=1 scope=10 target-scope=10 

 3 ADC  dst-address=93.240.147.64/29 pref-src=93.240.147.69 gateway=ether1-telekom-glasfaser 
        gateway-status=ether1-telekom-glasfaser reachable distance=0 scope=10 

 4 ADC  dst-address=172.17.0.22/31 pref-src=172.17.0.22 gateway=br-firewall-wanko 
        gateway-status=br-firewall-wanko reachable distance=0 scope=10 

 5 A S  dst-address=185.58.30.128/28 gateway=br-firewall-wanko 
        gateway-status=br-firewall-wanko reachable distance=1 scope=30 target-scope=10
87.190.23.57/32 is the Gateway, which is connected to the network 87.190.23.56/29.
93.240.147.69/29 is the IP-Address of this box.

What are the correct settings to get this work?

Within Linux this should do the trick:
/sbin/ip route add default via 87.190.23.57 dev ether1 onlink
[admin@MikroTik] > ping 87.190.23.57
  SEQ HOST                                     SIZE TTL TIME  STATUS                                    
    0 87.190.23.57                               56 255 1ms  
    1 87.190.23.57                               56 255 0ms  
    2 87.190.23.57                               56 255 0ms  
    3 87.190.23.57                               56 255 0ms  
    sent=4 received=4 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=1ms
    
    [admin@MikroTik] > ip address print detail 
Flags: X - disabled, I - invalid, D - dynamic 
 0   address=93.240.147.69/29 network=93.240.147.64 interface=ether1-telekom-glasfaser 
     actual-interface=ether1-telekom-glasfaser 

 1   address=172.17.0.22/31 network=172.17.0.22 interface=br-firewall-wanko 
     actual-interface=br-firewall-wanko 

 2   address=10.198.10.150/24 network=10.198.10.0 interface=ether8-to-private-network 
     actual-interface=ether8-to-private-network
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7167
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Recursive Routes - Need Help

Mon Mar 04, 2019 10:23 am

Recursive route cannot be resolved if gateway is interface (not IP address). It is suggested to avoid using gateway interfaces on broadcast networks, since it can lead to unexpected behavior.
 
RcRaCk2k
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Mon May 07, 2012 10:40 pm

Re: Recursive Routes - Need Help

Mon Mar 04, 2019 11:51 am

That means, that Mikrotik is not the correct router for this situation?
So i have to switch to a other vendor like ubiquiti?

But why is my first route not working?
dst-address=0.0.0.0/0 gateway=IP-ADDRESS%INTERFACE

That should do the trick, but why it wont work?
I am a little bit confused.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7167
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Recursive Routes - Need Help

Mon Mar 04, 2019 12:04 pm

1. No you need to configure route properly.
/ip route add dst-address87.190.23.57/32 gateway=93.240.147.6x

2. It doesn't work for the same reason I mentioned in previous post.
 
RcRaCk2k
Member Candidate
Member Candidate
Topic Author
Posts: 124
Joined: Mon May 07, 2012 10:40 pm

Re: Recursive Routes - Need Help

Mon Mar 04, 2019 12:17 pm

But there is no gateway on the 93.240.147.64/29 subnet.
That is why i need an interface-route.
 
User avatar
Halfeez92
Member Candidate
Member Candidate
Posts: 108
Joined: Tue Oct 30, 2012 12:58 pm
Location: 127.0.0.1
Contact:

Re: Recursive Routes - Need Help

Tue Mar 05, 2019 5:04 am

Hi,

i have done the scope-settings, but it will not work as expected.
Can you please have a look on that?
[admin@MikroTik] > 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   S  dst-address=0.0.0.0/0 pref-src=93.240.147.69 gateway=87.190.23.57 
        gateway-status=87.190.23.57 unreachable distance=1 scope=30 target-scope=30 

 1 ADC  dst-address=10.198.10.0/24 pref-src=10.198.10.150 gateway=ether8-to-private-network 
        gateway-status=ether8-to-private-network reachable distance=0 scope=10 

 2 A S  dst-address=87.190.23.57/32 gateway=ether1-telekom-glasfaser 
        gateway-status=ether1-telekom-glasfaser reachable distance=1 scope=10 target-scope=10 

 3 ADC  dst-address=93.240.147.64/29 pref-src=93.240.147.69 gateway=ether1-telekom-glasfaser 
        gateway-status=ether1-telekom-glasfaser reachable distance=0 scope=10 

 4 ADC  dst-address=172.17.0.22/31 pref-src=172.17.0.22 gateway=br-firewall-wanko 
        gateway-status=br-firewall-wanko reachable distance=0 scope=10 

 5 A S  dst-address=185.58.30.128/28 gateway=br-firewall-wanko 
        gateway-status=br-firewall-wanko reachable distance=1 scope=30 target-scope=10
87.190.23.57/32 is the Gateway, which is connected to the network 87.190.23.56/29.
93.240.147.69/29 is the IP-Address of this box.

What are the correct settings to get this work?

Within Linux this should do the trick:
/sbin/ip route add default via 87.190.23.57 dev ether1 onlink
[admin@MikroTik] > ping 87.190.23.57
  SEQ HOST                                     SIZE TTL TIME  STATUS                                    
    0 87.190.23.57                               56 255 1ms  
    1 87.190.23.57                               56 255 0ms  
    2 87.190.23.57                               56 255 0ms  
    3 87.190.23.57                               56 255 0ms  
    sent=4 received=4 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=1ms
    
    [admin@MikroTik] > ip address print detail 
Flags: X - disabled, I - invalid, D - dynamic 
 0   address=93.240.147.69/29 network=93.240.147.64 interface=ether1-telekom-glasfaser 
     actual-interface=ether1-telekom-glasfaser 

 1   address=172.17.0.22/31 network=172.17.0.22 interface=br-firewall-wanko 
     actual-interface=br-firewall-wanko 

 2   address=10.198.10.150/24 network=10.198.10.0 interface=ether8-to-private-network 
     actual-interface=ether8-to-private-network
Why is your default route has pref source from the subnet 93?

Who is online

Users browsing this forum: benache, Bing [Bot], davidungurean, Faizi, GoogleOther [Bot] and 54 guests