Community discussions

MikroTik App
 
mp3turbo2
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Jun 02, 2004 9:15 am

limiting upload of peer-to-peer appz

Thu May 12, 2005 1:13 pm

hello folks,

I am able to limit download and upload for p2p with this:

/ip firewall mangle
0 p2p=all-p2p action=passthrough mark-flow=p2p mark-connection=p2p

/queue type
0 X name="p2p-download-limit" parent=global-in flow=p2p limit-at=0 queue=default priority=1 max-limit=16000000
burst-limit=0 burst-threshold=0 burst-time=0

1 X name="p2p-upload-limit" parent=global-out flow=p2p limit-at=0 queue=default priority=1 max-limit=4000000 burst-limit=0
burst-threshold=0 burst-time=0


but what happens is

a) shaping upload speed seems to affect download speed also (ie. when not limited to 4Mbps, download can be 30Mbps, when limiting upload to 4Mbps, download can only be 7-9Mbps or so. I don't know why).

b) when limiting any of download/upload, seems like users are getting EQUAL chunks of speed, something like PCQ kicks in. I have nothing defined in /queue type except defaults. Ie. when I limit download speed to 10Mbps, users can download 6kB/s PER ONE downloading THREAD, so if they download 50 files at once with DC++, they can get 300kB/s, when they download 10 files at once, they get 60kB/s. I can't understand this, it behaves like some PCQ or so. If there is no limit on download, user can download at whatever speed is the other side able to supply (20Mbps makes no problem).


I'm lost, this is definitely my problem, my knowledge lacks. Is anyone able to provide simple configuration that is going to limit p2p UPLOAD speed ONLY?


I don't want to limit download any way, just upload scares me. Reason : on my line I have 30Mbps full-duplex, I can download and upload 30Mbps at once on ethernet in providers room, but radios are not capable of delivering 60Mbps total, so when my people 'feed' internet with data (30Mbps constant, fast line is fast line), they are efficiently LIMITING us in download. And you know what is more important to people, do you? So I would like to see 30Mbps down, 10Mbps up or so. I want to limit P2P upload traffic ONLY, I don't want to limit ALL uploads.

thnx, mp3turbo.
 
User avatar
Hugh Hartman
Frequent Visitor
Frequent Visitor
Posts: 92
Joined: Fri May 28, 2004 2:01 pm
Location: Fort Kent, Maine

Thu May 12, 2005 1:47 pm

I don't have an answer, at this point we limit the upload of all traffic, using the brusting feature, on problem people who leave the P2P application on and max out u/l for extended periods.
 
mp3turbo2
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Jun 02, 2004 9:15 am

Sun May 15, 2005 1:30 pm

bump - nobody?
 
tschaboo
just joined
Posts: 1
Joined: Sat May 14, 2005 8:19 am
Location: Austria

Re: limiting upload of peer-to-peer appz

Mon May 16, 2005 12:36 am

