<?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>MaddHat.com</title>
	<atom:link href="http://maddhat.com/feed" rel="self" type="application/rss+xml" />
	<link>http://maddhat.com</link>
	<description>Version 3</description>
	<lastBuildDate>Fri, 03 Sep 2010 20:10:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<image>
  <link>http://maddhat.com</link>
  <url>http://maddhat.com/favicon.ico</url>
  <title>MaddHat.com</title>
</image>
		<item>
		<title>apt-get upgrade Confusion</title>
		<link>http://maddhat.com/apt-get-upgrade-confusion</link>
		<comments>http://maddhat.com/apt-get-upgrade-confusion#comments</comments>
		<pubDate>Wed, 01 Sep 2010 15:00:26 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=197</guid>
		<description><![CDATA[While performing some regular maintenance on one of my Ubuntu machines I was getting a bit confused between all of the upgrade commands, so I investigated further.  I&#8217;ve listed below the basic differences between each: sudo apt-get upgrade install newest versions of packages on machine sudo apt-get dist-upgrade upgrades all packages on system, handle dependency]]></description>
			<content:encoded><![CDATA[<p>While performing some regular maintenance on one of my Ubuntu machines I was getting a bit confused between all of the upgrade commands, so I investigated further.  I&#8217;ve listed below the basic differences between each:</p>
<pre>sudo apt-get upgrade</pre>
<p>install newest versions of packages on machine</p>
<pre>sudo apt-get dist-upgrade</pre>
<p>upgrades all packages on system, handle dependency changes (remove obsolete packages).  This command prepares the system for upgrade but since /etc/sources.list is not changed to the sources for the newer distribution it will not actually upgrade to the newest version.</p>
<p>To actually perform a distribution upgrade the following command should be used (ensure you have a backup before issuing this command.  The upgrade could make your system unstable):</p>
<p>First, check which version you are currently running using the following:</p>
<pre>lsb_release -a</pre>
<p>Next, you can download the newest update manager and issue the upgrade command:</p>
<pre>sudo apt-get install update-manager-core
sudo do-release-upgrade</pre>
<p>All of these commands should be used with caution as you are directly affecting your software packages installed on the system.</p>
<p><a href="http://www.ghacks.net/2010/03/11/what-is-it-with-the-dist-upgrade-option-of-apt-get/" target="_blank">This site</a> was very helpful in my initial investigation of the differences of this command.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/apt-get-upgrade-confusion/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Exchange ICOs</title>
		<link>http://maddhat.com/microsoft-exchange-icos</link>
		<comments>http://maddhat.com/microsoft-exchange-icos#comments</comments>
		<pubDate>Sun, 15 Aug 2010 15:00:52 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ico]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=173</guid>
		<description><![CDATA[One of my email addresses I access through Microsoft Exchange. The domain at which this is hosted did not have a ICO for the page which has been an annoyance for me since I list all my frequently visited pages on my Firefox Bookmark Toolbar. I thought I better take some action to resolve this]]></description>
			<content:encoded><![CDATA[<p>One of my email addresses I access through Microsoft Exchange.  The domain at which this is hosted did not have a ICO for the page which has been an annoyance for me since I list all my frequently visited pages on my Firefox Bookmark Toolbar.  I thought I better take some action to resolve this so I searched for exhange ICO’s but had no success.  So, I decided to just adapt the logos for exchange and also the Office Outlook 2003 icon and send them to the web admin.  In case anyone else finds these useful I’m attaching them below.  Note that all logos are property of Microsoft.  I’ve created these only to make the experience for those running exchange better.</p>
<p>Previews of each included in compressed folder:  <img src="http://maddhat.com/wp-content/uploads/2010/05/exchange.png" alt="" /> <img src="http://maddhat.com/wp-content/uploads/2010/05/outlook-web.png" alt="" /></p>
<p><a href="http://maddhat.com/wp-content/uploads/2010/05/exchange-icos.zip">Download (ZIP)</a></p>
<p><a href="http://maddhat.com/wp-content/uploads/2010/05/exchange-icos.rar">Download (RAR)</a></p>
<p><a href="http://maddhat.com/wp-content/uploads/2010/05/exchange-icos.tar">Download (TAR)</a></p>
<p>or for terminal Linux users:</p>
<pre>wget http://maddhat.com/wp-content/uploads/2010/05/exchange-icos.tar</pre>
<p><strong>Note:</strong> To create these I used Photoshop and the <a href="http://www.telegraphics.com.au/sw/#icoformat" target="_blank">ICO plugin</a> to export them properly.  Found <a href="http://www.favicon.cc/" target="_blank">this site</a> for creating them free online as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/microsoft-exchange-icos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIND Tip &#8211; Dumping The Cache</title>
		<link>http://maddhat.com/bind-tip-dumping-the-cache</link>
		<comments>http://maddhat.com/bind-tip-dumping-the-cache#comments</comments>
		<pubDate>Sun, 01 Aug 2010 15:00:40 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind9]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[rndc]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=110</guid>
		<description><![CDATA[Thought it would be useful to document a useful command while learning how to operate BIND.  I set BIND9 up on my print server and was trying to examine how much resources it was consuming.  I found the following command helpful – it dumps the current BIND9 database from memory to /var/cache/bind (by default): sudo]]></description>
			<content:encoded><![CDATA[<p>Thought it would be useful to document a useful command while learning how to operate BIND.  I set BIND9 up on my print server and was trying to examine how much resources it was consuming.  I found the following command helpful – it dumps the current BIND9 database from memory to /var/cache/bind (by default):</p>
<pre>sudo rndc dumpdb –all</pre>
<p>After that I simply navigated to /var/cache/bind and issued the command</p>
<pre>ls –lah</pre>
<p>and was shown that it consumes 649K in memory from the output of the command above:</p>
<pre>-rw-r--r--  1 bind bind 649K 2010-05-02 08:15 named_dump.db</pre>
<p>I’m not a BIND expert and am actually stumbling around with some custom zone settings but I thought this was worth mentioning.  I&#8217;m also assuming this is quite small for a db size since this was only setup for testing for a 1 user network.  Nevertheless, it would be useful to check that you have adequate memory to handle the database size if you are deploying a DNS server for your network. I believe you can also limit the cache size if needed, but I don&#8217;t think I&#8217;ll be needing that option added to my config anytime soon.</p>
<p>If you haven’t already, read up on the rndc command – because it’s quite powerful.  In addition, make sure you are using the latest stable version of BIND to (as well as other benefits) protect against <a href="http://www.howtoforge.com/how-to-patch-bind-to-avoid-cache-poisoning-debian-etch" target="_blank">cache poisoning</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/bind-tip-dumping-the-cache/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gallery Update</title>
		<link>http://maddhat.com/gallery-update</link>
		<comments>http://maddhat.com/gallery-update#comments</comments>
		<pubDate>Tue, 27 Jul 2010 06:24:35 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=289</guid>
		<description><![CDATA[For those interested &#8211; updated my gallery page recently, adding some new photos and getting rid of some I&#8217;ve grown not-so-fond of. Check them out here.]]></description>
			<content:encoded><![CDATA[<p>For those interested &#8211; updated my gallery page recently, adding some new photos and getting rid of some I&#8217;ve grown not-so-fond of. Check them out <a href="http://maddhat.com/gallery">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/gallery-update/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 Upgrade Error Fix</title>
		<link>http://maddhat.com/wordpress-3-0-upgrade-error-fix</link>
		<comments>http://maddhat.com/wordpress-3-0-upgrade-error-fix#comments</comments>
		<pubDate>Thu, 15 Jul 2010 02:52:27 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=254</guid>
		<description><![CDATA[I was recently upgrading the version of WordPress on one of the sites I run and encountered the following error: &#8220;Fatal error: Call to a member function on a non-object in *SITEHERE*/taxonomy.php  on line 289". It took me a little looking around to find a solution but there was someone nice enough to look into]]></description>
			<content:encoded><![CDATA[<p>I was recently upgrading the version of WordPress on one of the sites I run and encountered the following error: &#8220;Fatal error:</p>
<pre>Call to a member function on a non-object in  *SITEHERE*/taxonomy.php  on line 289".</pre>
<p>It took me a little looking around to find a solution but there was someone nice enough to look into it in the wordpress forums and posted a solution.  Hopefully this article can save those of you with a similar issue some time in getting things running again.</p>
<p>The problem occurs due to an error in the &#8220;Podcasting Plugin by TSG&#8221;.  The fix is actually pretty simple and requires a few quick steps:</p>
<p>1. Manually deactivate all plugins.  The procedure to do so when you can&#8217;t access the administration menu is located <a href="http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F">here</a>.</p>
<p>2. Edit the file SITEROOT/plugins/podcasting/podcasting.php &#8211; On line 15 replace the code:</p>
<pre>register_taxonomy('podcast_format', 'custom_field');</pre>
<p>to</p>
<pre>function build_taxonomies() {
register_taxonomy('podcast_format', 'custom_field');
}
add_action( 'init', 'build_taxonomies', 0 );</pre>
<p>3. Re-enable your plugins and test your site &#8211; if this was the issue, things should be working properly now.</p>
<p>4. Upgrade the Podcast plugin in the Plugins menu.  I upgraded to Version 2.3.10.</p>
<p>Thanks to wordpress forum user ddarby14 for posting the solution.  <a href="http://wordpress.org/support/topic/411377?replies=17#post-1556570">Source thread.</a></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">
<p>I checked out this plugin and the offending line I found was line 15  in /plugins/podcasting/podcasting.php</p>
<pre><code>register_taxonomy('podcast_format', 'custom_field');</code></pre>
<p>I changed this to a function call</p>
<pre><code>function build_taxonomies() {
	register_taxonomy('podcast_format', 'custom_field');
  }
  add_action( 'init', 'build_taxonomies', 0 );</code></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/wordpress-3-0-upgrade-error-fix/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boot To USB Without BIOS USB Boot Support</title>
		<link>http://maddhat.com/boot-to-usb-without-bios-usb-boot-support</link>
		<comments>http://maddhat.com/boot-to-usb-without-bios-usb-boot-support#comments</comments>
		<pubDate>Thu, 01 Jul 2010 15:00:22 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[plop]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unzip]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=169</guid>
		<description><![CDATA[On any new machine I purchase I ensure to thoroughly run all hardware with the various diagnostic applications available on the Ultimate Boot CD.  I have the UBCD setup on a USB drive which allows me to ditch the CD wallet.  Problem is, even in this day and age, there are still machines I encounter]]></description>
			<content:encoded><![CDATA[<p>On any new machine I purchase I ensure to thoroughly run all hardware with the various diagnostic applications available on the Ultimate Boot CD.  I have the UBCD setup on a USB drive which allows me to ditch the CD wallet.  Problem is, even in this day and age, there are still machines I encounter that are not compatible with USB boot.  Most of the time I’ll burn an ISO to CD and hook up a spare CD-ROM drive, but recently I was determined to get the computer to boot to USB.  No BIOS update was available and I searched every inch of the BIOS menus looking for a USB boot option with no success.  So, after some browsing around I found PLoP.  PLoP is a Boot Manager that will (among other things) allow a machine to boot to USB even without BIOS support.  It’s actually quite an easy solution but does require you to make either a floppy or CD.  Since the machines I was working with were previously used in a cluster they had no CD-ROM drives but they did contain a floppy drive.  To create a PLoP boot disk using another Ubuntu machine I completed the following:</p>
<pre>wget <a href="http://download.plop.at/files/bootmngr/plpbt-5.0.10.zip">http://download.plop.at/files/bootmngr/plpbt-5.0.10.zip</a>

sudo apt-get install unzip

unzip plpbt-5.0.1.0.zip

cd phpbt-5.0.10/</pre>
<p>Insert the floppy to write to into the drive.  I’m assuming it’s located at /dev/fd0.</p>
<pre>fdformat /dev/fd0

dd if=plpbt.img of=/dev/fd0 bs=1440k</pre>
<p>Once you complete this you have created the bootable floppy and can now boot the machine to the floppy which contains the boot manager.  You will need to ensure that the installed floppy drive is listed on the boot list.  Note that the ISO is also included in the downloaded package if you would rather create a CD.</p>
<p>After you boot into PLoP there is a list of available boot options.  USB should be an option in the list and you simply select that as the boot option, press Enter, and your USB bootable drive can now be accessed!  Note:  Once booted to USB I could *only* use PS/2 keyboard and mouse with the machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/boot-to-usb-without-bios-usb-boot-support/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reassign NIC Identifiers In Ubuntu</title>
		<link>http://maddhat.com/reassign-nic-identifiers-in-ubuntu</link>
		<comments>http://maddhat.com/reassign-nic-identifiers-in-ubuntu#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:00:31 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[lspci]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wake-on-lan]]></category>
		<category><![CDATA[wol]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=121</guid>
		<description><![CDATA[I swapped out some NICs recently on a few of my lab machines.  These machines had a working install of Ubuntu Server 9.04.  After installing the NICs and rebooting, ifconfig showed nothing but lo details.  The first thing I did was ensured that the cards were seen by the OS by typing: lspci &#124; grep]]></description>
			<content:encoded><![CDATA[<p>I swapped out some NICs recently on a few of my lab machines.  These machines had a working install of Ubuntu Server 9.04.  After installing the NICs and rebooting, ifconfig showed nothing but lo details.  The first thing I did was ensured that the cards were seen by the OS by typing:</p>
<pre>lspci | grep Ethernet</pre>
<p>to which I received the output:</p>
<pre>02:04.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08) 

02:05.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08)</pre>
<p>This was correct as my new NIC was a dual Intel NIC.  From there I issued the command:</p>
<pre>sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old</pre>
<p>I reboot the system and all NICs were re-assigned to the correct Eth* interface.  Note that that the 70-persistent-net.rules.old will contain the old configuration should I choose this new NIC doesn’t work out for the system.</p>
<p><a href="http://www.paulkiddie.com/2009/11/force-udev-to-reassign-ethx-identifiers-in-ubuntu-8-04/" target="_blank">Where I originally found the re-assignment command.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/reassign-nic-identifiers-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Differential Backup Using Rsync</title>
		<link>http://maddhat.com/differential-backup-using-rsync</link>
		<comments>http://maddhat.com/differential-backup-using-rsync#comments</comments>
		<pubDate>Tue, 01 Jun 2010 15:00:13 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=116</guid>
		<description><![CDATA[Rsync is a well known tool for many who work in Linux regularly.  Quite some time ago I put together a short script that uses Rsync and logs the result nicely. The first task Rsync performs is to send an incremental file list which contains any differences between the source and destination drive, then makes]]></description>
			<content:encoded><![CDATA[<p>Rsync is a well known tool for many who work in Linux regularly.  Quite some time ago I put together a short script that uses Rsync and logs the result nicely. The first task Rsync performs is to send an incremental file list which contains any differences between the source and destination drive, then makes changes to the destination drive accordingly.    Because of that last part extreme caution should be used when executing such a script because you run the risk of overwriting information on the destination drive you may not want removed.  I have a dedicated drive for DV backups mounted in /media/dv-backup.  To use this script just change the variables accordingly:</p>
<pre>#!/bin/bash

#dv backup script

src=/media/dv 

dest=/media/dv-backup

log=/var/log/backup/dv-backup.log

echo "---" $date "-------------------" &gt;&gt; $log

rsync -t -r -v --delete $src $dest &gt;&gt; $log

echo "--------------- END ---------------" &gt;&gt; $log</pre>
<p>I have my backups log in /var/log/backup/ and they merely append the file each time Rsync runs.  I’m aware this is quite a simple script and could even be consolidated to one line.  However, I found that breaking this up makes it easy to read and change.  Also, who wants to remember every Rsync switch they want each time they want to perform a differential backup?</p>
<p>One quick change you could make to make it require less manually editing is replace the variables to take the terminal arguments.  Such a revision is listed below:</p>
<pre>src=$1

dest=$2

log=$3

echo "---" $date "-------------------" &gt;&gt; $log

rsync -t -r -v --delete $src $dest &gt;&gt; $log

echo "--------------- END ---------------" &gt;&gt; $log</pre>
<p>Usage to achieve same result as original:</p>
<pre>./backup.sh /media/dv /media/dv-backup /var/log/backup/dv-backup.log</pre>
<p>Both script revisions are attached:  <a href="http://maddhat.com/wp-content/uploads/2010/05/backup.sh" target="_blank">backup.sh</a> <a href="http://maddhat.com/wp-content/uploads/2010/05/backup2.sh" target="_blank">backup2.sh</a> Use at your own risk.. don&#8217;t blame me if you incorrectly wipe a drive!</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/differential-backup-using-rsync/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Link Aggregation in Ubuntu</title>
		<link>http://maddhat.com/setup-link-aggregation-in-ubuntu</link>
		<comments>http://maddhat.com/setup-link-aggregation-in-ubuntu#comments</comments>
		<pubDate>Sat, 15 May 2010 15:00:57 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[802.3ad]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[bond]]></category>
		<category><![CDATA[ifenslave]]></category>
		<category><![CDATA[iperf]]></category>
		<category><![CDATA[link aggregation]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=182</guid>
		<description><![CDATA[Link aggregation is something that has greatly interested me the last few months and I&#8217;ve been anxious to play with it on my own network setup.  For those not familiar with link aggregation there is a lot of good documentation on Wikipedia to get caught up to speed.  In my lab I wanted to setup]]></description>
			<content:encoded><![CDATA[<p>Link aggregation is something that has greatly interested me the last few months and I&#8217;ve been anxious to play with it on my own network setup.  For those not familiar with link aggregation there is a lot of good documentation on <a href="http://en.wikipedia.org/wiki/Link_aggregation" target="_blank">Wikipedia</a> to get caught up to speed.  In my lab I wanted to setup link aggregation on a box with a NC3134 which is a dual NIC (2x 10/100 full duplex ports).  I couldn’t do proper 802.3ad because I don’t have a switch which supports it…yet.  However, since I am running Ubuntu server I found I could still set it up using a different mode.  The mode I decided to configure the bond as is mode 0 otherwise known as the round-robin bond mode.  This type is described as &#8220;Round-robin policy:  Transmit packets in sequential order from the first available  slave through the last.  This mode provides load balancing and  fault tolerance.&#8221; (<a href="http://www.linuxhorizon.ro/bonding.html" target="_blank">Linux Horizon</a>)</p>
<p>The setup for bonding the NICs is actually quite simple.</p>
<pre>sudo apt-get install ifenslave
sudo nano /etc/network/interfaces</pre>
<p>Comment out your current configuration lines using the “#” before all lines.  The following was my setup for the bond address configuration:</p>
<pre>auto bond0
iface bond0 inet static
     address 192.168.2.200
     netmask 255.255.255.0
     broadcast 192.168.2.255
     gateway 192.168.2.1
slaves all
bond-mode 0
bond-miimon 100</pre>
<p>This configuration will use all of my network devices in the bond (which in this case is just 2) and give the IP address 192.168.2.200.  Note that I specified bond-mode 0.  There are several other bond types (some of which require a 802.3ad capable switch) and it would be worth your while to read up on them to find which would be best for you.</p>
<p>Another thing to note in this configuration is that I used bond-miimon 100.  This means that the links will be checked for failures every 100 milliseconds.  Setting this value to 0 disables checking for link failure.</p>
<p>Save and exit the configuration file.  From here you can take the interfaces down by issuing:</p>
<pre>sudo ifdown eth0
sudo ifdown eth1</pre>
<p>At this point I connected the 2<sup>nd</sup> Ethernet cable and restarted the networking services</p>
<pre>/etc/init.d/networking restart</pre>
<p>Simply type ifconfig and you should see bond0 in the list and listed as UP BROADCAST RUNNING MASTER MULTICAST and all others as UP BROADCAST RUNNING SLAVE MULTICAST.  Next we will test performance of the connection to ensure that the bond is functioning as it should.</p>
<p>Using iperf I can test the bandwidth utilized between the server and client in memory (which takes the drive write bottleneck out of the equation).  To setup iperf see my previous article on <a href="http://maddhat.com/testing-network-performance-using-iperf-3" target="_blank">using iperf</a>.</p>
<p>I have 192.168.2.101 setup as the server and 192.168.2.200 (the bonded NICs) as the client.  I issue the following command to test my connection:</p>
<pre>Iperf –c 192.168.2.101 –i 2</pre>
<p>The output was as follows:</p>
<pre>------------------------------------------------------------
Client connecting to 192.168.2.101, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.2.200 port 33878 connected with 192.168.2.101 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec  44.8 MBytes    188 Mbits/sec
[  3]  2.0- 4.0 sec  44.9 MBytes    188 Mbits/sec
[  3]  4.0- 6.0 sec  44.9 MBytes    188 Mbits/sec
[  3]  6.0- 8.0 sec  43.9 MBytes    184 Mbits/sec
[  3]  8.0-10.0 sec  44.8 MBytes    188 Mbits/sec
[  3]  0.0-10.0 sec    223 MBytes    187 Mbits/sec</pre>
<p>You can see that now the connection is reaching ~188Mbits out of the theoretical 200Mbits that the bond provides (remember we are using 2x 100mbit lines).  This is exactly the result we want.</p>
<p>Next, I wanted to test the fault of one line.  I disconnected one one of the cables from the dual NIC and ran the iperf connection test again.</p>
<pre>------------------------------------------------------------
Client connecting to 192.168.2.101, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.2.200 port 33879 connected with 192.168.2.101 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3]  2.0- 4.0 sec  22.4 MBytes  94.1 Mbits/sec
[  3]  4.0- 6.0 sec  22.4 MBytes  94.0 Mbits/sec
[  3]  6.0- 8.0 sec  22.5 MBytes  94.2 Mbits/sec
[  3]  8.0-10.0 sec  22.4 MBytes  94.0 Mbits/sec
[  3]  0.0-10.0 sec    112 MBytes  94.2 Mbits/sec</pre>
<p>You can see that the bandwidth has fallen back down to 94Mbits but the line still worked correctly without any traffic loss.</p>
<p>That’s it!  Pretty simple to setup and test the bond.   If you are creating a bond purely for the bandwidth increase keep in mind that system bottlenecks can still hinder performance &#8211; your hard drive write speed being the most likely.</p>
<p>With such a simple setup for this networking task it shows another benefit Linux servers can provide in comparison to Windows servers which (to my knowledge) do not natively support link aggregation.</p>
<p>The question I asked myself after this setup was: How does the 802.3ad configuration (mode 4) differ from mode 0 which doesn’t require switches with 802.ad support?  After some further research I found that while mode 0 uses sequential transmission, it can often receive packets out of order which creates the need for segment retransmission (as mentioned <a href="http://wiki.mikrotik.com/wiki/Manual:Interface/Bonding" target="_blank">here</a>).  It seems that mode 4 is able to receive all packets in order which produces an overall increase in efficiency.  I would be curious to see some performance benchmarks between the two and plan to do so once I have a managed switch – so stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/setup-link-aggregation-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco PIX 501 Quick Setup</title>
		<link>http://maddhat.com/cisco-pix-501-quick-setup</link>
		<comments>http://maddhat.com/cisco-pix-501-quick-setup#comments</comments>
		<pubDate>Sun, 02 May 2010 00:06:03 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[501]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[db9]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[hyperterminal]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[pdm]]></category>
		<category><![CDATA[pix]]></category>
		<category><![CDATA[pix 501]]></category>
		<category><![CDATA[rj45]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=96</guid>
		<description><![CDATA[I inherited a Cisco Pix 501 firewall recently and have to say I’m not near as educated on Cisco equipment yet as I feel I should be.  After a good amount of searching along the way I started getting the hang of things.  I had worked in Cisco’s Pix Device Manager (PDM) and found it]]></description>
			<content:encoded><![CDATA[<p>I inherited a  Cisco Pix 501 firewall recently and have to say I’m not near as  educated on Cisco equipment yet as I feel I should be.  After a good  amount of searching along the way I started getting the hang of things.   I had worked in Cisco’s Pix Device Manager (PDM) and found it to be  more of a pain trying to navigate than to setup through command line.   So, for this tutorial I will focus only on the CLI for setup of the  device.</p>
<p style="text-align: center;"><img class="aligncenter" title="pix501" src="http://maddhat.com/wp-content/uploads/2010/05/pix501.png" alt="pix501" width="567" height="248" /></p>
<p>Here is how I  was able to get things setup.  Note that this is just a basic setup  using the CLI with the following:</p>
<p>WAN: DHCP</p>
<p>LAN: Enable  NAT, and enable DHCP</p>
<p>After  configuration the firewall will be accessible at 192.168.3.1 (and  netmask 255.255.255.0) and DHCP leases available will be 192.168.3.50 &#8211;  192.168.3.80.  You can change these accordingly while going through the  commands.</p>
<p>First of all,  you need to connect to the device using your Cisco console cable which  is an RJ45 to DB9.  Connect the RJ45 end to the 501, and the DB9 end to a  machine with the connector.  In my case this was a Linux machine  running Ubuntu.  If you are on a Windows machine you can simply use  HyperTerminal to connect. I issued the following commands to get  connected to the 501:</p>
<pre>Sudo apt-get install cu
cu -l  /dev/ttyS0 -s 9600</pre>
<p>ttyS0 was  what worked for me, but yours may need to be changed to ttyS1, etc.  depending on your setup.</p>
<p>Once things  are connected I issued the following commands:</p>
<p>First press  no to the guided install (if you plan to follow the tutorial below).</p>
<pre>enable</pre>
<p>You will be  prompted here for a password.  The Enter key is the default password.</p>
<pre>config t</pre>
<p>This will  allow access to the configuration menu.  Press “?” to find all commands  available.</p>
<pre>username  USER password ***** privilege 15

enable  password ******

passwd  ******</pre>
<p>Replace USER  with the username you wish to create.  This allows you to create an  administrator account for the system.</p>
<pre>interface  ethernet0 auto

interface  ethernet1 100full

ip address  outside dhcp</pre>
<p>Make sure  your WAN connection is live when issuing the command above.  It will try  to assign a DHCP address when it’s issued.</p>
<pre>ip address  inside 192.168.3.1 255.255.255.0

show ip  address</pre>
<p>The above  command just shows the current setup.  I used it to double check I  entered everything properly.</p>
<pre>ip address  outside dhcp setroute

nat  (inside) 1 192.168.3.1 255.255.255.0

global  (outside) 1 interface

telnet  192.168.3.50
</pre>
<p>This was an  optional command.  This allowed telnet access to the client at  192.168.3.50.  This was added so I didn’t need the console cable  connected after the initial setup, and could merely telnet in from the  client as needed.</p>
<pre>no banner  exec

no banner  login

no banner  motd</pre>
<p>The banner  commands are also optional.  I wanted to cut out any extra information  at logins.  You can leave these, or change them as you desire.</p>
<pre>hostname  YOURHOST</pre>
<p>Replace  YOURHOST with the hostname you wish to give the 501.</p>
<pre>domain  local

dhcpd  address 192.168.3.50-192.168.3.80 inside

dhcpd dns  4.2.2.1 4.2.2.2</pre>
<p>These were  test DNS servers I used during setup.  I believe they are Level3’s, and  they are rather stable.  You can change to your local ISP’s DNS servers  or others as desired.</p>
<pre>dhcpd  lease 3600

dhcpd  ping_timeout 750

dhcpd  enable inside</pre>
<p>The above  command assigns the 501 as the DHCP server for the inside interface  (LAN).  If you wish to use a different DHCP server or don’t care to  enable DHCP, simply disregard this command.</p>
<pre>access-list  ping_acl permit icmp any any

access-group  ping_acl in interface outside</pre>
<p>These two  commands are added to allow ping requests.  Ping is disabled by default  on the 501 and annoyed me when trying to run diagnostics.  These are  optional.</p>
<pre>wr mem</pre>
<p>This  finalizes your setup by writing all changes to memory.<br />
These are the commands I found to work for me – and don’t have this in  production.  I don’t claim for this method of setup to be secure for  your environment and highly recommend you study up on the device more  before placing it in a production environment.  If anyone has some  modifications or additions to this guide please feel free to contact  me.  Hopefully this tutorial can serve as a first step in becoming  familiar with setup for the Pix 501, thanks for reading.</p>
<p>Source Image:  <a href="http://www.cisco.com/en/US/docs/security/pix/pix63/quick/guide/63_501qk.html" target="_blank">cisco.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/cisco-pix-501-quick-setup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
