QoS dengan PCQ dan Queue Tree

konfigurasi queue type

perhatian nama interface dan ip address sesuai dengan nama interface dan network address yang ditentukan sesusai denga topologi

/queue type add name=PCQ-UPLOAD kind=pcq pcq-classifier=src-address pcq-rate=0
/queue type add name=PCQ-DOWNLOAD kind=pcq pcq-classifier=dst-address pcq-rate=0

marking packet terlimit
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.exe \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.mp3 \

action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.mp4 \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.rar \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.dat \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.zip \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.flv \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=LAN content=.deb \
action=mark-connection new-connection-mark=limited-siswa_CONN passthrough=yes

/ip firewall mangle add chain=prerouting in-interface=LAN connection-mark=limited-siswa_CONN \
action=mark-packet new-packet-mark=limited-siswa_UPLOAD passthrough=no
/ip firewall mangle add chain=prerouting in-interface=WAN connection-mark=limited-siswa_CONN \
action=mark-packet new-packet-mark=limited-siswa_DOWNLOAD passthrough=no

marking packet browsing dan upload biasa
/ip firewall mangle add chain=prerouting src-address=xx.xx.xx.xx/xx in-interface=to-siswa \
action=mark-connection new-connection-mark=all-siswa_CONN passthrough=yes

/ip firewall mangle add chain=prerouting in-interface=LAN connection-mark=all-siswa_CONN \
action=mark-packet new-packet-mark=all-siswa_UPLOAD passthrough=no
/ip firewall mangle add chain=prerouting in-interface=WAN connection-mark=all-siswa_CONN \
action=mark-packet new-packet-mark=all-siswa_DOWNLOAD passthrough=no


queue tree parent

/queue tree add name=all-siswa-DOWNLOAD parent=LAN max-limit=512k
/queue tree add name=all-siswa-UPLOAD parent=WAN max-limit=512k

queue tree nya

/queue tree add name=limited-siswa_DOWNLOAD packet-mark=limited-siswa_DOWNLOAD parent=all-siswa-DOWNLOAD \
queue=PCQ-DOWNLOAD max-limit=32k limit-at=16k
/queue tree add name=normal-siswa_DOWNLOAD packet-mark=all-siswa_DOWNLOAD parent=all-siswa-DOWNLOAD \
queue=PCQ-DOWNLOAD max-limit=384k limit-at=64k
/queue tree add name=limited-siswa_UPLOAD packet-mark=limited-siswa_UPLOAD parent=all-siswa-UPLOAD \
queue=PCQ-UPLOAD max-limit=32k limit-at=16k
/queue tree add name=normal-siswa_UPLOAD packet-mark=all-siswa_UPLOAD parent=all-siswa-UPLOAD \
queue=PCQ-UPLOAD max-limit=384k limit-at=64k