<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elastix Blogs &#187; ADSL</title>
	<atom:link href="http://blogs.elastix.org/en/tag/adsl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.elastix.org/en</link>
	<description>Elastix Community Blog</description>
	<lastBuildDate>Tue, 06 Jul 2010 09:54:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iLBC vs g729 &#8212; The quick guide to using compressed codecs in Elastix</title>
		<link>http://blogs.elastix.org/en/2009/11/ilbc-vs-g729-the-quick-guide-to-using-compressed-codecs-in-elastix/</link>
		<comments>http://blogs.elastix.org/en/2009/11/ilbc-vs-g729-the-quick-guide-to-using-compressed-codecs-in-elastix/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 09:02:24 +0000</pubDate>
		<dc:creator>Josiah Spackman</dc:creator>
				<category><![CDATA[Elastix]]></category>
		<category><![CDATA[VOIP]]></category>
		<category><![CDATA[ADSL]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[codecs]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[g729]]></category>
		<category><![CDATA[gsm]]></category>
		<category><![CDATA[ilbc]]></category>
		<category><![CDATA[intraoffice]]></category>
		<category><![CDATA[sip bandwidth]]></category>
		<category><![CDATA[voip bandwidth]]></category>

		<guid isPermaLink="false">http://blogs.elastix.org/en/?p=102</guid>
		<description><![CDATA[We all know that g711 (alaw / ulaw) is meant to sound the best. It&#8217;s uncompressed and equivalent quality to ISDN, which most businesses are used to with their traditional PABX System.
However, it comes at a price, 64kbps + overheads means around 111kbps when you factor in everything else over an ADSL PPPoA / PPPoE [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that g711 (alaw / ulaw) is meant to sound the best. It&#8217;s uncompressed and equivalent quality to ISDN, which most businesses are used to with their traditional PABX System.</p>
<p>However, it comes at a price, 64kbps + overheads means around <a title="Asterisk Bandwidth Calc" href="http://site.asteriskguide.com/bandcalc/bandcalc.php" target="_blank">111kbps</a> when you factor in everything else over an ADSL PPPoA / PPPoE connection.</p>
<p>Now that&#8217;s a LOT when you think about it, considering on a standard ADSL2+ line you&#8217;re going to max out at around 5-7 SIP lines, especially if it&#8217;s a shared connection. This is where a compressed codec such as (My personal favorite) iLBC, or g729, can be incredibly cost effective, as you can load up around 15-20 on the same sort of bandwidth. When you&#8217;re a small business, that means with the right kind of QoS, you can share your ADSL Broadband connection and still have 5-10 concurrent phone calls, all happily living together.</p>
<p>So do away with expensive BRI interfaces and monthly charges, and go SIP!</p>
<p>We&#8217;re going to look at a few things very briefly:</p>
<p>1) MOS &#8211; What is it and why do I care?</p>
<p>2) Which codec is right for me?</p>
<p>3) g729 &#8211; Installation</p>
<p>4) iLBC &#8211; Installation</p>
<p>5) Trunk and Extension setup</p>
<p>6) Testing the codecs</p>
<p><span id="more-102"></span></p>
<p style="text-align: center"><strong>1) MOS &#8211; What is it and why do I care?</strong></p>
<p style="text-align: left">MOS stands for &#8220;<a title="Wikipedia MOS article" href="http://en.wikipedia.org/wiki/Mean_Opinion_Score" target="_blank">Mean Opinion Score</a>&#8220;, and in a nutshell it&#8217;s a way of determining out of 5 how good a particular codec (Read: Phone call) will sound. The Wikipedia article is a good overview of MOS, each codecs ratings, and some phrases you can use to test the compression yourself and see if words become difficult to understand.</p>
<p style="text-align: left">Now, we all want a nice good MOS, because at the end of the day if you&#8217;re using a PBX system, there&#8217;s nothing worse than it sounding like a VoIPBuster call to some exotic island. Personally I aim for higher quality, this is why iLBC stands out well for me. That said, the choice is yours, try a few out and see what sound you personally (And quite possibly the person who writes your paycheck) are happy with.</p>
<p style="text-align: left">
<p style="text-align: left">
<p style="text-align: center"><strong>2) Which codec is right for me?</strong></p>
<p style="text-align: left">Well that is a very good question, and that&#8217;s something that you&#8217;re going to have to answer for yourself. Lets look at some of the benefits of each:</p>
<table style="text-align: center" border="1" cellspacing="1" cellpadding="2" width="600">
<tbody>
<tr>
<th scope="row">iLBC Pros</th>
<th scope="row">iLBC Cons</th>
<th scope="row">g729 Pros</th>
<th scope="row">g729 Cons</th>
</tr>
<tr>
<td>Free!</td>
<td>Generally installed from Source code</td>
<td>Most physical devices support it</td>
<td>Costs $ per-channel</td>
</tr>
<tr>
<td>Better MOS than g729</td>
<td>&#8220;Interesting&#8221; license</td>
<td>Requires less CPU than iLBC for encoding / decoding<br />
(Good for low-powered or highly loaded PBXs)</td>
<td>Not many free Softphones support g729</td>
</tr>
<tr>
<td>Handles packet loss better than g729 &amp; g711</td>
<td>Less physical devices support it than g729</td>
<td>More common than iLBC</td>
<td>Easier to pick up the compression vs iLBC</td>
</tr>
<tr>
<td>Many open-source softphones support it</td>
<td></td>
<td></td>
<td>Many different version</td>
</tr>
</tbody>
</table>
<p style="text-align: left">It&#8217;s not difficult to see there could be benefits for either. If you&#8217;re looking for low-cost deployment, or over a shaky ADSL connection you can&#8217;t seem to QoS well (Or perhaps Wireless?) then iLBC is probably the way to go. If you&#8217;re doing a larger installation, or an installation for a customer then it&#8217;s worth investigating g729, especially if you&#8217;re running underpowered hardware or have a large number of Exts or lots of expected concurrent calls.</p>
<p style="text-align: left">Please keep in mind that you do not have to stick with just one codec, feel free to mix and match box on a per-customer level, or on a per-machine level also.</p>
<p style="text-align: left">
<p style="text-align: center">
<p style="text-align: center"><strong>3) g729 &#8211; Installation</strong></p>
<p style="text-align: left">OK so I&#8217;m going to cheat here and direct you to Digium. Yes, there are &#8220;free&#8221; binaries out there, but at the price of $10 per-channel surely it&#8217;s not that expensive if you&#8217;re going to add it to your PBX&#8217;s you deploy.</p>
<p style="text-align: left">Anyway if you&#8217;re downloading a &#8220;free&#8221; version, simply pop it in /usr/lib/asterisk/modules and chmod 755 the file. 64-bit versions go in /usr/lib64/asterisk/modules</p>
<p style="text-align: left">Other than that, follow Digiums excellent instructions here, it should take you less than 5 minutes: <a href="http://kb.digium.com/entry/5/">http://kb.digium.com/entry/5/</a></p>
<p style="text-align: left">
<p style="text-align: center">
<p style="text-align: center"><strong>4) iLBC &#8211; Installation</strong></p>
<p style="text-align: left">We&#8217;re going to be compiling this from source. Lucky for us Elastix makes this nice and easy! We won&#8217;t be installing a complete asterisk system, we don&#8217;t want to break the RPM&#8217;s because, let&#8217;s face it, it&#8217;s the easiest way to keep a system updated / secure.</p>
<p style="text-align: left">First off, download Asterisk from here: <a href="http://www.asterisk.org/downloads">http://www.asterisk.org/downloads</a></p>
<p style="text-align: left">Get it to your elastix box any way you want (SCP / SSH / local terminal) and pop it in /usr/src</p>
<p style="text-align: left">Now, run:</p>
<p style="text-align: left; padding-left: 30px;">tar xvzf asterisk-1.4.*.tar.gz</p>
<p style="text-align: left">change in to the newly created &#8220;asterisk&#8221; directory and run:</p>
<p style="text-align: left; padding-left: 30px;">./contrib/scripts/get_ilbc_source.sh</p>
<p style="text-align: left">Press &#8220;Enter&#8221; after it displays the warning presuming you&#8217;ve read the documentation (Which I&#8217;m also going to assume you&#8217;ve done) and shortly after you&#8217;ll get a lovely message telling you &#8220;The iLBC source code download is complete.&#8221;</p>
<p style="text-align: left">Now, run:</p>
<p style="text-align: left; padding-left: 30px;">./configure</p>
<p style="text-align: left">That should run through without any issues, so now we&#8217;re going to tell Asterisk that we only want to build a very basic system (for the sake of time) and we want the iLBC codec. To enable the iLBC Codec you need to ensure in &#8220;4. Codec Translators&#8221; that &#8220;codec_ilbc&#8221; is checked.</p>
<p style="text-align: left"><strong>Note:</strong> When you press &#8220;Esc&#8221; to quit &#8220;make menuconfig&#8221;, make sure you press <strong><span style="text-decoration: underline;">S</span></strong> to save changes.</p>
<p style="text-align: left">Now, just type &#8220;make&#8221; and watch the system build! As soon as you see codec_ilbc you can press Ctrl + C to stop it building. You&#8217;ll notice codec_ilbc being built just after all the app_ files, so it&#8217;s safest to stop the build process when you see the format_ files being built. Either that or let it run right the way through.</p>
<p style="text-align: left">Almost done now, you just need to copy ./codecs/codec_ilbc.so to /usr/lib/asterisk/modules (or /usr/lib64/asterisk/modules on a 64-bit system) and chmod 755 <span style="background-color: #ffffff">/usr/lib/asterisk/modules/codec_ilbc.so</span></p>
<p style="text-align: left"><span style="background-color: #ffffff"> </span></p>
<p style="text-align: left">
<p style="text-align: center"><strong>5) Trunk and Extension setup</strong></p>
<p style="text-align: left">Now depending on if you want your Ext or SIP Trunk to use the codec, it may be desirable to &#8220;force&#8221; the system to only use that codec.</p>
<p style="text-align: left"><strong>To setup a Trunk:</strong> Open the SIP / IAX2 Trunk that you wish to limit in Elastix to the particular codec. In the PEER Details add an additional two lines:</p>
<p style="text-align: left; padding-left: 30px;">disallow=all<br />
<span style="background-color: #ffffff">allow=g729&amp;ilbc</span></p>
<p style="text-align: left;"><span style="background-color: #ffffff">You may want to opt for something such as &#8220;allow=g729&amp;g711&#8243; or perhaps &#8220;allow=ilbc&amp;alaw&#8221; for example. Review your needs and act appropriately. Save and submit the changes.</span></p>
<p style="text-align: left"><span style="background-color: #ffffff"><strong>To setup an Ext:</strong> Open the Ext that you wish to limit the particular codec on. Scroll down to &#8220;disallow&#8221; and enter in &#8220;all&#8221;. Next in the &#8220;allow&#8221; field enter in something such as &#8220;g729&#8243; or &#8220;ilbc&#8221;, or perhaps &#8220;ilbc&amp;alaw&#8221; as above with the Trunk. Save and submit the changes when done.</span></p>
<p style="text-align: left"><span style="background-color: #ffffff"><strong>Notes:</strong> Try and avoid transcoding where possible. It&#8217;s nice that asterisk does it so well, however it does add marginal delay to your calls, not to mention CPU overheads etc.</span></p>
<p style="text-align: left"><span style="background-color: #ffffff">Also keep in mind that if you limit the codecs, say to just g729, and a particular device is unable to use g729, the call will simply fail.</span></p>
<p style="text-align: left"><span style="background-color: #ffffff"> </span></p>
<p style="text-align: center"><strong>6) Testing the codecs</strong></p>
<p style="text-align: left">The best part, testing! Hopefully everything has gone according to plan thus far. You&#8217;ve got one or two new codecs setup and you&#8217;re dying to test them out (In a development / testing environment naturally and not on your companies production PBX). Now you need to ssh in to your asterisk system and run:</p>
<p style="text-align: left; padding-left: 30px;">asterisk -r</p>
<p style="text-align: left">This brings up the asterisk console. Now, make a call on one of your new Ext&#8217;s that should be using iLBC / g729, or over the trunk that should be compressed.</p>
<p style="text-align: left">While that call is active, rush back over to your ssh session and in the asterisk console type:</p>
<p style="text-align: left; padding-left: 30px;">sip show channels</p>
<p style="text-align: left">You should see something like this:</p>
<pre style="padding-left: 30px;">x.x.x.x   09xxxxxxx   2408517b625  00101/00102  0x400 (ilbc)     No       Rx: ACK</pre>
<p style="text-align: left">If you&#8217;re making a pure SIP call, you&#8217;ll see one line for the Ext -&gt; Asterisk, and one line from Asterisk -&gt; your SIP Provider.</p>
<p style="text-align: left">Success!</p>
<p style="text-align: left">Thanks for reading, and if you have any questions please feel free to leave comments or post in the Elastix forums.</p>
<p style="text-align: left">Please also keep in mind that whilst g729 / iLBC are not the only codecs, almost every device that supports compression is likely to support one of them, or if not it will support GSM.</p>
<p style="text-align: left">Hopefully as you&#8217;re reading this you&#8217;re happily making calls via iLBC or g729. Enjoy!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblogs.elastix.org%2Fen%2F2009%2F11%2Filbc-vs-g729-the-quick-guide-to-using-compressed-codecs-in-elastix%2F&amp;linkname=iLBC%20vs%20g729%20%26%238212%3B%20The%20quick%20guide%20to%20using%20compressed%20codecs%20in%20Elastix"><img src="http://blogs.elastix.org/en/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blogs.elastix.org/en/2009/11/ilbc-vs-g729-the-quick-guide-to-using-compressed-codecs-in-elastix/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quick and Easy QoS with Tomato</title>
		<link>http://blogs.elastix.org/en/2009/11/quick-and-easy-qos-with-tomato-2/</link>
		<comments>http://blogs.elastix.org/en/2009/11/quick-and-easy-qos-with-tomato-2/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 15:53:59 +0000</pubDate>
		<dc:creator>Josiah Spackman</dc:creator>
				<category><![CDATA[Elastix]]></category>
		<category><![CDATA[VOIP]]></category>
		<category><![CDATA[ADSL]]></category>
		<category><![CDATA[Linksys AM300]]></category>
		<category><![CDATA[QoS]]></category>
		<category><![CDATA[Quality of Service]]></category>
		<category><![CDATA[SIP]]></category>
		<category><![CDATA[Tomato Firmware]]></category>
		<category><![CDATA[WL-520GU]]></category>
		<category><![CDATA[WRT54GL]]></category>

		<guid isPermaLink="false">http://blogs.elastix.org/en/?p=17</guid>
		<description><![CDATA[SIP combined with Elastix is nothing short of amazing.
Cost savings, flexibility, functionality, and I’ll say it again: Cost savings!
When deploying Elastix to use SIP over ADSL (for example), many find their existing Broadband connection does not quite provide satisfactory call quality, usually due to sharing the connection with other traffic.
We will follow this post up [...]]]></description>
			<content:encoded><![CDATA[<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">SIP combined with Elastix is nothing short of amazing.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">Cost savings, flexibility, functionality, and I’ll say it again: Cost savings!</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">When deploying Elastix to use SIP over ADSL (for example), many find their existing Broadband connection does not quite provide satisfactory call quality, usually due to sharing the connection with other traffic.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">We will follow this post up later with another on Diagnosing connectivity / quality issues.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px"><strong>NOTE:</strong> This is not the <em>only</em> way to do QoS, but after having struggled with the likes of pfsense, the budget / useless junk that many routers build in, and a host of other software / hardware solutions, I found Tomato did it the easiest, the best, and the most reliably! It’s a breeze to setup, and you’ll be kicking yourself for not having set something like this up earlier.<span id="more-17"></span></p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">Requirements:</p>
<ul>
<li><span style="background-color: #ffffff">Administrative access to the ADSL Router</span></li>
<li><span style="background-color: #ffffff">The Router must either do DMZ or (most ideally) Half-bridging. The Linksys AM300 is recommended</span></li>
<li><span style="background-color: #ffffff">A Linksys WRT54GL or Asus WL-52oGU — The WRT54GL was easiest to flash, but the WL-520GU is un-brickable</span></li>
<li><span style="background-color: #ffffff">The Tomato Firmware, available from polarcloud.com/tomato</span></li>
<li><span style="background-color: #ffffff">A quiet afternoon in the office, where nobody will jump up and down too much if you take down the internet for a little bit.</span></li>
</ul>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px"><strong>NOTE:</strong> I would *strongly* recommend you get permission to take and test this out on your <span style="margin: 0px; padding: 0px; text-decoration: underline;">home</span> connection prior to trying to deploy it in a production environment. I promise you will suffer much less heartbreak compared to tearing down a corporate network and finding you cannot easily repair it to its original state.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: center;margin: 0px"><strong>Step 1) Selecting the Hardware</strong></p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">I’ll be honest, the Linksys WRT54GL is probably the easiest, and at around NZD$100 it’s a bargain price! See xe.com/ucc to convert that price to your currency, or check out the price at Newegg.com</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">Make sure its the GL model, the L standing for Linux, as some of the non-L models aren’t compatible, namely the WRT54G v5.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">You also need a router that will hand the IP address / port-forwarding over to it, so you’re going to want something such as the Linksys AM300, it’s cheap, reliable and known to work well. Just make sure it has Firmware 1.19.04 or half-bridge won’t work. Other products such as the NetComm NB6PLUS4Wn will suffice if you put the Tomato in a DMZ, but half-bridging is a nicer solution than a DMZ, due to the Tomato router thinking it’s pretty much *the* connection to the Internet. I’ll leave the getting-connected-to-the-internet part to your imagination.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: center;margin: 0px"><strong>Step 2) Flashing Tomato</strong></p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">If you have the WRT54GL then this is <em>dead easy</em>. If you’ve previously used it, then reset it back to factory defaults. Connect via a cable (safer than wireless, even though technically speaking WiFi does work for upgrades), go into the Admin settings, select the firmware: WRT54G_WRT54GL.bin</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">Hit Upgrade, sit back, wait 2-3 minutes and then try re-logging in to the Web Interface.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">devices such as the Asus WL-520GU also work well in my experience, though the WRT54GL is definitely the easiest.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">Now there is a <strong><em>ton</em><span style="font-weight: normal;padding: 0px;margin: 0px"> of features that we <em>could</em> go into which you may find useful, but now’s not really the time to go into all those. With that in mind we’re going to dive straight into the deep end. Fire up the WebGUI, Login with the default username:password of admin:admin and click on QoS –&gt; Basic Settings on the left-hand side.</span></strong></p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px"><strong><span style="font-weight: normal;padding: 0px;margin: 0px"><br />
</span></strong></p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: center;margin: 0px"><span style="font-weight: normal;padding: 0px;margin: 0px"><strong>Step 3) Determining your speeds</strong></span></p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px"><strong><span style="font-weight: normal;padding: 0px;margin: 0px">This may sound like a silly thing for me to mention, but you absolutely </span>must</strong> get this right. First stop: Speedtest.net !</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">Run a speedtest and see what speeds you get. Also if you check the sync speeds in your router, they’ll give you a rough indication of what speeds you’ll be getting.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">Now, you’re not going to want to set your Max InboundBandwidth &amp; Max Outbound Bandwidth in Tomato to your actual line max. For example if your DSL connection is sync’ing at 4.8m/bit down and 950kbps upload and you specify those values in Tomato, not only will you never actually attain those speeds, but if you re-sync at a slightly lower speed, it’ll throw things even more. Speedtest for me shows I’m getting around 4300kbps down and 890kbps upload, so we’re going to round things right down to 3500kbps download and 800kbps upload. Seriously, I can pretty much promise that none of your staff will notice the difference between the internet speeds downloading at 4300kbps vs 3500kbps so don’t feel as though you’re going to be slowing down their internet. You won’t! If anything, they’ll “feel” like it’s going faster by the time we’re done.</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;text-align: left;margin: 0px">So, enter in those values of yours in the Max Bandwidth for inbound &amp; outbound. Up the top we’re going to set:</p>
<ul>
<li><span style="background-color: #ffffff">Enable QOS</span></li>
<li><span style="background-color: #ffffff">Prioritize small packets with these control flags: ACK</span></li>
<li><span style="background-color: #ffffff">Prioritize ICMP</span></li>
<li><span style="background-color: #ffffff">Reset class when changing settings</span></li>
<li><span style="background-color: #ffffff">Default Class: C</span></li>
</ul>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">Your Default Class can change, I’ve set it to C for un(C)lassified. Honestly it made sense when I first setup the router…</p>
<p style="padding-top: 0px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;margin: 0px">Now, we’re going to set the Outbound values, these are the <strong><em>most</em><span style="font-weight: normal;padding: 0px;margin: 0px"> essential. Here&#8217;s a bit of an example of how mine looks:</span></strong></p>
<ul>
<li><span style="background-color: #ffffff">Highest / 80% / 90%</span></li>
<li><span style="background-color: #ffffff">High / 20% / 80%</span></li>
<li><span style="background-color: #ffffff">Medium / 5% / 70%</span></li>
<li><span style="background-color: #ffffff">Low / 3% / 60%</span></li>
<li><span style="background-color: #ffffff">Lowest / 2% / 20%</span></li>
<li><span style="background-color: #ffffff">Class A / 90% / 100%</span></li>
<li><span style="background-color: #ffffff">Class B / 1% / 5%</span></li>
<li><span style="background-color: #ffffff">Class C / 1% / 10%</span></li>
<li><span style="background-color: #ffffff">Class D / 1% / 5%</span></li>
<li><span style="background-color: #ffffff">Class E / 10% / 20%</span></li>
</ul>
<p>Now I&#8217;ll explain my madness here. Class C is the default, so if it&#8217;s uncategorized it&#8217;s because it&#8217;s not important enough for me to spend the time writing rules for it, so you don&#8217;t want to give it much. Class B &amp; D don&#8217;t get used by me, so again I leave them very low, as nothing should be using them. Class A is going to be my VoIP so I want it to always get priority.</p>
<p>Here&#8217;s a summary of my understanding of how the QoS works. It could be totally wrong, however it&#8217;s done me well thus far:</p>
<p>You&#8217;ve got a limited amount of outgoing bandwidth, lets say for arguments sake its 100kbps.<br />
Now lets pretend you&#8217;re saturating that with a variety of traffic, including VoIP, sending email attachments through Gmail (http traffic) and FTP uploading (website changes?). So, VoIP is only going to use a tiny little bit, if you&#8217;re using iLBC then it&#8217;ll be 13.3kbps + overheads = 44kbps (<a title="Asterisk Bandwidth Calc" href="http://site.asteriskguide.com/bandcalc/bandcalc.php" target="_blank">See here</a>). If you&#8217;ve classified VoIP to Class A, it&#8217;s going to try and reserve 90% at least. You only need 44kbps so that&#8217;s still leaving 66kbps for HTTP &amp; FTP. Now, if HTTP is Highest, then it&#8217;s going to try and reserve 80% of the 100kbps for it, essentially leaving FTP with nothing. For this reason you&#8217;d set HTTP to High perhaps, and FTP to Medium. Both have a &#8220;max&#8221; of 80% &amp; 70% respectively, so it&#8217;ll do it&#8217;s best to share the remainder after VoIP between the two of them, at all times giving HTTP a minimum of 20% and FTP at least 5%.</p>
<p>In a nutshell, set the minimum amount to be reserved on the left, and the max that it should be allowed on the right. Assume worst-case scenario that your line is going to be 100% full all the time, and try and give each a bit of &#8220;wiggle room&#8221;</p>
<p>Next we setup Inbound also:</p>
<ul>
<li>Highest / 90%</li>
<li>High / 80%</li>
<li>Medium / 70%</li>
<li>Low / 60%</li>
<li>Lowest / 20%</li>
<li>Class A / 100%</li>
<li>Class B / 5%</li>
<li>Class C / 10%</li>
<li>Class D / 5%</li>
<li>Class E / 5%</li>
</ul>
<p>You can turn on TCP Vegas if you want, I choose not to, you can read more about it and what it does on Wikipedia. Scroll down and hit Save.</p>
<p>Now on to the next part:</p>
<p style="text-align: center"><strong>Step 4) Classification of Traffic types</strong></p>
<p style="text-align: left">On the left-hand side we&#8217;re now in QoS &#8211;&gt; Classification</p>
<p style="text-align: left">We need to classify the types of traffic that fall in to each of the classes we setup just earlier. We&#8217;re going to start by going through and clearing out all the standard rules and we&#8217;ll put in a few of our own:</p>
<ul>
<li>UDP / Src or Dst / 5060 / Class A / SIP</li>
<li>UDP / Src or Dst / 10000-20000 / Class A / RTP</li>
<li>TCP or UDP / Dst Port / 53 / Highest / DNS</li>
<li>TCP / Dst Port / 80,443 / High / HTTP &amp; HTTPS</li>
<li>TCP / Src or Dst / 25,110,143 / Medium / Email (SMTP POP3 IMAP)</li>
<li>TCP or UDP / Src or Dst / Class C Bulk Traffic</li>
<li>GRE / Src or Dst / Class E / PPTP VPN (GRE)</li>
</ul>
<p>Why? We prioritize VoIP first of all, at all times we want our voice to be perfect. Next we do DNS so that pages &#8220;feel&#8221; like they&#8217;re loading quickly (Especially with OpenDNS). We want HTTP &amp; HTTPS in their own little queue, followed by Email.<br />
Im also putting PPTP VPN into a class of it&#8217;s own, as I use that a bit myself for a variety of things.<br />
<span style="background-color: #ffffff">Finally, we&#8217;re already technically classifying anything that <em>isnt</em> classified as Bulk Traffic / Class C, but this rule just re-affirms it.</span></p>
<p><span style="background-color: #ffffff">Scroll down, hit Save, then make a call to a local freephone number out your local SIP connection to see if this is working.</span></p>
<p style="text-align: center"><span style="background-color: #ffffff"><strong>Step 5) Confirmation and Corrections</strong></span></p>
<p style="text-align: left">Now comes the testing part. You should be able to click on QoS &#8211;&gt; View Graphs, and while you&#8217;re on a call you&#8217;ll see Class A has a bit of traffic in it. If you click on the Class A title it will take you to a screen where you can now also see the IP that the traffic is going to. With a bit of luck, this should be your Elastix box (If you&#8217;ve got a remote extension) or your ITSP (If your Elastix box is local).</p>
<p style="text-align: left">From here, it&#8217;s a matter of keeping an eye on the graphs over the next few days / weeks and seeing what <span style="text-decoration: underline;">really</span> goes on through your Internet Connection. You may be quite surprised at what you see.</p>
<p style="text-align: left">If you run into any troubles, feel free to post on the Elastix Forums and either myself or one of the many other helpful regulars will be able to assist.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblogs.elastix.org%2Fen%2F2009%2F11%2Fquick-and-easy-qos-with-tomato-2%2F&amp;linkname=Quick%20and%20Easy%20QoS%20with%20Tomato"><img src="http://blogs.elastix.org/en/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blogs.elastix.org/en/2009/11/quick-and-easy-qos-with-tomato-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
