Queue for voip

Hi all.

I posted a similar subject in the forum but didnt got any reply, you can view my older post on this link: simple queues by interface

Anyway, i have a 433 board as firewall on a remote (900km away) site with 128/64 bandwidth that provided by satellite connection.

Im looking on a way to create priority to there voip adapter.

ether1 is LAN 192.168.7.0/24 (about 8 computers)
ether2 is WAN (External IP)
ether3 is VOIP 192.168.8.0/24 (only one device is connected to this network)

Since i didnt got a reply on my former post i tried setting up queue tree with packet mark.
It seems to work but not good enough. still have delay/noise if LAN network is on.

I read these post on voip priority: RouterOS - RouterOS - MikroTik Documentation
on this wiki they say something about "TOS". i didnt understand how to do it throw mikrotik and i cannot reach to this remote site and run ethereal/wireshark.

I hope that someone can suggest a proper way on how to configure it.
I have no problem that LAN connections will suffer, the VOIP phone is number 1 priority for them.

Listed bellow are my queue tree and my mangle rules if you need more details from the router to understand the situation just tell me and i will post them.

Thanks in advanced.

Regards,
Guy.

[admin@MikroTik] /queue tree> print
Flags: X - disabled, I - invalid
0 name="Voip out" parent=ether2 packet-mark=VOIP limit-at=0 queue=default
priority=2 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

1 name="Voip in" parent=ether3 packet-mark=VOIP limit-at=0 queue=default
priority=2 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

2 name="LAN in" parent=ether1 packet-mark=LAN limit-at=0 queue=default
priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

3 name="LAN out" parent=ether2 packet-mark=LAN limit-at=0 queue=default
priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

Mangle rules:
**- Please note that "connection marks" are only for nice presentation in winbox.

[admin@MikroTik] /ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=forward action=mark-packet new-packet-mark=VOIP passthrough=yes
src-address=192.168.8.0/24

1 chain=forward action=mark-packet new-packet-mark=VOIP passthrough=yes
dst-address=192.168.8.0/24

2 chain=forward action=mark-connection new-connection-mark=VOIP
passthrough=yes src-address=192.168.8.0/24

3 chain=forward action=mark-connection new-connection-mark=VOIP
passthrough=yes dst-address=192.168.8.0/24

4 chain=forward action=mark-packet new-packet-mark=LAN passthrough=yes
src-address=192.168.7.0/24

5 chain=forward action=mark-packet new-packet-mark=LAN passthrough=yes
dst-address=192.168.7.0/24

6 chain=forward action=mark-connection new-connection-mark=LAN
passthrough=yes src-address=192.168.7.0/24

7 chain=forward action=mark-connection new-connection-mark=LAN
passthrough=yes dst-address=192.168.7.0/24

You have no limits defined at all in your queue tree. Without a max-limit at the very least, it will not work. The queue needs to know how much bandwidth is there before it can start to reorder packets or apply specific limits and priorities. Your max limit should be something around 90% of the total available bandwidth on that link for best results.

The limit-at variable is used to specify a guaranteed rate for that queue, and should also be specified.

Hi Feklar.

Thanks for the reply.

I set bandwdith limit on my ether2 (WAN) in winbox Interfaces-general tab for ether2 128/128
On my ISP upload never seemes to be limited.

What limit should i put in the queue tree in my rules? 90% is 115/115 should it be on VOIP “mark” or my LAN “mark”?
My SIP adapter dosent takes more than 30/30 kbps iven if is the only device connected.

Should it be like this for example:
[guy@MikroTik] > queue tree print
Flags: X - disabled, I - invalid
0 name=“Voip out” parent=ether2 packet-mark=VOIP limit-at=115k queue=default
priority=2 max-limit=115k burst-limit=0 burst-threshold=0 burst-time=0s

1 name=“Voip in” parent=ether3 packet-mark=VOIP limit-at=115k queue=default
priority=2 max-limit=115k burst-limit=0 burst-threshold=0 burst-time=0s

2 name=“LAN in” parent=ether1 packet-mark=LAN limit-at=100k queue=default
priority=8 max-limit=100k burst-limit=0 burst-threshold=0 burst-time=0s

3 name=“LAN out” parent=ether2 packet-mark=LAN limit-at=100k queue=default
priority=8 max-limit=100k burst-limit=0 burst-threshold=0 burst-time=0s

Regards
Guy.

Your upload parent should be you WAN interface. Your download should be your LAN interface(s).

VoIP isn’t ever very bandwidth intensive, but it is very sensitive to latency. In your case, since it appears you have two different LAN interfaces, on your normal LAN i would set a hard limit on the amount of bandwidth that interface could take, somewhere around 75% or so depending on how much you have. That way your VoIP download will always have a guaranteed amount reserved for it. If you don’t want to do it that way, you can set the parent to one of the Global-X interfaces and set up queues there, I just never remember what one to use for Upload and Download.

Here is an example of a queue tree that I use often to give you an idea of what I am talking about.

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=2M name="Global Download" parent="ether5" \
    priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=1M max-limit=2M name="Normal Download" packet-mark=other_traffic \
    parent="Global Download" priority=4 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=512k max-limit=2M name="Heavy Download" packet-mark=heavy_traffic \
    parent="Global Download" priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=512k max-limit=2M name="High Download" packet-mark=high_traffic \
    parent="Global Download" priority=1 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=1M name="Global Upload ISP1" parent=ether1 priority=\
    8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=512k max-limit=1M name="Normal Upload ISP1" packet-mark=\
    other_traffic parent="Global Upload ISP1" priority=4 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=256k max-limit=1M name="Heavy Upload ISP1" packet-mark=\
    heavy_traffic parent="Global Upload ISP1" priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=256k max-limit=1M name="High Upload ISP1" packet-mark=high_traffic \
    parent="Global Upload ISP1" priority=1 queue=default

This breaks down to, all traffic leaving ether5 (Download) has a hard cap of 2Mbps. Of that 1Mbps is guaranteed for normal traffic, 512k to high priority traffic, and 512k to low priority. Any one of these queues can go up to the full 2Mbps if there is bandwidth that is not in use by another queue however. The ether1 queue (Upload) reads the same just with a 1Mbps hard cap, and different guaranteed rates.

Thanks , Great example with your own rules, i havent tried them yet but its looking good.

Regards,
Guy.