Community discussions

MUM Europe 2020
 
User avatar
THG
Member
Member
Topic Author
Posts: 472
Joined: Thu Oct 15, 2009 1:05 am

Problem with policy routing

Thu Apr 01, 2010 1:05 am

I got problem with the policy routing setup. I found out that both connections use the same gateway IP address. Is it possible to use Interface names instead of Gateway address and DST. Address in policy rules?

I followed this example, but replaced IPs with my own. It probably won't work with the same gateway address.
/ip route
add gateway=10.10.11.1 routing-mark=ISP2
add gateway=10.10.10.1 routing-mark=ISP1
add gateway=10.10.10.1
/ip route rule
add dst-address=192.168.0.0/24 action=lookup table=main
add dst-address=192.168.1.0/24 action=lookup table=main
add dst-address=10.10.10.0/30 action=lookup table=main
add dst-address=10.10.11.0/30 action=lookup table=main
add src-address=10.10.10.0/30 action=lookup table=ISP1
add src-address=10.10.11.0/30 action=lookup table=ISP2
add routing-mark=ISP1 action=lookup table=ISP1
add routing-mark=ISP2 action=lookup table=ISP2
/ip firewall mangle
add chain=prerouting src-address=192.168.0.0/24 action=mark-routing \
new-routing-mark=ISP1 passthrough=no

add chain=prerouting src-address=192.168.1.0/24 action=mark-routing \
new-routing-mark=ISP2 passthrough=no
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5950
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Problem with policy routing

Thu Apr 01, 2010 8:42 am

 
bigguns
Member Candidate
Member Candidate
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Problem with policy routing

Thu Apr 01, 2010 9:22 am

 
User avatar
THG
Member
Member
Topic Author
Posts: 472
Joined: Thu Oct 15, 2009 1:05 am

Re: Problem with policy routing

Thu Apr 01, 2010 6:15 pm

Thank you guys, I will try this now. :-D
 
User avatar
THG
Member
Member
Topic Author
Posts: 472
Joined: Thu Oct 15, 2009 1:05 am

Re: Problem with policy routing

Thu Apr 01, 2010 9:28 pm

I think there is something wrong in the manual, the following two rules is only allowed in prerouting and output chains.
/ip firewall mangle
add action=mark-routing chain=forward src-address=192.168.1.0/24 new-routing-mark=first
add action=mark-routing chain=forward src-address=192.168.2.0/24 new-routing-mark=other
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5950
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Problem with policy routing

Tue Apr 06, 2010 8:18 am

fixed

Who is online

Users browsing this forum: No registered users and 5 guests