Community discussions

MikroTik App
 
waqasahsan
just joined
Topic Author
Posts: 4
Joined: Tue Jan 07, 2014 9:47 am

Static Route to an IP via specific WAN/ISP when using PCC

Tue Jan 07, 2014 10:40 am

Hi All,

I am using RB750 with Dual WAN load balancing, using PCC and mangle, and it is working fine for a few weeks now. I would however like to add static routes to certain websites/IPs so that they always connect via the desired ISP. Assuming that the website address is 1.1.1.1 and ISP1 gateway address is 2.2.2.2 i add the following route
/ip route add dst-address=1.1.1.1 gateway=2.2.2.2
Route showed up as active however the traffic to the website was still being routed via ISP2 ( I checked via traceroute from my PC). I also tried after adding the routing mark for ISP1 to the route but to no avail.

Any help would be appreciated to resolve this issue.
 
User avatar
heislerb
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Mon Sep 16, 2013 4:41 pm

Re: Static Route to an IP via specific WAN/ISP when using PC

Tue Jan 07, 2014 1:13 pm

You can use a mangle rule, placed just before the two rules that sends packets from WAN1_conn or WAN2_conn to WAN1 or WAN2. You can use a destination address or a destination list.

Rule to add ****
add action=mark-connection chain=prerouting comment=Netflix dst-address-list=\
netflix-ips dst-address-type=!local in-interface=3LAN \
new-connection-mark=WAN1_conn



Just before these rules ****
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=3LAN new-routing-mark=to_WAN1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=3LAN new-routing-mark=to_WAN2 passthrough=no


I hope this helps.
Bob
 
waqasahsan
just joined
Topic Author
Posts: 4
Joined: Tue Jan 07, 2014 9:47 am

Re: Static Route to an IP via specific WAN/ISP when using PC

Tue Jan 07, 2014 9:31 pm

Thanks for the quick reply Bob, I guessed that I would need to fiddle with the mangle rules while i was writing my post and your solution also points in that direction. Sadly my ISP1 is down and I have been unable to verify the solution but will update once i get the chance.
 
waqasahsan
just joined
Topic Author
Posts: 4
Joined: Tue Jan 07, 2014 9:47 am

Re: Static Route to an IP via specific WAN/ISP when using PC

Wed Jan 08, 2014 8:59 am

Hi Bob,

My ISP1 finally came up and I was able to test the solution successfully. Thanks again.

Who is online

Users browsing this forum: clambert, intania, phascogale and 227 guests