Community discussions

MikroTik App
 
WojtusW5
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Mon Oct 02, 2017 1:25 pm

Problem with recursive routting

Mon Feb 18, 2019 11:33 pm

Hello, I create a routing table for use recursive routing. I was used 2 ISP and 2 IP in internet for test.

My routing table look like this:
/ip route
add check-gateway=ping distance=1 dst-address=208.67.222.222/32 gateway=172.20.150.14
add check-gateway=ping distance=1 gateway=208.67.222.222 target-scope=40
add check-gateway=ping comment=BACKUP_ISP distance=1 dst-address=208.67.220.220/32 gateway=192.168.50.62
add check-gateway=ping comment=BACKUP_ISP distance=2 gateway=208.67.220.220 target-scope=40

[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 A S dst-address=0.0.0.0/0 gateway=208.67.222.222 gateway-status=208.67.222.222 recursive via 172.20.150.14 ether1 check-gateway=ping distance=1 scope=30
target-scope=40
1 S ;;; BACKUP_ISP
dst-address=0.0.0.0/0 gateway=208.67.220.220 gateway-status=208.67.220.220 recursive via 192.168.50.62 ether2 check-gateway=ping distance=2 scope=30
target-scope=40
2 ADC dst-address=172.20.150.0/28 pref-src=172.20.150.13 gateway=ether1 gateway-status=ether1 reachable distance=0 scope=10
3 ADC dst-address=192.168.50.0/26 pref-src=192.168.50.61 gateway=ether2 gateway-status=ether2 reachable distance=0 scope=10
4 A S ;;; BACKUP_ISP
dst-address=208.67.220.220/32 gateway=192.168.50.62 gateway-status=192.168.50.62 reachable via ether2 check-gateway=ping distance=1 scope=30 target-scope=10
5 A S dst-address=208.67.222.222/32 gateway=172.20.150.14 gateway-status=172.20.150.14 reachable via ether1 check-gateway=ping distance=1 scope=30 target-scope=10

When I drop output packet to 208.67.222.222 this route set as disable - OK
But I don't understand why after then in default route to internet gateway is still 208.67.222.222 (but via 192.168.50.62) instead disable route via 208.67.222.222 and set as active route via 208.67.220.220.

Thank You for answer :)
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22401
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Problem with recursive routting  [SOLVED]

Tue Feb 19, 2019 4:04 am

here is mine which works.
/ip route
add check-gateway=ping distance=2 gateway=8.8.4.4
add check-gateway=ping distance=3 gateway=208.67.220.220
add distance=2 dst-address=8.8.4.4/32 gateway=xxx.yy.ccc.w scope=10 (primary via google servers)
add distance=3 dst-address=208.67.220.220/32 gateway=xxx.yy.ccc.w scope=10 (primary via opendns servers)
add distance=10 gateway=bb.ccc.dd.e (secondary gateway)
 
WojtusW5
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Mon Oct 02, 2017 1:25 pm

Re: Problem with recursive routting

Tue Feb 19, 2019 8:53 pm

Thank You !!!
I didn't think about it in this way.

Please moderators to close this topic.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22401
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Problem with recursive routting

Tue Feb 19, 2019 9:02 pm

Wojitus, as the originator of the thread you are the one to effectively close the topic by clicking the resolved selection in the appropriate post.
It appears as a checkmark in the upper right hand corner of the posts (accept this answer appears when you hover over it).
 
kokaKorina
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Wed Oct 31, 2018 5:07 pm

Re: Problem with recursive routting

Tue Feb 26, 2019 5:45 pm

Hy Anav
Can you explain me that how that target scope and scope works well?if we have unmanaged switch between main mikrotik that is default gateway and the mikrotik that is going to have recursive route what should I put for the scope or target scope and why those values matters?