John A. Sullivan III
2009-Jun-22 15:57 UTC
[asterisk-users] RTP/SIP traffic prioritization and Linux issues
Hello, all. I've stumbled across what seems to be a traffic prioritization issue in a Linux environment and wonder if anyone else has encountered or addressed this issue. We had planned to use expedited forwarding for our RTP and perhaps our SIP packets. Our plan was to set DSCP to 101110 (by the way, I think document http://www.voip-info.org/wiki/view/snom+360 is in error as I'm almost certain the expedited forwarding bits are 101110 and not 100010). However, we realized that when these passed through Linux based routers or firewalls using the default pfifo_fast packet scheduler, it would look at bits 3-7 for placement in band 0, 1, or 2. Using the standard expedited forwarding DSCP means pfifo_fast will see 1100 and place the packets in band 1 - the default band for all traffic. Thus, they will receive no prioritization. We are planning to thus change the DSCP to 101100 (b0 instead of b8 for Asterisk, 176 instead of 184 for our Snom phones) and map 101100 to 802.1p priority 7 on our switches. I am imagining this or is it a real issue when using Linux based firewalls and routers with default packet schedulers and expedited forwarding? Thanks - John -- John A. Sullivan III Open Source Development Corporation Street Preacher: Are you SAVED?????!!!!!! Educated Skeptic: Saved from WHAT?????!!!!!! Educated Believer: From our selfishness that hurts the ones we love and condemns us to an eternity of hurting each other. http://www.spiritualoutreach.com Christianity that makes sense
Dave Fullerton
2009-Jun-22 17:34 UTC
[asterisk-users] RTP/SIP traffic prioritization and Linux issues
John A. Sullivan III wrote:> Hello, all. I've stumbled across what seems to be a traffic > prioritization issue in a Linux environment and wonder if anyone else > has encountered or addressed this issue. > > We had planned to use expedited forwarding for our RTP and perhaps our > SIP packets. Our plan was to set DSCP to 101110 (by the way, I think > document http://www.voip-info.org/wiki/view/snom+360 is in error as I'm > almost certain the expedited forwarding bits are 101110 and not 100010). > However, we realized that when these passed through Linux based routers > or firewalls using the default pfifo_fast packet scheduler, it would > look at bits 3-7 for placement in band 0, 1, or 2. Using the standard > expedited forwarding DSCP means pfifo_fast will see 1100 and place the > packets in band 1 - the default band for all traffic. Thus, they will > receive no prioritization. > > We are planning to thus change the DSCP to 101100 (b0 instead of b8 for > Asterisk, 176 instead of 184 for our Snom phones) and map 101100 to > 802.1p priority 7 on our switches. > > I am imagining this or is it a real issue when using Linux based > firewalls and routers with default packet schedulers and expedited > forwarding? Thanks - JohnYou are correct, EF is 101110. I recently started using dscp on my network and ran into similar issues as you. I have cisco routers (not on smartnet) in my environment and some (v 12.x) understood dscp and some (<=v 11.x) did not. For those that did not I had to match on the precedence bits instead and everything thus far is working like it is supposed to. As for linux, I couldn't find anything online that actually implemented diffserv-style traffic management. I ended up writing a script that would generate a set of queues and used the dscp to drop packets into the appropriate queues and another script to set the dscp for programs that could not on their own. It's still a bit of a work in process and I'm sure there are improvements to be made, but if you'd like to look at it I can send it to you off-list. -Dave