Elektroda.pl
Elektroda.pl
X
Please add exception to AdBlock for elektroda.pl.
If you watch the ads, you support portal and users.

Mikrotik - Podział łącza + priorytetyzacja ruchu

cyco22 03 Sep 2014 12:01 2718 0
  • #1
    cyco22
    Level 9  
    Witam, mam następujący problem:
    Chciałbym na mikrotiku podzielić ruch według priorytetów i ograniczyć pasmo dla użytkowników. Zrobiłem sobie przycięcie pasma per user oraz priorytetyzację ruchu. Problem polega na tym, że kiedy mam włączone przycięcie dla użytkownika, to ruch nie idzie w żadem priorytet. Owszem jest on ograniczany przez kolejkę limitu pasma ale w priorytetach się nie pokazuje. Jedyna sytuacja w jakiej ruch zaczyna wędrować do priorytetów to wyłączenie markowania dla danych adresów IP. Tutaj pojawia się moje pytanie co zrobiłem źle że to tak działa, albo może raczej nie do końca działa.

    Poniżej dodaje konfiga.

    Adress list
    Quote:
    0 8192/256 192.168.1.13
    1 full 192.168.1.3
    2 full 192.168.1.15
    3 full 192.168.1.6
    4 full 192.168.1.36
    5 full 192.168.1.21
    6 full 192.168.1.54
    7 full 192.168.1.35
    8 8192/256 192.168.1.14
    9 4096/256 192.168.1.19
    10 14240/640 192.168.1.30
    11 14240/640 192.168.1.46
    12 14240/640 192.168.1.5
    13 14240/640 192.168.1.32
    14 14240/640 192.168.1.50
    15 14240/640 192.168.1.31
    16 14240/640 192.168.1.8
    17 14240/640 192.168.1.11
    18 14240/640 192.168.1.41
    19 14240/640 192.168.1.9
    20 14240/640 192.168.1.52
    21 8192/256 192.168.1.16
    22 8192/256 192.168.1.12
    23 full 192.168.1.2
    24 14240/640 192.168.1.4
    25 14240/640 192.168.1.10
    26 full 192.168.1.20
    27 full 192.168.1.222
    28 full 192.168.1.241
    29 full 192.168.1.242


    Mark
    Quote:
    0 ;;; full_net
    chain=forward action=mark-connection new-connection-mark=full_net
    passthrough=yes src-address-list=full

    1 chain=forward action=mark-connection new-connection-mark=full_net
    passthrough=yes dst-address-list=full

    2 chain=forward action=mark-packet new-packet-mark=full_net_download
    passthrough=no in-interface=WAN connection-mark=full_net

    3 chain=forward action=mark-packet new-packet-mark=full_net_upload
    passthrough=no connection-mark=full_net

    4 ;;; 4096/256_net
    chain=forward action=mark-connection new-connection-mark=4096/256_net
    passthrough=yes src-address-list=4096/256

    5 chain=forward action=mark-connection new-connection-mark=4096/256_net
    passthrough=yes dst-address-list=4096/256

    6 chain=forward action=mark-packet new-packet-mark=4096/256_down
    passthrough=no in-interface=WAN connection-mark=4096/256_net

    7 chain=forward action=mark-packet new-packet-mark=4096/256_up passthrough=no
    connection-mark=4096/256_net

    8 ;;; 8192/256_net
    chain=forward action=mark-connection new-connection-mark=8192/256_net
    passthrough=yes src-address-list=8192/256

    9 chain=forward action=mark-connection new-connection-mark=8192/256_net
    passthrough=yes dst-address-list=8192/256

    10 chain=forward action=mark-packet new-packet-mark=8192/256_down
    passthrough=no in-interface=WAN connection-mark=8192/256_net

    11 chain=forward action=mark-packet new-packet-mark=8192/256_up passthrough=no
    connection-mark=8192/256_net

    12 ;;; 14240/640_net
    chain=forward action=mark-connection new-connection-mark=14240/640_net
    passthrough=yes src-address-list=14240/640

    13 chain=forward action=mark-connection new-connection-mark=14240/640_net
    passthrough=yes dst-address-list=14240/640

    14 chain=forward action=mark-packet new-packet-mark=14240/640_down
    passthrough=no in-interface=WAN connection-mark=14240/640_net

    15 chain=forward action=mark-packet new-packet-mark=14240/640_up passthrough=n>
    connection-mark=14240/640_net

    16 ;;; Uslugi Prio
    chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes protocol=icmp

    17 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes protocol=udp port=53

    18 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes protocol=tcp port=22,53,8291,3389,27001-27100,2211

    19 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes layer7-protocol=battlefield2

    20 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes layer7-protocol=cssource

    21 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes layer7-protocol=quake-halflife

    22 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes layer7-protocol=sip

    23 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes layer7-protocol=teamspeak

    24 chain=prerouting action=mark-connection new-connection-mark=prio
    passthrough=yes layer7-protocol=ventrilo

    25 chain=prerouting action=mark-packet new-packet-mark=prio_down passthrough=n>
    in-interface=WAN connection-mark=prio

    26 chain=prerouting action=mark-packet new-packet-mark=prio_up passthrough=no
    connection-mark=prio

    27 X ;;; Skype
    chain=prerouting action=mark-connection new-connection-mark=skype
    passthrough=yes layer7-protocol=skypeout

    28 chain=prerouting action=mark-connection new-connection-mark=skype
    passthrough=yes layer7-protocol=skypetoskype

    29 chain=prerouting action=mark-packet new-packet-mark=skype_down
    passthrough=no in-interface=WAN connection-mark=skype

    30 chain=prerouting action=mark-packet new-packet-mark=skype_up passthrough=no
    connection-mark=skype

    31 ;;; poczta
    chain=prerouting action=mark-connection new-connection-mark=poczta
    passthrough=yes protocol=tcp port=25,110,143,993,995,587,465

    32 chain=prerouting action=mark-packet new-packet-mark=poczta_down
    passthrough=no in-interface=WAN connection-mark=poczta

    33 chain=prerouting action=mark-packet new-packet-mark=poczta_up passthrough=n>
    connection-mark=poczta

    34 ;;; WWW
    chain=prerouting action=mark-connection new-connection-mark=www
    passthrough=yes protocol=tcp port=80,443,8080,20,21

    35 chain=prerouting action=mark-packet new-packet-mark=www_down passthrough=no
    in-interface=WAN connection-mark=www

    36 chain=prerouting action=mark-packet new-packet-mark=www_up passthrough=no
    connection-mark=www

    37 ;;; youtube
    chain=prerouting action=mark-connection new-connection-mark=youtube
    passthrough=yes layer7-protocol=youtube_l7

    38 chain=prerouting action=mark-packet new-packet-mark=youtube_down
    passthrough=no in-interface=WAN connection-mark=youtube

    39 chain=prerouting action=mark-packet new-packet-mark=youtube_up
    passthrough=no connection-mark=youtube

    40 ;;; reszta_ruchu
    chain=prerouting action=mark-connection new-connection-mark=reszta_ruchu
    passthrough=yes

    41 chain=prerouting action=mark-packet new-packet-mark=reszta_ruchu_down
    passthrough=no in-interface=WAN connection-mark=reszta_ruchu



    42 chain=prerouting action=mark-packet new-packet-mark=reszta_ruchu_up
    passthrough=no connection-mark=reszta_ruchu


    Typy kolejek
    Quote:
    0 * name="default" kind=pfifo pfifo-limit=50

    1 * name="ethernet-default" kind=pfifo pfifo-limit=50

    2 * name="wireless-default" kind=sfq sfq-perturb=5 sfq-allot=1514

    3 * name="synchronous-default" kind=red red-limit=60 red-min-threshold=10
    red-max-threshold=50 red-burst=20 red-avg-packet=1000

    4 * name="hotspot-default" kind=sfq sfq-perturb=5 sfq-allot=1514

    5 name="4M_download" kind=pcq pcq-rate=4M pcq-limit=50
    pcq-classifier=dst-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    6 name="256K_upload" kind=pcq pcq-rate=256k pcq-limit=50
    pcq-classifier=src-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    7 name="sfq" kind=sfq sfq-perturb=5 sfq-allot=1514

    8 name="8M_download" kind=pcq pcq-rate=8M pcq-limit=50
    pcq-classifier=dst-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    9 name="14M_download" kind=pcq pcq-rate=14M pcq-limit=50
    pcq-classifier=dst-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    10 name="640K_upload" kind=pcq pcq-rate=640k pcq-limit=50
    pcq-classifier=src-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    11 name="portS" kind=pcq pcq-rate=0 pcq-limit=35 pcq-classifier=src-port
    pcq-total-limit=20480 pcq-burst-rate=0 pcq-burst-threshold=0
    pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32
    pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    12 name="portD" kind=pcq pcq-rate=0 pcq-limit=35 pcq-classifier=dst-port
    pcq-total-limit=1536 pcq-burst-rate=0 pcq-burst-threshold=0
    pcq-burst-time=10s pcq-src-address-mask=32 pcq-dst-address-mask=32
    pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    13 name="full_download" kind=pcq pcq-rate=20M pcq-limit=50
    pcq-classifier=dst-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    14 name="full_upload" kind=pcq pcq-rate=1740k pcq-limit=50
    pcq-classifier=src-address pcq-total-limit=7000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=64 pcq-dst-address6-mask=64

    15 name="SFQ2" kind=sfq sfq-perturb=5 sfq-allot=1514

    16 * name="pcq-upload-default" kind=pcq pcq-rate=0 pcq-limit=50
    pcq-classifier=src-address pcq-total-limit=2000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=128
    pcq-dst-address6-mask=128

    17 * name="pcq-download-default" kind=pcq pcq-rate=0 pcq-limit=50
    pcq-classifier=dst-address pcq-total-limit=2000 pcq-burst-rate=0
    pcq-burst-threshold=0 pcq-burst-time=10s pcq-src-address-mask=32
    pcq-dst-address-mask=32 pcq-src-address6-mask=128
    pcq-dst-address6-mask=128

    18 * name="only-hardware-queue" kind=none

    19 * name="multi-queue-ethernet-default" kind=mq-pfifo mq-pfifo-limit=50

    20 * name="default-small" kind=pfifo pfifo-limit=10


    Drzewko
    Quote:
    0 name="DOWNLOAD" parent=global packet-mark="" limit-at=0 queue=sfq priority=>
    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

    1 name="4M_down" parent=DOWNLOAD packet-mark=4096/256_down limit-at=0
    queue=4M_download priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    2 name="8M_down" parent=DOWNLOAD packet-mark=8192/256_down limit-at=0
    queue=8M_download priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    3 name="14M_down" parent=DOWNLOAD packet-mark=14240/640_down limit-at=0
    queue=14M_download priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    4 name="UPLOAD" parent=global packet-mark="" limit-at=0 queue=sfq priority=8
    max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

    5 name="4096/256_upl" parent=UPLOAD packet-mark=4096/256_up limit-at=0
    queue=256K_upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    6 name="8192/256_upl" parent=UPLOAD packet-mark=8192/256_up limit-at=0
    queue=256K_upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    7 name="640k_up" parent=UPLOAD packet-mark=14240/640_up limit-at=0
    queue=640K_upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    8 name="full_down" parent=DOWNLOAD packet-mark=full_net_download limit-at=0
    queue=full_download priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    9 name="full_up" parent=UPLOAD packet-mark=full_net_upload limit-at=0
    queue=full_upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0
    burst-time=0s

    10 name="USLUGI_DOWNLOAD" parent=global packet-mark="" limit-at=0 queue=sfq
    priority=8 max-limit=20M burst-limit=0 burst-threshold=0 burst-time=0s

    11 name="USLUGI_UPLOAD" parent=global packet-mark="" limit-at=0 queue=sfq
    priority=8 max-limit=1534k burst-limit=0 burst-threshold=0 burst-time=0s

    12 name="prio_down" parent=USLUGI_DOWNLOAD packet-mark=prio_down limit-at=12M
    queue=portS priority=1 max-limit=20M burst-limit=0 burst-threshold=0
    burst-time=0s

    13 name="skype_down" parent=USLUGI_DOWNLOAD packet-mark=skype_down limit-at=10>
    queue=portS priority=2 max-limit=20M burst-limit=0 burst-threshold=0
    burst-time=0s

    14 name="poczta_down" parent=USLUGI_DOWNLOAD packet-mark=poczta_down
    limit-at=8M queue=portS priority=3 max-limit=20M burst-limit=0
    burst-threshold=0 burst-time=0s

    15 name="www_down" parent=USLUGI_DOWNLOAD packet-mark=www_down limit-at=8M
    queue=portS priority=4 max-limit=20M burst-limit=0 burst-threshold=0
    burst-time=0s

    16 X name="youtube_down" parent=USLUGI_DOWNLOAD packet-mark=youtube_down
    limit-at=4M queue=portS priority=5 max-limit=20M burst-limit=0
    burst-threshold=0 burst-time=0s

    17 name="reszta_ruchu_down" parent=USLUGI_DOWNLOAD
    packet-mark=reszta_ruchu_down limit-at=1M queue=portS priority=8
    max-limit=20M burst-limit=0 burst-threshold=0 burst-time=0s

    18 name="prio_up" parent=USLUGI_UPLOAD packet-mark=prio_up limit-at=1331k
    queue=portD priority=1 max-limit=1534k burst-limit=0 burst-threshold=0
    burst-time=0s

    19 name="skype_up" parent=USLUGI_UPLOAD packet-mark=skype_up limit-at=894k
    queue=portD priority=2 max-limit=1534k burst-limit=0 burst-threshold=0
    burst-time=0s

    20 name="poczta_up" parent=USLUGI_UPLOAD packet-mark=poczta_up limit-at=512k
    queue=portD priority=3 max-limit=1534k burst-limit=0 burst-threshold=0
    burst-time=0s

    21 name="www_up" parent=USLUGI_UPLOAD packet-mark=www_up limit-at=512k
    queue=portD priority=4 max-limit=1534k burst-limit=0 burst-threshold=0
    burst-time=0s

    22 X name="youtube_up" parent=USLUGI_UPLOAD packet-mark=youtube_up limit-at=384k
    queue=portD priority=5 max-limit=1M burst-limit=0 burst-threshold=0
    burst-time=0s

    23 name="reszta_ruchu_up" parent=USLUGI_UPLOAD packet-mark=reszta_ruchu_up
    limit-at=128k queue=portD priority=8 max-limit=1280k burst-limit=0
    burst-threshold=0 burst-time=0s