Community discussions

MikroTik App
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Two route with same gateway and dst-addres but different routing mark

Wed Aug 12, 2015 9:59 am

With the following routes if I disable the route with comment loadbalancing1 the route check1 despite remains active, loses connectivity.

/ip route
add comment=loadbalancing1 distance=1 gateway=10.0.0.1 routing-mark=wan1
add comment=loadbalancing2 distance=1 gateway=10.1.0.1 routing-mark=wan2
add comment=failover1 distance=1 gateway=10.0.0.1
add comment=failover2 distance=2 gateway=10.1.0.1
add comment=check1 distance=1 gateway=10.0.0.1 routing-mark=check1
add comment=check2 distance=1 gateway=10.1.0.1 routing-mark=check2
Last edited by ibm on Sun Oct 04, 2015 7:29 pm, edited 1 time in total.
 
marrold
Member
Member
Posts: 427
Joined: Wed Sep 04, 2013 10:45 am

Re: Two route with same gateway and dst-addres but different routing mark

Wed Aug 12, 2015 11:11 am

If the traffic has a routing mark, and the 'active' route is for a different routing mark, it wont route. You need to add separate routes with different priorities, so in fail over situation marked traffic still matches a route-

Something like this-
/ ip route add dst-address=0.0.0.0/ gateway=10.10.10.1 routing-mark=data distance=1 check-gateway=ping
/ ip route add dst-address=0.0.0.0/ gateway=192.168.10.1 routing-mark=voice distance=1 check-gateway=ping
/ ip route add dst-address=0.0.0.0/ gateway=10.10.10.1 routing-mark=voice distance=2 check-gateway=ping
/ ip route add dst-address=0.0.0.0/ gateway=192.168.10.1 routing-mark=data distance=2 check-gateway=ping
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Two route with same gateway and dst-addres but different routing mark

Wed Aug 12, 2015 7:14 pm

With the following routes if I disable the route with comment loadbalancing1 the route check1 despite remains active, loses connectivity.

/ip route
add comment=loadbalancing1 distance=1 gateway=10.0.0.1 routing-mark=wan1
add comment=loadbalancing2 distance=1 gateway=10.1.0.1 routing-mark=wan2
add comment=failover1 distance=1 gateway=10.0.0.1
add comment=failover2 distance=2 gateway=10.1.0.1
add comment=check1 distance=1 gateway=10.0.0.1 routing-mark=check1
add comment=check2 distance=1 gateway=10.1.0.1 routing-mark=check2
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Two route with same gateway and dst-addres but different routing mark

Tue Aug 18, 2015 7:15 pm

Bump
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Two route with same gateway and dst-addres but different routing mark

Mon Aug 24, 2015 2:23 pm

Bump
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Two route with same gateway and dst-addres but different routing mark

Sun Oct 04, 2015 7:28 pm

Bump
 
ulysses
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Fri Sep 25, 2015 1:26 pm

Re: Two route with same gateway and dst-addres but different routing mark

Sun Oct 04, 2015 9:48 pm

May I ask how are you testing your setup? What do you mean by "looses connectivity"?
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Sun Oct 04, 2015 9:57 pm

Doing a ping from the routerboard with the routing mark that I want to test.
 
ulysses
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Fri Sep 25, 2015 1:26 pm

Re: Two route with same gateway and dst-addres but different routing mark

Sun Oct 04, 2015 10:07 pm

Try setting a correct src-address during ping, you may have some troubles if the packet is not masqueraded, for example.

In other words, the behavior is absurd as you are describing it, so I assume that since you are not disclosing the full picture, there are other reasons for the ping to timeout.

Also, you may want to observe the ping packets with the help of /tool sniffer to see if it actually goes out of the correct interface and in is has a correct src address set.
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Sun Oct 04, 2015 10:34 pm

Why should I use src-address if I set already a routing mark?
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Two route with same gateway and dst-addres but different routing mark

Fri Oct 09, 2015 10:08 pm

Bump
 
ulysses
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Fri Sep 25, 2015 1:26 pm

Re: Two route with same gateway and dst-addres but different routing mark

Fri Oct 09, 2015 10:14 pm

Did you use sniffer to look at the packets?

you should set src-address on ping in case you have multiple ip addresses assigned to the router interfaces. In that case it would select some of the ip addresses and it may be one that is going to break your policy routing rules.
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Fri Oct 09, 2015 11:58 pm

When I test in ping tool I set the routing mark I want to use in the advanced tab.
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Two route with same gateway and dst-addres but different routing mark

Sun Oct 18, 2015 1:41 pm

Bump
 
ulysses
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Fri Sep 25, 2015 1:26 pm

Re: Two route with same gateway and dst-addres but different routing mark

Mon Oct 19, 2015 10:36 am

So, have you checked where exactly the packets go with the sniffer?

Who is online

Users browsing this forum: No registered users and 82 guests