Community discussions

MikroTik App
 
guiseppe
just joined
Topic Author
Posts: 7
Joined: Thu Nov 24, 2005 9:00 am

MT as a SHAPER

Sat Feb 03, 2007 1:41 pm

Hi there,

I need to know the possibility of having a microtik machine act as a port shaper. I have around 5Mbps of downlink which i would like to shape based on port policy. For example i want to give priority to DNS and HTTP and than MSN and voice and cam than P2P and other ports.

Best regards,
 
User avatar
mneumark
Member
Member
Posts: 370
Joined: Thu Jun 08, 2006 7:20 am
Location: Escalon, CA
Contact:

Sun Feb 04, 2007 9:52 am

 
jo2jo
Forum Guru
Forum Guru
Posts: 1003
Joined: Fri May 26, 2006 1:25 am

Sun Feb 04, 2007 7:12 pm

Mt is AMAZING at this! shaping, QOS..ect..

look no further.. if ~5mbit of total traffic a RB 532 should be almost over-kil for just shapingl...
 
jowi007
Member Candidate
Member Candidate
Posts: 110
Joined: Thu Oct 13, 2005 11:07 am

Mon Feb 05, 2007 9:37 am

HI

i Am facing the same needs

i made pakcet mark in mangle for http prerouting
and mark connection for http packetts
and in queue tree i added a global total queue for http priority 2
and dns priority 1

and then i can add in simple queue if i want the total bandwith needed for http packets for example
anything else should be done ?
 
User avatar
mneumark
Member
Member
Posts: 370
Joined: Thu Jun 08, 2006 7:20 am
Location: Escalon, CA
Contact:

Mon Feb 05, 2007 9:58 am

jowi007, sounds like you got the hang of it and got what you needed to do done.

If you want to see more examples of how its done checkout http://wiki.mikrotik.com/wiki/TransparentTrafficShaper for a few more hints.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Mon Feb 05, 2007 10:17 am

better do not mix queue tree and simple queues.

for very effective shaping use queue tree as you can attach leaves to root node, prioritize them, then add leaves to them etc etc. that way you can create very extensive configurations.
 
jowi007
Member Candidate
Member Candidate
Posts: 110
Joined: Thu Oct 13, 2005 11:07 am

Fri Feb 09, 2007 11:29 pm

[admin@MikroTik] ip firewall mangle> pr
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting protocol=tcp dst-port=80 action=mark-packet new-packet-mark=Http passthrough=yes

1 chain=prerouting protocol=udp dst-port=53 action=mark-packet new-packet-mark=Dns passthrough=yes

2 chain=prerouting protocol=tcp dst-port=1863 action=mark-packet new-packet-mark=Msn passthrough=yes

3 chain=prerouting p2p=all-p2p action=mark-packet new-packet-mark=P2P passthrough=yes

4 chain=prerouting protocol=tcp dst-port=25 action=mark-packet new-packet-mark=SMTP passthrough=yes

5 chain=prerouting protocol=tcp dst-port=80 action=mark-connection new-connection-mark=Http passthrough=yes

6 chain=prerouting protocol=udp dst-port=53 action=mark-connection new-connection-mark=Dns passthrough=yes

7 chain=prerouting protocol=tcp dst-port=1863 action=mark-connection new-connection-mark=Msn passthrough=yes

8 chain=prerouting p2p=all-p2p action=mark-connection new-connection-mark=P2P passthrough=yes

9 chain=prerouting protocol=tcp dst-port=25 action=mark-connection new-connection-mark=SMTP passthrough=yes


[admin@MikroTik] queue tree> pr
Flags: X - disabled, I - invalid
0 name="Http" parent=global-out packet-mark=Http limit-at=0 queue=default priority=2 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s

1 name="Dns" parent=global-total packet-mark=Dns limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s

2 name="Msn" parent=global-total packet-mark=Msn limit-at=0 queue=default priority=3 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s

3 name="P2P" parent=global-total packet-mark=P2P limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s

4 name="Smtp" parent=global-total packet-mark=SMTP limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s


did i did something wrong in this ?
 
valens
Trainer
Trainer
Posts: 244
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Sat Feb 10, 2007 5:08 am

You need to do connection-mark first, and use it while you do packet-mark.

1 chain=prerouting protocol=tcp dst-port=80 action=mark-connection new-connection-mark=http-conn passthrough=yes

2 chain=prerouting protocol=tcp dst-port=80 connection-mark=http-conn action=mark-packet new-packet-mark=Http passthrough=no
 
guiseppe
just joined
Topic Author
Posts: 7
Joined: Thu Nov 24, 2005 9:00 am

Sat Feb 10, 2007 7:52 pm

Ok thanks a lot,

I tried this while trying to have the queues on a downlink router but when i tried using it on the uplink it didn't work. What should i use instead of PREROUTING? I am selecting ports going out of ether1.

Regards,
 
valens
Trainer
Trainer
Posts: 244
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Sat Feb 10, 2007 8:22 pm

It should work. You can use prerouting for limiting downlink and uplink, just specify different interface.
For uplink, use interface gateway, and for downlink, use interface local.
 
guiseppe
just joined
Topic Author
Posts: 7
Joined: Thu Nov 24, 2005 9:00 am

Sun Feb 11, 2007 11:07 am

Ok here's what i have:

I have one MT router with 3 ethernets. 2 of them are receving requests and the third one goes directly to the cisco router which serves as an uplink router. What i need to do is all the traffic going from the MT to the Cisco to be shaped with priority. Maybe you can help with this.

Regards,

Who is online

Users browsing this forum: ansky, holvoetn, m4rk3J, massinia, NetworqAndy and 76 guests