Community discussions

MikroTik App
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

p2p limiting with simple queues?

Thu Mar 30, 2006 1:08 am

Is it possible to limit p2p connections with simple queues on 2.9? It shows up but then the user still gets all their bandwidth + the amount in the p2p queue. for example if queue list looks like:

p2p 64kbps

user 256kbps

then the user p2p just downloads at 256+64, thus defeating the purpose. How can i make is so that the p2p bandwidth is taken from <user> and limited to rate of <p2p> ?

Thanks
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Thu Mar 30, 2006 2:18 pm

You may use 'parent' option for the queues,
e.g. queue (a) applies 256 kbps for all traffic,
and than queue (b) for p2p traffic, but set parent=queue(a).
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

Fri Mar 31, 2006 12:13 am

thanks, i got it working.

is there a way to make one rule go for ALL queues?

thanks.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Fri Mar 31, 2006 10:37 am

Could you give more details about 'one rule for all queues' ?
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

Mon Apr 03, 2006 3:42 am

every client has a queue, i would like EVERYONE, as in every single queue to share a single queue of say 256k for p2p traffic. so that at no time on my network is more than 256k of t1 being used for p2p.
 
dannyboy
Member Candidate
Member Candidate
Posts: 195
Joined: Fri Sep 16, 2005 4:21 am
Location: Nicaragua/USA
Contact:

Sun May 14, 2006 7:44 pm

can you send the way you did this ? I would like to do the same..

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

Mon May 15, 2006 8:55 am

we are still waiting ...!
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Tue May 23, 2006 3:13 am

Can anyone answer this question?
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Tue May 23, 2006 3:31 pm

can you send the way you did this ? I would like to do the same..

thanks
I hope this is helpful: http://forum.mikrotik.com/viewtopic.php?t=8544

The technique there is based on information from MikroTik documentatiion and employees and from the user community in this forum and from the wiki at http://wiki.mikrotik.com/wiki/PCQ_Examples, e.g., which says in part:
Per Connection Queue (PCQ) is a queuing discipline that can be used to dynamically equalize or shape traffic for multiple users, using little administration.
Oh, and MUM in Dallas was a good source of information as well. IIRC, the presentations are on the wiki.

rgds/ldv
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Tue May 23, 2006 5:29 pm

I have searched for “P2P” and read most of the posts. Everyone explains ways to Mangle P2P traffic and create Queue Tree queues, but no is addressing the P2P setting in Simple Queues.

I have 550 individual simple queues created, one for each client. Why don't I use "Queue Tree" queues, you ask...Webbox has a nice "Simple Queues" interface which allows my co-workers to adjust each customers speed up and down without needing more access or knowledge.
Another thing to add here, I'm using the MikroTik box as a bridge. Two ports are bridged to a single public IP address. The customer simple queues are working correctly.

The 2.9 Reference Manual, in the Bandwidth Chapter, Simple Queues section states:

“You can also use simple queues to build advanced QoS applications. They have useful integrated
features:
• Peer-to-peer traffic queuing
• Applying queue rules on chosen time intervals
• Priorities
• Using multiple packet marks from /ip firewall mangle
• Shaping of bidirectional traffic (one limit for the total of upload + download)”

My goal is to slow ALL P2P traffic to 15k/290k and keep other traffice at the customers speed. I can't seem to get the P2P queues to work. I tried creating a P2P queue with a “customer” queue as the parent. I tried creating P2P queue with a higher priority. I still have customer with 256k/480k of eDonkey traffic.
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Tue May 23, 2006 6:39 pm

My goal is to slow ALL P2P traffic to 15k/290k and keep other traffice at the customers speed. I can't seem to get the P2P queues to work. I tried creating a P2P queue with a “customer” queue as the parent. I tried creating P2P queue with a higher priority. I still have customer with 256k/480k of eDonkey traffic.
Marking the p2p traffic and funneling ONLY THE P2P TRAFFIC through a PCQ should achieve your objective. Using said technique you can allocate say 15 Kbps for upload of p2p and say 290 Kbps for download of p2p; if there is one subscriber doing p2p, they will get all of that bandwidth; if there are two, the designated amount of bandwidth will be split equally; yada yada.

