Community discussions

MikroTik App
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

URGENT: protocol forward between dual providers??...........

Mon Feb 18, 2013 11:36 am

Sorry to start this topic with urgent Title, but i believe as much as everything else counts in my situation "Time" has a major count!


in a network with two providers each with its own ip and gateway, how can i forward "ICMP" requests to one provider and let everything else do its normal work functioning through the other provider?

this way, when one subscriber's station is using a mean for its world wide communication that relies mainly on ping timing, will benifit from the fast reply from one provider while the rest of his/her data flow will take place on provider number 2.

I would appreciate a simple code as a jump start.


Thank you,
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: URGENT: protocol forward between dual providers??.......

Mon Feb 18, 2013 11:44 am

use routing-mark in mangle to mark icmp packets. And add route with that routuing mark to route over second gateway.
You can find similar examples in the wiki
http://wiki.mikrotik.com/wiki/User/Routing
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: URGENT: protocol forward between dual providers??.......

Mon Feb 18, 2013 12:51 pm

Let me get his correct:
ip address add address=22.22.22.50/29 interface=WAN-ICMP
ip address add address=33.33.33.50/29 interface=WAN-Data
ip route add dst-address=0.0.0.0/0 gateway=22.22.22.49
ip route add dst-address=0.0.0.0/0 gateway=33.33.33.49
ip firewall add chain=prerouting src-address=192.168.0.0/16 protocal=icmp   action=mark-routing new-routing-mark=WAN-ICMP
ip firewall add chain=prerouting src-address=192.168.0.0/16 protocal=!icmp  action=mark-routing new-routing-mark=WAN-Data
what will be my mistakes here and what are my next steps after marking them?

Thanks,
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: URGENT: protocol forward between dual providers??.......

Mon Feb 18, 2013 12:53 pm

You don't need second mangle rule.

And route with routing mark is missing

/ip route add gateway=22.22.22.49 routing-mark=WAN-ICMP
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: URGENT: protocol forward between dual providers??.......

Mon Feb 18, 2013 1:00 pm

If i said route icmp to WAN-ICMP as:

/ip route add gateway=22.22.22.49 routing-mark=WAN-ICMP

will the network automatically know data flow should got through WAN-Data or there is also another rule I must add?

thank you
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: URGENT: protocol forward between dual providers??.......

Mon Feb 18, 2013 1:09 pm

Oh I think the one masqurate rule on WAN-Data should do the job without any extra rule correct?
 
ronix
Member Candidate
Member Candidate
Posts: 151
Joined: Thu Nov 17, 2011 6:51 pm

Re: URGENT: protocol forward between dual providers??.......

Tue Feb 19, 2013 10:50 am

ok, lets try to solve it in a different way...

If you want you can give a high priority to ICMP...

for ex:
/ip firewall mangle
add chain=prerouting protocol=icmp action=mark-connection new-connection-mark=icmp-con passthrough=yes comment="ICMP_Mark_Con" disabled=no
add chain=prerouting protocol=icmp connection-mark=icmp-con action=mark-packet new-packet-mark=icmp-pkt passthrough=no comment="ICMP_PKT_Mark" disabled=no 

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1024k max-limit=2048k name=Hi_Priority_to_icmp packet-mark=icmp-pkt parent=global-in priority=1 queue=default

Who is online

Users browsing this forum: Bing [Bot], lurker888, Mosmos, philipwillemse and 105 guests