<?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>A Blog by Tim Bishop &#187; NanoBSD</title>
	<atom:link href="http://www.bishnet.net/tim/blog/tag/nanobsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bishnet.net/tim/blog</link>
	<description>"For a moment, nothing happened. Then, after a second or so, nothing continued to happen." -- HHGTTG</description>
	<lastBuildDate>Wed, 02 Nov 2011 15:21:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A new router (Soekris, Draytek and NanoBSD)</title>
		<link>http://www.bishnet.net/tim/blog/2008/11/05/a-new-router-soekris-draytek-and-nanobsd/</link>
		<comments>http://www.bishnet.net/tim/blog/2008/11/05/a-new-router-soekris-draytek-and-nanobsd/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 12:35:31 +0000</pubDate>
		<dc:creator>Tim Bishop</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Draytek]]></category>
		<category><![CDATA[NanoBSD]]></category>
		<category><![CDATA[net5501]]></category>
		<category><![CDATA[Soekris]]></category>
		<category><![CDATA[Vigor]]></category>
		<category><![CDATA[Vigor 110]]></category>

		<guid isPermaLink="false">http://www.bishnet.net/tim/blog/?p=93</guid>
		<description><![CDATA[A look at how I replaced my ageing router and ADSL modem with a Soekris net5501 running FreeBSD.


Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2006/03/19/router-rebuild-or-an-excuse-to-play-with-ipv6/' rel='bookmark' title='Permanent Link: Router rebuild (or, an excuse to play with IPv6?)'>Router rebuild (or, an excuse to play with IPv6?)</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/08/freebsd-with-netgear-wg311t/' rel='bookmark' title='Permanent Link: FreeBSD with Netgear WG311T'>FreeBSD with Netgear WG311T</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/10/freebsd-filesystem-snapshots/' rel='bookmark' title='Permanent Link: FreeBSD filesystem snapshots'>FreeBSD filesystem snapshots</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A few months back I wrote about <a href="http://www.bishnet.net/tim/blog/2008/06/19/ill-build-a-new-server-its-got-to-be-easier-than-patching-up-the-old-one/">building a new server</a>. It turned out to be more complicated than I thought, but 5 months on it&#8217;s still working well. Over the last few weeks I&#8217;ve been working on my next project &#8211; replacing my router.</p>
<p>The old router was an old dual CPU Pentium 3 machine with a couple of small SCSI hard disks in it. It was a full tower case and took up a lot of room and made a lot of noise. And, surprisingly, the power consumption was pretty similar to the server I recently built (which has way more in it). It even still had the <a href="http://speedtouch.hysplace.co.uk/images/28_L.jpg">original Speedtouch USB modem</a> that BT once gave to me. So it had to go.</p>
<p>I spent quite some time deliberating the way forward. I could have gone for a domestic router like most other people do, but I&#8217;m a geek, and I like the flexibility of doing it myself. But at the same time, a small sized unit, with low power requirements, and no noise, is what I wanted. The solution came in the form of a <a href="http://www.soekris.com/net5501.htm">Soekris net5501</a>.</p>
<p>I went for the net5501-70 which has a 500Mhz CPU and 512MB of RAM. Not a lot by today&#8217;s standards, but more than sufficient for what I needed. And incidently, it&#8217;s quicker than the old router. I got the model with a case, and got the mounting brackets for a hard drive (which although I don&#8217;t intend to use at this stage, it was cheaper to get it now than later). I also purchased a pair of <a href="http://www.sandisk.com/Products/Item(1182)-SDCFX3-004G-A31-SanDisk_Extreme_III_CompactFlash_4GB.aspx">4GB SanDisk Extreme III Compact Flash</a> cards to run the thing from. It&#8217;s worth noting that Soekris recommend SanDisk CF cards, and they&#8217;re peanuts at play.com.</p>
<p>The next point to consider was how to connect to the ADSL line. I could have stuck with the USB modem, but the drivers were aging, I wasn&#8217;t sure if it was the cause of the odd disconnections and failures to reconnect that I&#8217;d been getting. I looked at internal ADSL cards, but it seemed to be a bit of a gamble as to how they worked and if I&#8217;d be able to get the right drivers. In the end I settled on the <a href="http://www.draytek.co.uk/products/vigor110.html">Draytek Vigor 110</a>.</p>
<p>The Vigor 110 is basically just a PPPoA to PPPoE bridge. PPPoE isn&#8217;t widely used in the UK, but is in other parts of the world, so the support in FreeBSD was good (via ppp and the ng_pppoe module). It worked perfectly. It really was just a case of plugging it in and pointing ppp at it &#8211; no configuration required! And, just like the USB modem, it gives the router IP directly to the PC, so there&#8217;s no messing around to get that working either.</p>
<p>Longer term I plan to fill the net5501&#8242;s PCI slot with a wireless card, but I haven&#8217;t decided which to go for yet. This would turn the unit in to my wifi access point as well, but for now I&#8217;ll just stick with the separate one. I&#8217;d welcome advice on cards that are supported by FreeBSD.</p>
<p>So, that&#8217;s hardware all sorted. Next came the software. If you&#8217;ve been following my other posts you&#8217;ll know I&#8217;m a big fan of <a href="http://www.freebsd.org/">FreeBSD</a>, so it&#8217;s pretty clear what route I was going to take here. But given the use of CF cards I had to approach things differently. I also wanted to be able to power the system off without causing any filesystem problems, so this required the card to be mounted read-only.</p>
<p><a href="http://www.freebsd.org/doc/en/articles/nanobsd/article.html">NanoBSD</a> to the rescue! NanoBSD is a script that builds an image containing FreeBSD that can be written directly to a CF card (or anything else, really). It&#8217;s customisable, and I wrote a few bits to pull down the packages I wanted, and to make some configuration tweaks. It has a read-only root filesystem on the card, and uses memory-backed filesystems for /var and /etc. Config is stored in a separate partition on the disk and is copied to the memory-backed /etc during the boot process. But the best bit is the way it handles upgrades.</p>
<p>Upgrades are neatly done by having two root filesystems on the card. When you&#8217;re running off one you&#8217;re free to upgrade the other. NanoBSD generates two images; one for the entire card, and one that can be written to a single root filesystem. It also provides a script to write the image to the card and update the boot loader to boot from the right partition. So upgrading is as simple as re-running the NanoBSD script, writing the new image to the &#8220;other&#8221; partition, and rebooting. It can all be done live, and the only downtime is the time taken for a reboot (which is under a minute).</p>
<p>Of course, to use NanoBSD you need another system to do the builds on. Fortunately I&#8217;ve got a nice beefy server that can handle the job (although it took a few hacks to build the i386 image on an amd64 system). I&#8217;ve also got a nice <a href="http://tinderbox.marcuscom.com/">Tinderbox</a> setup which I already use for testing ports and which provided a nice supply of up-to-date packages.</p>
<p>So I&#8217;m happy, at last. Apart from my wifi access point I&#8217;ve managed to replace all my aging, power hungry, noisy equipment with nice new stuff. I guess I&#8217;ll be doing it all again in a few years <img src='http://www.bishnet.net/tim/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  .</p>


<p>Related posts:<ol><li><a href='http://www.bishnet.net/tim/blog/2006/03/19/router-rebuild-or-an-excuse-to-play-with-ipv6/' rel='bookmark' title='Permanent Link: Router rebuild (or, an excuse to play with IPv6?)'>Router rebuild (or, an excuse to play with IPv6?)</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/08/freebsd-with-netgear-wg311t/' rel='bookmark' title='Permanent Link: FreeBSD with Netgear WG311T'>FreeBSD with Netgear WG311T</a></li>
<li><a href='http://www.bishnet.net/tim/blog/2008/11/10/freebsd-filesystem-snapshots/' rel='bookmark' title='Permanent Link: FreeBSD filesystem snapshots'>FreeBSD filesystem snapshots</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.bishnet.net/tim/blog/2008/11/05/a-new-router-soekris-draytek-and-nanobsd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