a) shaping upload speed seems to affect download speed also (ie. when not limited to 4Mbps, download can be 30Mbps, when limiting upload to 4Mbps, download can only be 7-9Mbps or so. I don't know why).
Maybe it's not even the fault of the traffic-shaping on Your side but just because the DC-Client on the other side has an upload/download-ratio configured?

Some other P2P-protocols like BitTorrent try to keep the upload in relation to the download from the same connection by default. There You almost always have a download-speed of 0,5 - 1,5 times the upload-speed.

It would be easy to figure out: If You increase or decrease Your upload-allowance and the download goes up or down with the same factor, than it's because of ratios on the other side.
 
User avatar
[ASM]
Member Candidate
Member Candidate
Posts: 284
Joined: Sun Jun 06, 2004 12:59 am
Location: Sofia, Bulgaria
Contact:

Mon May 16, 2005 11:52 am

EDIT: Wrong... must read carefull....

I think that this happens because the whole connection is marked as p2p and shapers drop tcp ack packets
 
mp3turbo2
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Jun 02, 2004 9:15 am

Mon May 16, 2005 4:01 pm

tschaboo, good point but my situation is not dealing with ratio problem. I was trying to cope with it, but I was not able - I spent almost a week with simple issue and I was trying sooooo much different configurations. I can't understand it, when I do traffic shaping, it works everytime perfectly.

Just P2p is breaking my knees - there seems to be "like PCQ" behaviour. I just can't understand why.

And seems like nobody has answer for it, so this is probably not easy.

thnx, mp3turbo.
 
gianluca
Member Candidate
Member Candidate
Posts: 258
Joined: Sun Aug 08, 2004 11:00 pm
Location: Italy - Spain - USA

Tue May 17, 2005 12:10 am

Actually we are seeing the same behaviour.

I shape it with:

21 ;;; P2P
p2p=all-p2p action=passthrough mark-connection=p2p

22 in-interface=COG_GW connection=p2p action=accept
mark-flow=p2p-down

23 connection=p2p action=accept mark-flow=p2p-up

24 p2p=all-p2p action=accept

in 21 we mark all p2p, in 22 we see the incoming connections and 23 the outgoing. Actually it is limiting perfectly the upload and the download.

but the only customers that are actually reaching the limits are users with a lot of files in the download list (normally emule, ed2k, bitorrent...). We are seeing as well that the max speed of a single connection dont have more then 6 or 7 KB/s.

this is a problem for us, since a single file takes a lot of time to be downloaded.

I dont understand the reason. maybe mikrotik can give us a hand since we are quite a lot with the same problem.

Gianluca
 
GJS
Member
Member
Posts: 418
Joined: Sat May 29, 2004 4:07 pm
Location: London

Tue May 17, 2005 12:35 am

I'm not sure if this is helpful.

I have first made a connection mark on the P2P traffic and then flow marked packets with the connection mark, then set the queue up based on the flow mark. To this day, I have not been able to find out why this should be neccessary and what exactly is the difference between a connection mark and a flow mark :?

Also, note that MT can only detect search traffic for warez based protocols, not the file transfers. Therefore, warez can only be blocked (by dropping search packets), it cannot be throttled.

'Hope that helps in some way.
 
gianluca
Member Candidate
Member Candidate
Posts: 258
Joined: Sun Aug 08, 2004 11:00 pm
Location: Italy - Spain - USA

Tue May 17, 2005 10:02 am

GJS

thanks for your help. I cannot see the reason you do it in this way, but do you have the same problem then us with max 6KB/s per connection limit ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26914
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Thu May 19, 2005 9:24 am

so you asky why download is also limited? but this is a special feature of most P2P apps - they automatically slow you down if you don't allow uploads.
 
mp3turbo2
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Jun 02, 2004 9:15 am

Wed May 25, 2005 11:35 pm

bump - nobody solved asymetric download / upload issue? hmmmm

this definitely is not issue of download/upload ratio - I don't believe that the whole world has it set to 1:1. Also, I can't sleep because of that "pcq kinda" behaviour. I'm just stupid to configure it and I admit it - I don't have time to play with this for week. Also, I definitely know this is not problem of your software - it is one very fine capable system.

Seems like nobody wants to share his knowledge... and it is just three lines of code. Oh dear.
 
gianluca
Member Candidate
Member Candidate
Posts: 258
Joined: Sun Aug 08, 2004 11:00 pm
Location: Italy - Spain - USA

Thu May 26, 2005 12:43 am

this "pcq kinda" behaviour that we are also suffering since we started with mikrotik is not explainable.

I just hope that we are not the only ones, maybe it is a mangle trick we didnt know.

IS THERE SOMEONE ELSE WITH SAME BEHAVIOUR ???
 
mp3turbo2
Member Candidate
Member Candidate
Topic Author
Posts: 196
Joined: Wed Jun 02, 2004 9:15 am

Thu May 26, 2005 12:04 pm

yeah, I tried to follow how-to (there is something on limiting upload of p2p), didn't work for me.

I read manual and tried hard to do it - didn't work for me.

I spent almost three days just with this and I can't devote more time to it. Seems like I'm going to mangle and limit ports 411, 412 uploads (dc++) as they are the most used ports for upload here, but this is not solution I'd like. Once again, I don't think there is something wrong with the software, I just don't have the proper knowledge, patience and time to mess around with it.

thnx for hearing me out.
 
gianluca
Member Candidate
Member Candidate
Posts: 258
Joined: Sun Aug 08, 2004 11:00 pm
Location: Italy - Spain - USA

Fri May 27, 2005 1:37 am

I havent found the right scheme mangle+queue-tree+queue-type to control p2p. if anybody can publish its working one ?
 
noir
newbie
Posts: 31
Joined: Wed Dec 15, 2004 8:43 am
Location: South Africa

Fri May 27, 2005 9:55 am

I had the same problem 2, routeros 2.8 is unabble to mark individual p2p connections, they all run in a single pipe. I hope that 2.9 will fix this problem
 
gianluca
Member Candidate
Member Candidate
Posts: 258
Joined: Sun Aug 08, 2004 11:00 pm
Location: Italy - Spain - USA

Fri May 27, 2005 9:57 am

Noir, how do you have the p2p configuration on your router?

Who is online

Users browsing this forum: sid5632, tangent, VProk and 64 guests