Community discussions

MikroTik App
 
kokaKorina
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Wed Oct 31, 2018 5:07 pm

two default gateways from same subnet

Thu Feb 07, 2019 7:44 pm

Hello everyone
I am trying to have two default gateways from the same subnet. I am attaching the topology what I am trying to achieve is
mikrotik 1 has the default gateway as isp 1 with ad 1
mikrotik 1 has the default gateway as isp 2 with ad 2
but when isp1 goes down the the default route on mikrotik 1 for the isp does not get start until I manually disable the the default route to isp1
Even in routes it still shows its reachable
All the ip addresses are on ether 1 of each router
Does anyone knows the solution for this problem?
Thanks in advance
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22373
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: two default gateways from same subnet

Thu Feb 07, 2019 7:53 pm

Maybe you need two ethernet ports to the switch from the mikrotik??
 
kokaKorina
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Wed Oct 31, 2018 5:07 pm

Re: two default gateways from same subnet

Thu Feb 07, 2019 8:03 pm

Hy anav
I do not think that is the problem the mikrotik is not able to observe that isp1 interface is down I think that is the problem but do not know the solution
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22373
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: two default gateways from same subnet  [SOLVED]

Thu Feb 07, 2019 8:40 pm

I have two WANIPs, two modems and two cables coming to my router.
I use recursive IP routes to determine if ISP one is up and running, if not it switches to ISP2.
Its quite simple.
Trying to do this over one ethernet cable does not seem plausible to me but I am no expert.
 
kokaKorina
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Wed Oct 31, 2018 5:07 pm

Re: two default gateways from same subnet

Thu Feb 07, 2019 9:13 pm

Thanks anav
hope so someone knows the solution for this problem
 
kokaKorina
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Wed Oct 31, 2018 5:07 pm

Re: two default gateways from same subnet

Thu Feb 07, 2019 9:22 pm

Hi anav
It was simple solution for check-gateway I changed it to the ping it worked perfectly
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22373
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: two default gateways from same subnet

Thu Feb 07, 2019 9:35 pm

Here is how I do it. The router checks TWO different DNS servers to ensure that my primary network is indeed not available.

/ip route
add check-gateway=ping distance=2 gateway=8.8.4.4 target-scope=30
add check-gateway=ping distance=3 gateway=208.67.220.220 target-scope=30
add distance=10 gateway=ispgateway(secondary) target-scope=30
add distance=2 dst-address=8.8.4.4/32 gateway=ispgateway(primary)
add distance=3 dst-address=208.67.220.220/32 gateway=ispgateway(primary)

If I was only using one DNS server in my recursive look......
add check-gateway=ping distance=2 gateway=8.8.4.4 target-scope=30
add distance=10 gateway=ispgateway(secondary) target-scope=30
add distance=2 dst-address=8.8.4.4/32 gateway=ispgateway(primary)
 
kokaKorina
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Wed Oct 31, 2018 5:07 pm

Re: two default gateways from same subnet

Fri Feb 08, 2019 12:46 am

Thanks anav
Thats exactly what I was looking for it worked for me