Community discussions

MikroTik App
 
Mike33
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Tue Jun 25, 2013 2:13 am

Ping through different routing tables

Sat May 08, 2021 11:10 pm

There is such a routing setting:

"provider1-inet" - l2tp-interface
"provider2-inet" - lte-interface
/ip route add gateway="provider1-inet" distance=1   type=unicast comment="provider1"  
/ip route add gateway="provider2-inet" distance=2   type=unicast comment="provider2" 

/ip route add gateway="provider1-inet" distance=1   routing-mark="provider1" type=unicast
/ip route add                          distance=254 routing-mark="provider1" type=unreachable
/ip route add gateway="provider2-inet" distance=1   routing-mark="provider2" type=unicast
/ip route add                          distance=254 routing-mark="provider2" type=unreachable

/ip route rule add routing-mark="provider1" action=lookup-only-in-table table="provider1"
/ip route rule add routing-mark="provider2" action=lookup-only-in-table table="provider2"

when:
/ip route add gateway="provider1-inet" distance=1   type=unicast comment="provider1"  
/ip route add gateway="provider2-inet" distance=2   type=unicast comment="provider2" 
does not work:
/ping 8.8.8.8 count=1 routing-table=provider2

when:
/ip route add gateway="provider1-inet" distance=2   type=unicast comment="provider1"  
/ip route add gateway="provider2-inet" distance=1   type=unicast comment="provider2" 
does not work:
/ping 8.8.8.8 count=1 routing-table=provider1

Please tell me, is it possible to make all pings go normally?

Who is online

Users browsing this forum: anav, ItchyAnkle, menyarito and 90 guests