Community discussions

MikroTik App
 
servaris
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Tue May 20, 2014 4:30 pm
Location: Planet Earth
Contact:

RB2011UiAS VoIP QoS

Sat May 28, 2016 1:14 am

Hi,
My RB2011UiAS version=6.35.2
Found a page that shows a setup for QoS And VoIP at http://wiki.mikrotik.com/wiki/Voip
The code on that page shows things like parent=global-in and parent=global-out but there is only global in the Parent drop down list.

The code on that wiki page is:
/queue tree
add name="IN" parent=global-in priority=1
add name="OUT" parent=global-out priority=1
add name="SIP_IN" packet-mark=SIP_IN parent=IN priority=2
add name="SIP_OUT" packet-mark=SIP_OUT parent=OUT priority=2
add name="ALL_ELSE_IN" packet-mark=ELSE_IN parent=IN priority=8
add name="ALL_ELSE_OUT" packet-mark=ELSE_OUT parent=OUT priority=8

/ip firewall mangle
add action=mark-packet chain=prerouting comment="SIP Only" disabled=yes in-interface=WAN\
    new-packet-mark=SIP_IN passthrough=no src-address=192.168.0.16
add action=mark-packet chain=postrouting disabled=yes dst-address=192.168.0.16\
    new-packet-mark=SIP_OUT out-interface=WAN passthrough=no
add action=mark-packet chain=prerouting comment="All Else" disabled=yes in-interface=WAN\
    new-packet-mark=ELSE_IN passthrough=no src-address=!192.168.0.16
add action=mark-packet chain=postrouting disabled=yes dst-address=!192.168.0.16\
    new-packet-mark=ELSE_OUT out-interface=WAN passthrough=no
add action=mark-packet chain=prerouting comment="SIP Web Server" disabled=yes in-interface=WAN\
    new-packet-mark=ELSE_IN passthrough=yes protocol=tcp src-address=192.168.0.16 src-port=80
add action=mark-packet chain=postrouting disabled=yes dst-address=192.168.0.16\
    dst-port=80 new-packet-mark=ELSE_OUT out-interface=WAN passthrough=yes protocol=tcp
In my LAN, there is a vlan used for a couple of phones and other phones don't use any vlan. One of the parts of this setup I don't get when put into practice is, when making a call using phone on vlan, the
avg. rate
increases. When a call is made using smartphone (which is voip call) connected to our wifi, neither of the 2 queues avg. rate increases.

Here is what I have now:
/ip firewall mangle
add action=mark-packet chain=forward comment="VoIP IN" dst-port=5060,10251-15000 new-packet-mark=VoIP passthrough=no \
    protocol=udp src-address=107.6.xxx.xxx
add action=mark-packet chain=forward comment="VoIP OUT" dst-address=107.6.xxx.xxx dst-port=5060,10000-15000 \
    new-packet-mark=VoIP passthrough=no protocol=udp
/queue tree
add name=VoIP-IN packet-mark=VoIP parent=global priority=2 queue=default
add name=VoIP-OUT packet-mark=VoIP parent=voice_vlan priority=2 queue=default
What I don't get is, shouldn't the smart phone voip call should cause the queue tree VoIP-IN avg. rate to increase by the parent=global if global means everything/all ports etc? Neither of the queue's avg rate rise.

How to set this up correctly seeing as there is only a 'GLOBAL' in Parent Drop Down

Thanks for your help!
 
servaris
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Tue May 20, 2014 4:30 pm
Location: Planet Earth
Contact:

Re: RB2011UiAS VoIP QoS

Sat May 28, 2016 2:50 am

Hi,
Since writing the first post, took a shot at configuring the mangle rules and queue tree from the wiki page but using parent=GLOBAL. Made some calls from both desktop phone and smart phone and both showup in queue:

Current Settings:

/ip firewall mangle
add action=mark-packet chain=prerouting comment="SIP IN" dst-port=5060-5080 in-interface=ether1-gateway \
new-packet-mark=SIP-IN passthrough=no protocol=udp src-address=107.6.XXX.XXX
add action=mark-packet chain=postrouting comment=SIP-OUT dst-address=107.6.XXX.XXX dst-port=5060 new-packet-mark=\
SIP-OUT out-interface=ether1-gateway passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment=RTP-IN dst-port=10251-15000 in-interface=ether1-gateway \
new-packet-mark=RTP-IN passthrough=no protocol=udp src-address=107.6.XXX.XXX
add action=mark-packet chain=postrouting comment=RTP-OUT dst-address=107.6.XXX.XXX dst-port=10000-15000 \
new-packet-mark=RTP-OUT out-interface=ether1-gateway passthrough=no protocol=udp
add action=mark-packet chain=prerouting comment="All Else" in-interface=ether1-gateway new-packet-mark=ELSE-IN \
passthrough=no src-address=!107.6.XXX.XXX
add action=mark-packet chain=postrouting dst-address=!107.6.XXX.XXX new-packet-mark=ELSE-OUT out-interface=\
ether1-gateway passthrough=no

/queue tree
add limit-at=90M max-limit=92M name=IN parent=global priority=1
add limit-at=9M max-limit=10M name=OUT parent=global priority=1
add name=SIP-IN packet-mark=SIP-IN parent=IN priority=2
add name=SIP-OUT packet-mark=SIP-OUT parent=OUT priority=2
add name=RTP-IN packet-mark=RTP-IN parent=IN priority=2
add name=RTP-OUT packet-mark=RTP-OUT parent=OUT priority=2
add limit-at=89M max-limit=90M name=ELSE-IN packet-mark=ELSE-IN parent=IN
add limit-at=7M max-limit=8M name=ELSE-OUT packet-mark=ELSE-OUT parent=OUT

Who is online

Users browsing this forum: No registered users and 92 guests