Community discussions

MikroTik App
 
sroa
just joined
Topic Author
Posts: 14
Joined: Mon Dec 19, 2005 10:09 pm
Location: Puebla Mexico
Contact:

Bandwidth limit & equalize

Mon Dec 19, 2005 10:59 pm

Hi every one, I am new with MT and I was wondering if it is possible to handle real QoS and after that do Bandwidth Limiting.
I will try to explain my self in other words, I have 40 users who has 256kbps wireless link but most of them leave their pc on all the time using P2P, and i have to let them use p2p connections so when some other need to use www or ssh the service is too slow due to the llarge p2p downloads. What I want to do is a global policy that give priority to ssh, www, dns, etc and then if there is bandwidth left give to p2p, in other case if no one is using www or ssh, give all the bandwidth for p2p applications but in both cases keeping the mas rate to 256kbps.
I was thinking to create different classes, one for service or port (dns,ssh,www, p2p) and give priorities, then reagrupate all this classes in one and then share this last one amog the 40 users with 256kbps for each one.I was triyng to do this in linux, but at the end I found that I need one CPU for equalize and another for bandwidth limiting and obviusly I would like to use just ONE cpu.

Any idea?

Thanks

Sorry about my bad english
 
User avatar
Hugh Hartman
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Fri May 28, 2004 2:01 pm
Location: Fort Kent, Maine

Tue Dec 20, 2005 12:54 am

sroa said:Hi every one, I am new with MT and I was wondering if it is possible to handle real QoS and after that do Bandwidth Limiting.

the simple anser is yes--do the QoS in the queue tree and then bandwidth limiting in the simple queues which gets applied after the queue tree..

Here is what I do for P2P--I use a PCQ type set for upload (classifier= src-address(64k) --to limit each upload to that speed.

I limit P2P upload in the Queue tree under FULL OUT-parent as part of traffic management. (limit at, max limit and priority)..and place the entry for PCQ last in the Queue tree with limit at=0 max limit=0. global out-parent.

Then each client has their upload set in simple queues per IP. (128k).


regards, Hugh
 
sroa
just joined
Topic Author
Posts: 14
Joined: Mon Dec 19, 2005 10:09 pm
Location: Puebla Mexico
Contact:

Tue Dec 20, 2005 8:14 pm

Thank You !!! I will try......


Regards
 
raymonvdm
Member Candidate
Member Candidate
Posts: 161
Joined: Mon Jan 31, 2005 7:47 pm

Wed Jan 11, 2006 2:23 am

Ive found this example in the 2.9 docs i think this is what you need ??

Application Examples
Description
The following section discusses some examples of using the mangle facility.

Peer-to-Peer Traffic Marking
To ensure the quality of service for network connection, interactive traffic types such as VoIP and HTTP should be prioritized over non-interactive, such as peer-to-peer network traffic. RouterOS QOS implementation uses mangle to mark different types of traffic first, and then place them into queues with different limits.

The following example enforces the P2P traffic will get no more than 1Mbps of the total link capacity when the link is heavily used by other traffic otherwice expanding to the full link capacity:

[admin@MikroTik] > /ip firewall mangle add chain=forward \
\... p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn
[admin@MikroTik] > /ip firewall mangle add chain=forward \
\... connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p
[admin@MikroTik] > /ip firewall mangle add chain=forward \
\... connection-mark=!p2p_conn action=mark-packet new-packet-mark=other
[admin@MikroTik] > /ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn

1 chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p

2 chain=forward packet-mark=!p2p_conn action=mark-packet new-packet-mark=other
[admin@MikroTik] >
[admin@MikroTik] > /queue tree add parent=Public packet-mark=p2p limit-at=1000000 \
\... max-limit=100000000 priority=8
[admin@MikroTik] > /queue tree add parent=Local packet-mark=p2p limit-at=1000000 \
\... max-limit=100000000 priority=8
[admin@MikroTik] > /queue tree add parent=Public packet-mark=other limit-at=1000000 \
\... max-limit=100000000 priority=1
[admin@MikroTik] > /queue tree add parent=Local packet-mark=other limit-at=1000000 \
\... max-limit=100000000 priority=1