Community discussions

MikroTik App
 
blinderix
newbie
Topic Author
Posts: 48
Joined: Wed Apr 08, 2009 8:55 pm

Local subnets not visible after routing mark.

Wed Mar 09, 2016 8:11 pm

Hi,

We have two ISP and two local subnets. Both subnet use ISP1 without any problem and ISP2 with different distance for failover.

I tried to make one subnet use ISP1 and second subnet use ISP2. I made mangle rules and added the routes and everything works, but subnets don't see each other.

These are the mangle rules:

0 X chain=prerouting action=accept src-address=172.16.102.0/24 dst-address=172.16.103.0/24 log=no log-prefix=""
1 X chain=prerouting action=accept src-address=172.16.103.0/24 dst-address=172.16.102.0/24 log=no log-prefix=""
2 X chain=prerouting action=mark-routing new-routing-mark=ISP1 passthrough=no src-address=172.16.102.0/24 log=no log-prefix=""
3 X chain=prerouting action=mark-routing new-routing-mark=ISP2 passthrough=no src-address=172.16.103.0/24 log=no log-prefix=""


I added rules 0,1 after that but nothing changed. Still can't ping each other. What I'm missing?
Thanks in advance.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Local subnets not visible after routing mark.

Wed Mar 09, 2016 8:16 pm

You need to add the locally-connected routes to your marked-routing tables, or else exclude those destinations from route-marking.
 
blinderix
newbie
Topic Author
Posts: 48
Joined: Wed Apr 08, 2009 8:55 pm

Re: Local subnets not visible after routing mark.

Wed Mar 09, 2016 9:19 pm

You need to add the locally-connected routes to your marked-routing tables, or else exclude those destinations from route-marking.

Thanks! It worked. I have tried it earlier today, but may be made a mistake and totally messed. Thanks again.

P.S. I have tried:

X chain=prerouting action=mark-routing new-routing-mark=ISP1 passthrough=no src-address=172.16.102.0/24 dst-address=!172.16.103.0/24 log=no log-prefix=""
X chain=prerouting action=mark-routing new-routing-mark=ISP2 passthrough=no src-address=172.16.103.0/24 dst-address=!172.16.102.0/24 log=no log-prefix=""

but it didn't worked.