Community discussions

MikroTik App
 
downther0ad
just joined
Topic Author
Posts: 9
Joined: Mon Nov 02, 2015 10:21 pm

Routing based on dst-address

Tue Dec 22, 2015 10:43 pm

Hi,

As stated in title I need to make routing decision based on destiny address.

I have following rules:

mangle
chain=prerouting action=mark-routing new-routing-mark=to-172 passthrough=no dst-address=172.30.0.0/16
nat
chain=srcnat action=masquerade src-address=192.168.88.0/24 dst-address=172.30.0.0/16 out-interface=ether1-gateway
route
#      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  172.30.0.0/16                      172.30.250.1              1
I can see two gateways, the one that I cannot reach and the one that is always decided, I know this because with /tools trace always I get the same gateway even if I ping explicity to 172.30.x.x

192.168.88.0 is my router lan on eth3 and 172.30.0.0 is a remote visible network

I followed this:
http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways

Thanks in advance
 
telnetpr
newbie
Posts: 29
Joined: Fri Dec 18, 2015 9:02 pm

Re: Routing based on dst-address

Wed Dec 23, 2015 4:41 pm

Did you create the static route with the new routing mark ??
You do not have the required permissions to view the files attached to this post.
 
downther0ad
just joined
Topic Author
Posts: 9
Joined: Mon Nov 02, 2015 10:21 pm

Re: Routing based on dst-address

Wed Dec 23, 2015 4:50 pm

yes, I have this route:
0 A S  dst-address=172.30.0.0/16 gateway=172.30.x.x gateway-status=172.30.x.x reachable via  ether1-gateway distance=1 scope=30 target-scope=10 
        routing-mark=to-172
 
telnetpr
newbie
Posts: 29
Joined: Fri Dec 18, 2015 9:02 pm

Re: Routing based on dst-address

Wed Dec 23, 2015 7:18 pm

yes, I have this route:
0 A S  dst-address=172.30.0.0/16 gateway=172.30.x.x gateway-status=172.30.x.x reachable via  ether1-gateway distance=1 scope=30 target-scope=10 
        routing-mark=to-172

Try your masquerade only with the source address. And see what happen
chain=srcnat action=masquerade src-address=192.168.88.0/24