Yuo have to use firewall mangle rules and queues.
First of all, identify the type of traffic using magle. but import the SSL7 signs fromhttp://
www.mikrotik.com/download/l7-protos.rsc
In this example, My output interface is WLAN and my LAN is in interface ether1.
ros code
/ip firewall mangle
add action=mark-connection chain=forward comment=DNS disabled=no dst-port=53 \
new-connection-mark=dns passthrough=yes protocol=udp
add action=mark-connection chain=forward disabled=no layer7-protocol=dns \
new-connection-mark=dns passthrough=yes
add action=mark-packet chain=forward connection-mark=dns disabled=no \
new-packet-mark=dnsP passthrough=no
add action=mark-connection chain=forward comment="VoIP (SIP)" disabled=no \
layer7-protocol=sip new-connection-mark=voip passthrough=yes
add action=mark-connection chain=forward comment="VoIP (Skype)" disabled=no \
layer7-protocol=skypetoskype new-connection-mark=voip passthrough=yes
add action=mark-connection chain=forward disabled=no layer7-protocol=skypeout \
new-connection-mark=voip passthrough=yes
add action=mark-connection chain=forward disabled=no layer7-protocol=h323 \
new-connection-mark=voip passthrough=yes
add action=mark-connection chain=forward disabled=no dscp=46 new-connection-mark=voip passthrough=yes
add action=mark-packet chain=forward connection-mark=voip disabled=no \
new-packet-mark=voipP passthrough=no
add action=mark-connection chain=forward comment="Other traffic" disabled=no \
new-connection-mark=otros passthrough=yes
add action=mark-packet chain=forward connection-mark=otros disabled=no \
new-packet-mark=otrosP passthrough=no
add action=mark-connection chain=forward disabled=yes new-connection-mark=\
desconocido packet-mark=no-mark passthrough=yes
Basicaly, I differenciate three types of traffic:
- Routing protocols
VoIP
Other Traffic
ros code
/queue type
add kind=pcq name=PCQ pcq-classifier=src-address pcq-limit=50 pcq-rate=0 \
pcq-total-limit=2000
add kind=pcq name=DOWN pcq-classifier=dst-address pcq-limit=50 pcq-rate=0 \
pcq-total-limit=2000
add kind=pcq name=UP pcq-classifier=src-address pcq-limit=50 pcq-rate=0 \
pcq-total-limit=2000
Then I create two queue type: UP AND DOWN of type PCQ.
Finally, I create the queue tree for the traffic priorization:
ros code
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=750k name=UPLOAD packet-mark="" parent=wlan1 priority=2
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=200k \
max-limit=500k name=VOIP-UP packet-mark=voipP parent=UPLOAD priority=5 \
queue=UP
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=100k \
max-limit=150k name=ROUTING-UP packet-mark=dnsP parent=UPLOAD priority=3 queue=\
UP
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=OTRO-UP packet-mark=otrosP parent=UPLOAD priority=8 queue=\
UP
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=DOWNLOAD packet-mark="" parent=ether1 priority=2
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=100k \
max-limit=150k name=ROUTING-DOWN packet-mark=dnsP parent=DOWNLOAD priority=3 \
queue=DOWN
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=OTRO-DOWN packet-mark=otrosP parent=DOWNLOAD priority=8 \
queue=DOWN
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=200k \
max-limit=500k name=VOIP-DOWN packet-mark=voipP parent=DOWNLOAD priority=\
5 queue=DOWN
I hope this explanation is satisfactory for you and I increase my karma.