Community discussions

MikroTik App
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 6138
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Playing with Routes.

Thu Feb 18, 2021 7:51 pm

GIven ROUTES
ISP1 distance=5
ISP2 distance=10

Bur our requirements are lets say we have lanA and lanB.
We want lanA to go out ISP1 but failover to ISP2
We want lanB to go out ISP2 but failover to ISP1

Can this be done without mangling is the challenge?

Ignoring fail over for now, if I add a third route to the above two routes......
ISP2 distance=10 Routing-Mark=UseISP2
and Route Rule
Source-address=lanB subnet
Action: Look-up only in Table
Table: UseISP2

The above scenario quickly becomes all traffic (all LANs) goes to ISP1 because of the lower distance, however if the traffic is originating on lanB, it will get routed out ISP2.
Can one somehow inject a fail over design within this type of construct without mangling?

I believe the case of lanA being routed to ISP2, should work in the sense that if ISP1 is not available will not the traffic automatically be routed to ISP2 via the second route rule?
The real and only problem is then only the reverse case, what to do if ISP2 is down.
How do we then ensure lanB traffic gets to ISP1????????

A. Is there a way to trick or nest route rules .................
B. Is there a way with a fourth Route and another route rule, so that if ISP2 is not available, to check if ISP one is available and then go toTable UseISP1
ISP2 distance=10 Routing-Mark=UseISP
and Route Rule
Source-address=lanB subnet
Action: Look-up only in Table
Table: UseISP1
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 1976
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Playing with Routes.

Fri Feb 19, 2021 9:28 pm

Can this be done without mangling is the challenge?

Yes, by using route rules with routing mark/route table for each LAN/WAN combination.

Then create 2 rules for each routing table, one with distance of "1" and another "2", recursive routing will serve better here
MTCNA, MTCTCE, MTCRE & MTCINE
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 6138
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Playing with Routes.

Fri Feb 19, 2021 11:42 pm

Okay but before hitting recursive routing, is this what you mean???
So besides the two NORMAL Standard FAILOVER ROUTING for two WANs.

ISP 1 distance= 5 check gateway=ping
ISP2 distance = 10

route 3 isp1 wan , route-rule lan1 go to isp1 via table:lan1 distance=? Check gateway=ping?
route 4 isp1 wan, route-rule lan1alt go to isp2 via table:lan1alt distance=?
route 5 isp2 wan, route-rule lan2 go to isp2 via table:lan2 distance=? Check gateway=ping?
route 6 isp2 wan, route-rule lan2alt go to isp1 via table:lan2alt distance=?
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 1976
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Playing with Routes.

Mon Feb 22, 2021 9:27 pm

without recursive routing, will be something like this (trying tp keep with your method of explanation):

Route Rules:
LAN1: SrcAdd(LAN1) Table(LAN1)
LAN2: SrcAdd(LAN2) Table(LAN2)
Routes:
route 1 isp1 wan, route-mark LAN1 distance=1
route 2 isp2 wan, route-mark LAN1 distance=2
route 3 isp2 wan, route-mark LAN2 distance=1
route 4 isp1 wan, route-mark LAN2 distance=2
MTCNA, MTCTCE, MTCRE & MTCINE
 
User avatar
anav
Forum Guru
Forum Guru
Topic Author
Posts: 6138
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Playing with Routes.

Mon Feb 22, 2021 10:35 pm

Oh thats too easy, you escape artist you!!
So there are not two normal routes?
Just four abnormal routes (no table main then)???

Now lets see that with recursive routing, I will help immensely, here are my routes.

/ip route
add check-gateway=ping distance=3 gateway=1.0.0.1
add check-gateway=ping distance=4 gateway=9.9.9.9
add comment=PrimaryRecursive distance=3 dst-address=1.0.0.1/32 gateway=\
g.w.-primary_isp scope=10
add comment=ScondaryRecursive distance=4 dst-address=9.9.9.9/32 gateway=\
1g.w.-primary_isp scope=10
add comment=SecondaryWAN distance=10 gateway=g.w.-secondary_isp




Route rules:
without recursive routing, will be something like this (trying tp keep with your method of explanation):

Route Rules:
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!

Who is online

Users browsing this forum: No registered users and 57 guests