Community discussions

MikroTik App
 
proggams2
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Wed Mar 14, 2007 10:15 pm

correct way in mangle

Thu May 17, 2007 10:12 am

hello everytone , i need help in mangle now i use prerouting and e.g to say i want to mark the yahoo webcam port which is 5100 so i add 1rule prerouting with dst port and one prerouting with scr port. is it correct to add the 2 rules prerouting what i want is to have 1 rule for upload and 1 for download for yahoo webcam . plz can someone help me and tell me if i want for upload i use other than prerouting and many thanks.
 
proggams2
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Wed Mar 14, 2007 10:15 pm

Thu May 17, 2007 12:21 pm

anyone >>?????
 
Ghassan
Member Candidate
Member Candidate
Posts: 213
Joined: Mon May 29, 2006 11:08 pm
Location: Lebanon
Contact:

Thu May 17, 2007 1:05 pm

Hello,

Let us assume that we have 2 isps or 2 interfaces ( 2 gateways )

the first interface is ISP1 and the second interface is ISP2 .

all default ports are done through ISP1 but we might want to mark yahoo port to route from ISP2 then do the following :
/ip route
add gateway="your isp's gateway" check-gateway=arp routing-mark=net2

/ip firewall mangle
add chain=prerouting protocol=tcp dst-port=5100 action=mark-routing new-routing-mask=net2 passthrough=yes

Ghassan
Last edited by Ghassan on Thu May 17, 2007 1:09 pm, edited 1 time in total.
 
Ghassan
Member Candidate
Member Candidate
Posts: 213
Joined: Mon May 29, 2006 11:08 pm
Location: Lebanon
Contact:

Thu May 17, 2007 1:07 pm

I assume it as Yahoo Webcam .. I am glad to help you .

but notice that if your gateway is not available by arp or by ping then it will use your second gateway which is your default gateway . :wink:
 
proggams2
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Wed Mar 14, 2007 10:15 pm

Thu May 17, 2007 7:46 pm

thx ghassan , what i really want i did this the mangle rule but what i dont know is ..
im using this rule with queue tree and limit this lets say 32k this is for down. if i want to do for upload what can i do ?? i put another rule with prerouting or what ?? this is my Q. thx
 
Ghassan
Member Candidate
Member Candidate
Posts: 213
Joined: Mon May 29, 2006 11:08 pm
Location: Lebanon
Contact:

Thu May 17, 2007 8:49 pm

use the same way like p2p ,

mark your port 5100 then you can limit it from Queue Tree ...

but this must have a changes with prerouting to forward chain :wink:

here is the link :
http://www.mikrotik.com/testdocs/ros/2.9/ip/mangle.php

Regards,

Ghassan
 
User avatar
maroon
Member Candidate
Member Candidate
Posts: 230
Joined: Thu Oct 07, 2004 11:15 am
Location: Lebanon
Contact:

Fri May 18, 2007 9:36 am

Ghassasn khayeh!

kifak?

question if possible ;) !! let's say i have 2 wan connections and an internetal network, and I want to make a load balancer for both two connections. but my 1st WAN is limited by quota and the 2nd WAN is unlimited. I wanna follow the instructions of the example on WIKI
.
but still have some doubts about:

- if I downloaded the quota, how can I switch all the connections to the 2nd WAN without doing any human intevention?
- the example for failover in WIKI too, can I use it with the same configuration of loadbalancing. let's say even connections are established and src-natted to gateway for WAN1 and WAN1 failed/droped. how even connections continue accessing the internet.

hope you got my idea about the questions

best regards[/i][/code]
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Fri May 18, 2007 9:58 am

you can count how much you download and using script collect information from that firewall rule, when you reach the limit you can do what ever you want using scripting - disable interface, reroute traffic only to unlimited interface
 
Ghassan
Member Candidate
Member Candidate
Posts: 213
Joined: Mon May 29, 2006 11:08 pm
Location: Lebanon
Contact:

Fri May 18, 2007 11:56 am

Ghassasn khayeh!

kifak?

question if possible ;) !! let's say i have 2 wan connections and an internetal network, and I want to make a load balancer for both two connections. but my 1st WAN is limited by quota and the 2nd WAN is unlimited. I wanna follow the instructions of the example on WIKI
.
but still have some doubts about:

- if I downloaded the quota, how can I switch all the connections to the 2nd WAN without doing any human intevention?
- the example for failover in WIKI too, can I use it with the same configuration of loadbalancing. let's say even connections are established and src-natted to gateway for WAN1 and WAN1 failed/droped. how even connections continue accessing the internet.

hope you got my idea about the questions

best regards[/i][/code]
I agree with "janisk" but you can make scripts .. or use NetWatch to see if pinging your isp is available , somehow ..

one script for checking your gateway's quota that you count and the second script is to change your gateway ( unlimited gateway ) because if one of them is unavailabe .

If I am not wrong ..you will have problems or pages freeze ....
 
User avatar
maroon
Member Candidate
Member Candidate
Posts: 230
Joined: Thu Oct 07, 2004 11:15 am
Location: Lebanon
Contact:

Fri May 18, 2007 12:08 pm

Ghassan hi again,

do u have msn, mobile number?

would be appreciated

regards,

Who is online

Users browsing this forum: bitflow, GoogleOther [Bot], lurker888, sas2k, sindy and 46 guests