?
Solved

How do you setup QOS to give traffic "A" absolute priority over traffic "B". Difficulty: traffic "A" is time-sensistive.

Posted on 2006-05-11
4
Medium Priority
?
306 Views
Last Modified: 2010-03-17
Hello,

After reading the advanced routing HOWTO and experimenting, I've been unable to accomplish what I need: to give traffic A (VoIP traffic, in this case) absolute priority over traffic B (all other traffic).  Each time I think I've got it, I find I can degrade the audio quality by flooding the uplink with traffic.  Because "audio quality" is difficult to describe, I also left a ping going during the flood-test: it would jump randomly between 10ms to 100ms.  Anyways.. here's a full list of what I have available:

* the router is a modern machine running Linux 2.4.32 (vanilla)
* CBQ, HTB, CSZ, HFSC and PRIO are available as modules
* connection is DSL, synched at 3000kbps down, 512kbps up
* "traffic A" packets are marked for expedited forwarding (rfc2598) for easy classification

HFSC looks like a promissing solution, but documentation is scarce.

Thanks, and good luck!
0
Comment
Question by:ITD_Technician
4 Comments
 
LVL 27

Expert Comment

by:Nopius
ID: 16664958
How exactly did you flood your uplink? With incoming or outgoing flood?

PRIO gives absolute priority to some traffic over all other traffic types, but for outgoing traffic only.
0
 
LVL 3

Accepted Solution

by:
Ustas earned 2000 total points
ID: 16677250
Assuming 2 network cards on the router and VoIP network or host to have addresses 10.0.1.0/24 and the other computers in the network having addresses 10.0.2.0/24 you can try out this script:

#!/bin/bash

#############################################
## Initialise Queing Disciplines
#############################################

/sbin/tc qdisc del dev eth0 root 2>/dev/null #Upload
/sbin/tc qdisc del dev eth1 root 2>/dev/null #Download

        AQ="/sbin/tc qdisc add"
        AC="/sbin/tc class add"
        AF="/sbin/tc filter add"


#### Upload Queue - assuming a 100Mbps NIC
$AQ dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt 1000 cell 8
#### Download Queue - assuming a 100Mbps NIC
$AQ dev eth1 root handle 11: cbq bandwidth 100Mbit avpkt 1000 cell 8


##Upload

##VoIP
$AC dev eth0 parent 10:0 classid 10:1 cbq \
        allot 1514 cell 8 maxburst 20 avpkt 1000 prio 1 \
        bandwidth 100Mbit rate 512Kbit weight 51Kbit

$AQ dev eth0 parent 10:1 sfq quantum 512Kbit

$AF dev eth0 parent 10:0 protocol ip prio 1 u32 flowid 10:1 \
        match ip src 10.0.1.0/24

##The remaining traffic - give a bit less bandwidth, at lower priority
$AC dev eth0 parent 10:0 classid 10:2 cbq \
        allot 1514 cell 8 maxburst 20 avpkt 1000 prio 2 \
        bandwidth 100Mbit rate 400Kbit weight 40Kbit bounded

$AQ dev eth0 parent 10:2 sfq quantum 400Kbit

$AF dev eth0 parent 10:0 protocol ip prio 1 u32 flowid 10:2 \
        match ip src 10.0.2.0/24



##Download

##VoIP
$AC dev eth1 parent 11:0 classid 11:1 cbq \
        allot 1514 cell 8 maxburst 20 avpkt 1000 prio 1 \
        bandwidth 100Mbit rate 3Mbit weight 300Kbit

$AQ dev eth1 parent 11:1 sfq quantum 3Mbit

$AF dev eth1 parent 11:0 protocol ip prio 1 u32 flowid 11:1 \
        match ip dst 10.0.1.0/24

##Rest of network - give a bit less bandwidth
$AC dev eth1 parent 11:0 classid 11:2 cbq \
        allot 1514 cell 8 maxburst 20 avpkt 1000 prio 2 \
        bandwidth 100Mbit rate 2500Kbit weight 250Kbit

$AQ dev eth1 parent 11:2 sfq quantum 2500Kbit

$AF dev eth1 parent 11:0 protocol ip prio 1 u32 flowid 11:2 \
        match ip dst 10.0.2.0/24


#EOF


Since you have VoIP equipment, I assume you'd be using real IP addresses, which you can put instead of 10.0.1.0/24 and 10.0.2.0/24 networks. I also suggest you take NAT out of linux box, onto your dsl modem.

I am running a more complex setup for prioritising VoIP Traffic in an ISP and it is working just as you need, to keep the latency low.

Let me know if it helps.

Stas
0
 
LVL 7

Expert Comment

by:wesbird
ID: 16725237
Here's another alternative if you have a Speedtouch router : http://www.voip-info.org/wiki/view/QoS+and+Port+Forwarding+Speedtouch+510v4

Speedtouch routers have built in QoS.
0
 

Author Comment

by:ITD_Technician
ID: 16746084
Thanks for your responses.  I'll be trying them out and getting back to you.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question