You should be able to funnel the rest of the data (!P2P) through your existing simple queues.

Someone far more qualified than I can validate that statement or offer a replacement or additional alternatives.

rgds/ldv
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Wed May 24, 2006 6:14 pm

Idvaden, thank you for your post. I'm not looking a gift horse in the mouth, your help is appriciated.

I'm still hoping someone can explain the P2P settings for simple queues.

I'm using version 2.9.23. Via WinBox, on the “Advanced” tab, I find P2P settings.

When I set up a Simple Queue for an IP address/customer. My brain wants to think (for the IP address I entered under the general tab) I can select "p2p-all", select the mangled packet mark for p2p, select the corresponding Interface, and then set a target Upload and Download.

If someone has any information on Simple Queue P2P configurations please post it here.
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Wed May 24, 2006 7:07 pm

When I set up a Simple Queue for an IP address/customer. My brain wants to think (for the IP address I entered under the general tab) I can select "p2p-all", select the mangled packet mark for p2p, select the corresponding Interface, and then set a target Upload and Download.
RouterOS always amazes me when I click on a tab I haven't looked at before so I now understand your interest in simple queues.

It looks more or less like the bandwidth controls available within the AP section of ROS so I tried a simple queue on one leg of a point-to-multipont system that is in staging (yes, using R52 radios purchased from Janis).

Save the fact that I didn't have a source of p2p data and chose to use ICMP (pings) as test traffic, it seems to work and meet the objectives you have outlined.

That leaves the only potential stretch being whether ROS can decipher p2p traffic as well as pings, so good luck and thanks for teaching me something (use of simple queues).

However, others have written in this forum and elsewhere about the difficulty of controlling UDP traffic, so I suspect that is the true limitation on how effective any approach can be.

rgds/ldv
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Wed May 24, 2006 7:54 pm

It is neat to see how many options RouterOS has hidden away.

Just wish the options where explained better somewhere.
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Thu May 25, 2006 10:07 pm

Marking the p2p traffic and funneling ONLY THE P2P TRAFFIC through a PCQ should achieve your objective. Using said technique you can allocate say 15 Kbps for upload of p2p and say 290 Kbps for download of p2p; if there is one subscriber doing p2p, they will get all of that bandwidth; if there are two, the designated amount of bandwidth will be split equally; yada yada.

You should be able to funnel the rest of the data (!P2P) through your existing simple queues.
OK, lets forget simple queues for now. With P2P I can't decide which way is UP!

When a LAN side client is serving (uploding) files to the P2P network, would I use the src-address as the classifier in pcq file type...and then in the Queue Tree, create a queue using my LAN ethernet interface as the parent.

Will the following lines limit P2P upload to 15k for each client if “ether2” is my internal interface?

queue type add name=p2p-Up kind=pcq pcq-rate=15000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000

queue tree add name=p2p-up parent=ether2 packet-mark=p2p limit-at=0 queue=p2p-Up priority=3 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s


What I'm asking is; WHO is the source or destination in P2P traffic? The local client's PC is acting as a server so the connection is established by the P2P network.

I guess the “uploaded” packets will have the local client as the source.
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Thu May 25, 2006 10:38 pm

What I'm asking is; WHO is the source or destination in P2P traffic? The local client's PC is acting as a server so the connection is established by the P2P network.

I guess the “uploaded” packets will have the local client as the source.
The last thing I remember memorizing was the list of counties in the state in which I wanted to get out of the 7th grade, so I try to find something that indicates the normal order {a mnemonic if you will -- notice that everything is in reverse alphabetical order}:

upload/download
public/private
public/local
src/dst

