Community discussions

MikroTik App
 
Beccara
Long time Member
Long time Member
Topic Author
Posts: 606
Joined: Fri Apr 08, 2005 3:13 am

Having trouble with P2P marking

Sun May 21, 2006 9:28 am

Hey all,

I'm tring to setup QOS on our edge router, right now i want to make all P2P the lowest priority(8) and evething else high(1), right now i'm trying to get all the p2p tracked.

I put these rules in place to mark p2p

[admin@Edge] > ip firewall mangle print all
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting connection-mark=p2p-con action=mark-packet new-packet-mark=p2p passthrough=no

1 chain=forward connection-mark=p2p-con action=mark-packet new-packet-mark=p2p passthrough=no

2 chain=prerouting p2p=all-p2p action=mark-connection new-connection-mark=p2p-con passthrough=no

3 chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p-con passthrough=no


However i notice that only ~1/4 of the traffic is getting marked, this is unencrypted as i have done tests myself. I have taken the router offline and killed all connections in the connection tracker but i cant get the router to mark all the p2p traffic

Any ideas guys?
 
Beccara
Long time Member
Long time Member
Topic Author
Posts: 606
Joined: Fri Apr 08, 2005 3:13 am

Sun May 21, 2006 10:50 am

Ok well i think i got it sorted as far as mangle goes

What i'm wanting to do is set it up so that p2p whores can run 24/7 but if the traffic is needed else where it goes there


say we have a 2mbit CIR pipe, P2P is using 2mbit and a user goes to a speed test site, i wasn the speed test to show 2mbit, so that p2p was just getting "dropped"


Anyideas how i can do this?
 
cibernet
Long time Member
Long time Member
Posts: 610
Joined: Fri Jan 28, 2005 7:22 pm
Location: Marcos Juárez, Córdoba, Argentina
Contact:

Mon May 22, 2006 2:26 am

Ok well i think i got it sorted as far as mangle goes

What i'm wanting to do is set it up so that p2p whores can run 24/7 but if the traffic is needed else where it goes there


say we have a 2mbit CIR pipe, P2P is using 2mbit and a user goes to a speed test site, i wasn the speed test to show 2mbit, so that p2p was just getting "dropped"


Anyideas how i can do this?
You can do QoS.. use mangle and create a queue tree
 
Beccara
Long time Member
Long time Member
Topic Author
Posts: 606
Joined: Fri Apr 08, 2005 3:13 am

Mon May 22, 2006 5:46 am

Tried that, Created a Queue tree like this

[admin@Edge] > queue tree print detail
Flags: X - disabled, I - invalid
0 name="Download-Queue" parent=Edge-Tower0 packet-mark="" limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0 burst-threshold=0
burst-time=0s

1 name="Upload-Queue" parent=OnBoard packet-mark="" limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

2 name="P2P-Download" parent=Download-Queue packet-mark=p2p limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

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

4 name="Other-Download" parent=Download-Queue packet-mark=other limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0 burst-threshold=0
burst-time=0s

5 name="Other-Upload" parent=Upload-Queue packet-mark=other limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s


But that didnt really work, so i tried adding in PCQ like this

5 name="Download" kind=pcq pcq-rate=0 pcq-limit=500 pcq-classifier=dst-address,dst-port pcq-total-limit=20000

6 name="Upload" kind=pcq pcq-rate=0 pcq-limit=500 pcq-classifier=src-address,src-port pcq-total-limit=20000


And reset it up

[admin@Edge] > queue tree print detail
Flags: X - disabled, I - invalid
0 name="Download-Queue" parent=Edge-Tower0 packet-mark="" limit-at=0 queue=Download priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

1 name="Upload-Queue" parent=OnBoard packet-mark="" limit-at=0 queue=Upload priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

2 name="P2P-Download" parent=Download-Queue packet-mark=p2p limit-at=0 queue=Download priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

3 name="P2P-Upload" parent=Upload-Queue packet-mark=p2p limit-at=0 queue=Upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

