Community discussions

MikroTik App
kraljek
刚刚加入了
Topic Author
Posts: 18
加入: Fri Apr 24, 2015 8:13 am

Simple QOS for VOIP

Tue May 12, 2015 1:23 pm

Hi all,

我需要的例子for VOIP priority on other traffic.

What exactly i need,

I whant that all SIP phones on internal network 192.168.1.0/24 have priority on all other traffic, but I know what is my four public IPs of SIP servers (etc. public ip 172.16.16.1, 172.16.16.2, 172.16.16.3, 172.16.16.4).


I whant filter for SIP phones in internal network that have a priority1 to get public ip of servers, considering on other traffic who will have priority 8

Many thx.

Tomislav
Top
DLNoah
Member Candidate
Member Candidate
Posts: 144
加入: Fri Nov 12, 2010 5:33 pm

Re: Simple QOS for VOIP

Tue May 12, 2015 10:16 pm

The setup we use for VOIP QOS is:
1) Create a parent queue to match the LAN interface (or the LAN network, if I know that instead). Set this queue up with the customer package limit for download & upload -- if you leave it unlimited, there will still be short hiccups of bad voice quality when a burst of data traffic starts, until the queue learns what the upstream limit is. The drawback is, of course, if the upstream package limit is ever increased, you'll have to remember to edit your parent queue as well. Change the queue type from default-small to default.
2) Add a queue for the voice traffic. Most of the time, I match the internal IPs of the phones, but you could also have the "target" set to the whole LAN network and add a destination for the network of the external SIP servers (If they don't fit into a single network, you're going to have to packet mark instead). I set max-limit and limit-at of (100k * number of simultaneous calls) for upload and download on this queue, priority 1, with a parent of the above. Change the queue type from default-small to default.
3) Add a queue for all other traffic. Most of the time, I set this to match 0.0.0.0/0 -- as long as your parent is matching specifically from the LAN side, this will work, though it may be a better practice to only match on the internal network. You can leave this unlimited if you want, but I usually set it to the same max-limits as the parent, so I can see traffic on the Traffic tab. Change the queue type from default-small to default.

So, in your network, that might look something like:
Code:Select all
/queue simple add max-limit=1100k/5500k name="Master Parent" queue=default/default target=192.168.1.0/24 add limit-at=500k/500k max-limit=500k/500k name="Phone Traffic - 5 calls" parent="Master Parent" target=192.168.1.0/24 dst=172.16.16.0/29 add max-limit=1100k/5500k name="All Internet Traffic" parent="Master Parent" queue=default/default target=192.168.1.0/24
如果公众IPs的SIP服务器并不在ir own simple network (so that Destination won't work for you), then you'll have to either set multiple targets for all the internal phone IPs (if those are static), or use an address list and packet-marks to identify connections to or from the SIP servers and match the packet-mark into the simple queue.
Top
用户头像
hgonzale
Member Candidate
Member Candidate
Posts: 272
加入: Thu Nov 06, 2014 1:12 pm
Location:Fuengirola, Spain
Contact:

Re: Simple QOS for VOIP

Thu May 14, 2015 10:48 am

There are many ways to do.

Here my examples, BUT, I know my IP phones IP address. You can match with dest-port (5060), dest-ip (sip servers).....

at mangle

add action=mark-connection chain=prerouting comment="VoIP Mark" new-connection-mark=VoIP src-address-list=sip-internos
add action=mark-connection chain=forward dst-address-list=sip-internos new-connection-mark=VoIP
add action=mark-packet chain=prerouting comment="VoIP Packet" connection-mark=VoIP new-packet-mark=VOIP passthrough=no
add action=mark-packet chain=forward connection-mark=VoIP new-packet-mark=VOIP passthrough=no

at queue tree

add limit-at=512k max-limit=2M name=VoIP-download packet-mark=VOIP parent=total-download priority=2 queue=default
add limit-at=512k max-limit=3M name=VoIP-upload packet-mark=VOIP parent=total-upload priority=2 queue=default

And the rest of services with queue 3 or greater (lower priority).

Remember, the priorities are activer when the bandwidth is FULL, while you have bandwidth available, is not necesary the priorities.
Top
ik3umt
Member Candidate
Member Candidate
Posts: 295
加入: Tue Jul 08, 2014 3:58 pm

Re: Simple QOS for VOIP

Fri Dec 20, 2019 4:43 pm

Question:

If a whole /24 subnet on a dedicated interface is reserved for IP Phones, can I avoid use of packets marking / mangle rules and manage the voip traffic just using queue target ?

Can just this work ? :
Code:Select all
/queue simple add name=Internet queue=default/default target="" add max-limit=1M/1M name=VoIP parent=Internet priority=1/1 queue=default/default target=172.16.1.0/24
or I must add anyway a second child queue to match PCs traffic ?? :
Code:Select all
add add max-limit=50M/50M name=PCtraffic parent=Internet queue=default/default target=192.168.1.0/24
and what's the importance of queues order ?
Top

Who is online

Users browsing this forum:Bing [Bot],去ogle [Bot]and 10 guests