Someone else can validate whether this actually works. There may be exceptions which , ,as a noob to ROS, I have yet to encounter.

rgds/ldv
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Thu May 25, 2006 10:45 pm

If I follow your logic then in parent=ether2...ether2 should be changed to reflect the Public/Internet/WAN interface. In this case ether1.

But the rest is correct?
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Fri May 26, 2006 12:15 am

If I follow your logic then in parent=ether2...ether2 should be changed to reflect the Public/Internet/WAN interface. In this case ether1.

But the rest is correct?
Again, this is opinion, not gospel; I'm trying to evade a binary answer to your question by giving examples that I think may be working as desired. OTOH, we could have things backwards enough times to flip the results and make it look like they are working `[8-))

To get into sync with the many examples in the manual, forum and wiki, one needs to name one's interfaces, e.g., Public and Local. In an AP, Public would typically be ether1 and Local would be wlan1. In a transparent bridge, Public might be ether1 and Local might be ether2.

To give an example constructed a few weeks ago before I learned the importance of using the aliased names:

5 name="pcq-download" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000

6 name="pcq-upload" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000

[vaden@EP-Ombudsman] > /queue tree print
Flags: X - disabled, I - invalid
0 name="Download" parent=ether2 packet-mark="" limit-at=0 queue=default priority=8 max-limit=4096000 burst-limit=0
burst-threshold=0 burst-time=0s

1 name="queue2" parent=Download packet-mark=all limit-at=0 queue=pcq-download priority=8 max-limit=4096000
burst-limit=0 burst-threshold=0 burst-time=0s

2 name="Upload" parent=ether1 packet-mark="" limit-at=0 queue=default priority=8 max-limit=512000 burst-limit=0
burst-threshold=0 burst-time=0s

3 name="queue4" parent=Upload packet-mark=all limit-at=0 queue=pcq-upload priority=8 max-limit=512000 burst-limit=0
burst-threshold=0 burst-time=0s

Warning: I could have this all backwards, but mrtg and NetViewer seem to both indicate we're getting the effect we were looking for.

Again, we stand on the shoulders of giants and attribution goes to those who wrote the manual, those who wrote in the forum and those who wrote and are writing the wiki.

Having such a strong user community is one of MikroTik's biggest advantages IMHO.

rgds/ldv
 
maxfava
Member Candidate
Member Candidate
Posts: 225
Joined: Mon Oct 17, 2005 12:30 am

Fri May 26, 2006 10:48 am

You have to use a scripting that insert simple queue specified for p2p when a customer log in.

I'm working on this. I will send update when I will goal it.

Ciao
Max
 
abc123
newbie
Posts: 34
Joined: Fri Mar 31, 2006 6:13 pm

Fri May 26, 2006 10:51 am

the only problem you will have with "speeds" like 15kbps is that shaper is not able to shape them correctly to such low numbers. If you limit some traffic/IP/subnet etc. to such low number, it will work but due to nature of p2p packets, you will never be able to shape p2p to 15kbps for one user or globally for all users. This is just ridiculous low number.

We have found out that p2p shaping starts working "exactly" somewhere around 512kbps. This is not problem of mikrotik, this should be simply nature of things and non-exactness of packets marking because not all p2p protocols are 100% identified and thus, they can't be 100% processed (shaped etc). Note that some protocols are drop only, you can't shape them at all.
 
SeaSteve
just joined
Posts: 14
Joined: Tue May 23, 2006 3:11 am
Location: Central Texas

Fri May 26, 2006 11:28 pm

Man "Idvaden", you are a BIG supporter of the MikroTik “community”

I'm poking fun at you but you're right. It's amazing what a dedicated community of people can do. And the software is no slouch either. As I said before, options at every new turn and what a great price.

Thank you for taking the time to help me and anyone else reading this post.

Who is online

Users browsing this forum: diasdm, mansuramir and 174 guests