Ooma VOIP QOS help needed

anyone have a working setup I can build from? I went into Wiki and did the basics but I’m not real sure I have it setup right and I don’t know how to check if it is working right. Wiki makes it look simple…tnx

The basics are:

Use mangle table to detect and mark packets:

  • use connection marks to classify each stream of data
  • mark connections as voip, and best-effort
  • use packet marks on the individual packets which are part of marked connections.

Use queues to guarantee bandwidth to VoIP flows.
(Mikrotik doesn’t have LLQ “priority” but guaranteeing bandwidth to a VoIP application works fine)

In a queue, the Max Limit: (target upload / target download) boxes is the fastest any connection may go, but you guarantee bandwidth by using the Advanced > Limit At: Target upload/download boxes.
Limit At = “minimum guaranteed” bandwidth. Any queue which is using less than “limit at” will receive bandwidth before any queue which is above its own “limit at” value. Priority values are the “tie breakers” between two or more queues which are above limit-at. 1 is highest priority, and 8 is lowest.

So - if your VoIP queue has a limit-at set to something normal for your network, such as 512Kbps (if you’re using G.729, then each call is about 32Kbps on the wire including ethernet frame headers. G.711 uses about 80Kbps on the wire per call), and the best effort queue has no limit-at set, then the VoIP queue is guaranteed some of your bandwidth. Then if it has a lower number in priority than your best effort queue, it will always get priority over the best-effort data. You should limit the priority queue’s maximum bandwidth to something sane like 1 or 2 Mbps so that voice can’t starve your entire connection.

thanks for the reply. Lots to take in. I “get” 50% of what your saying. Can you provide a working set of rules to load onto the router for me?

Use mangle table to detect and mark packets:

  • use connection marks to classify each stream of data
  • mark connections as voip, and best-effort
  • use packet marks on the individual packets which are part of marked connections.

“each stream of data”? Specifically, what are they? VOIP, Video, data?

"mark connections as VOIP. I used the Wiki example to mark the WAN and my Bridge ports on the LAN. I see data coming and going. I suspect that it is being marked, but, how do I confirm they are marked?

“use packet marks”…no idea on how to do this and confirm it’s working.

appreciate your help…tnx

Bump…anyone out there have a Ooma solution I can use to build up from?

I can’t right now, but I can give a few more suggestions:

You can see whether connection marks are working by opening the connection tracking tab of the IP > Firewall menu in Winbox. Connection mark is a collumn that is shown for each connection. (Or you can add the collumn with the little black arrowhead at the top-right of the table)

Basically, queues can match packets based on their packet mark - which is done in the mangle table of the firewall configuration. It’s most efficient to mark packets based on which connection they’re a part of (two VoIP calls would be two connections, each with lots of individual packets).

So the prerouting chain of the mangle table can start with a few rules:
e.g. connection-mark=voip action=mark-packet new-packet-mark=voip
Then make sure that pass-thru is NOT checked on these packet-mark action rules. This improves performance.
After the packet mark rules, you mark connections, based on some criteria - I’d suggest udp, and ports 5060-5062 (to match SIP itself) and another rule that matches perhaps the IP address of your SIP server and protocol=udp, so that the all-important RTP is given priority. If the RTP packets arrive at your router with an IP DSCP value of 46, you could use that as your match criteria, and it would be the most flexible. You can open a packet capture in WireShark to see what DSCP value is on the RTP packets.

Anyway, so now that the connections have marks, and those are being used to mark individual packets, your queues can use the packet marks to give priority to the VoIP packets.

Start small - just try marking the connections (don’t worry about queues and packet marks yet) and verify the connections are getting properly marked by viewing them in the IP > Firewall > Connections tab.

thanks for the baby steps. I’ll take a shot at it now that I know I can view the marked Voip in connections to verify. Right now I’m not seeing anything marked Voip so I know I have more to do on this. Thanks for your help and if you get time to send me the proper mangle rules I’s appreciate it since that would push me in the right direction. Actually any Mangle rules that mark anything would be a step to help me get there. I tried a few mangle “mark” rules and I keep getting Bad new connection mark. I’ll keep at it! Thanks again.

Update; I got the Ooma marked via marking all to and from the Ooma IP address. QueTree; Parent for up & down, then added Ooma marked with a Pri02. I did not do anything with the limits other than try a few settings which did cause quality differences but in the end I left them blank so that Ooma had Pri and 100% bandwidth.

So, my ASSumption is Ooma QOS is working. Learned a lot but have lots to learn.

I know this is an old post, but would you be willing to share your mangle & queue info with me? I also use Ooma.