Community discussions

MikroTik App
 
brasileottanta
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jun 22, 2006 8:52 am

Bandwidth limit and P2p block

Tue Sep 08, 2009 11:31 pm

Hi Guys ,

I want to set max bandwidth for limit generic traffic . I found many examples to write a rule or simple queue to limit , but no one work.
My ros is 3.28 and the rules in 2.9.50 work perfctly. What is the change from 2.9 to 3.X in firewall programming ?

ROS 3.x and 2.9.x use the same sintax ?


Thank's in advance.


p.s.
http://www.mikrotik.com/testdocs/ros/2. ... p#6.54.6.3 , this example don't work on my router ..
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Bandwidth limit and P2p block

Wed Sep 09, 2009 1:13 am

if you use bridge, execute
/interface bridge settings set use-ip-firewall=yes 
 
brasileottanta
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jun 22, 2006 8:52 am

Re: Bandwidth limit and P2p block

Wed Sep 09, 2009 4:09 pm

if you use bridge, execute
/interface bridge settings set use-ip-firewall=yes 

Thank's !! I forgot this :-(

so , take a look to this example :
/ ip firewall mangle
add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \
new-connection-mark=http_conn passthrough=yes
add chain=prerouting connection-mark=http_conn action=mark-packet \
new-packet-mark=http passthrough=no
add chain=prerouting p2p=all-p2p action=mark-connection \
new-connection-mark=p2p_conn passthrough=yes
add chain=prerouting connection-mark=p2p_conn action=mark-packet \
new-packet-mark=p2p passthrough=no
add chain=prerouting action=mark-connection new-connection-mark=other_conn \
passthrough=yes
add chain=prerouting connection-mark=other_conn action=mark-packet \
new-packet-mark=other passthrough=no

/ queue simple
add name="main" target-addresses=10.0.0.0/16 max-limit=256000/1000000
add name="http" parent=main packet-marks=http max-limit=240000/500000 priority=1
add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000 priority=8
add name="other" parent=main packet-marks=other max-limit=128000/128000 priority=4
this limit the traffic for all network or for client ? ( If 4 client , we have 256k/4 or 256k*4 ? )




Thank's in advance.

Who is online

Users browsing this forum: sindy and 82 guests