Page 1 of 1

correct way in mangle

Posted: Thu May 17, 2007 10:12 am
by proggams2
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.

Posted: Thu May 17, 2007 12:21 pm
by proggams2
anyone >>?????

Posted: Thu May 17, 2007 1:05 pm
by Ghassan
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

Posted: Thu May 17, 2007 1:07 pm
by Ghassan
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:

Posted: Thu May 17, 2007 7:46 pm
by proggams2
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

Posted: Thu May 17, 2007 8:49 pm
by Ghassan
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

Posted: Fri May 18, 2007 9:36 am
by maroon
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]

Posted: Fri May 18, 2007 9:58 am
by janisk
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

Posted: Fri May 18, 2007 11:56 am
by Ghassan
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 ....

Posted: Fri May 18, 2007 12:08 pm
by maroon
Ghassan hi again,

do u have msn, mobile number?

would be appreciated

regards,