Home > general > pipes, queues, and rules

pipes, queues, and rules

October 23rd, 2005 Leave a comment Go to comments

I finally got around to perfecting the traffic shaping rules on my m0n0wall firewall box. As many of you know, I use Sunrocket’s VoIP service, which works great except for when I’m doing any sort of large file upload. When this happens, the voice packets get delayed due to the large amount of upstream traffic, and hence, voice starts cutting out and sounding like a bad cellphone connection. Anyway, with the new traffic shaping rules, the m0n0wall box is able to take all of the upload (and download) traffic, and re-prioritize it. So…I’ve set up rules to give packets to and from my VoIP box the highest priority. The difference this change makes is quite remarkable.

To test the rules, I started a large download *and* a large upload, then called my work number and left myself a voicemail. I did it once with the shaping rules disabled and then again with the rules enabled. You can hear the results:

Without shaping and with shaping.

Here are the rules I currently have in place if you’re really interested.

Categories: general Tags: , ,
  1. Tim M
    October 24th, 2005 at 14:59 | #1

    Awesome! I never got around to implementing this completely… only used the wizard to do the most basic stuff (ACKs and small packets highest priority, etc). I’ll have to implement that next time I get a chance..

    I’ll just borrow your concepts.. :-) Thanks..

  2. October 24th, 2005 at 15:18 | #2

    I think I need to put some rules in as well to prioritize ACK packets…since implementing the VoIP rules, I’ve noticed that the latency of interactive internet stuff is quite a bit higher. Prioritizing ACKs shoud (theoretically) help that.

  3. chris
    October 28th, 2005 at 13:47 | #3

    I used the wizard first, then reduced the weight on the upload queues it created. I added a 70 weight queue for UDP from my VoIP adapter out. I then added a rule putting VoIP at the top of the list using the existing High priority download queue.

    Basically similar to what you have, but built off of the wizard, so my other traffic still flows nicely.

  4. dbs
    April 13th, 2006 at 05:46 | #4

    bump! :(
    interesting article on setting up pipes-queues-rules as there is barely any material on this (that i can find)
    anyway, i am in the same boat, did prioritis ACKs but still about 25ping higher is this the queue latency/buffer?
    am running monowall on a cel600.
    and did u end up sorting out the latency issue.

  5. April 13th, 2006 at 12:44 | #5

    Thanks…BSD-style traffic shaping is a little confusing to get your head around initially. I put this stuff up on the blog more for my own reference in the future than anything :-)

    Regarding the latency issue, it just sort of went away. I’m not sure if it was a transient issue with comcast that day or what. The ruleset posted above is the same as I’ve been running since the article was posted.

  1. No trackbacks yet.