Asterisk: Give VoIP Traffic the Green Light (Part 3)

Last week we left off with using Wondershaper to improve network performance by, somewhat paradoxically, throttling our line speeds to less than their maximum. Today we'll learn how to prioritize specific types of network traffic.

 

But first, I must make a small but important correction. Unless you are running Debian, before you can run Wondershaper from the command line you must make one edit in the wshaper script. Comment out or delete these lines:

echo Please read the documentation in 'README' first :-)
exit

Now you can run the wshaper command without it complaining. Debian users may run the wondershaper command without making any edits first.

Wondershaper status: Clearing the queue
Wondershaper displays its current status with this command:

# wshaper status

Use this command to turn Wondershaper off:

# wshaper clear eth1

It might take a bit of experimenting to find the optimum settings. Typically, around 90 percent of your maximum line speed works well. Start low and work your way up. If your Internet line is used primarily for VoIP, and not a lot of other traffic, this could be all you need to do to ensure decent VoIP performance.

Starting wondershaper automatically
Your last step is to make sure Wondershaper starts at boot, or when your network interface comes up. Starting it at boot is the easiest. First edit the wshaper script to include your desired settings:

DOWNLINK=728
UPLINK=256
DEV=eth1

Then place the script in /etc/init.d, and use your favorite runlevel utility, such as chkconfig (Red Hat) or update-rc.d (Debian) to add it to your desired runlevels, like this:

# chkconfig --level 2345 wshaper on
# chkconfig --level 016 wshaper off

# update-rc.d wondershaper start 30 2 3 4 5 . stop 0 1 6 .

Starting Wondershaper when your network interface comes up is done differently on every Linux distribution, so please refer to your documentation to learn how to do this. Starting it at boot is perfectly acceptable and simple to manage. However, some admins believe that anything related to network interfaces, like iptables, traffic shaping, routing, IPSec, and so forth, should start and stop with the interface. It's a question of taste, so do what suits you.

Click Here to Continue Reading 

 

« XO Communications Brings Industry-Leading VoIP Services Bundle to Businesses in Jacksonville | Main | Wireless Gigabit Ethernet Solution, FibeAir IP-Max »