tag:blogger.com,1999:blog-23608903990488311132024-03-13T12:49:43.145+11:00Open Source on Commodity HardwareEnhancing your home computing experiencesJonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.comBlogger40125tag:blogger.com,1999:blog-2360890399048831113.post-70940825980855844912013-04-24T17:35:00.002+10:002013-04-25T19:52:18.807+10:00On Cleaning Ubuntu's boot partition<br />
<span style="font-family: Arial, Helvetica, sans-serif;">I got two Ubuntu servers which have been shutdown for months. Upon powering them up, I did the usual "apt-get update; apt-get upgrade" on both but received the following error:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">gzip: stdout: No space left on device</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Did a "df -kh" and noticed the /boot partition is almost full. </span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root@web-host:/boot# df -kh</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Filesystem Size Used Avail Use% Mounted on</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/dev/mapper/web--host-root 70G 9.8G 56G 15% /</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">... ... </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/dev/sda1 228M 224M 0 100% /boot</span><br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Note: Ubuntu's default /boot partition size is 228MB, and the /boot directory stores previous (unused) versions of linux in case if they are needed. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">To clean up the /boot directory:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">1. Use "apt-get autoremove" and problem solved.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">2. In case if this doesn't work, I found a <a href="http://ubuntuforums.org/showthread.php?t=1435818" target="_blank">web post</a> with a script to remove all unused linux images.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic" |while read n;do apt-get -y remove $n;done</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">While the following error still occurs occassionally, the /boot usage is reduced to 26%.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">update-initramfs: Generating /boot/initrd.img-3.2.0-33-generic</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">gzip: stdout: No space left on device</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Subsequent "apt-get update; apt-get upgrade" are successful and returns no error. </span></div>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">P.S. There's this program called <a href="http://gparted.sourceforge.net/" target="_blank">GParted </a>which comes with Ubuntu Live CD (ubuntu desktop 13.0.4 ships with Gparted v.0.12.1). It allows for resizing of /boot partition. </span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">However, if the Ubuntu servers have Logical Volume Manager (LVM) on its sda5 partition (sitting on top of sda2), then use <a href="http://gparted.sourceforge.net/download.php" target="_blank">Gparted's own live CD</a> (v.0.14) which supports resizing LVM.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
</div>
<br />Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com2tag:blogger.com,1999:blog-2360890399048831113.post-83211247576323789072012-11-22T18:05:00.001+11:002012-11-22T18:05:07.393+11:00Raspberry Pi<br />
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">A colleague recently told me about <a href="http://en.wikipedia.org/wiki/Raspberry_Pi" target="_blank">Raspberry Pi</a> originally developed for educational purposes. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">It is a credit card low cost computer running on a stripped down version of Debian. Considering its price and it is running on open source operating system, it definitely caught my attention.</span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-fVxCwrGxVdY/UK3LWbtJPKI/AAAAAAAAAYE/KCYJooAwOOk/s1600/raspberrypirev2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="http://1.bp.blogspot.com/-fVxCwrGxVdY/UK3LWbtJPKI/AAAAAAAAAYE/KCYJooAwOOk/s320/raspberrypirev2.jpg" width="320" /></a></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Herewith one of the <a href="http://www.trustedreviews.com/raspberry-pi_Desktop-PC_review" target="_blank">reviews</a> on this product. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;">Applications</span></i></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">There are several articles written about cool ideas to use this hardware (such as <a href="http://www.makeuseof.com/tag/top-5-amazing-raspberry-pi-computer/" target="_blank">here</a>, and <a href="http://www.techrepublic.com/blog/european-technology/10-coolest-uses-for-the-raspberry-pi/505" target="_blank">here</a>), including remote security camera, media streamer, internet radio etc.</span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Based on what I have read so far, this board should be able to deliver any applications or functions that is not overly CPU demanding. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">On a personal note, I am particularly fond of its low-noise aspect, such that it can sit pretty well anywhere in my home without generating too much disturbances. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;">Cost</span></i></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">I did a quick calculation on the cost of building one of these including casing and flash drive, which works out to be less than $75.00 (but I have not considered the delivery cost of Pi itself): </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span></div>
<table cellpadding="7" cellspacing="0" style="width: 639px;">
<colgroup><col width="198"></col>
<col width="199"></col>
<col width="198"></col>
</colgroup><tbody>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Item</span></div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="199">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Cost ($)</span></div>
</td>
<td style="border: 1px solid #000000; padding: 0cm 0.19cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Remarks</span></div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Pi</span></div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="199">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">42</span></div>
</td>
<td style="border: 1px solid #000000; padding: 0cm 0.19cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://australia.rs-online.com/web/generalDisplay.html?id=raspberrypi" target="_blank">RS Online</a></span></div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Case</span></div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="199">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">10</span></div>
</td>
<td style="border: 1px solid #000000; padding: 0cm 0.19cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Ebay AU</span></div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">32GB SD card</span></div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="199">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">21.90</span></div>
</td>
<td style="border: 1px solid #000000; padding: 0cm 0.19cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Ebay AU</span></div>
</td>
</tr>
<tr valign="TOP">
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">Total</span></div>
</td>
<td style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; border-top: 1px solid #000000; padding-bottom: 0cm; padding-left: 0.19cm; padding-right: 0cm; padding-top: 0cm;" width="199">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;">73.90</span></div>
</td>
<td style="border: 1px solid #000000; padding: 0cm 0.19cm;" width="198">
<div class="western" lang="en">
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span></div>
</td>
</tr>
</tbody></table>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;">Getting started</span></i></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">To have it up and running, there are several getting started guides available online, and here is a<a href="http://www.engadget.com/2012/09/04/raspberry-pi-getting-started-guide-how-to/" target="_blank"> quite comprehensive one</a> with pictures illustrating the steps. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">In summary, it is as simple as preparing the operating system on the SD card (from either a windows or linux machine), plug it in, power it up and off you go. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><i>Others Tech References</i></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">- Design Spark provides a <a href="http://www.designspark.com/nodes/view/type:Design-centre/slug:raspberry-pi" target="_blank">schematics capture and PCB layout tool</a> for free. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">- I found a <a href="http://www.pierrox.net/cmsms/open-source/clfs.html" target="_blank">guide </a>detailing building GNU/Linux on ARM machine from the ground up. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">- <a href="http://gooseberry.atspace.co.uk/" target="_blank">Gooseberry </a>- an alternative to Raspberry Pi.</span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">It's definitely on my agenda. </span></div>
<div class="western" lang="en" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com1tag:blogger.com,1999:blog-2360890399048831113.post-31111376648079316472012-11-19T22:28:00.003+11:002012-11-22T11:07:50.509+11:00OwnCloud on Ubuntu. Media Server (miniDLNA). Remote Access<br />
<div class="western" style="margin-bottom: 0cm;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">Incentive</span></b></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Recently
I took a half an hour video using my Samsung S3. The video was
approximately 3.6GB, which is close to the upper limit offered by
several publicly available cloud/ online storage services such as
</span><a href="https://www.dropbox.com/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Dropbox</a><span style="font-family: Arial, Helvetica, sans-serif;">, </span><a href="https://drive.google.com/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Google Drive</a><span style="font-family: Arial, Helvetica, sans-serif;">, or </span><a href="https://one.ubuntu.com/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Ubuntu One</a><span style="font-family: Arial, Helvetica, sans-serif;">.</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">That
is enough incentive for me to build my own private cloud, considering my 1.5TB harddrive is the only storage limitation and I have full ownership
over its security.</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">OwnCloud
Server</span></b></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-zjoKikxGq6Q/UKoUiecVEqI/AAAAAAAAAWs/nC-fCcBwV5I/s1600/owncloud-logo-150x74.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="158" src="http://1.bp.blogspot.com/-zjoKikxGq6Q/UKoUiecVEqI/AAAAAAAAAWs/nC-fCcBwV5I/s320/owncloud-logo-150x74.png" width="320" /></a></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">I came across </span><a href="http://owncloud.org/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">OwnCloud</a><span style="font-family: Arial, Helvetica, sans-serif;">, an open source, php web based software.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Owncloud is a centralized storage solution: the software automatically stores your files onto its server.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">It also has its own clients for linux, windows, android etc, so it's quite flexible in my opinion.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><i>Installation</i></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">On my
ubuntu server running on 12.04.1 LTS (with LAMP stack), it's installation is simply:</span></div>
<div class="western" lang="en-US" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace;"><br />
</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root@ubuntu:/opt#
apt-get install owncloud</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br />
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">At the time of writing, this gives you
ownCloud version 3 (the latest version is owncloud 4), so keep in mind the compatible sync clients's version is 1.05</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Upon successful installation, OwnCloud can be accessed via </span><span style="font-family: Arial, Helvetica, sans-serif;">web interface http://server-ip-address</span><web address="address" ip="ip" style="font-family: Arial, Helvetica, sans-serif;">/owncloud. </web><span style="font-family: Arial, Helvetica, sans-serif;">All file upload, download and folder creation can be done here: </span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-svPohIuZPeo/UKoVYwgLBII/AAAAAAAAAW0/4KifvWyve0A/s1600/owncloud.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="http://2.bp.blogspot.com/-svPohIuZPeo/UKoVYwgLBII/AAAAAAAAAW0/4KifvWyve0A/s320/owncloud.jpg" width="320" /></a></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">OwnCloud Sync
Clients</span></b></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">OwnCloud's web interface allows for max of 2MB upload, I understand this as a PHP limitation. </span></div>
<div class="western" style="margin-bottom: 0cm;">
</div>
<div>
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://owncloud.org/sync-clients/" target="_blank">OwnCloud has several sync clients available for different OSes</a>, which don't have such limitations. So far I have tried two clients (both version 1.05 for Windows and Linux respectively) with the following findings:</span><br />
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><i>1. Windows 8</i></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Upon first setting up owncloud clientsync account, I encountered this
client and server timing out of sync error. This prohibits the server and client to synchronize their files.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">As a work around, I have set up the Ubuntu server as an NTP server. Then I pointed my windows machine
towards it. </span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">For reference:</span></div>
<table cellpadding="4" cellspacing="0" style="width: 100%px;">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td style="border: 1px solid #000000; padding: 0.1cm;" valign="TOP" width="100%"><div align="JUSTIFY" class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><i>Install
</i></span></span>
</div>
<div align="JUSTIFY" class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">#
apt-get install ntp</span></span></div>
<div align="JUSTIFY" class="western" style="margin-bottom: 0cm;">
<br /></div>
<div align="JUSTIFY" class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;"><i>Start/
stop NTP</i></span></span></div>
<div align="JUSTIFY" class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">#
/etc/init.d/ntp --help</span></span></div>
<div align="JUSTIFY" class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="font-size: x-small;">Usage:
/etc/init.d/ntp
{start|stop|restart|try-restart|force-reload|status}</span></span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div align="JUSTIFY" class="western">
<span style="font-family: Arial, sans-serif; font-size: x-small;"><i>As client</i></span></div>
<div align="JUSTIFY" class="western">
<span style="font-family: Arial, sans-serif; font-size: x-small;"># ntpdate au.pool.ntp.org</span></div>
</td>
</tr>
</tbody></table>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">(In all fairness, it turned out the Windows machine was configured to the incorrect timezone, hence prohibiting it from synchronizing with the times.windows server).</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><i><br /></i></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><i>2. Ubuntu Laptop LTS
12.04</i></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Having installed the
ownCloud sync client on my </span><a href="http://homenw.blogspot.com.au/2012/11/hp-mini-1000-ubuntu-1204-lts.html" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">netbook</a><span style="font-family: Arial, Helvetica, sans-serif;">, I have encountered no synchronization issues (apparently the netbook already has a public NTP working properly). </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-q2XE19_5pLY/UKoW2qrygbI/AAAAAAAAAW8/xf6-q_LVvig/s1600/owncloud+ubuntu+client.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="http://2.bp.blogspot.com/-q2XE19_5pLY/UKoW2qrygbI/AAAAAAAAAW8/xf6-q_LVvig/s320/owncloud+ubuntu+client.png" width="320" /></a></div>
<div class="western" style="margin-bottom: 0cm;">
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">I have left my netbook switched on allowing it to be sync for the entire day. Did a tcpdump to confirm there are https traffic being exchanged between the client and server.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The sync is finally successful. I suspect the initial sync took longer than the subsequent incremental updates. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b><br /></b></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><b><br /></b></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b>Home Access (miniDLNA)</b></span><br />
<br />
<div style="font-family: Arial, Helvetica, sans-serif;">
Leveraging the Ethernet over Power setup I previously <a href="http://homenw.blogspot.com.au/2012/11/moving-to-ethernet-over-power.html" target="_blank">posted</a>, it makes sense to enable DLNA on my OwnCloud server. This essentially converts my server to become a centralized storage, which allows for access from all devices via DLNA.</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<a href="http://sourceforge.net/projects/minidlna/" target="_blank">MiniDLNA</a> is a light weight DLNA server software, which installation is as simple as running "apt-get install minidlna". A google search of "dlna ubuntu" returns this <a href="http://www.conrad.id.au/2012/06/quick-tip-dlna-server-on-linux-ubuntu.html" target="_blank">quick tip</a> as its first result covering all the essential configurations. </div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
For my setup, by default, OwnCloud stores its client files in the following directory:</div>
<span style="color: #0b5394; font-family: Courier New, Courier, monospace; font-size: x-small;">/var/lib/owncloud/data/root/files/ clientsync</span><br />
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
In addition, I have also created a "music" and "photos" folders under the same directory. These directories are added to the media directories of minidlna (/etc/minidlna.conf)</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># set this to the directory you want scanned.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># * if have multiple directories, you can have multiple media_dir= lines</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># * if you want to restrict a media_dir to a specific content type, you</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># can prepend the type, followed by a comma, to the directory:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)</span><br />
<span style="color: #0b5394; font-family: Courier New, Courier, monospace; font-size: x-small;">media_dir=A,/var/lib/owncloud/data/root/files/music</span><br />
<span style="color: #0b5394; font-family: Courier New, Courier, monospace; font-size: x-small;">media_dir=P,/var/lib/owncloud/data/root/files/photos</span><br />
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
Notice I have set them as "A" for audio and "P" for images. </div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
At this point, if I run minidlna, the server returns an “Media directory not accessible!" error .</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
There is a <a href="http://forum.owncloud.org/viewtopic.php?f=3&t=2065" target="_blank">post on the owncloud community forum</a> describing the fix - by adding both root and minidlna users to the group www-data:</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
root@ubuntu:/opt# usermod -a -G www-data root</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
root@ubuntu:/opt# usermod -a -G www-data minidlna</div>
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
Now, apply -R option to force a full rescan, before restarting minidlna:</div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root@ubuntu:/opt# minidlna -R</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root@ubuntu:/opt# /etc/init.d/minidlna force-reload</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">* Restarting DLNA/UPnP-AV media server minidlna [ OK ]</span><br />
<div style="font-family: Arial, Helvetica, sans-serif;">
<br /></div>
<div style="font-family: Arial, Helvetica, sans-serif;">
/var/log/minidlna.log confirms file scan is successful:</div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] minidlna.c:155: warn: received signal 15, good-bye</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] minidlna.c:907: warn: Starting MiniDLNA version 1.0.21 [SQLite 3.7.9].</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] minidlna.c:935: warn: Creating new database...</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] minidlna.c:1002: warn: HTTP listening on port 8200</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] scanner.c:719: warn: Scanning /var/lib/owncloud/data/root/files/music</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] scanner.c:790: warn: Scanning /var/lib/owncloud/data/root/files/music finished (166 files)!</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:26] scanner.c:719: warn: Scanning /var/lib/owncloud/data/root/files/photos</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[2012/11/17 14:23:28] scanner.c:790: warn: Scanning /var/lib/owncloud/data/root/files/photos finished (1359 files)!</span><br />
<div style="font-family: Arial, Helvetica, sans-serif; font-weight: bold;">
<br /></div>
<b style="font-family: Arial, Helvetica, sans-serif;">Remote Access</b></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">As mentioned earlier, there are largely two methods for ownCloud clients to access OwnCloud server - web access and sync client. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">There are some useful tweaks which enhance the security and ease of remote access:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">1. Enhance security by <a href="https://help.ubuntu.com/community/forum/server/apache2/SSL" target="_blank">enabling SSL</a> (and redirecting all HTTP to HTTPS)</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">2. Enabling remote access by utilizing free dynamic dns services as covered in my earlier <a href="http://homenw.blogspot.com.au/2012/11/dynamic-dns-dnsdynamic-and-no-ip.html" target="_blank">post</a>. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">For example, rather than configuring https://Server-LAN-IP/owncloud, configure https://dynamicDNS-URL:some-random-port/owncloud as the owncloud server's address.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Stating the obvious, the dynamicDNS-URL is intended to be accessible via the public internet. That also means you can access your ownCloud from anywhere in the world with internet connectivity. </span><br />
<br />
<b style="font-family: Arial, Helvetica, sans-serif;">Further notes</b><br />
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">I recall enabling SSL on my Apache2 server involved a couple of steps, from creating SSL certificate to enabling the corresponding module in Apache2 software.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">It is a worthwhile topic which I may write another post on when I get around to it. </span></div>
<div class="western" style="margin-bottom: 0cm;">
</div>
</div>
Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com1tag:blogger.com,1999:blog-2360890399048831113.post-12944241050774041812012-11-19T22:23:00.001+11:002012-11-19T22:23:15.254+11:00HP mini 1000 - Ubuntu 12.04 LTSA quick post on my HP mini 1000 network, which I first blogged (<a href="http://homenw.blogspot.com.au/2012/01/hp-mini-1000-ubuntu-netbook-edition.html" target="_blank">post</a>) in the beginning of this year.<br />
<br />
First time I started it up in ten months, the software manager automatically offered to upgrade it to 12.04 LTS. The rest was point and click and a couple of hours of waiting - which has been really worthwhile:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-yma57wUqRRI/UKn8rEJZJeI/AAAAAAAAAWE/tzYtpOHNADQ/s1600/20121119_202548.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-yma57wUqRRI/UKn8rEJZJeI/AAAAAAAAAWE/tzYtpOHNADQ/s320/20121119_202548.jpg" width="320" /></a></div>
<br />
Giving credit to <a href="http://www.ubuntu.com/ubuntu" target="_blank">Ubuntu</a>, the latest LTS version has fixed at least two bugs:<br />
1. The wireless connection is functioning properly and its icon correctly reflects its status.<br />
2. The little blue LED button which enables/ disables the wireless connection now functions properly.<br />
<br />
Not bad for a three years old Intel atom netbook as I am planning to do more things with it.Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-47470451064071227552012-11-19T21:37:00.001+11:002012-11-19T22:41:39.885+11:00Dynamic DNS - dnsdynamic and no-ip<br />
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Dynamic DNS (ddns) allows for remote access to publicly hosted server with dynamic IP address, using a pre-defined URL. </span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">I am covering two dynamic DNS providers offering free services, and how to setup their ddns clients respectively:</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<b style="font-family: Arial, Helvetica, sans-serif;">1. <a href="http://www.no-ip.com/" target="_blank">No-IP</a></b></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">No-IP comes with its own <a href="http://support.no-ip.com/customer/portal/articles/363247-installing-the-linux-dynamic-update-client-on-ubuntu" target="_blank">linux ddns client</a>, which can be installed using "apt-get noip2". </span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">To manually setup your details, run noip2 with the "-C" option. </span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
</div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root@web-host:# noip2 -h</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">USAGE: noip2 [ -C [ -F][ -Y][ -U #min]</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> [ -u username][ -p password][ -x progname]]</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> [ -c file][ -d][ -D pid][ -i addr][ -S][ -M][ -h]</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Version Linux-2.1.9</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Options: <span style="color: blue;">-C create configuration data</span></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -F force NAT off</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -Y select all hosts/groups</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -U minutes set update interval</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -u username use supplied username</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -p password use supplied password</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -x executable use supplied executable</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -c config_file use alternate data path</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -d increase debug verbosity</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -D processID toggle debug flag for PID</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -i IPaddress use supplied address</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -I interface use supplied interface</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -S show configuration data</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -M permit multiple instances</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -K processID terminate instance PID</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -z activate shm dump code</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> -h help (this text)</span></div>
<div>
<br /></div>
<br />
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Note: the /usr/local/etc/noip2.conf returns some seemly encrypted text, so it's not meant to be changed. </span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="western" style="margin-bottom: 0cm;">
<b style="font-family: Arial, Helvetica, sans-serif;">2. <a href="http://www.dnsdynamic.org/" target="_blank">DNSdynamic</a></b></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">
DNSdynamic service uses ddclient in ubuntu. Herewith my configuration for reference:</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root@ubuntu:#
cat /etc/ddclient.conf</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># Configuration file
for ddclient generated by debconf</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># /etc/ddclient.conf</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br />
</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">daemon=60</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">protocol=dyndns2</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use=web,
web=checkip.dyndns.org</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">server=www.dnsdynamic.org</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">login= (username)<username></username></span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">password=<password></password></span><span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">(password)</span></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">(domain)</span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><domain>.dnsdynamic.com</domain></span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Replace the corresponding fields with your own account details<fields>.</fields></span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<div class="western" style="margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">P.S. Remember to set up<a href="http://homenw.blogspot.com.au/2012/11/belkin-dsl-modem-router-port-forwarding.html" target="_blank"> port forwarding</a> if your servers are sitting behind NAT.</span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
<br />Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com2tag:blogger.com,1999:blog-2360890399048831113.post-64767668661163785642012-11-19T21:36:00.002+11:002012-11-19T21:36:48.950+11:00Belkin DSL Modem Router Port Forwarding<span style="font-family: Arial, Helvetica, sans-serif;">I have replaced my <a href="http://homenw.blogspot.com.au/2011/05/on-netgear-wnr2000-wifi-router-for.html" target="_blank">Netgear wireless router</a> with Belkin FD 2401 v1 (Wirelss modem router), I think it is worth bit over $60 on Ebay off the top of my head. It is overall more stable and reliable, so far so good.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">While setting its port forwarding feature (Firewall > Virtual Servers), I noticed if the inbound port is a <a href="http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers" target="_blank">well known port number</a> (0 - 1024) then it simply doesn't work i.e. no access.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">However, any port outside this range (including registered ports) functions well - as shown in the examples beneath:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-cPSq36A0toc/UKoCCpDT_hI/AAAAAAAAAWc/y4QYM6dofss/s1600/Belkin+router+firewall.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="225" src="http://2.bp.blogspot.com/-cPSq36A0toc/UKoCCpDT_hI/AAAAAAAAAWc/y4QYM6dofss/s400/Belkin+router+firewall.jpg" width="400" /></span></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">P.S. the Belkin is running on firmware 1.00.38(Jul 1 2010 13:40:12).</span>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com1tag:blogger.com,1999:blog-2360890399048831113.post-14385494058201965882012-11-12T17:28:00.004+11:002012-11-19T10:02:06.658+11:00Moving to Ethernet over Power <br />
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">It has
been awhile since I last posted, been busy with other commitments.</span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">In this post, I would
like to share some recent modifications I made to my home
networking.
</span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;"><b>Motivation</b></span></i></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">The
original intention was to improve the Wifi performance at home. </span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Originally, my laptop (in the study) is covered by the living room's Wifi coverage. </span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Whenever I watch online TV or backup its files, my whole place's Wifi connection grinds to a halt. Also, the iPad is rendered useless.</span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">The logical approach would be upgrading all my devices to 802.11n, but it is quite a substantial investment considering my laptop is a
four years old Sony VAIO and I still use my iPhone 3GS, both
supporting </span><span style="font-family: Arial, Helvetica, sans-serif;"> </span><span style="font-family: Arial, Helvetica, sans-serif;">only </span><span style="font-family: Arial, Helvetica, sans-serif;">802.11g. </span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">Also, I tried enabling DLNA on a 802.11n smartphone and streamed it to the WDTV media player. It just repeatingly halted. </span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">I felt there has to be a better option. </span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
</div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;"><b>Setup and two use cases</b></span></i></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">In
large, there are three areas being connected: living area (wifi
router), study and the storage room. The idea is to dedicate the Wifi signals to the portable devices (e.g. iPad, iPhone with no SIM).</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-H2EilrIDAFA/UKCUDEBX43I/AAAAAAAAAVA/QzA_Mou2TNA/s1600/eop.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="225" src="http://3.bp.blogspot.com/-H2EilrIDAFA/UKCUDEBX43I/AAAAAAAAAVA/QzA_Mou2TNA/s400/eop.jpg" width="400" /></span></a></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">In parallel, all the "non-internet" traffic are to be carried across the home's power line.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-DDdUCmMxiig/UKCUky361KI/AAAAAAAAAVI/fX2HiXwtUJo/s1600/eop+use+case.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="225" src="http://2.bp.blogspot.com/-DDdUCmMxiig/UKCUky361KI/AAAAAAAAAVI/fX2HiXwtUJo/s400/eop+use+case.jpg" width="400" /></span></a></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
</div>
<ul>
<li><div lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">(1) For example, I
am using ownCloud to backup my photos and personal documents from my
laptop (as illustrated by the blue line, "Use Case 1")</span></div>
</li>
</ul>
<ul>
<li><div lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">(2) Likewise, if I
would like to display my photos on the LED TV via WDTV media
player, then I can share it from either my Laptop or
ownCloud (DLNA enabled) – once again, all traffic through the
Power line ("Use Case 2".</span></div>
</li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;">While all these happen. I can still use my iPad to happily browse the internet (red line), simply because the Belkin Wifi Router is not involved in these use cases.</span><br />
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
</div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;"><b>Some
details</b></span></i></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">If you
look at the diagram more closely, there are several small boxes attached
to the “Home Power Line” cloud in the center. </span><span style="font-family: Arial, Helvetica, sans-serif;">These are the EoPs' plugs. Their models are Belkin Powerline AV (F5D4070) and TP-Link TL PA-201 respectively. </span></div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">This <a href="http://www.belkin.com/au/support-article?rnId=57" target="_blank">Belkin's support page article</a> describes powerline adapters compatibility. By large, there two standards in the market today. HP 1.0 and HP AV. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">My working combination of Belkin and TP-Link are running on the older Home Plug 1.0 standard. This standard supports up to 85Mbps throughput. </span><br />
<div>
<br /></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Originally, I bought a newer pair of Belkins Homeplug AV running on HPAV standard. Unfortunately, t</span><span style="font-family: Arial, Helvetica, sans-serif;">hese newer plugs cannot detect other HP1.0 devices over the power line.</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<i><span style="font-family: Arial, Helvetica, sans-serif;"><b>Further technical details</b></span></i></div>
<ul>
<li><div lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">The people on
Whirlpool forum have done a much better job than myself analyzing
Ethernet over Power products available in the market. It’s worth a
read if you are considering using it for your home.</span></div>
</li>
</ul>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="color: blue; font-family: Arial, Helvetica, sans-serif;"><u><a href="http://forums.whirlpool.net.au/archive/1512203">http://forums.whirlpool.net.au/archive/1512203#</a></u></span><br />
<span style="color: blue; font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<ul>
<li><div lang="en-US" style="margin-bottom: 0.35cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><strike>I am no electrical
engineer, but I do suspect my results may have to do with multiple phases and circuits, as detailed in
this Intellon Whitepaper</strike>. Cross phase coupling is still good technical information.</span></div>
</li>
</ul>
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<span style="color: blue; font-family: Arial, Helvetica, sans-serif;"><u><a href="http://www.smallnetbuilder.com/mydownloads/plc_cross-phase_coupling.pdf">http://www.smallnetbuilder.com/mydownloads/plc_cross-phase_coupling.pdf</a></u></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Glad to hear what you think or your experiences.</span><br />
<div class="western" lang="en-US" style="margin-bottom: 0.35cm;">
<br /></div>
Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com2tag:blogger.com,1999:blog-2360890399048831113.post-73791204121259019582012-01-23T20:31:00.003+11:002012-01-23T20:50:23.196+11:00Quick Start on Asterisk-GUI (Analog Trunk)<span style="font-family: Arial, Helvetica, sans-serif;">Provisioning an analog trunk on Asterisk GUI 2.0.4 requires bit more work compared to <a href="http://homenw.blogspot.com/2012/01/quick-start-on-asterisk-gui.html">provisioning SIP client</a> (and some manual setting in my case) so I'll cover the settings before moving onto the provisioning steps. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><b>Some Background</b></i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">I am using Asterisk version <span style="line-height: 115%;">1.4.26.2 (it is quite old). Just prior to this release, the Zaptel driver has been renamed to DAHDI (See this <a href="http://www.voip-info.org/wiki/view/DAHDI">link </a>for more information). </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 115%;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Interesting enough, </span><span style="font-family: Arial, Helvetica, sans-serif;">the module is named “chan_dahdi.so” but
the “zapata.conf” file (instead of the chan_dahdi.conf file) is read by
asterisk:</span><br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: 'Courier New'; font-size: 9pt;">home-unix6*CLI> module reload chan_dahdi.so<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: 'Courier New'; font-size: 9pt;"> -- Reloading module
'chan_dahdi.so' (DAHDI Telephony w/PRI)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: 'Courier New'; font-size: 9pt;"> == Parsing
'/usr/local/etc/asterisk/<span style="color: #c00000;">zapata.conf'</span>:
Found<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;">P.S. the purpose of zapata.conf is to configure all
TDM interface parameters. The configuration was covered in this <a href="http://homenw.blogspot.com/2010/03/setting-up-bsd-ata-box-with-asterisk.html">post</a>.</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;">Check out the <a href="http://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-1.4.22">change logs [r122314]</a></span></span><span style="font-family: Arial, Helvetica, sans-serif;"> and confirmed chan_zap.c was indeed removed in one of the earlier releases (1.4.22). </span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<i style="font-family: Arial, Helvetica, sans-serif;"><b>Some manual settings</b></i></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;">1. Asterisk GUI cannot detect analog hardware - I added one line in ztscan.conf (in etc/asterisk directory), restarted the asterisk process and the FXO port can be detected: </span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">[1]</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">active=yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">alarms=OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">description=Wildcard
TDM400P REV E/F Board 1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">name=WCTDM/0<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">manufacturer=Digium<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">devicetype=Wildcard
TDM400P REV E/F<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">location=PCI
Bus 05 Slot 09<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">basechan=1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">totchans=4<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 9pt;">irq=10<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: red; font-size: 9pt;">port=1,FXO</span></b><b><span style="font-size: 9pt;"><o:p></o:p></span></b></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span lang="EN"><span style="font-family: Arial, Helvetica, sans-serif;">2. </span></span><span style="font-family: Arial, Helvetica, sans-serif;">Asterisk GUI provision the analog trunk as Zap channel (in
extensions.conf file), but Asterisk doesn’t understand Zap - unless the </span><span style="font-family: Arial, Helvetica, sans-serif;">“dahdichanname”
parameter in asterisk.conf is set to "no"</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: 'Courier New'; font-size: 9pt;">home-unix6# cat asterisk.conf | grep dahdi<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: 'Courier New'; font-size: 9pt;">dahdichanname = <span style="color: red;">no</span> <strike>yes</strike>; Channels created by
chan_dahdi will be called 'DAHDI', otherwise 'Zap'<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">3. After Asterisk process restarts, "chan_dahdi.so" module is not loaded. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">At the moment, I have to manually run "module load chan_module.so" in Asterisk console, because adding "load => chan_dahdi.so" in modules.conf does not help... </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i><b>Provisioning</b></i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">1. If the analog port is detected, it will be displayed on the "Configure Hardware" page:</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-3bMHg_gnfuc/Tx0nGK4lEfI/AAAAAAAAAUI/1qa2pHY6psc/s1600/1+-+hardware.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://3.bp.blogspot.com/-3bMHg_gnfuc/Tx0nGK4lEfI/AAAAAAAAAUI/1qa2pHY6psc/s400/1+-+hardware.jpg" width="400" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2. On "Trunk" page, select "New Analog Trunk". Tick "Channel" and assign a name to it: </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-hhMo879eJzI/Tx0nHwPSxpI/AAAAAAAAAUQ/qTAIIuvUgAg/s1600/2.+analog+trunk.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="http://2.bp.blogspot.com/-hhMo879eJzI/Tx0nHwPSxpI/AAAAAAAAAUQ/qTAIIuvUgAg/s400/2.+analog+trunk.jpg" width="400" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;">3. On "Outgoing Calling Rules" page, set "New Calling Rule" and use the trunk previously defined in step two (local-line):</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-qAXrsEQeHLg/Tx0n1NiB57I/AAAAAAAAAUY/KQkebdmUZsQ/s1600/3.+Outgoing+Calling+Rules.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="http://3.bp.blogspot.com/-qAXrsEQeHLg/Tx0n1NiB57I/AAAAAAAAAUY/KQkebdmUZsQ/s400/3.+Outgoing+Calling+Rules.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">4. On "Dial plans" page, edit the existing dialplan (if none exist, just create a new one). Tick to include the outgoing calling rule previously defined (localline):</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-mPn4kMTjEUI/Tx0oNQSDNwI/AAAAAAAAAUg/0KgLGljtH6I/s1600/4.+Dial+Plans.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="http://2.bp.blogspot.com/-mPn4kMTjEUI/Tx0oNQSDNwI/AAAAAAAAAUg/0KgLGljtH6I/s400/4.+Dial+Plans.jpg" width="400" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">5. Apply the changes ("Apply Change" button is on the top right corner of web browser). This requires a system restart but I restarted the Asterisk process. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">6. The analog trunk has been provisioned and can make or receive phone calls. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Notes:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Remember <i>Some Manual Settings </i></span><span style="font-family: Arial, Helvetica, sans-serif;"><i>3. After Asterisk process restarts, "chan_dahdi.so" module is not loaded.</i> So manual loading/ reload is required. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<br />Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com2tag:blogger.com,1999:blog-2360890399048831113.post-43055314313141130862012-01-22T17:38:00.001+11:002012-01-23T20:32:23.149+11:00Quick Start on Asterisk-GUI (SIP Client)<span style="line-height: 115%;"><span style="color: windowtext; line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">As a continuation of previous blog on <a href="http://homenw.blogspot.com/2012/01/asterisk-gui.html">Asterisk GUI</a>, this post is a quick start guide to a simple provisioning example - adding a new SIP client which can call other users in the default context.</span></span></span><br />
<span style="line-height: 115%;"><span style="color: windowtext; line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 115%;"><span style="color: windowtext; line-height: 115%;">Note: please read the "Browser Notes" added in the </span></span><a href="http://homenw.blogspot.com/2012/01/asterisk-gui.html" style="line-height: 18px;">Asterisk GUI</a><span style="line-height: 18px;">, as I have only managed to have IE 9 browser working with Asterisk-GUI so far. </span></span><br />
<span style="line-height: 115%;"><span style="color: windowtext; line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 115%;"><span style="color: windowtext; line-height: 115%;">1. </span></span><span style="color: windowtext; line-height: 115%;">The Asterisk-GUI is accessible via the URL and can be login via a non-admin user (defined in manager.conf):</span></span><br />
<span style="line-height: 115%;"><span style="color: windowtext; line-height: 115%;"><a href="http://192.168.10.154:8088/asterisk/static/config/index.html"><span style="font-family: Arial, Helvetica, sans-serif;">http://<asterisk ip="" server="">:8088/asterisk/static/config/index.html</asterisk></span></a></span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Upon successful login, the first page is the "System Status" page:</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-FSb0EAwDgTM/TxutKfPGigI/AAAAAAAAATw/Y0-wDVDt3As/s1600/asterisk-gui+frontpage.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="225" src="http://4.bp.blogspot.com/-FSb0EAwDgTM/TxutKfPGigI/AAAAAAAAATw/Y0-wDVDt3As/s400/asterisk-gui+frontpage.jpg" width="400" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">2. Click on the "Dialplan" tab on the left sidebar and create a new Dial plan (ignoring the warning of "No Calling Rules Defined"):</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-miLIiXinUQM/TxutUF1g5II/AAAAAAAAAT4/4kea6f804ww/s1600/dialplan1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="225" src="http://1.bp.blogspot.com/-miLIiXinUQM/TxutUF1g5II/AAAAAAAAAT4/4kea6f804ww/s400/dialplan1.jpg" width="400" /></span></a></div>
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Note: I have ticked "default" context to link to this dialplan. i.e. this dialplan can call/ receive calls from previously provisioned users. </span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">3. Click on the "User" tab and create a new user. </span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-I0tgTq19lCQ/Txutrq3Ri-I/AAAAAAAAAUA/QsWnI1LvC-E/s1600/Users.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="225" src="http://1.bp.blogspot.com/-I0tgTq19lCQ/Txutrq3Ri-I/AAAAAAAAAUA/QsWnI1LvC-E/s400/Users.jpg" width="400" /></span></a></div>
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">4. After this, the SIP client (x-lite) can successfully register as user "6000" and call other users. </span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><b>Some thoughts:</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">The good thing about Asterisk GUI is it is ported under FreeBSD (/usr/ports/www/asterisk-gui/) which makes the installation much easier (than compiling source and working through dependencies). </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">That being said, some features such as adding an analog line seems quite complex - I spent a couple of hours and have not worked this out. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">At a later day, I may consider trying out <a href="http://www.freepbx.org/">FreePBX </a>for provisioning but would prefer to run it on a Linux server. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18px;"><br /></span></span><br />
<span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"><br /></span>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-71309200172619732222012-01-22T17:15:00.002+11:002012-01-22T17:25:23.248+11:00IPBlue phone continues ringing after call is picked up…<span style="font-family: Arial, Helvetica, sans-serif;">As a continuation of the previous post <span style="background-color: white;"><a href="http://homenw.blogspot.com/2012/01/asterisk-ground-up-12.html">Configuring Asteriskfrom the Ground Up (1/2)</a>, this post is about an issue I encountered and its resolution. </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;">When calling IPBlue (Cisco softphone) from Xlite (SIP client), after I picked up the call (on IPBlue) the ring-tone continues and the call could not be established. </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;">Reviewing the console, </span><span style="background-color: white;">when IPBlue is first registered, its capability is set to '0'.</span>
</span><br />
<span style="background-color: white;"><span style="font-family: Arial, Helvetica, sans-serif;">Also, a warning message "Don't know any of 0x0 formats" shows up after the call is picked up. </span></span><br />
<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New';"><span style="font-size: 12px;"> -- Device 'SEP00215D2B1296' successfully registered</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New';"><span style="font-size: 12px;">Device capability set to '0'</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New';"><span style="font-size: 12px;">Adding button: 9, 1</span></span></div>
<div style="color: grey; font-family: 'Courier New'; font-size: 9pt;">
<br /></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> -- Executing [1000@DLPN_DialPlan1:1]
Dial("SIP/6000-2a2fc000", "Skinny/1000@ipblue") in new
stack<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> -- skinny_request(1000@ipblue)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> -- Called 1000@ipblue<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> -- Skinny/1000@ipblue-4 is ringing<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">[Jan 22 16:02:50] WARNING[1490]:
channel.c:700 ast_best_codec: Don't know any of 0x0 formats<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">The warning message suggests it may has to do with the codec and the resolution is as follows.</span><br />
<br />
<br />
<div class="MsoListParagraph" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">1. Allow <b>all</b> audio codecs for
both IPBlue and SIP phones:</span><span style="color: grey; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: grey; font-family: Arial, sans-serif; font-size: 10pt; line-height: 115%;">skinny.conf<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">[ipblue]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">type=7960<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">;context=default<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">line=1000 ; Dial(Skinny/1000@ipblue)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">device=SEP00215D2B1296<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #c00000; font-family: 'Courier New'; font-size: 9pt;">allow=all<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: grey; font-family: Arial, sans-serif; font-size: 10pt; line-height: 115%;">sip.conf<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">;;; SIP Client - J
Lam, Jan 2012<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">[xlite]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">; Turn off silence
suppression in X-Lite ("Transmit Silence"=YES)!<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">; Note that Xlite
sends NAT keep-alive packets, so qualify=yes is not needed<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">type=friend ; Context used for both
inbound and outbound calls<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">regexten=1234 ; When they register,
create extension 1234<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">host=dynamic ; This device needs to
register<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #c00000; font-family: 'Courier New'; font-size: 9pt;">allow=all<o:p></o:p></span></b></div>
</td>
</tr>
</tbody></table>
<br />
<br />
<br />
<div class="MsoListParagraph" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">2. On both IPBlue and Xlite clients, permit G.711 is used:<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">IP Blue’s setting:<span style="color: grey;"><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="Picture_x0020_15" o:spid="_x0000_i1026" style="height: 235.5pt; mso-wrap-style: square; visibility: visible; width: 201.75pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:\Users\JONATH~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png">
</v:imagedata></v:shape><span style="color: grey; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-idpR8QEUmTo/Txuo20BeEBI/AAAAAAAAATg/ETsSuOMkrsA/s1600/ipblue.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="320" src="http://2.bp.blogspot.com/-idpR8QEUmTo/Txuo20BeEBI/AAAAAAAAATg/ETsSuOMkrsA/s320/ipblue.jpg" width="274" /></span></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">X-Lite Preferences:<span style="color: grey;"><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif;"><v:shape id="Picture_x0020_16" o:spid="_x0000_i1025" style="height: 174pt; mso-wrap-style: square; visibility: visible; width: 192.75pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///C:\Users\JONATH~1\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png">
</v:imagedata></v:shape><span style="color: grey; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-EFIQfG3BvaE/Txuo6ymUJlI/AAAAAAAAATo/eYjMgZiZWIU/s1600/xlite.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="289" src="http://2.bp.blogspot.com/-EFIQfG3BvaE/Txuo6ymUJlI/AAAAAAAAATo/eYjMgZiZWIU/s320/xlite.jpg" width="320" /></span></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Since I am not sure
which of the G.711 codecs (alaw, ulaw) is used by IPBlue, I have enabled both on X-Lite.</span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: -24px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="text-indent: -18pt;"><span style="line-height: 115%;">3. Reload SIP module to enable sip.conf, and force skinny client to </span><span style="line-height: 14px;">re-register</span><span style="line-height: 115%;">:</span></span></span></div>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">The following messages appear on Asterisk console
(asterisk –rvvvvvgc)</span><span style="color: grey; font-family: Arial, sans-serif; font-size: x-small;"><o:p></o:p></span></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">home-unix6*CLI>
</span><span style="color: #c00000; font-family: 'Courier New'; font-size: 9pt;">sip reload</span><span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> Reloading SIP><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> == Parsing
'/usr/local/etc/asterisk/sip.conf': Found<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> == Parsing
'/usr/local/etc/asterisk/users.conf': Found<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> == Parsing
'/usr/local/etc/asterisk/sip_notify.conf': Found<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">home-unix6*CLI>
</span><span style="color: #c00000; font-family: 'Courier New'; font-size: 9pt;">skinny reset SEP00215D2B1296</span><span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"> -- Device 'SEP00215D2B1296' successfully
registered<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">Device capability
set to </span><span style="color: #c00000; font-family: 'Courier New'; font-size: 9pt;">'268'</span><span style="color: grey; font-family: 'Courier New'; font-size: 9pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: 'Courier New'; font-size: 9pt;">Adding button: 9,
1<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Note: ensure skinny
client’s device capability is NOT set to ‘0’… <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -18.0pt;">
<span style="font: normal normal normal 7pt/normal 'Times New Roman';"><span style="font-size: small;"><span style="font-family: Arial, sans-serif; line-height: 18px;">4.</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> </span></span></span><span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">SIP and Skinny clients can now call each other successfully. i.e. no
more ringing tone after Skinny client picks up the phone. <o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Voice is also working fine. <span style="color: grey;"><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<br />
<div class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 9pt;">
<span style="color: #666666; font-family: Arial, sans-serif; font-size: 9pt;"><o:p></o:p></span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-64956037564916241372012-01-15T22:19:00.002+11:002012-01-23T20:32:12.675+11:00Asterisk GUI Installation<span style="font-family: Arial, Helvetica, sans-serif;">For easier administration, Asterisk comes with a built-in mini web server. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The FreeBSD port is called <span style="line-height: 115%;">Asterisk-GUI (</span><span style="line-height: 115%;">/usr/ports/www/asterisk-gui</span><span style="line-height: 115%;">)</span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></span><br />
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">In the ports directory, run "make; make install" following by "make checkconfig" to check the configurations in (/etc/asterisk) http.conf and manager.conf:</span></span><br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">make;
make install<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">make
checkconfig</span><span style="font-family: 'Courier New';"> # Verifies the
http.conf and manager.conf (/etc/asterisk)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">home-unix6# make
checkconfig<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> --- Checking Asterisk configuration to see
if it will support the GUI ---<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">* Checking for
http.conf: OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">* Checking for
manager.conf: OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">* Checking if
HTTP is enabled: OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">* Checking if
HTTP static support is enabled: OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">* Checking if
manager is enabled: OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">* Checking if
manager over HTTP is enabled: OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> --- Everything looks good ---<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> * GUI should be available at
http://home-unix6.mooo.com:8088/asterisk/static/config/cfgbasic.html<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> * Note: If you have bindaddr=127.0.0.1 in
/usr/local/etc/asterisk/http.conf<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> you will only be able to visit it from the
local machine.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> Example: http://localhost:8088/asterisk/static/config/cfgbasic.html<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> * The login and password should be an entry
from /usr/local/etc/asterisk/manager.conf<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> which has 'config' permission in read and
write. For example:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> [admin]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> secret = mysecret1873<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> read = system,call,log,verbose,command,agent,config<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> write =
system,call,log,verbose,command,agent,config<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> --- Good luck! ---</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p> </o:p></span><span style="font-family: Arial, sans-serif;"> </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">home-unix6# vi
/usr/local/etc/asterisk/http.conf</span><span style="font-family: Arial, sans-serif;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Asterisk Builtin mini-HTTP server<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[general]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Whether HTTP interface is enabled or not. Default is no.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">enabled=yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Whether Asterisk should serve static content from http-static<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Default is no.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">enablestatic=yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Address to bind to. Default is 0.0.0.0<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;bindaddr=127.0.0.1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">bindaddr=0.0.0.0<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Port to bind to (default is 8088)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">bindport=8088<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">manager.conf - admin and jlam users are defined, along with their privileges<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
AMI - The Asterisk Manager Interface<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Third party application call management support and PBX event supervision<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
This configuration file is read every time someone logs in<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Use the "manager list commands" at the CLI to list available
manager commands<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
and their authorization levels.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
"manager show command <command></command>" will show a help text.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
---------------------------- SECURITY NOTE -------------------------------<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
Note that you should not enable the AMI on a public IP address. If needed,<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
block this TCP port with iptables (or another FW software) and reach it<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
with IPsec, SSH, or SSL vpn tunnel.
You can also make the manager<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
interface available over http if Asterisk's http server is enabled in<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
http.conf and if both "enabled" and "webenabled" are set
to yes in<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
this file. Both default to no. httptimeout provides the maximum<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
timeout in seconds before a web based session is discarded. The<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
default is 60 seconds.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[general]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">displaysystemname
= yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">enabled
= yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">webenabled
= yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">port
= 5038<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;httptimeout
= 60<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
a) httptimeout sets the Max-Age of the http cookie<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
b) httptimeout is the amount of time the webserver waits<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; on a action=waitevent request (actually
its httptimeout-10)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;
c) httptimeout is also the amount of time the webserver keeps<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; a http session alive after completing a
successful action<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">bindaddr
= 0.0.0.0<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[admin]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">secret
= </span>
<span style="font-family: 'Courier New';"><password></password></span> <span style="font-family: 'Courier New';"> <span style="color: blue;">; don't use password "password", as it is the
default value. Otherwise, t</span></span><span style="color: blue; font-family: 'Courier New';">he GUI will keep prompting you to change it</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">read
= system,call,log,verbose,command,agent,user,config,originate<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">write
= system,call,log,verbose,command,agent,user,config,originate<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[jlam]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">secret
= <password> <span style="color: blue;">; Only non-admin user with the correct priv</span></password></span><span style="color: blue; font-family: 'Courier New';">i</span><span style="font-family: 'Courier New';"><span style="color: blue;">leges can provision voice trunks.</span><span style="color: red;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">read
= system,call,log,verbose,command,agent,user,config,originate<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">write
= system,call,log,verbose,command,agent,user,config,originate<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-EWQvT4LS5YU/TxK2G-esHhI/AAAAAAAAATU/r1T0Cg01JgE/s1600/Asterisk-GUI.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="217" src="http://3.bp.blogspot.com/-EWQvT4LS5YU/TxK2G-esHhI/AAAAAAAAATU/r1T0Cg01JgE/s400/Asterisk-GUI.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Asterisk-GUI Dial Plans tab</td></tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><b>Additional notes as of 22nd Jan 2012:</b></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<b><span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Browser Notes:<o:p></o:p></span></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">I have tried accessing the Asterisk-GUI using both web-browsers Google Chrome
16.0.912.75 and Firefox 9.0.1. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">Both browsers don't allow me to </span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">"Save" settings (Asterisk GUI no response after clicking
"Save"). In another words, I cannot do provisioning using them. </span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><o:p><span style="font-family: Arial, Helvetica, sans-serif;">The only web browser which works with Asterisk-GUI (as I have discovered so far) is </span></o:p></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">Internet Explorer
9. </span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;">"Save"
button works, hence allow provisioning.</span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">In some occasions, after apply settings,
browser returns to Login screen (indicating login successful) but sidebar
disappears. <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="line-height: 115%;"><span style="font-family: Arial, Helvetica, sans-serif;">The only work around so far is to logout
and then login again…</span><span style="color: #7f7f7f; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></span></div>
</div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-69500239338983961242012-01-15T16:17:00.002+11:002012-01-22T17:18:26.727+11:00Configuring Asterisk from the Ground Up (2/2)<span style="font-size: x-small;"><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;">Disclaimer: </span><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;">I recommend and acknowledge </span><a href="http://www.voip-info.org/" style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px; text-decoration: none;">www.voip-info.org</a><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;"> as my comprehensive online reference to the details on Asterisk. </span>
</span><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 14px;">Also, blogspot doesn't seems to like "<" and ">" symbols, hence some of the code posted maybe incorrect.</span><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">This is the second part of the Asterisk build guide, which covers setting Asterisk to store the CDR (call details record) in an MySQL back-end and reading the records through a web-browser.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, sans-serif;">By default, /var/log/asterisk/cdr-csv/</span> <span style="font-family: Arial, sans-serif;">Master.csv</span><br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">"","xlite","1234","default","""jlam""
<xlite>","SIP/xlite-2a2b6000","SIP/xlite-2a2c5000","Dial","SIP/xlite","2012-01-14
09:00:54",,"2012-01-14 09:01:01",7,0,"NO
ANSWER","DOCUMENTATION","1326531654.11",""<o:p></o:p></xlite></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">"","xlite","1234","default","""jlam""
<xlite>","SIP/xlite-2a2b6000","SIP/xlite-2a2c5000","Dial","SIP/xlite","2012-01-14
09:02:17",,"2012-01-14 09:02:37",20,0,"NO
ANSWER","DOCUMENTATION","1326531737.13",""<o:p></o:p></xlite></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">Asterisk addons is required to be installed (</span><span style="font-family: Arial, sans-serif;">/usr/ports/net/asterisk14-addons) because this functions uses the </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">(/usr/local/lib/asterisk/modules/)cdr_addon_mysql.so</span><span style="font-family: Arial, sans-serif;"><o:p> module. </o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p>Note: libtool24 (</o:p></span><span style="font-family: Arial, sans-serif;">/usr/ports/devel/libtool24) is required to be installed first before adding asterisk14-addons.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p>Load module every time Asterisk starts - </o:p></span><span style="font-family: Arial, sans-serif;">modules.conf</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;;; CDR MySQL backend addon:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">load => cdr_addon_mysql.so<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">On MySQL, I used this example MySQL script in </span><a href="http://www.blogger.com/[http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql" style="font-family: Arial, sans-serif;">voip-info.or</a><span style="font-family: Arial, sans-serif;">g which basically reflects the structure of the Master.csv file:</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p># </o:p></span><b><span style="font-family: Arial, sans-serif;">mysql –u asterisk –ppassword </span></b><span style="font-family: Arial, sans-serif;">(note
there is no space between “-p” and the password)</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">CREATE DATABASE asterisk;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">GRANT INSERT<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ON asterisk.*<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">TO asterisk@localhost<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">IDENTIFIED BY 'password';<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">USE asterisk;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">CREATE TABLE `cdr` (<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`calldate` datetime NOT NULL
default '0000-00-00 00:00:00',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`clid` varchar(80) NOT NULL
default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`src` varchar(80) NOT NULL
default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`dst` varchar(80) NOT NULL
default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`dcontext` varchar(80) NOT
NULL default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`channel` varchar(80) NOT NULL
default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`dstchannel` varchar(80) NOT
NULL default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`lastapp` varchar(80) NOT NULL
default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`lastdata` varchar(80) NOT
NULL default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`duration` int(11) NOT NULL
default '0',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`billsec` int(11) NOT NULL
default '0',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`disposition` varchar(45) NOT
NULL default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`amaflags` int(11) NOT NULL
default '0',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`accountcode` varchar(20) NOT
NULL default '',<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">`userfield` varchar(255) NOT
NULL default ''<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ALTER TABLE `cdr` ADD
`uniqueid` VARCHAR(32) NOT NULL default '';<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ALTER TABLE `cdr` ADD INDEX (
`calldate` );<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ALTER TABLE `cdr` ADD INDEX (
`dst` );<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ALTER TABLE `cdr` ADD INDEX (
`accountcode` );<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b style="font-family: Arial, sans-serif;">cdr_mysql.conf - </b><span style="font-family: Arial, sans-serif;">define MySQL database and table name</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[global]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">dbname=asterisk<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">table=cdr<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">password=password<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">user=asterisk<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><b>cdr.conf - </b>comment out "csv" back end and added "mysql"</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; CHOOSING A CDR "BACKEND"
(what kind of output to generate)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;[csv]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;usegmtime=yes ; log
date/time in GMT. Default is
"no"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;loguniqueid=yes ; log
uniqueid. Default is "no"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;loguserfield=yes ; log user field.
Default is "no"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[mysql]</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">usegmtime=yes ; log date/time
in GMT. Default is "no"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">loguniqueid=yes ; log
uniqueid. Default is "no"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">loguserfield=yes ; log user field.
Default is "no"<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">Note: remember to add user “asterisk”
on the local host, else the CDR records won’t be inserted into MySQL.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="font-family: Arial, sans-serif;">Displaying the
records using web browser:</span></b></div>
<span style="font-family: Arial, sans-serif;">Ensure Apache and PHP are installed. The versions of the software on my system are:</span><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">home-unix6# httpd -v<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">Server version: Apache/2.2.14 (FreeBSD)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">Server built: Feb 21 2010
13:14:06<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">home-unix6# php -v<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">PHP 5.3.2 with Suhosin-Patch (cli) (built: Jun 3 2010 20:54:27)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">Copyright (c) 1997-2009 The PHP Group<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace;">Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies</span><span style="font-family: Arial, sans-serif;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">This </span><a href="http://scriptplayground.com/tutorials/php/Printing-a-MySQL-table-to-a-dynamic-HTML-table-with-PHP/" style="font-family: Arial, sans-serif;">link </a><span style="font-family: Arial, sans-serif;">contains a sample php file which prints all contents in the MySQL database. I have hard-coded the database and table name. </span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">[index.php not shown here due to blogspot incorrectly displaying "<" and ">"]</span><br />
<br />
<span style="font-family: Arial, sans-serif;">A new directory for CDR records is created, where the file above is saved - /usr/local/www/cdr/<o:p></o:p></span><span style="font-family: Arial, sans-serif;">index.php</span><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">Modify the /usr/local/etc/apache22/httpd.conf<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', monospace; line-height: 100%;">Listen
0.0.0.0:80</span><br />
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">DocumentRoot
"/usr/local/www/cdr"</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">LoadModule
php5_module libexec/apache22/libphp5.so</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;"><directory "="" cdr"="" local="" usr="" www=""></directory></span></div>
<div style="line-height: 100%; margin-bottom: 0in; text-indent: 0.28in;">
<span style="font-family: 'Courier New', monospace;">Options
Indexes FollowSymLinks</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">AllowOverride
None</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">Order
allow,deny</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">Allow
from all</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;"></span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">#</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">#
DirectoryIndex: sets the file that Apache will serve if a directory</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">#
is requested.</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">#</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;"><ifmodule dir_module=""></ifmodule></span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">#DirectoryIndex
index.html</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;">DirectoryIndex
index.php</span></div>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-family: 'Courier New', monospace;"></span></div>
</div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"> CDR records on Web browser</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-pihl6PstgiY/TxJhYflmL-I/AAAAAAAAATM/ZfBmAszX2_U/s1600/cdr+mysql.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="color: black;"><img border="0" height="225" src="http://4.bp.blogspot.com/-pihl6PstgiY/TxJhYflmL-I/AAAAAAAAATM/ZfBmAszX2_U/s400/cdr+mysql.jpg" width="400" /></span></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com2tag:blogger.com,1999:blog-2360890399048831113.post-81985212896976364282012-01-15T15:58:00.001+11:002012-01-22T17:19:09.486+11:00Configuring Asterisk from the Ground Up (1/2)<span style="font-size: x-small;"><br /></span><br />
<span style="font-size: x-small;"><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;">Disclaimer: </span><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;">I recommend and acknowledge </span><a href="http://www.voip-info.org/" style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px; text-decoration: none;">www.voip-info.org</a><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 14px;"> as my comprehensive online reference to the details on Asterisk. </span></span><br />
<span style="background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 14px;">Also, blogspot doesn't seems to like "<" and ">" symbols. For the time being, I have replaced these symbols with "{" and "}"</span><br />
<span style="font-size: x-small;"><br /></span><br />
<b style="font-family: Arial, Helvetica, sans-serif;">Overview</b><br />
<span style="font-family: Arial, Helvetica, sans-serif;">This is the first part of the Asterisk build guide, which covers setting Asterisk to accept SIP, Skinny (Cisco) and PSTN devices' registration, and building a dial plan with Voicemail function. </span><br />
<br />
<i><span style="font-family: Arial, Helvetica, sans-serif;">It is assumed the operating system and Asterisk have been successfully installed on the system. (My </span><span lang="EN" style="font-family: Arial, sans-serif; line-height: 14px;">FreeBSD Operating System is 8.0 and A</span><span lang="EN" style="font-family: Arial, sans-serif; line-height: 14px;">sterisk version is 1.4.26.2). OS and ports installation are out of scope to this port... </span></i><br />
<span style="font-family: Arial, sans-serif;"><span style="line-height: 14px;"><i><br /></i></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">The basic concepts of configuring Asterisk (and the gotchas) are illustrated through the following example: </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-6PZrbzG5ChQ/TxJWbnBVDgI/AAAAAAAAATE/ja_CQMsI7Yk/s1600/asterisk+setu.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="http://1.bp.blogspot.com/-6PZrbzG5ChQ/TxJWbnBVDgI/AAAAAAAAATE/ja_CQMsI7Yk/s320/asterisk+setu.jpg" width="320" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;">In a nutshell, the Asterisk can be understood to be as simple as a dial plan dictating the behaviors of multiple clients. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">This Asterisk server has three clients: </span><br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;">
<span style="font-family: Arial, sans-serif;">1.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span><span style="font-family: Arial, sans-serif;">SIP Phone – X-Lite</span><span lang="ZH-CN" style="font-family: SimSun;">(</span><span style="font-family: Arial, sans-serif;">Windows Program, <a href="http://www.counterpath.com/x-lite.html">X-Lite</a></span><span lang="ZH-CN" style="font-family: SimSun;">)</span><span style="font-family: Arial, sans-serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 36pt; margin-right: 0cm; margin-top: 0cm; text-indent: -18pt;">
<span style="font-family: Arial, sans-serif;">2.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span><span style="font-family: Arial, sans-serif;">Cisco IP Phone – IP Blue
(Windows program, <a href="http://www.ipblue.com/">IP Blue</a></span><span style="font-family: Arial, sans-serif;">- 30 days trial)**</span><span style="font-family: Arial, sans-serif; text-indent: -18pt;">3.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span><span style="font-family: Arial, sans-serif; text-indent: -18pt;">PSTN Phone*** – <a href="http://dualphone.net/DUALphone_3088_for_Skype-789.aspx">Dual Phone</a>
for Skype, but I use only the landline connection to Asterisk server Digium Clone (OpenVox) FXO port. For more information refer to my other <a href="http://homenw.blogspot.com/2010/03/setting-up-bsd-ata-box-with-asterisk.html">post</a>.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">Note: <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-AU"><span style="font-family: Arial, sans-serif;">* For a full list of VoIP and soft phones supported by
Asterisk, see this voip-info </span><a href="http://www.voip-info.org/wiki/view/VOIP+Phones#SoftPhones" style="font-family: Arial, sans-serif;">link</a><span style="font-family: Arial, sans-serif;">. </span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">** </span><span style="font-family: Arial, sans-serif;">I tried the following IP Blue packages on my Windows Vista:</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">IPB
Softphone Advanced 2.15.26.37 Setup - Works OK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">IPB
Softphone 508 2.15.35.49 Setup -
crashes on Vista<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p><br /></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">SCCP module is also available, although it does not come with my distribution of Asterisk by default. It can be downloaded from sourceforge and be compiled to replace of skinny.conf.</span>
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">*** w.r.t. the PSTN component in the Asterisk server, Zapata.conf is to
be replaced by chan_dahdi.conf <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b style="font-family: Arial, sans-serif;">SIP/ Skinny/ PSTN Devices - Asterisk Configurations</b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">The configuration files are located under the directory (</span><span style="font-family: Arial, sans-serif;">/usr/local/etc/asterisk)</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: grey; font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">1. SIP client - </span><span style="font-family: Arial, sans-serif;">sip.conf</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[xlite] ; Make sure the
<u>User ID</u> entered on XLite client matches this value<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">type=friend</span><span style="font-family: 'Courier New';"> </span><span style="font-family: 'Courier New';">; Same context used for both
inbound and outbound calls</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">regexten=1234 ; When they register, create extension 1234<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">host=dynamic ; This device needs to register<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">disallow=all<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">allow=gsm ; GSM consumes far less bandwidth than ulaw<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">allow=ulaw<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">allow=alaw<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;context=default</span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<span style="font-family: Arial, Helvetica, sans-serif;">2. SCCP client - skinny.conf</span><br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[ipblue]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">type=7960<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;context=default<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">line=1000 ; Dial(Skinny/1000@ipblue)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">device=SEP00215D2B1296<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<span style="font-family: Arial, sans-serif;">In addition to setting up Skinny module, tftp server has to be setup (because skinny client downloads an XML file which defines the Call Manager's IP address and port):</span><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">I installed the tftp port (</span><span style="font-family: Arial, sans-serif;">/usr/ports/ftp/tftp-hpa)</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">/etc/inetd.conf<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">tftp dgram
udp wait root
/usr/libexec/tftpd tftpd -l
-s /tftpboot<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">#tftp dgram
udp6 wait root
/usr/libexec/tftpd tftpd -l
-s /tftpboot<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">/etc/rc.conf<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">inetd_enable="YES" # Inetd for TFTP server (Skinny)<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p>The XML file (for Skinny client) is named as "</o:p></span><span style="font-family: Arial, sans-serif;">SEP<mac-address>.cnf.xml"</mac-address></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">It is placed under the /tftpboot/ directory. A sample file is shown beneath (Call Manager's parameters are colored in <span style="color: red;">red</span>)</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"><tbody>
<tr><td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
{device}<br />
{devicePool}<br />
{callManagerGroup}<br />
{members}<br />
{member priority="0"}<br />
{callManager}<br />
{ports}<br />
<span style="color: red;"> {ethernetPhonePort}2000{/ethernetPhonePort}</span><br />
{/ports}<br />
<span style="color: red;">{processNodeName}192.168.10.154{/processNodeName}</span><br />
{/callManager}<br />
{/member}<br />
{/members}<br />
{/callManagerGroup}<br />
{/devicePool}<br />
{versionStamp}{Jan 28 2008 19:01:00}{/versionStamp}<br />
{loadInformation}{/loadInformation}<br />
{userLocale}<br />
{name}{/name}<br />
{langCode}en{/langCode}<br />
{/userLocale}<br />
{networkLocale}{/networkLocale}<br />
{idleTimeout}0{/idleTimeout}<br />
{authenticationURL}{/authenticationURL}<br />
{directoryURL}{/directoryURL}<br />
{idleURL}{/idleURL}<br />
{informationURL}{/informationURL}<br />
{messagesURL}{/messagesURL}<br />
{proxyServerURL}{/proxyServerURL}<br />
{servicesURL}{/servicesURL}<br />
{/device}<br />
<span style="font-family: 'Courier New'; line-height: 115%;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">Note:
asterisk must be restarted for the skinny configurations to take effect, a
reload just won’t work (</span><a href="http://www.voip-info.org/wiki/view/Asterisk+config+skinny.conf" style="font-family: Arial, sans-serif;">link</a><span style="font-family: Arial, sans-serif;">)</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">home-unix6*CLI> skinny
show devices<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">Name DeviceId IP Type R NL<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">--------------------
---------------- --------------- --------------- - --<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ipblue SEP00215D2B1296 192.168.10.45 7960 Y
1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">home-unix6*CLI> skinny
show lines<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">Device Name Instance Name Label<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">--------------------
-------- -------------------- --------------------<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">ipblue 1 1000<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">3. Zapata.conf</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: Arial, sans-serif;">I have covered the zapata.conf file in a previous <a href="http://homenw.blogspot.com/2010/03/setting-up-bsd-ata-box-with-asterisk.html">post</a> so it is added beneath only for reference:</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN" style="font-family: Arial, sans-serif;"></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[channels]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; OpenVox User
Manual<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; Span 1: WCTDM/0
"Wildcard TDM400P REV E/F Board 1" (MASTER)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">signalling=fxo_ks<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">adsi=yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">pulse=yes<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">context=default<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">channel => 1</span><span style="color: grey;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><b>Extensions - Basics</b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">extensions.conf</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[default]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten
=> 1234,1,Dial(SIP/xlite) ;;;
SIP client<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten
=> 5678,1,Dial(DAHDI/1-1) :::
PSTN client<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten
=> 1000,1,Dial(Skinny/1000@ipblue) ;;;
Skinny client</span><span style="font-family: 'Courier New';"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">I didn't define any "context" for the clients, so they will all use the default context. </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">The setup above allows all three devices to be registered to the Asterisk server and call each other using their corresponding extensions.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b style="font-family: Arial, sans-serif;">Extensions - More Details</b></div>
<span style="font-family: Arial, sans-serif;">For example, I would like to SIP client to ring for 10s. If nobody picks up the call, then a voice menu is played to the called, where he/she can choose to either leave a voice mail, or try calling the land-line (or hangup). </span><br />
<span style="font-family: Arial, sans-serif;"><br /></span><br />
<span style="font-family: Arial, sans-serif;">The implementation example is as follows (please read the comments for further details):</span><br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;;; exten syntax<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; exten => id, priority, command<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[default]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;;; Default dialplan<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten => 5678,1,Dial(DAHDI/1)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
1000,1,Dial(Skinny/1000@ipblue)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
1234,1,Dial(SIP/xlite,10)
; SIP client rings for 10s<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten => 1234,2,Answer<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
1234,3,Goto,xlite-menu|s|1 ;
If the call is unanswered, <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> ; it will be
forwarded to "xlite-menu"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[xlite-menu]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
s,1,Background(/tmp/menu) ; Play
"menu" message<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
s,2,WaitExten(10) ; Wait
for user input for 10s<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
1,1,Voicemail(1@default) ; user-id@context<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten =>
2,1,Dial(DAHDI/1-1)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten => 9,1,Hangup<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten => i,1,Goto(s,1) ; "i" stands for
invalid entry, <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> ; play "menu"
message again<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten => t,1,Goto(s,1) ; "t" stands for
timeout, <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"> ; play "menu"
message again</span><span style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;;; 8500 to access Voicemail</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">exten => 8500,1,VoicemailMain<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';"><br /></span></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">One line has been added to the voicemail.conf file: </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"><tbody>
<tr><td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[default]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">1 =>
1234,Example Mailbox,root@localhost<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; Syntax: user-id =>
pin, mailbox, user<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><o:p>When the user dials 8500 to access his/her voicemail, voicemail prompts for user-id and pin as defined above.</o:p></span><span style="font-family: Arial, sans-serif;">To record your own welcome message, add
the following to extensions.conf</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 478.8pt;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">[default]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">;;; Record voicemail<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">; Record voice file to /tmp directory<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">
exten => 205,1,Wait(2) ; Call 205 to Record new Sound Files<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">
exten => 205,2,Record(/tmp/asterisk-recording:ulaw) ; Press # to
stop recording<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">
exten => 205,3,Wait(2)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">
exten => 205,4,Playback(/tmp/asterisk-recording) ; Listen to your
voice<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">
exten => 205,5,wait(2)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New';">
exten => 205,6,Hangup<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">Remember to change the file name from “asterisk-recording”
to “menu” (or whichever name defined in the Background() call. </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif;">[Giving credit to the references I used <a href="http://www.voip-info.org/wiki/view/Asterisk+tips+ivr+menu">IVR menu</a>, <a href="http://www.voip-info.org/wiki/view/Asterisk+cmd+VoiceMail">Voicemail </a>and <a href="http://www.voip-info.org/wiki/view/Asterisk+howto+dial+plan">Dialplan</a>]</span><br />
<span style="font-family: Arial, sans-serif;"><br /></span><br />
<span style="font-family: Arial, sans-serif;"><br /></span><br />
<span style="font-family: Arial, sans-serif;">Note: a follow up <a href="http://homenw.blogspot.com/2012/01/ipblue-phone-continues-ringing-after.html">post </a>re: Xlite and IPBlue interworking... </span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-64299982941912053802012-01-12T20:21:00.003+11:002012-01-12T21:34:23.727+11:00Some Tips On Home Networking<span style="font-family: Arial, Helvetica, sans-serif;">A while back, I was chatting with a friend as he was renovating his place and would like to setup his home network (or internet enabled/ multimedia/ high definition/ 3D entertainment center). This eventually became lots of emails exchanged over a period of one and a half year.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-2vC2pCZkID4/Tw63JoGXnTI/AAAAAAAAAS8/oBaHnhhYM58/s1600/david+homenw.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="207" src="http://3.bp.blogspot.com/-2vC2pCZkID4/Tw63JoGXnTI/AAAAAAAAAS8/oBaHnhhYM58/s400/david+homenw.jpg" width="400" /></a></div>
<span style="font-family: Calibri, sans-serif;"><span style="font-size: 15px; line-height: 17px;"><br /></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Given this background, I have pieced together some tips and information as a reference for those who are interested:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<i><span style="font-family: Arial, Helvetica, sans-serif;">Connection Medium</span></i><br />
<span style="font-family: Arial, Helvetica, sans-serif;">For home networking, the purpose of any connection is to create a common LAN (Local Area Network) segment. All devices (e.g. laptop, igadgets, alarm clocks) that are connected to the same segment can "speak" to each other. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><strike><br /></strike></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">1. The most popular connection medium is copper, also known as </span><a href="http://en.wikipedia.org/wiki/Category_6_cable" style="font-family: Arial, Helvetica, sans-serif;">Cat6</a><span style="font-family: Arial, Helvetica, sans-serif;">. Theoretically supports up to 10Gbps throughput, it depends on the device(s) you are connected to. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Also, keep in mind the maximum reach is 100m</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2. <a href="http://en.wikipedia.org/wiki/Power_line_communication">Network over Power</a> leverages your existing electricity connection to extend the reach of Cat 6. Be sure to check the speed supported by the connection interface. For example, if it says 10/100 that means it supports either 10Mbps or 100Mbps.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">3. Wireless connection <a href="http://en.wikipedia.org/wiki/IEEE_802.11">WiFi, or 802.11a/b/g/n</a> with "G" supporting up to 54Mbps (actually 22Mbps in reality due to interference, or half-duplex behavior for the geeks) and "N" is the latest standard supporting up to 300Mbps in theory. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">4. Did you know that there are <a href="http://www.netgear.com.au/home/products/powerline/high-performance/MCAB1001.aspx">ethernet/ coaxial cable adapters</a> available in the market? </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<i style="font-family: Arial, Helvetica, sans-serif;">On Wireless</i><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- For wireless, ensure your laptop and access point actually have the same mode (g/n) configured. A real story, a friend was complaining about his latest 802.11n laptop often taking awhile to connect to the internet, it turned out his AP supported only 11g and he was waiting for the laptop to "give up" on n and fallback to g. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- Slightly more details, also be mindful of mixed mode of operation e.g. some devices support 802.11g while other 802.11n in the same Wireless LAN segment. While 802.11n standard has something known as Mixed Mode Format protection build in, for earlier standards e.g. 802.11b/g, mixed mode operation results in a "hit" in throughput performance (I do confess I have not had a chance to try this)</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i>Data and Bandwidth</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- Is the data going to stay within your home? For example, is the connection dedicated to streaming HD videos from the NAS on the first floor to the media player on the second floor? </span><span style="font-family: Arial, Helvetica, sans-serif;">Also, is it necessary to have a dedicated 1Gbps connection for internet access, if (say) your home has only DSL access which max at 12Mb/1Mb?</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- By the way, it turns out only 10Mbps is required to <a href="http://en.wikipedia.org/wiki/Streaming_media">stream HD video</a> in theory, although real life experience showed even streaming mpeg-2 (dvd quality) over 802.11g shows pause every couple of minutes.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><i>Storage and files access</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- Today, most of the off-the-shelf NAS (Network Access Server) supports iTune, so the media files it store are accessible from your iPhone/Pad via wireless (on the same LAN segment).</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- <i>What if I want to access my storage while I am away? Do I have to setup dd-client for reverse DNS, security?</i></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">How about a simpler solution, have you tried using <a href="http://www.dropbox.com/">Dropbox</a>? It is free and is supported on Windows/ Linux/ iOS/ Android... </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<i style="font-family: Arial, Helvetica, sans-serif;">Basic Security tips</i><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- Always, always upgrade device firmware when possible. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- Have you setup your WPA2 authentication on the wireless network? </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<i><span style="font-family: Arial, Helvetica, sans-serif;">What's next? </span></i><br />
<span style="font-family: Arial, Helvetica, sans-serif;">- <span style="line-height: 115%;">I keep hearing news about Apple TVs and Samsung, I mean, even Ubuntu is onto this... but personally I see more potential in <a href="http://en.wikipedia.org/wiki/Near_field_communication">this technology</a> - imagine swiping the web browser from your smart phone onto your TV in real time just like the movie <a href="http://en.wikipedia.org/wiki/Iron_Man_2">Iron Man 2</a>.</span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 115%;"> </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><br /></span>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-66523159659976723562012-01-11T23:00:00.002+11:002012-01-11T23:00:53.973+11:00HP Mini 1000 - Ubuntu Netbook Edition 10.04 Lucid<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 8pt;">[Readers note: this
post was written back in May 2011 so some of the materials may not be the most up
to date (e.g. I think Ubuntu has merged the netbook remix and desktop into one
single edition). It is presented purely for reference purposes. ]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">Cutting a long story short, I purchased a
HP mini 1000 back in 2009 and it has been basically collecting dust since. (I
thought the netbook itself looks great, and I still do). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-NM93RrDIds0/Tw1y2jJAQKI/AAAAAAAAASo/SI_nnJI0fX4/s1600/IMAG0127.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="http://1.bp.blogspot.com/-NM93RrDIds0/Tw1y2jJAQKI/AAAAAAAAASo/SI_nnJI0fX4/s320/IMAG0127.jpg" width="320" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">So, in the interest of making the netbook
useful, I went ahead to install <a href="http://en.wikipedia.org/wiki/Ubuntu_Netbook_Edition">Ubuntu Netbook Remix </a></span><span style="font-family: Arial, sans-serif; font-size: 10pt;">having confirmed my netbook is one of
the <a href="https://wiki.ubuntu.com/HardwareSupport/Machines/Netbooks">supported models</a>.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">Ubuntu’s netbook edition is available
under the “<a href="http://www.ubuntu.com/download/ubuntu/alternative-download">alternative-download</a>” page</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">. (Click “alternative-download” tab on
the main <a href="http://www.ubuntu.com/download/ubuntu/download">download page</a></span><span style="font-family: Arial, sans-serif; font-size: 10pt;">). The latest netbook edition is still
10.04 (which is used on my netbook). It seems like from then onwards, Ubuntu offers
only either server or desktop edition.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">As a side note, since the HP netbook has
no DVD rom</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">,
I used the Universal USB Installer to create the USB install thumb drive</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> for this installation. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">The actual installation is rather straight
forward so I have skipped the details, whereas t</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">weaking the system is actually the “fun”
part, but thankfully there is a <a href="https://wiki.ubuntu.com/HardwareSupport/Machines/Netbooks">wiki Ubuntu page</a> dedicated to this topic. </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">For those who couldn't be bothered reading this, there are three fixes for HP mini 1000: </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">1). the wireless connection doesn't work unless the wireline is plugged in when system starts up </span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt;">(use GUI </span><span style="background-color: white; font-size: 13px; line-height: 19px;">System->Administration->Hardware Drivers</span><span style="background-color: white; font-size: 13px; line-height: 19px;"> and install the "restricted driver")</span></span><span style="font-family: Arial, sans-serif; font-size: 10pt;">, </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size: 10pt;">2).Ethernet port (<i>amend </i>the options "</span><span style="background-color: white; color: #333333; font-size: 13px; line-height: 19px;">acpi_os_name=Linux" to </span><span style="color: #333333; font-size: x-small;"><span style="line-height: 19px;">GRUB_CMDLINE_LINUX_DEFAULT line in the </span></span><span style="background-color: white; color: #333333; font-size: 13px; line-height: 19px;">/etc/default/grub file and then do an "update-grub"). </span><span style="font-size: 10pt;">and</span></span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">3).Setting Firefox's browser cache to point to a RAM disk to avoid killing the solid state drive with constant read/write (Open firefox, in the URL type about:config. Promise you'd be careful, and then set the parameter </span><span style="font-family: Arial, sans-serif; font-size: 10pt; line-height: 115%;">"browser.cache.disk.parent_directory"
with the value "/dev/shm/firefox"</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">) .</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">So here with a screen shot of the web browser on Ubuntu running on HP mini 1000... </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: x-small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-IWO4mFiaLIQ/Tw144wdvzII/AAAAAAAAASw/Vhl280aCfJs/s1600/Screenshot-Homepage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="http://2.bp.blogspot.com/-IWO4mFiaLIQ/Tw144wdvzII/AAAAAAAAASw/Vhl280aCfJs/s320/Screenshot-Homepage.png" width="320" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: x-small;">P.S. Not shown on the screen is the wireless status actually has an exclamation mark as if it isn't connected, although the internet connection works perfectly fine. </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: x-small;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: x-small;"><br /></span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-80722067247994430672012-01-11T20:28:00.003+11:002012-01-11T22:02:08.675+11:00Ubuntu Server 11.04 Halts when issues “reboot” command<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">The Node Controller I built in an <a href="http://homenw.blogspot.com/2011/07/implementing-private-cloud-on-your.html">earlier post</a> consistently e</span><span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">xperienced this system halt issue. Basically, after I entered a “reboot”
command. the system halted with a “shutting down” message showing on the
screen (forever). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">The hardware is Dell Optiplex 745 and the operating system was Ubuntu
11.04 (server). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: 'Courier New'; font-size: 8pt; line-height: 115%;">root@ubuntu-NodeController:~#
uname -a<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: 'Courier New'; font-size: 8pt; line-height: 115%;">Linux
ubuntu-NodeController <span style="color: red;">2.6.38-13</span>-generic-pae
#53-Ubuntu SMP Mon Nov 28 19:41:58 UTC 2011 i686 i686 i386 GNU/Linux<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">I did some search online and found the issue was caused by
a Ubuntu 11.04 software bug</span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto;">
<span style="font-family: Arial, sans-serif; font-size: 10pt; line-height: 115%;"><a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/255961">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/255961</a></span><span style="font-family: Arial, sans-serif; font-size: 8pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">So I upgraded the Ubuntu software release:<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 9pt;"># sudo apt-get install update-manager-core<o:p></o:p></span></div>
<div class="MsoListParagraph" style="margin-bottom: 0.0001pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm;">
<span style="font-family: Arial, sans-serif; font-size: 9pt;"># sudo do-release-upgrade</span></div>
<br />
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
<span style="font-family: Arial, sans-serif;"><span style="font-size: 12px; line-height: 13px;"><br /></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 115%;">Now the system is running on Ubuntu 11.10 server
and the issue is resolved. <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
<span style="font-family: 'Courier New'; font-size: 8pt; line-height: 115%;">root@ubuntu-NodeController:~# uname -a<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin: 0cm; mso-add-space: auto;">
<span style="font-family: 'Courier New'; font-size: 8pt; line-height: 115%;">Linux ubuntu-NodeController <span style="color: red;">3.0.0-14</span>-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011
i686 i686 i386 GNU/Linux</span><br />
<span style="font-family: 'Courier New'; font-size: 8pt; line-height: 115%;"><br /></span><br />
<br />
<div class="MsoNormal" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 13px;"><br /></span><br />
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 13px;">P.S. while searching for the solution, I stumble upon a post suggesting to set the “reboot” option to one of these </span><span style="font-family: Arial, sans-serif; font-size: 12px; line-height: 13px;">“bios”, “apci” and “force” (</span><span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 13px;">in the kernel). </span><br />
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 13px;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0cm;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"># vi /etc/default/grub<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #c00000; font-family: 'Courier New', Courier, monospace; font-size: xx-small;">GRUB_CMDLINE_LINUX="reboot=x"<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: xx-small;"># update-grub</span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif; font-size: 9pt; line-height: 13px;">While the suggestion was not helpful to my setup, it could be useful for other cases of system restart halt where OS upgrade is not an option. </span></div>
</div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-62640176119542909462011-08-30T20:56:00.007+10:002012-01-10T14:53:34.251+11:00Motion and a low-cost home surveillance system<div>
<br /></div>
<div>
<div>
<span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span">I have this Creative Live webcam from years ago. While it works perfectly well, its resolution is no better than my iPhone 3Gs…</span></span></div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span style="font-size: 10pt;">So, rather than throwing it away or let it sit around idle, I connected it into the Ubuntu server, installed the <a href="http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome">“motion”</a></span><span style="font-size: 10pt;">package and turned it into a low-cost web surveillance system…</span></span></div>
</div>
<div>
<span style="font-size: 10pt;">
</span></div>
<a href="http://2.bp.blogspot.com/-A2XlAYiUQ2w/TlzCTUCuqvI/AAAAAAAAAR0/yqM5-oMNTSI/s1600/creative%2Bwebcam.JPG"><span class="Apple-style-span"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5646601669869218546" src="http://2.bp.blogspot.com/-A2XlAYiUQ2w/TlzCTUCuqvI/AAAAAAAAAR0/yqM5-oMNTSI/s320/creative%2Bwebcam.JPG" style="cursor: pointer; display: block; height: 320px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: left; width: 240px;" /></span></a><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span">As you shall see, it is a straight-forward procedure:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span">1. On the Ubuntu server, to install motion, enter</span><span class="Apple-style-span">:</span></div>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"># apt-get install motion</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
2. Configure "motion.conf" file to enable remote access (web browser):</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">File: /etc/motion/motion.conf<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"># Restrict webcam connections to localhost only (default: on)<o:p></o:p></span></div>
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;">webcam_localhost off</span><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"># Restrict control connections to localhost only (default: on)<o:p></o:p></span></div>
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;">control_localhost off</span><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span style="font-size: 10pt;"><o:p>3. </o:p></span><span class="Apple-style-span">Lastly, restart “motion” daemon:</span></span></div>
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 13px;">/etc/init.d/motion restart</span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-size: 13px;"><span class="Apple-style-span">The webcam’s image should be available through the url “http://<ubuntu-ip-address>:8081”</ubuntu-ip-address></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span">
</span></div>
</div>
<a href="http://3.bp.blogspot.com/-TPR_6M3qfko/TlzDVXcvv_I/AAAAAAAAAR8/XdIjp1erZm8/s1600/creative%2B-%2Bmotion.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5646602804655013874" src="http://3.bp.blogspot.com/-TPR_6M3qfko/TlzDVXcvv_I/AAAAAAAAAR8/XdIjp1erZm8/s320/creative%2B-%2Bmotion.jpg" style="cursor: hand; cursor: pointer; display: block; height: 216px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span">
</span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-39338021657237572102011-08-22T17:54:00.006+10:002012-01-10T14:53:15.665+11:00BSD Mail/ SendMail 101<div>
<span class="Apple-style-span">While working on <a href="http://homenw.blogspot.com/2011/08/hurricane-electric-ipv6-certification.html">HE's IPv6 certification</a>, I gathered some useful experiences with setting up a basic mail server on FreeBSD so I thought it would be worthwhile to do a quick blog on this...</span><br />
<div>
<span class="Apple-style-span">
</span></div>
<div>
<span class="Apple-style-span"><u>Overview</u></span></div>
</div>
<div>
<span class="Apple-style-span">
</span></div>
<span class="Apple-style-span"><a href="http://4.bp.blogspot.com/-Vy-or9wTjUY/TlIMTX16c5I/AAAAAAAAARU/l1qEXmy2wMs/s1600/mail.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5643586810005844882" src="http://4.bp.blogspot.com/-Vy-or9wTjUY/TlIMTX16c5I/AAAAAAAAARU/l1qEXmy2wMs/s320/mail.jpg" style="cursor: hand; cursor: pointer; display: block; height: 124px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a></span><span class="Apple-style-span" style="font-family: arial; font-size: small;">Firstly, the Mail User Agent (MUA) is what the user uses to compose emails. BSD Mail is the default MUA which comes with FreeBSD. Its syntax is as follows (for composing emails):</span><br />
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 8pt;">#mail <email address=""> <o:p></o:p></email></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 8pt;">Subject:<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 8pt;">[Mail Content]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-size: 8pt;"><span class="Apple-style-span">.</span><span style="font-family: 'Courier New';"> </span><span class="Apple-style-span"><i>Remember to enter a<span class="Apple-style-span"><span class="Apple-style-span"> “.” in a new line to end writing the email</span></span></i></span><span class="Apple-style-span"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 8pt;">EOT<o:p></o:p></span></div>
</div>
<div>
<span class="Apple-style-span">
</span></div>
<div>
<span class="Apple-style-span">Secondly, the Mail Transfer Agent (MTA) is what interacts with the rest of the internet i.e. the MTA is responsible for sending and receiving emails. Sendmail is the default FreeBSD's MTA.</span></div>
<div>
<span class="Apple-style-span">
</span></div>
<div>
<span class="Apple-style-span">I configured the following files (under /etc/mail) to have this setup working:</span></div>
<div>
<span class="Apple-style-span">1. "virtualusertable" - the email address accepted and local user to forward the email to. </span></div>
<div>
<span class="Apple-style-span">2. "access" - like an ACL for emails, it identifies the incoming/ outgoing email addresses permitted/ denied. </span></div>
<div>
<span class="Apple-style-span">3. local-host-names - email domain accepted into local machine.</span></div>
<div>
<span class="Apple-style-span">
</span></div>
<div>
<span class="Apple-style-span">In /etc/rc.conf, I have also added "sendmail_enable=yes"; along with setting my NAT gateway to accept TCP 25. </span></div>
<div>
<span class="Apple-style-span">
</span></div>
<div>
<span class="Apple-style-span">For those interested in more details, FreeBSD Handbook has dedicated a <a href="http://www.blogger.com/-%20http://www.freebsd.org/doc/en/books/handbook/sendmail.html">page </a>on Sendmail. According to this page, there are certain occasions when either a "make" or process restart is required for the configuration changes to take effect but in the interest of keeping this post simple I will not go into any details here. </span></div>
<div>
<span class="Apple-style-span">
</span></div>
<div>
<span class="Apple-style-span">That seems to be it, Sendmail was running fine and accepting emails:</span></div>
<div>
<div>
<span class="Apple-style-span">home-unix6# /etc/rc.d/sendmail status</span></div>
<div>
<span class="Apple-style-span">sendmail is running as pid 1170.</span></div>
<div>
<span class="Apple-style-span">sendmail_clientmqueue is running as pid 1174.</span></div>
<div>
<span class="Apple-style-span">
</span></div>
</div>
<div>
<span class="Apple-style-span" style="line-height: 18px;"><u>On DNS</u></span></div>
<div>
<span class="Apple-style-span" style="line-height: 18px;">Also worth noting is when you send an email, the local MTA actually perform two DNS queries:</span></div>
<div>
<span class="Apple-style-span" style="line-height: 18px;">1. MX (Mail Exchange) query against the destination email domain - to resolve the mail server's hostname.</span></div>
<div>
<span class="Apple-style-span" style="line-height: 18px;">2. A (or AAAA) query against the MX response, to resolve the IP address of the receiving SMTP server. </span></div>
<div>
<span class="Apple-style-span" style="line-height: 18px;">
</span></div>
<div>
<span class="Apple-style-span" style="font-family: arial; font-size: small; line-height: 18px;">P.S. As a test, I tried sending an email to my service provider, iiNet email account, using this machine. Interesting enough, I received an error message informing me the email I sent has been rejected due to the "poor reputation" of the MTA...at least I can be sure my setup is working (there is a <a href="http://forums.whirlpool.net.au/archive/912436">Whirlpool forum</a> on this from others with similar experiences).</span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-23136233889357531352011-08-22T10:58:00.007+10:002011-08-22T17:53:37.257+10:00Hurricane Electric IPv6 Certification<a href="http://www.he.net/">Hurricane Electric</a> has a free IPv6 Certification available <a href="http://ipv6.he.net/certification/">online</a>. <div>
<br /></div><div>I used a laptop and a FreeBSD server with the related open-source packages installed, and managed to reach the Sage level. </div><div>
<br /><a href="http://ipv6.he.net/certification/scoresheet.php?pass_name=JonathonL" target="_blank"><img src="http://ipv6.he.net/certification/create_badge.php?pass_name=JonathonL&badge=3" width="229" height="137" border="0" alt="IPv6 Certification Badge for JonathonL" /></a>
<br /></div>
<br /><div>I recommend this test for anybody who wish to gain further exposure to IPv6 technologies.</div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-28183883336505703132011-07-29T21:15:00.005+10:002012-01-10T14:52:54.736+11:00Implementing Cloud Computing on your average Desktop PC (Part 3/3)<div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<u><span style="font-family: Arial, sans-serif; font-size: 10pt;">Bundling an image</span></u></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">Under the Cloud Controller webpage’s Extras tab, there are some “ready-made” packages available for downloading:<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
</div>
<a href="http://3.bp.blogspot.com/-Fp3pUyu2BzI/TjKaEbY5nRI/AAAAAAAAAQI/vF7Iv5Blmlc/s1600/extras.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5634735484656262418" src="http://3.bp.blogspot.com/-Fp3pUyu2BzI/TjKaEbY5nRI/AAAAAAAAAQI/vF7Iv5Blmlc/s320/extras.jpg" style="cursor: pointer; display: block; height: 189px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;" /></a><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">Referencing the instructions on Eucalyptus Image Management, <a href="http://open.eucalyptus.com/wiki/EucalyptusImageManagement_v1.6">link</a>:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">There are basically three steps to bundle an image:<o:p></o:p></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">1. Add a root disk image</span><br />
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">2. Add a kernel/ramdisk pair to Walrus</span><br />
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">3. Register the uploaded data with Eucalyptus.</span><br />
<div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"></span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">Having extracted the “ready-made” packages into my home directory, </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">/home/jonathonl/ubuntu9.04-bucket/euca-ubuntu-9.04-i386/kvm-kernel</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">, I carried out the following steps:<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="font-family: 'Courier New'; font-size: 8pt;"></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">[Kernel]</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-bundle-image -i ubuntu.9-04.x86.img --kernel true</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-upload-bundle -b kvm-kernel/ -m /tmp/ubuntu.9-04.x86.img.manifest.xml<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="font-family: 'Courier New'; font-size: 8pt;">euca-register kvm-kernel/ubuntu.9-04.x86.img.manifest.xml<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">[VM]</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-bundle-image -i <path directory="">/vmlinuz-2.6.28-11-server</path></span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-upload-bundle -b kvm-kernel/ -m /tmp/vmlinuz-2.6.28-11-server.manifest.xml</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-register kvm-kernel/vmlinuz-2.6.28-11-server.manifest.xml</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">[RAM disk]</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8.5pt;">euca-upload-bundle -b kvm-kernel/ -m /tmp/initrd.img-2.6.28-11-server.manifest.xml</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-bundle-image -i kvm-kernel/initrd.img-2.6.28-11-server --ramdisk true</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Courier New'; font-size: 8pt;">euca-register kvm-kernel/initrd.img-2.6.28-11-server.manifest.xml</span><span style="font-family: 'Courier New'; font-size: 8pt;"><o:p></o:p></span></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><br /></span></div>
The kernel, vm and ram images should be available under the “images” tab:</span><img alt="" border="0" id="BLOGGER_PHOTO_ID_5634737200814689090" src="http://3.bp.blogspot.com/-FJrQ7EFcbrk/TjKboUk9C0I/AAAAAAAAAQQ/FPInunbRLhw/s320/images.jpg" style="cursor: pointer; display: block; height: 131px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;" /></div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<u><span style="font-family: Arial, sans-serif; font-size: 10pt;">Hybridfox - Launch Instance</span></u><u><span style="font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></u></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">I used Hybridfox to manage and launch an instance. To begin with, </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">Firefox 5.01 does NOT work with Elasticfox</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">(installation error). </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">However, Firefox works well with Hybridfox</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> (v1.7b89). This <a href="https://help.ubuntu.com/community/UEC/ElasticFox">link </a>has all the instructions for setting up Hybridfox to communicate with your cloud systems.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">During the setup, a KeyPair will be created. Be sure to save this key somewhere handy as it will be used for SSH into the instance later. </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">The following settings were used to launch an instance:</span></div>
</div>
</div>
<div>
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><br /></span></div>
<a href="http://4.bp.blogspot.com/-5wFNhYd-L0o/TjKcbgWp2DI/AAAAAAAAAQY/3xKgjtj_XXo/s1600/launch.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5634738080149264434" src="http://4.bp.blogspot.com/-5wFNhYd-L0o/TjKcbgWp2DI/AAAAAAAAAQY/3xKgjtj_XXo/s320/launch.jpg" style="cursor: hand; cursor: pointer; display: block; height: 320px; margin: 0px auto 10px; text-align: center; width: 223px;" /></a><br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">With my setup, I am also using the Cloud Controller as a jump host to access the instance running on Node Controller. The Keypair file mentioned earlier is used as follows to allow for a password-less SSH login: <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">root@ubuntu-CloudController:~# <span style="color: #c00000;">ssh -i /home/jonathonl/<u>keypair.pem</u> 192.168.133.1</span><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">Linux ubuntu 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><o:p><span class="Apple-style-span"> </span></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">The programs included with the Ubuntu system are free software;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">the exact distribution terms for each program are described in the<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">individual files in /usr/share/doc/*/copyright.</span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by </span></span><span class="Apple-style-span" style="font-family: 'Courier New'; font-size: x-small; line-height: 18px;">applicable law.</span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">To access official Ubuntu documentation, please visit:<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; line-height: 115%;"><span class="Apple-style-span">http://help.ubuntu.com/<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New';"><span class="Apple-style-span">root@ubuntu:~#<o:p></o:p></span></span></div>
</div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span"></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="apple-style-span"><span style="color: #222222; font-family: Arial, sans-serif; font-size: 10pt; line-height: 115%;">So, this concludes the implementation of Cloud Computing, from installation to running an instance.<u> </u></span></span><span style="font-family: Arial, sans-serif; font-size: 10pt; line-height: 115%; text-decoration: underline;"><o:p></o:p></span></span></div>
</div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-71003465396338204362011-07-29T20:55:00.006+10:002012-01-10T14:52:46.342+11:00Implementing Cloud Computing on your average Desktop PC (Part 2/3)<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<u><span style="font-family: Arial, sans-serif; font-size: 10pt;">After OS installation - on Integration and Troubleshooting<o:p></o:p></span></u></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">After the OS is installed on both Cloud Controller and Node Controller systems, the Cloud Controller’s web interface should be accessible through <b><a href="https:"><span style="color: black;"><span style="color: black;">https:/<span style="color: black;">/</span></span></span></a></b><cloud-public-ip>:8443 using the default credentials - admin/admin.</cloud-public-ip></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">While I thought my private cloud was ready to go, it turned I still had to fix and tune a couple of things. The following were the errors I encountered along with their resolutions I gathered along the way:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span"><br /></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">1. “Store” tab showed “failed to connect to local store proxy” error:</span><br />
<ol start="1" style="margin-top: 0cm;" type="1"> </ol>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 9pt;">Referencing the <a href="http://open.eucalyptus.com/forum/error-failed-connect-local-store-proxy-it-installed">link</a></span><span style="font-family: Arial, sans-serif; font-size: 9pt;">, do a “apt-get install python-image-store-proxy” to resolve the problem. <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><o:p> </o:p></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">2. Verify (and fix) the “/etc/eucalyptus/eucalyptus.conf” file</span><br />
<ol start="2" style="margin-top: 0cm;" type="1"> </ol>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">On Cloud Controller, ensure the <b style="mso-bidi-font-weight: normal;">private and public interfaces</b> are set correctly (in my case, I set them as the two different NICs to avoid some random remote access issues). Furthermore, set <b style="mso-bidi-font-weight: normal;">NODES=””</b> to resolve the 0 free/max problem discussed later. <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><o:p> </o:p></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">3. Under “Configuration” tab, remember to set the IP address for Cloud Controller, Walrus Host and Cluster Controller, as well as save the VM Types.</span><br />
<ol start="3" style="margin-top: 0cm;" type="1"> </ol>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">With my setup, I set the system’s public IP address to be Cloud Host, Walrus Host; whereas for the Cluster Controller I used private address. Also, I saved the default VM Types. <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"> </span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">4. Credentials.zip</span><br />
<ol start="4" style="margin-top: 0cm;" type="1"> </ol>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 54.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18.0pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">4.1<span style="font: normal normal normal 7pt/normal 'Times New Roman';"> </span></span><span style="font-family: Arial, sans-serif; font-size: 10pt;">“eucarc” script gives “No Route to Host” error<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">“eucarc” script is a part of credentials.zip file, which is to be extracted into ~/.euca/ directory on the Cloud Controller.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">A</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">fter Walru</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">s, Cluster Controller and VM Types registration, d</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">ownload credentials </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">onto Cloud Controller (as Cloud Client) </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">and </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">run the</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> "eucarc" script</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">The “eucarc” script may give a</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> "No Route to Host" error, </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">this <a href="http://fnords.wordpress.com/2009/10/04/run-your-own-uec-part-1/">link </a>s</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">uggested restarting the Cloud Controller to resolve this issue (and I can confirm it works).</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 54.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18.0pt;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">4.2<span style="font: normal normal normal 7pt/normal 'Times New Roman';"> </span></span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> “EC2_ACCESS_KEY environment variable must be set”<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">While issue “euca_describe-availability-zones verbose” command (euca2ools), it gives an error as follows:</span><span style="font-family: 'Courier New'; font-size: 9pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 9pt;">root@ubuntu-CloudController:~# euca-describe-availability-zones<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 9pt;">EC2_ACCESS_KEY environment variable must be set.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 9pt;">Connection failed</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">The way I resolved this was to download the credentials again, and re-run the “eucarc” script. Furthermore, in /root/.bashrc, add the line to avoid downloading the credentials every time the cloud controller restarts. <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: 'Courier New'; font-size: 9pt;">[ -r ~/.euca/eucarc ] && . ~/.euca/eucarc<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">(I read this on one of the forums but forgot to capture the link)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><span class="Apple-tab-span" style="white-space: pre;"> </span>4.3 Node Controller (?) Without fully understand the purpose of the "eucarc" script, I also scp and ran it on the Node Controller having encountered the 0 free/max cpu issue the second time.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">5. “euca-describe-availability-zones verbose” should describe the environment (resources availabile on the Node Controller for running an instance). </span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">If the “free/max” fields are both 0, then something has not been registered properly.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"> </span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">B</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">y removing "NODES" config under eucalyptus.conf, and then deregister BOTH clusters and Node, and then register the cluster and then node again, </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">it </span><span style="font-family: Arial, sans-serif; font-size: 10pt;">solve</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">d</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> the 000 free/max CPU problem</span><span style="font-family: Arial, sans-serif; font-size: 10pt;">, referencing this <a href="http://open.eucalyptus.com/forum/euca-describe-availability-zones-verbose-returning-0000-free-max-columns-fedora-13-14">link</a>.</span></span><span style="font-family: Arial, sans-serif; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">root@ubuntu-CloudController:~/.euca# <span style="color: #c00000;">euca_conf --deregister-nodes 192.168.20.2</span></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">SUCCESS: removed node '192.168.20.2' from '//etc/eucalyptus/eucalyptus.local.conf'<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">root@ubuntu-CloudController:~/.euca# euca_conf --list-clusters</span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">registered clusters:<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> HomeCluster 192.168.10.153<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-CloudController:~/.euca# <span style="color: #c00000;">euca_conf --deregister-cluster HomeCluster</span><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">SUCCESS: cluster 'HomeCluster' successfully deregistered.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">root@ubuntu-CloudController:~/.euca# <span style="color: #c00000;">euca_conf --register-cluster HomeCluster 192.168.20.1</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">Trying rsync to sync keys with "192.168.20.1"...The authenticity of host '192.168.20.1 (192.168.20.1)' can't be established.</span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">ECDSA key fingerprint is 2a:29:27:ce:a1:03:a9:5e:c1:e3:52:9e:62:89:de:23.<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">Are you sure you want to continue connecting (yes/no)? yes<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">Warning: Permanently added '192.168.20.1' (ECDSA) to the list of known hosts.<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">done.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">SUCCESS: new cluster 'HomeCluster' on host '192.168.20.1' successfully registered.</span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-CloudController:~/.euca# euca_conf --list-clusters<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">registered clusters:<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> HomeCluster 192.168.20.1<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-CloudController:~/.euca# <span style="color: #c00000;">euca_conf --register-nodes 192.168.20.2</span><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">INFO: We expect all nodes to have eucalyptus installed in //var/lib/eucalyptus/keys for key synchronization.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">Trying rsync to sync keys with "192.168.20.2"...done.</span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-CloudController:~/.euca# euca_conf --list-nodes<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">registered nodes:<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;"> 192.168.20.2 HomeCluster<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">root@ubuntu-CloudController:~/.euca# euca-describe-availability-zones</span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE HomeCluster 192.168.20.1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 11px;">root@ubuntu-CloudController:~/.euca# euca-describe-availability-zones verbose</span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE HomeCluster 192.168.20.1<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE |- vm types free / max cpu ram disk<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE |- m1.small <span style="color: red;">0002 / 0002</span> 1 192 2<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE |- c1.medium 0002 / 0002 1 256 5<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE |- m1.large 0001 / 0001 2 512 10<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE |- m1.xlarge 0001 / 0001 2 1024 20<o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 8pt;">AVAILABILITYZONE |- c1.xlarge 0000 / 0000 4 2048 20<o:p></o:p></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><br /></span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">6. Configure bridge on CloudController in response to WARN message in /var/log/eucalyptus/cc.log, referencing recommendations from this <a href="http://open.eucalyptus.com/forum/managed-novlan-and-priv-interface-type-why-bridge">link</a>.</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"><br /></span><br />
<ol start="2" style="margin-top: 0cm;" type="1"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> </span></ol>
<span style="font-family: Arial, sans-serif; font-size: 10pt;"> </span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">Congratulations if you have reached this far into this post. At this stage, you should have a working cloud platform, allowing you to search and install images from "Store" tab. </span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> <div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;"><o:p> </o:p></span></div>
</span></div>
<a href="http://1.bp.blogspot.com/-NGufPXpxdGM/TjKRzxo1pYI/AAAAAAAAAQA/-4pnbOQWpC0/s1600/Untitled.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5634726402477892994" src="http://1.bp.blogspot.com/-NGufPXpxdGM/TjKRzxo1pYI/AAAAAAAAAQA/-4pnbOQWpC0/s320/Untitled.jpg" style="cursor: hand; cursor: pointer; display: block; height: 214px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">The next blog will be about Hybridfox interface, launching an instance and accessing it through ssh.</span>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-75036204008788991112011-07-29T19:30:00.025+10:002012-01-10T14:52:39.535+11:00Implementing Cloud Computing on your average Desktop PC (Part 1/3)<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">Why Eucalyptus? Because it is also used by Amazon’s<a href="http://aws.amazon.com/ec2/"><span style="color: blue;">EC2 cloud platform</span></a>. Even better, Eucalyptus comes with Ubuntu Server edition 11.04.</span></div>
<div>
<span class="Apple-style-span"></span><br />
<div>
<span class="Apple-style-span"><span class="Apple-style-span"> </span></span><br />
<div class="MsoNormal" style="font-family: Arial, sans-serif; line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span"><span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">I began by reading <a href="http://cssoss.files.wordpress.com/2010/11/eucalyptus-beginners-guide-uec-edition1-1.pdf"><span style="color: blue;">Eucalyptus beginner’s guide</span></a>, which contains all the installation procedure and configuration items, as well as a high-level reference diagram showing all of the private cloud's components </span><span class="Apple-style-span"><span style="color: black; font-family: Arial, sans-serif;">(</span><span style="color: black; font-family: Arial, sans-serif;">please read the guide in case if this diagram is not clear due to low resolution</span><span style="color: black; font-family: Arial, sans-serif;">):</span></span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></span></span></div>
<span class="Apple-style-span"><span class="Apple-style-span"> <div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 13px; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span" style="margin-left: auto; margin-right: auto;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5634715617004171458" src="http://1.bp.blogspot.com/-LuqjCj8MqKY/TjKH_-nhMMI/AAAAAAAAAPw/Rwc7WjnS2RM/s320/overview.jpg" style="cursor: hand; cursor: pointer; display: block; height: 146px; margin: 0px auto 10px; text-align: center; width: 320px;" /></span></span></div>
</span></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">While I do not intend to go through every step in the beginner's guide, the definition of an "instance" is worth paying attention to (since this is what I aimed at running eventually), "The VMs running on the hypervisor and controlled by UEC are called instances."</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">As you may notice, the private cloud implementation is across two desktop PCs:</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"> </span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p> </o:p></span></span></div>
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"> <div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"><span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5634716321688356994" src="http://4.bp.blogspot.com/-ZR0EEPKHzFk/TjKIo_xUiII/AAAAAAAAAP4/q0yd28Tpgz8/s320/PCs.jpg" style="cursor: hand; cursor: pointer; display: block; height: 129px; margin: 0px auto 10px; text-align: center; width: 320px;" /></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Although there is an option of installing the entire private cloud on a single computer, I decided to use my old PC as a dedicated Cloud Controller. </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">My old PC's CPU does not support Intel’s Virtual Hardware Acceleration (VT) technology but it has a hard-drive of 1.5TB (ample storage space). For the Node Controllers, I purchased a second hand PC from EBay for $190, which is only strong enough to run Windows XP but its CPU supports VT and also upgraded it to 4GB of ram in total.</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<b><span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;"><o:p> </o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<b><span style="font-family: Arial, sans-serif; font-size: 10pt;">Installation Notes</span></b><span style="color: black; font-family: Georgia, serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">The actual OS installation was rather straight forward. I inserted Ubuntu’s installation CD and followed the screen instructions. As a note, it would be a good idea to be connected to the internet to do apt-get update as well as sync up the time with NTP.</span><span style="color: black; font-family: Arial, sans-serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<u><span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Node Controller</span></u><span style="color: black; font-family: Arial, sans-serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Prior to installation, consider the Node Controller is the only component which CPU is required to support hardware virtualization. To identify the CPU model, either check in BIOS or check the /proc/cpuinfo file (if Linux is already installed):<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-NodeController:/var/log# cat /proc/cpuinfo<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">processor : 0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">vendor_id : GenuineIntel<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">model name : Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">address sizes : 36 bits physical, 48 bits virtual<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Cross check with this<a href="http://ark.intel.com/VTList.aspx#59133"><span style="color: blue;"> Intel's link </span></a>to confirm if the process supports VT technology.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Virtual Hardware Acceleration (VT) technology needs to be enabled through <b>BIOS </b>settings (in my case, it was enabling the "Hardware Virtualization" cpu setting). Otherwise, Eucalyptus complaints about BIOS stopping KVM from starting in the following syslog messages:<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-NodeController:/var/log# cat syslog | grep -i kvm</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">Jul 21 20:39:29 ubuntu-NodeController kernel: [ 27.885070] kvm:</span><span style="color: #c00000; font-family: 'Courier New'; font-size: 8pt;">disable TXT in the BIOS or activate TXT before enabling KVM</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">Jul 21 20:39:29 ubuntu-NodeController kernel: [ 27.885074] kvm: disabled by bios</span><span style="color: black; font-family: 'Times New Roman', serif; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">Jul 21 20:39:29 ubuntu-NodeController init: qemu-kvm pre-start process (1086) terminated with status 1</span><span style="color: black; font-family: Georgia, serif; font-size: 8pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Another thing worth nothing about Node Controller is, the "eth1" interface should be part of the bridge interface, which, as its named, bridges the physical port to a virtual/ internal interface on the instance. </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<u><span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Cloud Controller</span></u><span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">As you may note in the diagram above, the Cloud Controller has <b>two NIC cards</b> installed. One for internet access (public), the other for cloud access (private). I attempted setting up both Private and Public interfaces on the same Ethernet port, but remote access worked intermediately (...I doubt does single port setup works).<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Herewith the /etc/network/interfaces file for reference:<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">root@ubuntu-CloudController:~# cat /etc/network/interfaces<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"># This file describes the network interfaces available on your system<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"># and how to activate them. For more information, see interfaces(5).<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"># The loopback network interface<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">auto lo<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">iface lo inet loopback<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"># The internet interface<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">auto eth0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">iface eth0 inet static<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">address 192.168.10.153<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">netmask 255.255.255.0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">network 192.168.10.0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">broadcast 192.168.10.255<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">gateway 192.168.10.1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"><o:p> </o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;"># The Cloud Computing interface (This was changed to a bridge interface later to resolve an error message)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">auto eth1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">iface eth1 inet static<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">address 192.168.20.1<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">netmask 255.255.255.0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">network 192.168.20.0<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">broadcast 192.168.200.255<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">Also worth mentioning, I have setup my Cloud Controller as client as well, installing the following packages:</span><span style="color: black; font-family: Arial, sans-serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">apt-get install qemu-kvm<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="color: black; font-family: 'Courier New'; font-size: 8pt;">apt-get install euca2ools<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">P.S. I setup my Cloud Controller as NAT to allow Node Controller to access the internet (Somehow my home’s internet gateway does not allow me to configure static routing so I had to resolve to this work around).</span><span style="color: black; font-family: Arial, sans-serif; font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-margin-top-alt: auto;">
<span style="color: black; font-family: Arial, sans-serif; font-size: 10pt;">So herewith the list of considerations I came across during installation of Eucalyptus. Part two will contain configuration and troubleshooting items needed to get Eucalyptus up-and-running. </span></div>
</span></div>
</span></div>
<div>
</div>
<div>
</div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-86794647260095037462011-06-04T09:51:00.006+10:002012-11-19T18:16:59.485+11:00Optimizing TCP Throughput on FreeBSD system<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;">I stumbled across a rather dated</span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;"> document about optimizing TCP</span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;"> throughput</span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;"> on FreeBSD system</span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;">; where its proof of theory was carried out using FreeBSD OS 4.0. </span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;">Herewith the <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.70.6479&rep=rep1&type=pdf" target="_blank">link</a>: </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">I would like to provide a quick reference to view some of these tunings and bring it to our awareness.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;"><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;">Quote from</span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;"> </span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;">“Introduction”: </span></span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">This paper explores the end-system factors that can limit bandwidth for TCP on high-speed networks and the techniques to overcome those limitations… <b>The limiting factor</b> is not CPU processing power but the <b>ability to move data through the host I/O system and memory.</b></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
</div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;">The paper then proceeded to present four techniques: 1. </span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;">Large MTU, 2. </span><span class="Apple-style-span" style="font-family: monospace; white-space: pre;"><span style="font-family: "Arial","sans-serif"; mso-fareast-font-family: PMingLiU; mso-fareast-language: ZH-HK;">Interrupt </span><span style="color: black; font-family: Arial, sans-serif;"><i>coalescing, </i>3. </span></span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;">Checksum offloading, 4. </span><span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;">Zero-Copy (page remapping)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
I checked on my FreeBSD 7.0 system and noted most of these options have been enabled by default, or included under sysctl, and herewith my findings:</div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;"><span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;">1. For larger MTU size, use "ifconfig em0 mtu <mtu>"</mtu></span></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;"><span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;">2. Interrupt coalescing. At first, I thought it would have been the "device polling" option used in the GENERIC kernel file, but it turned out to be always enabled and option is invisible under "sysctl -a"...<span class="Apple-tab-span" style="white-space: pre;"> </span> </span></span><a href="http://freebsd.1045724.n5.nabble.com/Configuring-BCE-Interrupt-Coalescing-on-8-1-RELEASE-td3750002.html">http://freebsd.1045724.n5.nabble.com/Configuring-BCE-Interrupt-Coalescing-on-8-1-RELEASE-td3750002.html</a></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;"><span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;">3. Checksum Offloading (onto the interface), enabled by default</span></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;"><span style="color: black; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: black;"># ifconfig -m <span class="Apple-tab-span" style="white-space: pre;"> </span># to display the hardware capabilities, which are shown under options. <span class="Apple-tab-span" style="white-space: pre;"> </span># Use "-txcsum -rxcsum" options to switch off. </span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span"><span style="color: black;"><span style="color: black;">FreeBSD# ifconfig -m<span class="Apple-tab-span" style="white-space: pre;"> </span> </span></span>em0: flags=8843</span><up broadcast="broadcast" multicast="multicast" running="running" simplex="simplex"><span class="Apple-style-span"> metric 0 mtu 1500 options=19b</span><rxcsum tso4="tso4" txcsum="txcsum" vlan_hwcsum="vlan_hwcsum" vlan_hwtagging="vlan_hwtagging" vlan_mtu="vlan_mtu"></rxcsum></up></span></div>
<div class="MsoNormal" style="font-family: Arial, sans-serif; font-size: 10pt; line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 10.0pt;">4. Zero copying, once again, another built in feature and the closest thing I can find are some vnodes parameters...</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span">FreeBSD# sysctl -a | grep numvnodes <span class="Apple-tab-span" style="white-space: pre;"> </span> </span><span class="Apple-style-span" style="font-family: 'courier new';">vfs.numvnodes: 61486</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span">FreeBSD# sysctl -a | grep maxvnodes<span class="Apple-tab-span" style="white-space: pre;"> </span> </span><span class="Apple-style-span" style="font-family: 'courier new';">kern.maxvnodes: 69071</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span">[Output from top command]</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'courier new';">Memory Usage…</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span" style="font-family: 'courier new';">last pid: 50644;<span style="mso-spacerun: yes;"> </span>load averages:<span style="mso-spacerun: yes;"> </span>0.37,<span style="mso-spacerun: yes;"> </span>0.21,0.09<span style="mso-spacerun: yes;"> </span>up 1+23:21:49<span style="mso-spacerun: yes;"> </span>12:11:30<span class="Apple-tab-span" style="white-space: pre;"> </span> </span><span class="Apple-style-span" style="font-family: 'courier new';">64 processes:<span style="mso-spacerun: yes;"> </span>1 running, 63 sleeping<span class="Apple-tab-span" style="white-space: pre;"> </span> </span><span class="Apple-style-span" style="font-family: 'courier new';">CPU states:<span style="mso-spacerun: yes;"> </span>5.0% user,<span style="mso-spacerun: yes;"> </span>0.0% nice, 11.0% system,<span style="mso-spacerun: yes;"> </span>0.9% interrupt, 83.0% idle<span class="Apple-tab-span" style="white-space: pre;"> </span> </span><span class="Apple-style-span" style="font-family: 'courier new';">Mem: 30M Active, 471M Inact, 115M Wired, 192K Cache, 110M Buf, 366M Free<span class="Apple-tab-span" style="white-space: pre;"> </span> </span><span class="Apple-style-span" style="font-family: 'courier new';">Swap: 8192M Total, 8192M Free</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><span class="Apple-style-span">M</span><span class="Apple-style-span">y reference is nowhere near completion, but it would be a good start prior to reading up on this other TCP/IP optimization paper on FreeBSD system:</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span"><a href="http://people.freebsd.org/~andre/Optimizing%20the%20FreeBSD%20IP%20and%20TCP%20Stack.pdf">http://people.freebsd.org/~andre/Optimizing%20the%20FreeBSD%20IP%20and%20TCP%20Stack.pdf</a></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span class="Apple-style-span" style="font-family: 'courier new'; font-size: x-small;"><br /></span></div>
Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-20309284918250366652011-05-28T10:25:00.003+10:002012-01-10T14:52:18.613+11:00Quick note on "Wall" command<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">On a FreeBSD system, if you would like to send messages to all users, then login as root and type: </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">#wall</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: Arial, sans-serif; font-size: 10pt;">-- Message</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px;">[Ctrl-D]</span></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0tag:blogger.com,1999:blog-2360890399048831113.post-21907504899666149562011-05-09T23:05:00.004+10:002012-01-13T20:20:36.559+11:00On Netgear WNR2000 Wifi Router (for Linksys ATA and Iomega NAS to work)<div>
It has been almost 6 months since my last post... I believe I have collected sufficient information from using the Netgear WNR2000 wifi router for another post. By the way, this router is 3 years old and was released back in June 2008 (http://routers.productwiki.com/netgear-wnr2000/). </div>
<div>
<br /></div>
<div>
I purchased a Linksys ATA device and in the process of getting it work behind the Netgear router, there were several interesting findings with regards to the port-forwarding settings:</div>
<div>
1. Using WNR2000 default settings, the Linksys ATA could only make out-going phone calls. Incoming phone calls resulted in a "person you are trying to call is unavailable..." message, despite successful SIP registration. </div>
<div>
2. Netgear WNR2000 port forwarding settings only came into effect AFTER the router rebooted. </div>
<div>
3. F.Y.I. I configured static IP address on the Linksys ATA device (which, by the way, only comes into effect after disabling DHCP on Linksys ATA)</div>
<div>
The following Port Forwarding rules were referenced from another post, and the rule numbers on WNR2000 MATTERS. Have them configured the other way around and incoming calls would't work. </div>
<div>
<br /></div>
<div>
Rule <b>1</b>: Permit UDP 5060, Linksys ATA static IP<linksys address="" ata="" ip=""></linksys></div>
<div>
Rule <b>2</b>: Permit UDP 16384 - 16482, <linksys address="" ata="" ip=""></linksys>Linksys ATA static IP</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
I also own an Iomega NAS (with an Ethernet port). Interesting enough, everytime after I restarted my laptop, the NAS' share drives were no longer visible (The laptop connects to the same Netgear AP which the NAS is also connected to through a CAT5e). Out of interest, Wireshark capture indicated that when Iomega started up, it first multicasts MDNS queries (port 5353 rather than UDP 53 for standard DNS). </div>
<div>
This was then followed by exchanging SMB messages (TCP 445) between the laptop and NAS. While I am no expert in SMB, I recall reading messages annoucing each of the shared directories. </div>
<div>
As such, it would appear either the NAS stopped annoucing these messages after the TCP connection timed out (due to laptop restart), or the wireless router stopped new TCP sessions from being established. </div>
<div>
The only workaround was to restart the wifi router. Afterwards, the NAS shared drives would magically become visible from my laptop again. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
P.S. This morning the Netgear router finally gave in after several restarts. Both my laptop and iPhone had difficulty connecting to the AP. As a result, I have replaced this router with a TP-Link TL-WR740. Upgraded this box to the latest firmware and so far so good... the Linksys ATA was a matter of simply plug-and-play while the IP NAS has remained visible so far... perhaps I shall have more to add after another couple of months.<br />
<br />
P.P.S. For convenience, the dialplan on the Linksys ATA has been simplified from<br />
# Original dialplan, local calls only<br />
<br />
(*xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx|<#0:>xx.<:@gw0>.)<br />
<br />
To<br />
# For dialing everything<br />
(*xx|xxx.)<br />
<br />
<br /></div>Jonathon Lamhttp://www.blogger.com/profile/16802957046800853888noreply@blogger.com0