Page 1 of 1

Routing 2 WANs

Posted: Fri Mar 23, 2012 4:58 am
by whoknew
1 WAN for data and another for a SIP trunk.

Whats the best way to route both? I have read the wiki on the ECMP load balancing (I don't want to load balance, just route all voip traffic to SIP trunk and route data through the cable modem), also read the Load Balancing over Multiple Gateways wiki. Any recommendations from someone who has done it?

Re: Routing 2 WANs

Posted: Fri Mar 23, 2012 12:16 pm
by vik1988
1 WAN for data and another for a SIP trunk.

Whats the best way to route both? I have read the wiki on the ECMP load balancing (I don't want to load balance, just route all voip traffic to SIP trunk and route data through the cable modem), also read the Load Balancing over Multiple Gateways wiki. Any recommendations from someone who has done it?
For eg.
/ip firewall mangle add chain=prerouting protocol=udp dst-port=5060 action=mark-routing new-routing-mark=sip

/ip route add gateway=SIPTRUNK routing-mark=sip
/ip route add gateway=WAN
You need to create a rule for marking of specific routing traffic. Here i have used protocol udp and sip port 5060 for understanding. you can change it accordingly.

Re: Routing 2 WANs

Posted: Thu Apr 05, 2012 3:29 pm
by whoknew
http://wiki.mikrotik.com/wiki/Load_Bala ... e_Gateways

I was using this, it works well for what I have setup. Only problem I have, I can't access the RB450G via winbox offsite. Any thoughts?

Re: Routing 2 WANs

Posted: Thu Apr 05, 2012 3:34 pm
by vik1988
add one more default route.....towards any gateway

Re: Routing 2 WANs

Posted: Thu Apr 05, 2012 4:33 pm
by whoknew
so add another ip route 0.0.0.0/0 towards the gateway I want to use?

Re: Routing 2 WANs

Posted: Sat Apr 07, 2012 9:31 am
by vik1988
so add another ip route 0.0.0.0/0 towards the gateway I want to use?
Yes for reverse traffic.

Re: Routing 2 WANs

Posted: Sun Apr 08, 2012 3:02 am
by acim

Re: Routing 2 WANs

Posted: Wed May 14, 2014 11:52 pm
by Zapnologica
I am looking to do the exact same thing,

I am gonna give it a try and see how it goes. Must admit I expected it to be slightly more complex than a 3 liner.

Re: Routing 2 WANs

Posted: Sat May 31, 2014 3:12 am
by andjelok
I have the same problem as the maroon of this post http://blog.butchevans.com/2008/09/mikr ... n-example/ if anyone has a solution for this problem. The primary ISP for another ISP and the other for good

Re: Routing 2 WANs

Posted: Fri Nov 07, 2014 10:37 am
by mikez
you have to keep RTP in mind as that is the real reason to send traffic over an alternative WAN - to dedicate a connection to improve voice quality.

with that in mind you may have to add a fourth line to that config to include UDP ranges of 10000:20000, or whatever your provider's RTP port range happens to be.