Community discussions

MikroTik App
 
nabuk
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2004 1:45 pm
Location: Italy

Pppoe PCQ help for eoip and tunnel interfaces

Tue Nov 24, 2009 7:12 pm

Hi all,
we have a router with 3 ethernet interface, eth1, eth2, eth3.
Eth1 is the public interface connected on internet
eth2 and eth3 have some internet traffic of customer with public ip and other router.
Ther're also a lot of eoip tunnel and vpls tunnel over that we do pppoe-server. So we have a lot of dynamic pppoe interfaces.

We want to enable PCQ shaping, but i've some problem with queue tree/mangle.

I attach queue tree for upload traffic to eth1 and download traffic to global-out (because i've dynamic pppoe interface)

I do connection and packet marking in the forward chain, like this:
chain=forward action=mark-connection new-connection-mark=conn_1 passthrough=yes src-address-list=Consumer
chain=forward action=mark-packet new-packet-mark=packet_1_DOWNLOAD passthrough=no in-interface=eth1 connection-mark=conn_1
chain=forward action=mark-packet new-packet-mark=packet_1_UPLOAD passthrough=no out-interface=eth1 connection-mark=conn_1
It's the right way ? Or i'm wrong in some place ?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Pppoe PCQ help for eoip and tunnel interfaces

Tue Nov 24, 2009 11:46 pm

yes, 'forward' is enough for 'global-out'. by the way, you can use 'global-out' also for upload - just use different routing-marks (as you do)
 
nabuk
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2004 1:45 pm
Location: Italy

Re: Pppoe PCQ help for eoip and tunnel interfaces

Wed Nov 25, 2009 10:13 am

Chupaka,
du you suggest to use in queue tree:

for upload.......Parent=global-out packet-mark=packet_1_UPLOAD

for download......Parent=global-out packet-mark=packet_1_DOWNLOAD

it's right ? in the mangle i do only a connection marking is it right or i need two rule also for this ?

Another question,
if i want to use some queue tree together with the pppoe dynamic simple queue, i want use connection-rete to limit some download, but if i use it, pppoe are speed limited only versus the pppoe server, not over internet. I think that queue tree with mangle will by-pass simple queue. Ther's a way to use it ?


Thanks
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Pppoe PCQ help for eoip and tunnel interfaces

Wed Nov 25, 2009 1:47 pm

yes, 'connection' is bi-directional, so you mark it only once

and as a rule, if you have simple queues, they have precedence over queue tree
 
nabuk
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2004 1:45 pm
Location: Italy

Re: Pppoe PCQ help for eoip and tunnel interfaces

Fri Dec 18, 2009 11:19 am

Tried this configuration but i've a strange thing.For example a customer from address list "internet_1500_384_196" shoud have a download speed of 1,5Mbit but it can go at only 100-200kbit. If i disable queue tree the download is fine.

I can't fine the error, any idea ?

Here is an export


/ip firewall mangle
add action=change-mss chain=forward comment="" disabled=no new-mss=1440 protocol=tcp tcp-flags=syn tcp-mss=1441-65535
add action=mark-connection chain=forward comment="internet privati 4 mega" disabled=no new-connection-mark=conn_4096_384_196 passthrough=yes src-address-list=internet_4096_384_196
add action=mark-packet chain=forward comment=upload connection-mark=conn_4096_384_196 disabled=no new-packet-mark=upload_4096_384_196 out-interface=vlan140_BGP-peer1 passthrough=no
add action=mark-packet chain=forward comment=download connection-mark=conn_4096_384_196 disabled=no in-interface=vlan140_BGP-peer1 new-packet-mark=down_4096_384_196 passthrough=no
add action=mark-connection chain=forward comment="internet privati 1,5 mega" disabled=no new-connection-mark=conn_1500_384_196 passthrough=yes src-address-list=internet_1500_384_196
add action=mark-packet chain=forward comment=upload connection-mark=conn_1500_384_196 disabled=no new-packet-mark=upload_1500_384_196 passthrough=no src-address-list=\
    internet_1500_384_196
add action=mark-packet chain=forward comment=download connection-mark=conn_1500_384_196 disabled=no dst-address-list=internet_1500_384_196 new-packet-mark=down_1500_384_196 passthrough=\
    no
add action=mark-connection chain=forward comment="internet privati 640" disabled=no new-connection-mark=conn_640_256_96 passthrough=yes src-address-list=internet_640_256_96
add action=mark-packet chain=forward comment=upload connection-mark=conn_640_256_96 disabled=no new-packet-mark=upload_640_256_96 out-interface=vlan140_BGP-peer1 passthrough=no
add action=mark-packet chain=forward comment=download connection-mark=conn_640_256_96 disabled=no in-interface=vlan140_BGP-peer1 new-packet-mark=down_640_256_96 passthrough=no
add action=mark-connection chain=forward comment="internet privati 320" disabled=no new-connection-mark=conn_320_256_96 passthrough=yes src-address-list=internet_320_256_96
add action=mark-packet chain=forward comment=upload connection-mark=conn_320_256_96 disabled=no new-packet-mark=upload_320_256_96 out-interface=vlan140_BGP-peer1 passthrough=no
add action=mark-packet chain=forward comment=download connection-mark=conn_320_256_96 disabled=no in-interface=vlan140_BGP-peer1 new-packet-mark=down_320_256_96 passthrough=no
add action=mark-connection chain=forward comment="internet privati 2 mega" disabled=no new-connection-mark=conn_2048_256_96 passthrough=yes src-address-list=internet_2048_256_96
add action=mark-packet chain=forward comment=upload connection-mark=conn_2048_256_96 disabled=no new-packet-mark=upload_2048_256_96 out-interface=vlan140_BGP-peer1 passthrough=no
add action=mark-packet chain=forward comment=download connection-mark=conn_2048_256_96 disabled=no in-interface=vlan140_BGP-peer1 new-packet-mark=down_2048_256_96 passthrough=no
add action=mark-connection chain=forward comment="internet business 2 mega" disabled=no new-connection-mark=conn_2048_512_256 passthrough=yes src-address-list=internet_2048_512_256
add action=mark-packet chain=forward comment=upload connection-mark=conn_2048_512_256 disabled=no new-packet-mark=upload_2048_512_256 out-interface=vlan140_BGP-peer1 passthrough=no
add action=mark-packet chain=forward comment=download connection-mark=conn_2048_512_256 disabled=no in-interface=vlan140_BGP-peer1 new-packet-mark=down_2048_512_256 passthrough=no
add action=mark-connection chain=forward comment="internet business 4 mega base" disabled=no new-connection-mark=conn_4096_512_256 passthrough=yes src-address-list=internet_4096_512_256
add action=mark-packet chain=forward comment=upload connection-mark=conn_4096_512_256 disabled=no new-packet-mark=upload_4096_512_256 out-interface=vlan140_BGP-peer1 passthrough=no
add action=mark-packet chain=forward comment="" disabled=no in-interface=vlan140_BGP-peer1 new-packet-mark=down_4096_512_256 passthrough=no


/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=80M name=Upload_globale parent=vlan140_BGP-peer1 priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=80M name=Download_globale parent=global-out priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name=Download_privati parent=Download_globale priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=Upload_privati parent=Upload_globale priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name="Download internet privati 320k" packet-mark=down_320_256_96 parent=Download_privati priority=8 \
    queue=pcq-down-privati-320k
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name="Upload internet privati 320k" packet-mark=upload_320_256_96 parent=Upload_privati priority=8 \
    queue=pcq-upload-privati-320k
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name="Download internet privati 2 mega" packet-mark=down_2048_256_96 parent=Download_privati \
    priority=8 queue=pcq-down-privati-2mega
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name="Upload internet privati 2 mega" packet-mark=upload_2048_256_96 parent=Upload_privati priority=8 \
    queue=pcq-upload-privati-2mega
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name="Download internet privati 4 mega" packet-mark=down_4096_384_196 parent=Download_privati \
    priority=8 queue=pcq-down-privati-4mega
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name="Download internet privati 1,5 mega" packet-mark=down_1500_384_196 parent=Download_privati \
    priority=8 queue=pcq-down-privati-1.5mega
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name="Upload internet privati 4 mega" packet-mark=upload_4096_384_196 parent=Upload_privati priority=\
    8 queue=pcq-upload-privati-4mega
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name="Upload internet privati 1,5 mega" packet-mark=upload_1500_384_196 parent=Upload_privati \
    priority=8 queue=pcq-upload-privati-1.5mega
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 max-limit=0 name="Download internet privati 640k" packet-mark=down_640_256_96 parent=Download_privati priority=8 \
    queue=pcq-down-privati-640k
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name="Upload internet privati 640k" packet-mark=upload_640_256_96 parent=Upload_privati priority=8 \
    queue=pcq-upload-privati-640k

/queue type
set default kind=pfifo name=default pfifo-limit=50
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=5
add kind=pcq name=pcq-down-privati-4mega pcq-classifier=dst-address pcq-limit=40 pcq-rate=4000000 pcq-total-limit=12000
add kind=pcq name=pcq-upload-privati-4mega pcq-classifier=src-address pcq-limit=40 pcq-rate=384000 pcq-total-limit=12000
add kind=pcq name=pcq-down-privati-1.5mega pcq-classifier=dst-address pcq-limit=40 pcq-rate=1500000 pcq-total-limit=13000
add kind=pcq name=pcq-upload-privati-1.5mega pcq-classifier=src-address pcq-limit=40 pcq-rate=384000 pcq-total-limit=13000
add kind=pcq name=pcq-down-privati-640k pcq-classifier=dst-address pcq-limit=40 pcq-rate=640000 pcq-total-limit=12000
add kind=pcq name=pcq-upload-privati-640k pcq-classifier=src-address pcq-limit=40 pcq-rate=256000 pcq-total-limit=12000
add kind=pcq name=pcq-down-privati-320k pcq-classifier=dst-address pcq-limit=40 pcq-rate=320000 pcq-total-limit=4000
add kind=pcq name=pcq-upload-privati-320k pcq-classifier=src-address pcq-limit=40 pcq-rate=256000 pcq-total-limit=4000
add kind=pcq name=pcq-down-privati-2mega pcq-classifier=dst-address pcq-limit=40 pcq-rate=2000000 pcq-total-limit=4000
add kind=pcq name=pcq-upload-privati-2mega pcq-classifier=src-address pcq-limit=40 pcq-rate=256000 pcq-total-limit=4000
set default-small kind=pfifo name=default-small pfifo-limit=10



 
nabuk
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2004 1:45 pm
Location: Italy

Re: Pppoe PCQ help for eoip and tunnel interfaces

Mon Dec 28, 2009 9:39 am

no one can help ?

Who is online

Users browsing this forum: ariooooooooo, Bing [Bot], dazzaling69, erlinden, grayfoxbsd, Question, tarfox and 139 guests