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

<channel>
	<title>LinuxMonk &#187; Rosario</title>
	<atom:link href="http://www.linuxmonk.org/author/Rosario/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxmonk.org</link>
	<description>A Journey Towards Infinity...</description>
	<lastBuildDate>Fri, 16 Jul 2010 19:32:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Huawei Modem not detecting in Ubuntu 10.04 Lucid &#8211; Fix</title>
		<link>http://www.linuxmonk.org/2010/07/17/huawei-modem-not-detecting-in-ubuntu-10-04-lucid-fix/</link>
		<comments>http://www.linuxmonk.org/2010/07/17/huawei-modem-not-detecting-in-ubuntu-10-04-lucid-fix/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 19:25:28 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Huawei]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=325</guid>
		<description><![CDATA[I always like to do thinks in terminal, let me explain you in my way.  Use lsusb command to find if the modem is detected. If detected use lsusb -v, to find the product id and vendor id of the modem. In my case I am using Huawei EC168C &#8211; the vendor id is &#8220;12d1&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>I always like to do thinks in terminal, let me explain you in my way.  Use lsusb command to find if the modem is detected.</p>
<p>If detected use lsusb -v, to find the product id and vendor id of the modem.</p>
<p>In my case I am using Huawei EC168C &#8211; the vendor id is &#8220;12d1&#8243; and product id is &#8220;1446&#8243;.</p>
<p>Open the terminal and follow the instructions</p>
<blockquote><p>#sudo gedit /etc/udev/rules.d/15-huawei-115x.rules</p></blockquote>
<p>Now paste the following content as follows and save.</p>
<blockquote><p>SUBSYSTEM==&#8221;usb&#8221;,<br />
SYSFS{idProduct}==&#8221;1446&#8243;,<br />
SYSFS{idVendor}==&#8221;12d1&#8243;,<br />
RUN+=&#8221;/lib/udev/modem-modeswitch &#8211;vendor 0x12d1 &#8211;product 0&#215;1446 &#8211;type option-zerocd&#8221;</p></blockquote>
<p>Save the file. Unplug and plug the modem. Now right click the network icon , goto Mobile Broadband and click Edit. Enter the phone and username.</p>
<p>In my case I am in Zantel network. The phone number is #777 and username is @zantel.com. Click the network icon again and click the detected modem to enjoy surfing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2010/07/17/huawei-modem-not-detecting-in-ubuntu-10-04-lucid-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Shell Script to keep the Datanodes on MySQL NDB Clusters live and stable</title>
		<link>http://www.linuxmonk.org/2010/01/07/a-shell-script-to-keep-the-datanodes-on-mysql-ndb-clusters-live-and-stable/</link>
		<comments>http://www.linuxmonk.org/2010/01/07/a-shell-script-to-keep-the-datanodes-on-mysql-ndb-clusters-live-and-stable/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 13:40:29 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySql NDB Clusters]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NDB Clusters]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=317</guid>
		<description><![CDATA[When i installed an ndb clusters, i found sometimes one of the datanodes, fails for some reason and they never start again untill it is manually done. So i wrote a shell script for the datanodes to check itself. The script checks in the ndbd process is running, if not its starts the process and [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->When i installed an ndb clusters, i found sometimes one of the datanodes, fails for some reason and they never start again untill it is manually done. So i wrote a shell script  for the datanodes to check itself. The script checks in the ndbd process is running, if not its starts the process and writes a log. I added this shell script to the cron job to run the script every 10 minutes. Now the ndb clusters is perfectly stable for some months.</p>
<p>You may ask, 10 mins is too long. Does it mean, the database server will be down for 10 mins. Not beacuse there are more than 1 data node in the cluster, during this 10 mins other nodes will serve.</p>
<blockquote><p>#!/bin/sh</p>
<p>logfile=/usr/local/mysql-cluster/restart.log</p>
<p>PID=`ps -eo &#8216;tty pid args&#8217; | grep &#8216;ndbd&#8217; | grep -v grep | tr -s &#8221; | cut -f2 -d &#8221;`</p>
<p>if [ -z "$PID" ]</p>
<p>then</p>
<p>message=`service ndbd start`</p>
<p>echo &#8220;`date` &#8211; NDBD started&#8221;&gt;&gt;$logfile</p>
<p>fi</p></blockquote>
<p>Cron job that I added, (edit the file /etc/crontab and add the following line at the end)</p>
<blockquote><p>*/10 * * * * root /path/to/the/script</p></blockquote>
<p>This would keep the ndbclusters live for ever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2010/01/07/a-shell-script-to-keep-the-datanodes-on-mysql-ndb-clusters-live-and-stable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password Protected WordPress blog</title>
		<link>http://www.linuxmonk.org/2010/01/06/password-protected-wordpress-blog/</link>
		<comments>http://www.linuxmonk.org/2010/01/06/password-protected-wordpress-blog/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 17:36:22 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=315</guid>
		<description><![CDATA[A simple way to have a password protected wordpress.org blog. You may ask, if a blog is to be password protected, what is the need for it. Sometimes we may need a small office or company internal blog which may have confidential information of the company. Here you go Add the following code to the [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->A simple way to have a password protected wordpress.org blog. You may ask, if a blog is to be password protected, what is the need for it. Sometimes we may need a small office or company internal blog which may have confidential information of the company. Here you go</p>
<p>Add the following code to the beginning of the index.php file of the Theme you are using.</p>
<blockquote><p>&lt;?php<br />
if (!is_user_logged_in()) {<br />
auth_redirect();<br />
}<br />
?&gt;</p></blockquote>
<p>And thats it&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2010/01/06/password-protected-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 Wireless Issue Dell 1330 or BCM4312</title>
		<link>http://www.linuxmonk.org/2010/01/01/ubuntu-9-10-wireless-issue-dell-1330-or-bcm4312/</link>
		<comments>http://www.linuxmonk.org/2010/01/01/ubuntu-9-10-wireless-issue-dell-1330-or-bcm4312/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 14:50:36 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=313</guid>
		<description><![CDATA[To solve this issue you should make sure you have installed the right driver and also you should make sure you removed all the conflicting drivers. Because if there is any conflicting drivers installed it will not allow the kernel to load the right driver. Packages to be intalled bcmwl-kernel-source bcmwl-modaliases Packages that should not [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->To solve this issue you should make sure you have installed the right driver and also you should make sure you removed all the conflicting drivers. Because if there is any conflicting drivers installed it will not allow the kernel to load the right driver.</p>
<p><strong>Packages to be intalled</strong></p>
<blockquote><p>bcmwl-kernel-source</p>
<p>bcmwl-modaliases</p></blockquote>
<p><strong>Packages that should not be installed or removed</strong></p>
<blockquote><p>b43-fwcutter</p>
<p>linux-backports-modules-karmic</p>
<p>linux-backports-modules-karmic-generic</p></blockquote>
<p>actually no backports-modules need not be installed.</p>
<p>Problems solved</p>
<ul>
<li>detecting wireless connections, but not able to connect.</li>
<li>Wireless not working</li>
<li>wireless is enabled but doesnt work.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2010/01/01/ubuntu-9-10-wireless-issue-dell-1330-or-bcm4312/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>M-Commerce Mobile App &#8211; My First J2ME Experience</title>
		<link>http://www.linuxmonk.org/2009/12/27/m-commerce-mobile-app-my-first-j2me-experienc/</link>
		<comments>http://www.linuxmonk.org/2009/12/27/m-commerce-mobile-app-my-first-j2me-experienc/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 08:42:37 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mobile App]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=303</guid>
		<description><![CDATA[I am trying to create secure mobile application that would be used for m-commerce. From day one of the development i faced several challenges. I made the application more like a web browser, and the connection using http, (ofcourse finally after development it would be https) for the request and response. I created a cool [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;">I am trying to create secure mobile application that would be used for m-commerce. From day one of the development i faced several challenges. I made the application more like a web browser, and the connection using http, (ofcourse finally after development it would be https) for the request and response. I created a cool graphical user interface with <a href="http://www.kalmeo.org/projects/kuix">Kuix Library</a>.  The J2ME application would interact with a PHP server application and all transactions will be in xml. I made the transactions light weight. Making the application look like it is loading the data from the local. I took care of all the security flaws, hiding most of the implementation from the user.</p>
<p style="margin-bottom: 0in;">But still I am not satisfied of the security.</p>
<p style="margin-bottom: 0in;">I wanted to create a seperate protocol, to ensure high security.  Features</p>
<ol>
<li>The application should be bound to 	the mobile number, the user should be able to access the m-commerce 	service only through the mobile number he/she has registered.</li>
<li>The application should be bound to 	the SIM card and the mobile itself. More to the SIM card.</li>
</ol>
<p style="margin-bottom: 0in;"><strong>Methods</strong></p>
<ol>
<li>Try to push an sms from the server, on each login with a encrypted session key. After that use that key for every transaction you make in that particular session.</li>
<li>Try to push an SMS with a generated permanent private key, on your first login with the application. Take the signature of the SIM card and save this private key and simcard signature in phone memory. From next login check if the saved signature and SIM signature matches. If so procees with the http login sending the username, password, and the private key.</li>
</ol>
<p style="margin-bottom: 0in;"><strong>Challenges in implementation,</strong></p>
<ol>
<li>Its is very hard to know the 	mobile number from the J2ME application. There are some methods 	available, but they are not perfect and differs from each model.</li>
<li>Still wondering if i could read 	the signature of the simcard, so that i could deactivate the Java 	application on sim card change.</li>
<li>Waiting for the SMS would incur 	much time.</li>
</ol>
<p>Any suggestions are most welcomed. Awaiting your comments</p>
<p style="margin-bottom: 0in;">
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2009/12/27/m-commerce-mobile-app-my-first-j2me-experienc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting Zantel&#8217;s Z-Connect modem to Internet in Linux(Ubuntu)</title>
		<link>http://www.linuxmonk.org/2009/12/27/connecting-zantels-z-connect-modem-to-internet-in-linuxubuntu/</link>
		<comments>http://www.linuxmonk.org/2009/12/27/connecting-zantels-z-connect-modem-to-internet-in-linuxubuntu/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 08:40:24 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wvdial]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=306</guid>
		<description><![CDATA[Z-Connect is one of the fastest wireless modem in Tanzania. Connecting it in Linux was a challenge. Here is the configuration file to connect to the Internet in Linux. I am using Ubuntu. In your terminal give the command #wvdialconf Edit the file /etc/wvdial.conf with your favorite text editor and overwrite the entire contents with [...]]]></description>
			<content:encoded><![CDATA[<p>Z-Connect is one of the fastest wireless modem in Tanzania. Connecting it in Linux was a challenge. Here is the configuration file to connect to the Internet in Linux. I am using Ubuntu.</p>
<ul>
<li>In your terminal give the command</li>
</ul>
<blockquote><p>#wvdialconf</p></blockquote>
<ul>
<li>Edit the file /etc/wvdial.conf with your favorite text editor and overwrite the entire contents with the following</li>
</ul>
<blockquote><p>Init2 = AT+CRM=1<br />
Dial Command = ATM1L3DT<br />
Modem Type = Analog Modem<br />
Phone = #777<br />
ISDN = 0<br />
Username = &#8220;@zantel.com&#8221;<br />
Init1 = ATZ<br />
Password = &#8221; &#8221;<br />
Modem = /dev/ttyUSB0<br />
Baud = 519600</p></blockquote>
<ul>
<li>Now come to the terminal and type the command</li>
</ul>
<blockquote><p>#wvdial</p></blockquote>
<p>Enjoy Browsing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2009/12/27/connecting-zantels-z-connect-modem-to-internet-in-linuxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebug a gift for WebDevelopers</title>
		<link>http://www.linuxmonk.org/2009/08/25/firebug-a-gift-for-webdevelopers/</link>
		<comments>http://www.linuxmonk.org/2009/08/25/firebug-a-gift-for-webdevelopers/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 19:41:30 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=295</guid>
		<description><![CDATA[Firebug is a firefox plugin, which converts a simple browsers into a powerful debugging tool. When I was learning how to develop a Drupal module i came across the term Firebug. Now it has become part of my life. The day i found firebug, I was just thinking why it didn&#8217;t come to my sight [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;">Firebug is a firefox plugin, which converts a simple browsers into a powerful debugging tool. When I was learning how to develop a Drupal module i came across the term Firebug. Now it has become part of my life. The day i found firebug, I was just thinking why it didn&#8217;t come to my sight all these days when i was surfing the net.</p>
<p style="margin-bottom: 0in;">Firebug, gives so many reasons for a web developer to use it. May be let me list in what all ways Firebug helped me</p>
<ol>
<li>It was very hard to find the bugs 	in Java Script. Most of the time if there is a syntax error, the 	code would not respond, Firebug often helps me in tracking the bug 	in the Java script.</li>
<li>Tracing through the HTML code. 	When you keep your mouse on each HTML, tag below Firebug will 	highlight the content at the top of the screen. It would be so 	helpful to trace, which part of the HTML creates a particular 	segment.</li>
<li>Then it can also trace CSS. Most 	commonly when you are trying to edit a template to create you 	website. Firebug when play a greater role in it.</li>
<li>I don&#8217;t think its over, but I am 	using Firebug for all these, still very often it gets updated with 	new features added.</li>
</ol>
<p style="margin-bottom: 0in;">Firefox is the Browser that i really love and the two plugins Delicious and Firebug have become my intimate these days, helping me every moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2009/08/25/firebug-a-gift-for-webdevelopers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Deploying Django in Apache using mod_wsgi</title>
		<link>http://www.linuxmonk.org/2009/06/27/deploying-django-in-apache-using-mod_wsgi/</link>
		<comments>http://www.linuxmonk.org/2009/06/27/deploying-django-in-apache-using-mod_wsgi/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 15:12:17 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=293</guid>
		<description><![CDATA[Deploying Django in Apache using mod_wsgi is the most recommended one when compared to using mod_python. Deploying Django in apache is not very difficult, its simple with quite simple steps. Here i have created a helloworld project and explained how to deploy it in apache. You must install mod_wsgi apache module before trying this. Step [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0in;">Deploying Django in Apache using mod_wsgi is the most recommended one when compared to using mod_python. Deploying Django in apache is not very difficult, its simple with quite simple steps. Here i have created a helloworld project and explained how to deploy it in apache. You must install mod_wsgi apache module before trying this.</p>
<p style="margin-bottom: 0in;"><strong>Step 1:</strong> Create an directory named apache in your project directory. And add two files one for conf and another a wsgi application in it.</p>
<blockquote>
<p style="margin-bottom: 0in;">$mkdir apache</p>
<p style="margin-bottom: 0in;">$cd apache</p>
<p style="margin-bottom: 0in;">$touch apache_django_wsgi.conf</p>
<p style="margin-bottom: 0in;">$touch dj_hello.wsgi</p>
</blockquote>
<p style="margin-bottom: 0in;"><strong>Step 2: </strong>Open the apache_django_wsgi.conf file with a text editor(gedit)and add the following contents</p>
<p style="margin-bottom: 0in;">
<blockquote>
<p style="margin-bottom: 0in;">WSGIScriptAlias /dj &#8220;/path/to/us/project/folder/helloworld/apache/dj_hello.wsgi&#8221;</p>
<p style="margin-bottom: 0in;">&lt;Directory &#8220;/path/to/ur/project/folder/helloworld/apache&#8221;&gt;</p>
<p style="margin-bottom: 0in;">Allow from all</p>
<p style="margin-bottom: 0in;">&lt;/Directory&gt;</p>
</blockquote>
<p style="margin-bottom: 0in;">Here, helloworld is the name of the project</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Step 3:</strong> Open the dj_hello.wsgi with a text editor(gedit) and add the following contents</p>
<blockquote>
<p style="margin-bottom: 0in;">import os, sys</p>
<p style="margin-bottom: 0in;">#Calculate the path based on the location of the WSGI script.</p>
<p style="margin-bottom: 0in;">apache_configuration= os.path.dirname(__file__)</p>
<p style="margin-bottom: 0in;">project = os.path.dirname(apache_configuration)</p>
<p style="margin-bottom: 0in;">workspace = os.path.dirname(project)</p>
<p style="margin-bottom: 0in;">sys.path.append(workspace)</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">#Add the path to 3rd party django application and to django itself.</p>
<p style="margin-bottom: 0in;">sys.path.append(&#8216;/usr/lib/python2.5/site-packages/django/&#8217;)</p>
<p style="margin-bottom: 0in;">os.environ['DJANGO_SETTINGS_MODULE'] = &#8216;helloworld.settings&#8217;</p>
<p style="margin-bottom: 0in;"># project settings file</p>
<p style="margin-bottom: 0in;">import django.core.handlers.wsgi</p>
<p style="margin-bottom: 0in;">application = django.core.handlers.wsgi.WSGIHandler()</p>
<p style="margin-bottom: 0in;"><strong><br />
</strong></p>
</blockquote>
<p style="margin-bottom: 0in;"><strong>Step 4:</strong> Put an entry in your apache configuration fine (httpd.conf or apache2.conf depending upon the destro you are using)</p>
<blockquote>
<p style="margin-bottom: 0in;">Include &#8220;/path/to/ur/project/folder/helloworld/apache/apache_django_wsgi.conf&#8221;</p>
</blockquote>
<p style="margin-bottom: 0in;">helloworld, is the name of the django project that i am deploying in django. After doing all the steps don&#8217;t forget to restart the apache service for the changes to take effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2009/06/27/deploying-django-in-apache-using-mod_wsgi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IP Bonding or Teaming in Linux &#8211; RHEL 5</title>
		<link>http://www.linuxmonk.org/2009/06/24/ip-bonding-or-teaming-in-linux-rhel-5/</link>
		<comments>http://www.linuxmonk.org/2009/06/24/ip-bonding-or-teaming-in-linux-rhel-5/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 16:25:14 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Networking]]></category>
		<category><![CDATA[bonding]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=282</guid>
		<description><![CDATA[IP Bonding or Teaming is a method of combining all the network interfaces togather into one with one of the types like Network Fault Tolerance, Round Robin, Back up, Loadbalancing etc. So it looks virtually as a single interface to the outside world providing high availability, based on the type you have set. Means, in [...]]]></description>
			<content:encoded><![CDATA[<p>IP Bonding or Teaming is a method of combining all the network interfaces togather into one with one of the types like Network Fault Tolerance, Round Robin, Back up, Loadbalancing etc. So it looks virtually as a single interface to the outside world providing high availability, based on the type you have set. Means, in a Network fault tolerant type one will take over if other fails and in a Load Balancing type trafic is shared when one busy to the other.</p>
<p>I got a chance of doing IP bonding in a HP Proliant Servers running RHEL 5. Everthing went well with no issues. Let me share my experience with my blog readers. In linux IP bonding is quite simple and is done with some kernel modules and no extra package is to be installed. In Windows, bonging or teaming is done with some software. With HP server, it can easily be done with some HP Network Configuration Uitlities.<br />
Two establish IP bonding you need a minimum of two nework interfaces</p>
<p style="margin-bottom: 0in;"><strong>Step 1:Check your network interfaces</strong></p>
<blockquote>
<p style="margin-top: 0.19in; margin-bottom: 0.19in; line-height: 100%;"><span style="color: #0000ff;"><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><span>#ethtool eth0</span></span></span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><br />
</span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Settings for eth0:<br />
Supported ports: [ TP MII ]<br />
Supported link modes: 10baseT/Half 10baseT/Full<br />
100baseT/Half 100baseT/Full<br />
Supports auto-negotiation: Yes<br />
Advertised link modes: 10baseT/Half 10baseT/Full<br />
100baseT/Half 100baseT/Full<br />
Advertised auto-negotiation: Yes<br />
</span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><strong>Speed: 100Mb/s</strong></span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><br />
</span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><strong>Duplex: Full<br />
</strong></span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;">Port: MII<br />
PHYAD: 1<br />
Transceiver: internal<br />
Auto-negotiation: on<br />
Supports Wake-on: g<br />
Wake-on: g<br />
Current message level: 0&#215;00000007 (7)<br />
</span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><strong>Link detected: yes</strong></span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><strong></strong></span></span></p>
<p style="margin-top: 0.19in; margin-bottom: 0.19in; line-height: 100%;"><span style="color: #0000ff;"><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><span>#ethtool eth1</span></span></span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><br />
Settings for eth1:<br />
Supported ports: [ TP MII ]<br />
Supported link modes: 10baseT/Half 10baseT/Full<br />
100baseT/Half 100baseT/Full<br />
Supports auto-negotiation: Yes<br />
Advertised link modes: 10baseT/Half 10baseT/Full<br />
100baseT/Half 100baseT/Full<br />
Advertised auto-negotiation: Yes<br />
Speed: 100Mb/s<br />
Duplex: Full<br />
Port: MII<br />
PHYAD: 1<br />
Transceiver: internal<br />
Auto-negotiation: on<br />
Supports Wake-on: g<br />
Wake-on: g<br />
Current message level: 0&#215;00000007 (7)<br />
Link detected: yes </span></span><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"><strong></strong></span></span></p>
</blockquote>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Step 2: Check all the requiured kernel modules are available(bonding and mii)</strong></p>
<blockquote>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">#modprobe &#8211;list | grep bonding</span></p>
<p style="margin-bottom: 0in;">/lib/modules/2.6.18-92.el5/kernel/drivers/net/bonding/bonding.ko</p>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;"># modprobe &#8211;list | grep mii</span></p>
<p style="margin-bottom: 0in;">/lib/modules/2.6.18-92.el5/kernel/drivers/net/mii.ko</p>
<p style="margin-bottom: 0in;">
</blockquote>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Step 3: Editing the modprobe.conf file</strong></p>
<blockquote>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">#vim /etc/modprobe.conf</span></p>
<p style="margin-bottom: 0in;">and add the following lines at the end</p>
<p style="margin-bottom: 0in;">alias bond0 bonding</p>
<p style="margin-bottom: 0in;">options bond0 mode=1 arp_ip_target=192.168.52.1 arp_interval=200 primary=eth0</p>
</blockquote>
<p style="margin-bottom: 0in;">To know more about the parameters to be used here use the command</p>
<blockquote>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;"><span style="background: transparent none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">#modinfo bonding</span></span></p>
<p style="margin-bottom: 0in;">filename:       /lib/modules/2.6.18-92.el5/kernel/drivers/net/bonding/bonding.ko</p>
<p style="margin-bottom: 0in;">author:         Thomas Davis, tadavis@lbl.gov and many others</p>
<p style="margin-bottom: 0in;">description:    Ethernet Channel Bonding Driver, v3.2.4</p>
<p style="margin-bottom: 0in;">version:        3.2.4</p>
<p style="margin-bottom: 0in;">license:        GPL</p>
<p style="margin-bottom: 0in;">srcversion:     DB2ABCD47A83F8567EBE92B</p>
<p style="margin-bottom: 0in;">depends:</p>
<p style="margin-bottom: 0in;">vermagic:       2.6.18-92.el5 SMP mod_unload gcc-4.1</p>
<p style="margin-bottom: 0in;">parm:           max_bonds:Max number of bonded devices (int)</p>
<p style="margin-bottom: 0in;">parm:           miimon:Link check interval in milliseconds (int)</p>
<p style="margin-bottom: 0in;">parm:           updelay:Delay before considering link up, in milliseconds (int)</p>
<p style="margin-bottom: 0in;">parm:           downdelay:Delay before considering link down, in milliseconds (int)</p>
<p style="margin-bottom: 0in;">parm:           use_carrier:Use netif_carrier_ok (vs MII ioctls) in miimon; 0 for off, 1 for on (default) (int)</p>
<p style="margin-bottom: 0in;">parm:           mode:Mode of operation : 0 for balance-rr, 1 for active-backup, 2 for balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp)</p>
<p style="margin-bottom: 0in;">parm:           primary:Primary network device to use (charp)</p>
<p style="margin-bottom: 0in;">parm:           lacp_rate:LACPDU tx rate to request from 802.3ad partner (slow/fast) (charp)</p>
<p style="margin-bottom: 0in;">parm:           xmit_hash_policy:XOR hashing method: 0 for layer 2 (default), 1 for layer 3+4 (charp)</p>
<p style="margin-bottom: 0in;">parm:           arp_interval:arp interval in milliseconds (int)</p>
<p style="margin-bottom: 0in;">parm:           arp_ip_target:arp targets in n.n.n.n form (array of charp)</p>
<p style="margin-bottom: 0in;">parm:           arp_validate:validate src/dst of ARP probes: none (default), active, backup or all (charp)</p>
<p style="margin-bottom: 0in;">parm:           fail_over_mac:For active-backup, do not set all slaves to the same MAC.  0 of off (default), 1 for on. (int)</p>
<p style="margin-bottom: 0in;">module_sig:	883f35048175a9e6e24e25c96667c37112449509f5739ebf283efa5295d315b73cee5e956f6e25709cbcf2826571c5ffc20f2d87672bb921d610d7</p>
<p style="margin-bottom: 0in;">
</blockquote>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Step 3: Now load the modules</strong></p>
<blockquote><p>&lt;!&#8211; 		@page { size: 8.27in 11.69in; margin: 0.79in } 		P { margin-bottom: 0.08in } 	&#8211;&gt;</p>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;"> #modprobe bonding</span></p>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;"> #modprobe mii</span></p>
</blockquote>
<p style="margin-bottom: 0in;">This will create a bond0 config file in the networks-scripts directory</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Step 4: Editting the three configuration files for eth0,eth1,bond0</strong></p>
<blockquote>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">|# vim /etc/sysconfig/network-scripts/ifcfg-bond0</span></p>
<p style="margin-bottom: 0in;">DEVICE=bond0</p>
<p style="margin-bottom: 0in;">BOOTPROTO=none</p>
<p style="margin-bottom: 0in;">ONBOOT=yes</p>
<p style="margin-bottom: 0in;">NETMASK=255.255.255.0</p>
<p style="margin-bottom: 0in;">IPADDR=192.168.52.4</p>
<p style="margin-bottom: 0in;">USERCTL=no</p>
<p style="margin-bottom: 0in;">GATEWAY=192.168.52.1</p>
<p style="margin-bottom: 0in;">TYPE=Ethernet</p>
<p style="margin-bottom: 0in;">IPV6INIT=no</p>
<p style="margin-bottom: 0in;">PEERDNS=yes</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">#vim  /etc/sysconfig/network-scripts/ifcfg-eth0</span></p>
<p style="margin-bottom: 0in;">DEVICE=eth0</p>
<p style="margin-bottom: 0in;">BOOTPROTO=none</p>
<p style="margin-bottom: 0in;">ONBOOT=yes</p>
<p style="margin-bottom: 0in;">MASTER=bond0</p>
<p style="margin-bottom: 0in;">SLAVE=yes</p>
<p style="margin-bottom: 0in;">USERCTL=no</p>
<p style="margin-bottom: 0in;">TYPE=Ethernet</p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">#vim /etc/sysconfig/network-scripts/ifcfg-eth1</span></p>
<p style="margin-bottom: 0in;">DEVICE=eth1</p>
<p style="margin-bottom: 0in;">BOOTPROTO=none</p>
<p style="margin-bottom: 0in;">ONBOOT=yes</p>
<p style="margin-bottom: 0in;">MASTER=bond0</p>
<p style="margin-bottom: 0in;">SLAVE=yes</p>
<p style="margin-bottom: 0in;">USERCTL=no</p>
<p style="margin-bottom: 0in;">TYPE=Ethernet</p>
</blockquote>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;"><strong>Step5: Restart your networks service</strong></p>
<blockquote>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">#/etc/init.d/network restart</span></p>
</blockquote>
<blockquote>
<p style="margin-bottom: 0in;"><span style="color: #0000ff;">#ifconfig</span></p>
</blockquote>
<p style="margin-bottom: 0in;">Now use ifconfig command to check the, you will look a new interface called bond0 has been created.  The ip you set for it is going to be your ip address of the system. Enjoy bonding</p>
<p style="margin-bottom: 0in;">
<p style="margin-top: 0.19in; margin-bottom: 0.19in; line-height: 100%;">
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2009/06/24/ip-bonding-or-teaming-in-linux-rhel-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with Forkbombs</title>
		<link>http://www.linuxmonk.org/2009/05/25/fun-with-forkbombs/</link>
		<comments>http://www.linuxmonk.org/2009/05/25/fun-with-forkbombs/#comments</comments>
		<pubDate>Mon, 25 May 2009 06:03:05 +0000</pubDate>
		<dc:creator>Rosario</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.linuxmonk.org/?p=274</guid>
		<description><![CDATA[Try this small shell script in your terminal. To have more fun remote login to others desktops and try this command in the terminal. ){ :&#38; };: This is a strange command in linux which crashes the system. Let me explain what exactly happens when this command is executed. ) &#8211; Function header where : [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0in;">Try this small shell script in your terminal. To have more fun remote login to others desktops and try this command in the terminal.</p>
<blockquote>
<p style="margin-bottom: 0in;"><strong> <img src='http://www.linuxmonk.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> ){ <img src='http://www.linuxmonk.org/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> :&amp; };:</strong></p>
</blockquote>
<p style="margin-bottom: 0in;">This is a strange command in linux which crashes the system. Let me explain what exactly happens when this command is executed.</p>
<ul>
<li> <img src='http://www.linuxmonk.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> ) &#8211; Function header where : is the name of the function(Colon and two parenthesis)</li>
<li>{ Opens the body of the function</li>
<li> A blank space is more important here, to have a good syntax</li>
<li>: recursive call to the same function(Colon)</li>
<li>|- pipes the out put of one function call to another</li>
<li>: which calls the function again (Colon)</li>
<li>&amp; Forks, creates a child process and assigns the function call to it</li>
<li>} Closes the function definition</li>
<li>; delimiter to end the function definition (Semicolon)</li>
<li>: actual call to the function(Colon)</li>
</ul>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">So the above script calls recursively itself twice and forks it to a child process indefinitly. At a point the memory gets full and the system crashes. You can gaurd yourself from forkbombs by restricting the number of process that can be executed at a time. Have fun with fork bombs&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmonk.org/2009/05/25/fun-with-forkbombs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
