Community discussions

MikroTik App
 
Trekkie
newbie
Topic Author
Posts: 37
Joined: Thu Feb 07, 2013 1:48 am

Give 'Priority' to SIP traffic over all others.

Fri Aug 22, 2014 7:08 pm

I looked at the Wiki and found this page: http://wiki.mikrotik.com/wiki/Voip

At the very end of the page is a sample configuration that does what I want to do. I understand that I have no control once it leaves my router, but my issue right now is occasionally something will 'upload' to the internet and consume all my available bandwidth. This upload could be anything like a file transfer, etc.

All I want to do is tell my RB433G that if it's SIP traffic from this internal ip address (172.16.0.52 in my case) mark those packets with Priority 2, and everything else with priority 8.

Then, make sure the priority 2s 'get out' first.

I did the following firewall rules:
add action=mark-packet chain=prerouting comment="Detect NAT Traversal" dst-address-list=local-addr in-interface=WAN new-packet-mark=\
    nat-traversal passthrough=no
add action=mark-packet chain=prerouting comment="SIP Only" in-interface=LAN new-packet-mark=SIP_IN passthrough=no src-address=172.16.0.52
add action=mark-packet chain=postrouting dst-address=172.16.0.52 new-packet-mark=SIP_OUT out-interface=LAN passthrough=no
add action=mark-packet chain=prerouting comment="All Else" in-interface=LAN new-packet-mark=ELSE_IN passthrough=no src-address=!172.15.0.52
add action=mark-packet chain=postrouting dst-address=!172.16.0.52 new-packet-mark=ELSE_OUT out-interface=LAN passthrough=no
add action=mark-packet chain=prerouting comment="SIP Web Server" in-interface=LAN new-packet-mark=ELSE_IN protocol=tcp src-address=172.16.0.52 \
    src-port=80
add action=mark-packet chain=postrouting dst-address=172.16.0.52 dst-port=80 new-packet-mark=ELSE_OUT out-interface=LAN protocol=tcp
and created the following queues
/queue tree
add name=IN parent=LAN priority=1 queue=default
add name=OUT parent=LAN priority=1 queue=default
add name=SIP_IN packet-mark=SIP_IN parent=IN priority=2 queue=default
add name=SIP_OUT packet-mark=SIP_OUT parent=OUT priority=2 queue=default
add name=ELSE_IN parent=IN queue=default
add name=ELSE_OUT parent=OUT queue=default
I'm not sure if I did the TREE right. The example in the wiki didn't explain clearly to me the 'parent' tag. The LAN is my 8 ports on the RB433G that are for my internal network. I have an external port WAN that is to my ISP.

Am I missing any tagging? I've done some testing and haven't been able to re-create the 'use all bandwidth' just right yet to cause the symptom again, but I could also have 'fixed' it and that's why I can't recreate.

Thank you.
 
User avatar
Kickoleg
Member Candidate
Member Candidate
Posts: 128
Joined: Tue Mar 11, 2014 3:13 pm
Location: Yverdon-les-Bains, Suisse

Re: Give 'Priority' to SIP traffic over all others.

Fri Aug 22, 2014 7:45 pm

I recommend you watch the presentation, it should explain everything about VoIP ...
http://tiktube.com/video/oIfK3iDlgDFCCL ... uJlmoCGql=

And second way to prioritize VoIP is matching and increasing by DSCP (TOS), you can read about this here ...
http://wiki.mikrotik.com/wiki/DSCP_based_QoS_with_HTB
MTCNA, MTCUME, MTCRE, MTCWE, MTCTCE certified
 
Trekkie
newbie
Topic Author
Posts: 37
Joined: Thu Feb 07, 2013 1:48 am

Re: Give 'Priority' to SIP traffic over all others.

Fri Aug 22, 2014 8:34 pm

Cool thanks for the pointer. I guess I found the wrong page. That looks much more like what I would prefer to do.

Thanks

Who is online

Users browsing this forum: anon31337 and 82 guests