Page 1 of 1

Basic QoS rules needed - can't seem to configure it

Posted: Sun Apr 11, 2010 11:16 am
by bigguns
Hi there,
I've been trying to setup QoS on my RB800 using the wiki guides (following ToS guides) but after playing around with it alittle I found that ToS isn't really what I need.

Basically I'm trying to setup QoS for (highest first)

1)VOIP
2)HTTP/HTTPS
3)Media (videos)
4)Other

I feel the only way to really get this working is to use port based QoS - but I'm stuck on creating rules to do this for the whole network due to my setup.

Eth1 - WAN (for LAN 192.168.0.X)
Eth2 - WAN (for LAN 192.168.1.X)
Eth3 - Bridge >>> Netgear Switch (LANs)
WLAN - part of 192.168.0.X

Could someone kindly point me in the right direction to get to setup - ideally an example rule of how I would allow apply a rule which could cover both LANs and WANs.

Thank you.

Re: Basic QoS rules needed - can't seem to configure it

Posted: Mon Apr 12, 2010 1:47 pm
by Pilgrim
mine look like this

GTS is my PPPoE connection to the internet. Recommend to make the diagram not to loose the overview of what you want to acheive.

rgs



/ip firewall mangle
add action=mark-packet chain=prerouting comment="" disabled=no dst-port=53 new-packet-mark=High_Priority passthrough=\
no protocol=udp
add action=mark-connection chain=prerouting comment="UDP / Games Martin" disabled=no new-connection-mark=UPDandGames \
passthrough=yes protocol=udp src-address=192.168.xxx.xxx
add action=mark-packet chain=prerouting comment="" connection-mark=UPDandGames disabled=no new-packet-mark=\
High_Priority passthrough=no
add action=mark-connection chain=prerouting comment=VOIP disabled=no new-connection-mark=VOIP passthrough=yes \
src-address=192.168.0.xxx
add action=mark-packet chain=prerouting comment="" connection-mark=VOIP disabled=no new-packet-mark=High_Priority \
passthrough=no
add action=mark-connection chain=prerouting comment="Winbox connection" disabled=no dst-port=8291 \
new-connection-mark=winbox-conn passthrough=yes protocol=tcp src-address=192.168.0.0/24
add action=mark-packet chain=prerouting comment="" connection-mark=winbox-conn disabled=no new-packet-mark=\
High_Priority passthrough=no
add action=mark-connection chain=forward comment="Dreambox server" disabled=no dst-address=192.168.0.xxx \
new-connection-mark=DB out-interface=LAN1_Master passthrough=yes
add action=mark-packet chain=prerouting comment="" connection-mark=DB disabled=no new-packet-mark=High_Priority \
passthrough=no
add action=mark-connection chain=prerouting comment="Terminator HTTP Traffic" disabled=no dst-port=80 \
new-connection-mark=Terminator-http-conn passthrough=yes protocol=tcp src-address=192.168.0.xxx
add action=mark-packet chain=prerouting comment="" connection-mark=Terminator-http-conn disabled=no new-packet-mark=\
Terminator_Medium passthrough=no
add action=mark-connection chain=prerouting comment="Terminator low priority Traffic" disabled=no \
new-connection-mark=Terminator-Low-conn passthrough=yes protocol=tcp src-address=192.168.0.xxx src-port=\
1024-53000
add action=mark-packet chain=prerouting comment="" connection-mark=Terminator-Low-conn disabled=no new-packet-mark=\
Terminator_Medium passthrough=no
add action=mark-connection chain=prerouting comment="Other PCs HTTP Traffic" disabled=no dst-port=80 \
new-connection-mark=OtherPCs-conn passthrough=yes protocol=tcp src-address=192.168.0.0/24
add action=mark-packet chain=prerouting comment="" connection-mark=OtherPCs-conn disabled=no new-packet-mark=\
Other_Medium passthrough=no
add action=mark-connection chain=prerouting comment="Other PCs low priority Traffic" disabled=no new-connection-mark=\
Other-Low-Conn passthrough=yes protocol=tcp src-address=192.168.0.0/24 src-port=1024-53000
add action=mark-packet chain=prerouting comment="" connection-mark=Other-Low-Conn disabled=no new-packet-mark=\
Other_Low passthrough=no
add action=mark-connection chain=prerouting comment=Pilgrim disabled=yes new-connection-mark=OtherPCs-conn \
passthrough=yes src-address=192.168.0.0/24
add action=mark-packet chain=prerouting comment="" connection-mark=Pilgrim-conn disabled=yes new-packet-mark=Pilgrim \
passthrough=no
[admin@MikroTik] /ip firewall mangle>

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=512k name=Total_Upload \
packet-mark="" parent=GTS priority=1
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=180k max-limit=512k name=UL_Terminator \
packet-mark="" parent=Total_Upload priority=4
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=4M name=Total_Download \
packet-mark="" parent=LAN1_Master priority=1
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=128k max-limit=512k name=UL_High packet-mark=\
High_Priority parent=Total_Upload priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1500k max-limit=4M name=DL_Terminator \
packet-mark="" parent=Total_Download priority=3
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1500k max-limit=4M name=DL_Other packet-mark=\
"" parent=Total_Download priority=4
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M max-limit=4M name=DL_OtherMedium \
packet-mark=Other_Medium parent=DL_Other priority=4 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=500k max-limit=4M name=DL_OtherLow \
packet-mark=Other_Low parent=DL_Other priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M max-limit=4M name=DL_TerminatorMedium \
packet-mark=Terminator_Medium parent=DL_Terminator priority=3 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=500k max-limit=4M name=DL_TerminatorLow \
packet-mark=Terminator_Low parent=DL_Terminator priority=6 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=160k max-limit=512k name=UL_TerminatorMedium \
packet-mark=Terminator_Medium parent=UL_Terminator priority=4 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=20k max-limit=512k name=UL_TerminatorLow \
packet-mark=Terminator_Low parent=UL_Terminator priority=6 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=180k max-limit=512k name=UL_Other packet-mark=\
"" parent=Total_Upload priority=4
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=20k max-limit=512k name=UL_OtherLow \
packet-mark=Other_Low parent=UL_Other priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=160k max-limit=512k name=UL_OtherMedium \
packet-mark=Other_Medium parent=UL_Other priority=4 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=250k max-limit=4M name=DL_High packet-mark=\
High_Priority parent=Total_Download priority=1 queue=default
[admin@MikroTik] /queue tree>
HTB setup ver2.jpg

Re: Basic QoS rules needed - can't seem to configure it

Posted: Mon Apr 26, 2010 5:39 pm
by Cr33p3r
A good start on understanding HTB for QoS in mikrotik

http://tiktube.com/index.php?video=253