Community discussions

MikroTik App
 
txfz
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Tue Mar 10, 2020 9:02 am

Pinging via secondary default route?

Tue Aug 31, 2021 12:15 pm

Hi,

I'm trying out various WAN failover solutions. One of them requires that you be able to ping the "inactive" connection via its interface, which is where I'm getting stuck. I don't know if I'm missing something completely obvious.

I have set up a lab environment with two different routes to the Internet.
/ip address
add address=10.1.0.2/30 interface=ether1 network=10.1.0.0
add address=10.2.0.2/30 interface=ether2 network=10.2.0.0
/ip route
add check-gateway=ping comment="Default route 1" distance=1 gateway=10.1.0.1
add check-gateway=ping comment="Default route 2" distance=2 gateway=10.2.0.1

 0 A S  ;;; Default route 1
        dst-address=0.0.0.0/0 gateway=10.1.0.1 gateway-status=10.1.0.1 reachable via  ether1 
        check-gateway=ping distance=1 scope=30 target-scope=10 

 1   S  ;;; Default route 2
        dst-address=0.0.0.0/0 gateway=10.2.0.1 gateway-status=10.2.0.1 reachable via  ether2 
        check-gateway=ping distance=2 scope=30 target-scope=10 

 2 ADC  dst-address=10.1.0.0/30 pref-src=10.1.0.2 gateway=ether1 gateway-status=ether1 reachable
        scope=10 

 3 ADC  dst-address=10.2.0.0/30 pref-src=10.2.0.2 gateway=ether2 gateway-status=ether2 reachable
        scope=10

Route 1 works, of course, but am I not supposed to be able to send traffic via route 2 while it isn't the active route? I get timeouts using this command:

ping interface=ether2 9.9.9.9

Route 2 works as expected when I manually disable route 1.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Pinging via secondary default route?  [SOLVED]

Tue Aug 31, 2021 1:24 pm

You cannot ping using the secondary default route itself. But you can create another route to the destination used for the path transparency check, using the same gateway the secondary default route uses, or you can create another default route using the same gateway, but in a dedicated routing table (marked with a dedicated routing-mark), and assign that routing-mark to the test ping requests being sent to the transparency check destination.
 
txfz
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Tue Mar 10, 2020 9:02 am

Re: Pinging via secondary default route?

Tue Aug 31, 2021 1:50 pm

Thank you. I just found the routing mark solution in a different thread, too, and I think that will do the trick.

Who is online

Users browsing this forum: almdandi, FurfangosFrigyes and 104 guests