4 name="Other-Download" parent=Download-Queue packet-mark=other limit-at=0 queue=Download priority=1 max-limit=0 burst-limit=0 burst-threshold=0
burst-time=0s

5 name="Other-Upload" parent=Upload-Queue packet-mark=other limit-at=0 queue=Upload priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s


But i still see the same result, any ideas?
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Tue May 23, 2006 2:16 am

Tried that, Created a Queue tree like this
<snip>...</snip>
But i still see the same result, any ideas?
As a noob to ROS I'm not sure the following will be helpful, but it is submitted in the eventuality that it is helpful or that someone will make helpful comments about what is wrong with this approach. It certainly is far from being in final form.

First, the results of the code:
[vaden@Ombudsman] > /queue tree print bytes 
Flags: X - disabled, I - invalid 
 #   NAME                          PARENT       PACKET-MARK LIMIT-AT   BYTES               
 0   Download                      ether2                   0          110094650616        
 1   queue6                        Download     users       0          100509575670        
 2   Upload                        ether1                   0          25979021369         
 3   queue8                        Upload       users       0          14722801248         
 4   queue8P                       Upload       usersP      64000      11256220121         
 5   queue6P                       Download     usersP      0          9585074946
[vaden@Ombudsman] > /queue tree export
# may/22/2006 23:06:48 by RouterOS 2.9.x
# software id = <redacted>
#
/ queue tree 
add name="Download" parent=ether2 packet-mark="" limit-at=0 queue=default priority=8 \
    max-limit=6144000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no 
add name="queue6" parent=Download packet-mark=users limit-at=0 queue=pcq-download \
    priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no 
add 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 disabled=no 
add name="queue8" parent=Upload packet-mark=users limit-at=0 queue=pcq-upload priority=7 \
    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no 
add name="queue8P" parent=Upload packet-mark=usersP limit-at=64000 queue=pcq-upload \
    priority=8 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no 
add name="queue6P" parent=Download packet-mark=usersP limit-at=0 queue=pcq-download \
    priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no 
add name="queue8other" parent=Upload packet-mark="" limit-at=0 queue=pcq-upload priority=1 \
    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no 
[vaden@Ombudsman] >
Again, I hope this is helpful and apologize for the waste of resources if it is not.

rgds/ldv
 
Beccara
Long time Member
Long time Member
Topic Author
Posts: 606
Joined: Fri Apr 08, 2005 3:13 am

Tue May 23, 2006 3:08 am

And from this you see p2p speeds drop when all other traffic needs to the bandwidth?
 
ldvaden
Member Candidate
Member Candidate
Posts: 201
Joined: Sun Oct 30, 2005 8:27 pm
Location: North Texas

Tue May 23, 2006 4:04 am

And from this you see p2p speeds drop when all other traffic needs to the bandwidth?
Short answer: we think the answer is yes.

Longer answer:

First, an attribution: documents and employees of MikroTik and the user community of which this forum consists are the sources of how to do this.

The first two licenses we purchased from MikroTik were for an internal firewall (so everyone would have to become familiar with ROS) and for a transparent bridge to be used between Cisco routers and Cisco access points to achieve "share and share alike" wrt bandwidth. Since those initial purchases, we've grown to using MikroTik RBs and ROS almost exclusively.

If you look at the numbers above and couple that with our observations that prior to implementation of Ombudsman (still alpha) a single uploader running p2p softwares could substantially reduce our abilities to service other customers' requests for downloads and/or interactive sessions, we think the answer is yes.

Notice the alpha host name is Ombudsman - an indication that we're trying to establish what we call "share and share alike" and which the MikroTik documentation refers to as " share available traffic among users equally, or depending on the load of the channel."

It works better if the CPE participates in QOS, but when that is not possible, we feel MikroTik can most remarkably improve the customers' experiences.

rgds/ldv

Who is online

Users browsing this forum: Ahrefs [Bot], alibloke, Bing [Bot], chechito, Cvatter, leviself56, Pinacolada88 and 52 guests