<?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>Crossed Wires &#187; Linux</title>
	<atom:link href="http://veejoe.net/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://veejoe.net/blog</link>
	<description>Vic's Blog</description>
	<lastBuildDate>Sat, 31 Dec 2011 13:29:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Oracle Database 11gR2 on Linux on System z</title>
		<link>http://veejoe.net/blog/2011/08/oracle-database-11gr2-on-linux-on-system-z/</link>
		<comments>http://veejoe.net/blog/2011/08/oracle-database-11gr2-on-linux-on-system-z/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 13:57:14 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[IOUG]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[RAC]]></category>
		<category><![CDATA[systemz]]></category>
		<category><![CDATA[z/VM]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5582</guid>
		<description><![CDATA[Earlier this year (30 March, to be precise) Oracle announced that Oracle Database 11gR2 was available as a fully-supported product for Linux on IBM System z.  A while before that they had announced E-Business Suite as available for Linux on System z, but at the time the database behind it had to be 10g.  Shortly after 30 [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year (30 March, to be precise) Oracle announced that Oracle Database 11gR2 was available as a fully-supported product for Linux on IBM System z.  A while before that they had announced E-Business Suite as available for Linux on System z, but at the time the database behind it had to be 10g.  Shortly after 30 March, they followed up the 11gR2 announcement with a statement of support for the Oracle 11gR2 database on Linux on System z as a backend for E-Business Suite &#8212; the complete, up-to-date Oracle stack was now available on Linux on System z!</p>
<p>In April this year I attended the zSeries Special Interest Group miniconf[1], part of the greater Independent Oracle Users Group (IOUG) event <strong>COLLABORATE 11</strong>.  I was amazed to discover that there are actually Oracle employees whose job it is to work on IBM technologies &#8212; just like there are IBM employees dedicated to selling and supporting the Oracle stack.  Never have I seen (close-up) a better example of the term &#8220;coopetition&#8221;.</p>
<p>On my return from the zSeries SIG and IOUG, I&#8217;ve become the local Oracle expert.  However, I&#8217;ve had no more training than the two days of workshops run at the conference!  The workshops were excellent (held at the Epcot Center at Walt Disney World, no less!) but they could not an expert make.  So I&#8217;ve been trying to build some systems and teach myself more about running Oracle.  I thought I&#8217;d gotten off to a good start too &#8212; I&#8217;d installed a standalone system, then went on to build a two-node RAC.  I communicated my success to one of my sales colleagues:</p>
<p>&#8220;I&#8217;ve got a two-node RAC setup running on the z9 in Brisbane!&#8221;</p>
<p>&#8220;Great!  Good work,&#8221; he said.  &#8221;So the two nodes are running in different LPARs, so we can demonstrate high-availability?&#8221;</p>
<p>&#8221; . . . &#8221;</p>
<p>In my haste I&#8217;d built both virtual machines in the same LPAR.  Whoops.  (I&#8217;ve fixed that now, by the way.  The two RAC nodes are in different LPARs and <strong>seem</strong> to be performing better for it.)</p>
<p>Over the coming weeks, I&#8217;ll write up some of the things that have caught me out.  I still don&#8217;t really know how all this stuff works, but I&#8217;m getting better!</p>
<p><em>Links:</em></p>
<p>IBM System z: <a title="IBM System z site (US)" href="http://www.ibm.com/systems/z" target="_blank">www.ibm.com/systems/z</a> or <a title="IBM System z site (Australia)" href="http://www.ibm.com/systems/au/z" target="_blank">www.ibm.com/systems/au/z</a></p>
<p>Linux on System z: <a title="IBM Linux on System z site (US)" href="http://www.ibm.com/systems/z/os/linux/index.html" target="_blank">www.ibm.com/systems/z/os/linux/index.html</a></p>
<p>Oracle zSeries SIG: <a title="zSeries Oracle Users SIG" href="http://www.zseriesoraclesig.org" target="_blank">www.zseriesoraclesig.org</a></p>
<p>Oracle Database: <a title="Oracle Database" href="http://www.oracle.com/us/products/database/index.html" target="_blank">www.oracle.com/us/products/database/index.html</a></p>
<p>[1] Miniconf is a term I picked up from <a title="linux.conf.au (LCA)" href="http://linux.conf.au" target="_blank">linux.conf.au</a> &#8212; the zSeries SIG didn&#8217;t advertise its event as a miniconf, but as a convenient name for a &#8220;conference-in-a-conference&#8221; I&#8217;m using the term here.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2011/08/oracle-database-11gr2-on-linux-on-system-z/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What a difference a working resolver makes</title>
		<link>http://veejoe.net/blog/2011/08/what-a-difference-a-working-resolver-makes/</link>
		<comments>http://veejoe.net/blog/2011/08/what-a-difference-a-working-resolver-makes/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 13:45:19 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[TLS]]></category>
		<category><![CDATA[z/VM]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5579</guid>
		<description><![CDATA[The next phase in tidying up my user authentication environment in the lab was to enable SSL/TLS on the z/VM LDAP server I use for my Linux authentication (I&#8217;ll discuss the process on the DeveloperWorks blog, and put a link here).  Apart from being the right way to do things, LDAP authentication appears to require SSL or TLS in [...]]]></description>
			<content:encoded><![CDATA[<p>The next phase in tidying up my user authentication environment in the lab was to enable SSL/TLS on the z/VM LDAP server I use for my Linux authentication (I&#8217;ll discuss the process on the DeveloperWorks blog, and put a link here).  Apart from being the right way to do things, LDAP authentication appears to require SSL or TLS in Fedora 15.</p>
<p>After I got the Fedora system working, I thought it would be a good idea to have other systems in the complex using SSL/TLS also.  The process was moderately painless on a SLES 10 system, but on the first SLES 11 system I went to YaST froze while saving the changes.  I (foolishly) rebooted the image, and it hung during boot.  Not fun.</p>
<p>After a couple of attempts to fix up what I thought were the obvious problems (each attempt involving logging off the guest, connecting its disk to another guest, mounting the filesystem, making a change, unmounting and disconnecting, and re-IPLing) with no success, I went into /etc/nsswitch.conf and turned off LDAP for everything I could find.  This finally allowed the guest to complete its boot &#8212; but I had no LDAP now.  I did a test using <strong>ldapsearch</strong>, which reported it couldn&#8217;t reach the LDAP server.  I tried to ping the LDAP server by address, which worked.  I tried to lookup the hostname of the LDAP server, and name resolution failed with the traditional &#8220;no servers could be reached&#8221; message.  This was odd, as I knew I&#8217;d changed it since it was pointing to the wrong DNS server before&#8230;  I could ping the DNS by address, and another system resolved fine.</p>
<p>I thought it might have been a configuration problem &#8212; I had earlier had trouble with systems not being able to do recursive DNS lookups through my DNS server.  I went to YaST to configure the DNS Server, and it told me that I had to install the package &#8220;bind&#8221;.  WHAT?!?!?  How did the BIND package get uninstalled from the system&#8230;</p>
<p>Unless&#8230;  It&#8217;s the wrong system&#8230;</p>
<p>I checked /etc/resolv.conf on a working system and sure enough I had the IP address wrong.  I was pointing at a server that was NOT my DNS server.  Presumably the inability to resolve the name of the LDAP server I was trying to reach is what made the first attempt to enable TLS for LDAP fail in YaST, and whatever preload magic SLES uses to enable LDAP authentication got broken by the failure.  Setting the right DNS and re-running the LDAP Client module in YaST not only got LDAP authentication working but got me a bootable system again.</p>
<p>A simple fix in the end, but I&#8217;d forgotten the power of the resolver to cause untold and unpredictable havoc.  Now, pardon me while I lie in wait for the YaST-haters who will no doubt come out and sledge me&#8230;  :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2011/08/what-a-difference-a-working-resolver-makes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RACF Native Authentication with z/VM</title>
		<link>http://veejoe.net/blog/2011/07/racf-native-authentication-with-zvm/</link>
		<comments>http://veejoe.net/blog/2011/07/racf-native-authentication-with-zvm/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 02:49:33 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[DeveloperWorks]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[developerworks]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RACF]]></category>
		<category><![CDATA[redbook]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[z/VM]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?guid=625b8b0fd4eed59114ff4be30a66773e</guid>
		<description><![CDATA[ In 2009 I was part of the team that produced the Redbook &#34;Security for Linux on System z&#34; (find it at http://www.redbooks.ibm.com/abstracts/sg247728.html ).  Part of my contribution was a discussion about using the z/VM LDAP Server to provide Linux...]]></description>
			<content:encoded><![CDATA[<p> In 2009 I was part of the team that produced the Redbook &quot;Security for Linux on System z&quot; (find it at <a href="http://www.redbooks.ibm.com/abstracts/sg247728.html">http://www.redbooks.ibm.com/abstracts/sg247728.html</a>).  Part of my contribution was a discussion about using the z/VM LDAP Server to provide Linux guests with a secure password authentication capability.  I probably went a little overboard with screenshots of <a href="http://phpldapadmin.sourceforge.net">phpLDAPadmin</a>, but overall I think it was useful.</p>
<p>I&#8217;ve come back to implement some of what I&#8217;d put together then, and unfortunately found&#8230;  not <i>errors</i> as such, but things I perhaps could have discussed in a little more detail.  I&#8217;ve been using the z/VM LDAP Server on a couple of systems in my lab but had not enabled RACF.  I realised I need to &quot;eat my own cooking&quot; though, so decided to implement RACF and enable the SDBM backend as well as switch to using Native Authentication in the LDBM backend.</p>
<p>Native Authentication provides a way for security administrators to present a standard RFC 2307 (or equivalent) directory structure to clients while at the same time taking advantage of RACF as a password or pass phrase store.  Have a look in our Redbook for more detail, but basically the usual schema is loaded into LDAP and records are created using the usual object classes like <b>inetOrgPerson</b>, but the records do not contain the <b>userPassword</b> attribute.  Instead of comparing a presented password against the field contained in LDAP, the z/VM LDAP Server (when Native Authentication is enabled) issues a RACROUTE call to RACF to have it check the password.</p>
<p>In my existing LDAP database, I had user records that were working quite successfully to authenticate logons to Linux.  My plan was simply to enable RACF, creating users in RACF with the same userid as the <b>uid</b> field in LDAP (I have access to a userid convention that fits RACF&#8217;s 8-character restriction, so no need to change it).  After going through the steps in the RACF program directory, and various follow-up tasks to make sure that various service machines would work correctly, I did the LDAP reconfiguration to get Native Authentication.</p>
<p>At this point I probably need to clarify my userid plan.  The documentation for Native Authentication in the TCP/IP Planning and Administration manual says that the LDAP server needs to be able to work out which RACF userid corresponds to the user record in LDAP to be able to validate the password.  It does this by either having the RACF userid explicitly specified using the <b>ibm-nativeId</b> attribute (the object class <b>ibm-NativeAuthentication</b> has to be added to the user object), or by matching the existing <b>uid</b> attribute with RACF.  This is what I hoped to be able to do; by using the same ID in RACF as I was already using in LDAP, I planned to not require the extra object class and attribute.  In the Redbook, because my RACF ID was different from the LDAP one I went straight to using the <b>ibm-nativeId</b> attribute and didn&#8217;t go back and test the <b>uid</b> method.</p>
<p>So, I gave it a try.  I had to disable SSH public-key authentication so that my password would actually get used, and once I did that I found that I couldn&#8217;t log on.  It didn&#8217;t matter whether I tried with my password or pass phrase, neither was successful.  I read and re-read all the LDAP setup tasks and checked the setup, but it all looked fine.  In one of those &quot;let&#8217;s just see&quot; moments, I decided to see if it worked with the <b>ibm-nativeId</b> attribute specified in uppercase&#8230;  and it did!</p>
<p>Okay, so it <i>appeared</i> that the testing of <b>uid</b> against a RACF id was case-sensitive.  I decided to try creating a different ID, with an uppercase <span style="font-weight: bold;">uid</span>, in LDAP to double-check.  Since phpLDAPadmin wouldn&#8217;t let me create an uppercase version of my own userid (since that would be non-unique), I created a different LDAP id to test:</p>
<blockquote><p>[viccross@laptop ~]$ ssh MAINT@zlinux1<br />Password: <br />Could not chdir to home directory /home/MAINT: No such file or directory<br />/usr/X11R6/bin/xauth:  error in locking authority file /home/MAINT/.Xauthority<br />MAINT@zlinux1:/&gt; </p></blockquote>
<p>My MAINT user in LDAP has no <span style="font-weight: bold;">ibm-nativeId</span> attribute, so the only operational difference is the uppercase <span style="font-weight: bold;">uid</span> (the error messages are caused by the LDAP userid not having a home directory; I use a NFS shared home directory had I hadn&#8217;t bothered setting up the homedir for a test userid).</p>
<p>The final test was to change the contents of the <span style="font-weight: bold;">ibm-nativeId</span> attribute in my LDAP user record to lower-case &#8212; and it broke my login.  So that would seem to indicate that the user check against RACF is case sensitive wherever LDAP gets the userid from.  I&#8217;m going to have a look through documentation to see if there&#8217;s something I need to change, but this looks like something to be aware of when using Native Authentication.</p>
<p>I also noticed that I didn&#8217;t describe the LDAP Server SSL/TLS support in the Redbook, but that&#8217;s a post for another day&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2011/07/racf-native-authentication-with-zvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSL speed revisited</title>
		<link>http://veejoe.net/blog/2011/05/openssl-speed-revisited/</link>
		<comments>http://veejoe.net/blog/2011/05/openssl-speed-revisited/#comments</comments>
		<pubDate>Tue, 17 May 2011 06:03:05 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[DeveloperWorks]]></category>
		<category><![CDATA[CPACF]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[developerworks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[z/VM]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?guid=25ab712c9d9b45a4c147d6a2fadfa571</guid>
		<description><![CDATA[ I realised I never came back and reported the results of my OpenSSL &#34;speed&#34; testing after our 2096 got upgraded.  For reference, here was the original chart, from when the system was sub-capacity: ... and the...]]></description>
			<content:encoded><![CDATA[<p> I realised I never came back and reported the results of my OpenSSL &quot;speed&quot; testing after our 2096 got upgraded.  For reference, here was the original chart, from when the system was sub-capacity:</p>
<p><a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeed.png" ><img alt="image" src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeed.png" style="display: block; margin: 0pt auto; text-align: center; position: relative;" /></a> </p>
<p>&#8230; and the question was, does the CPACF run at the speed of the CP (i.e. it runs sub-capacity if the CP is sub-capacity) or does it run at full speed like an IFL, zIIP or zAAP.  If the latter, the result after the upgrade should be the same as before &#8212; that would indicate the speed of crypto operations does not change with the CP capacity, and that CPACF is always full speed.  If the former, we should see an improvement between pre- and post-upgrade, indicating that the speed of CPACF follows the speed of the CP.</p>
<p>Place your bets&#8230;  Okay, no more bets&#8230;  Here&#8217;s the chart:</p>
<p><a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeedTestz9CPACF.png" ><img alt="image" src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeedTestz9CPACF.png" style="display: block; margin: 0pt auto; text-align: center; position: relative;" /></a>  <br />The graph compares the results from the first chart in blue (when the machine was at capacity setting F01) with the full-speed (capacity setting Z01) results in red.</p>
<p>Okay, so did you get it right?  If you know your z/Architecture you would have!  As the name suggests, the Central Processor Assist for Cryptographic Function (or CPACF) is pretty-much an adjunct to each CP, just like any standard execution unit (like the floating point unit, say).  It is not like the Crypto Express cards, which are actually an I/O device and totally separate from the CP.  Because it is directly associated with each CP, for sub-capacity CPs its CPACF is bound to the speed of that CP.</p>
<p>If you look closer, further evidence that CPACF performance scales with capacity setting can be seen in the respective growth rates of each set of data points.  To see this a little clearer (because I don&#8217;t know the right mathematical terms to describe the shape of the curve, so I&#8217;ll just show you) I drew a couple more graphs:</p>
<p><a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeedTestz9CPACFline.png" ><img alt="image" src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeedTestz9CPACFline.png" style="display: block; margin: 1em 1em 0pt 0pt; float: left; position: relative;" /></a> <a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeedTestz9CPACFfactor.png" ><img alt="image" src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/resource/BLOGS_UPLOADED_IMAGES/OpenSSLspeedTestz9CPACFfactor.png" style="display: block; margin: 0pt auto; text-align: center; position: relative;" /></a>    </p>
<p>Looking at the left graph (which is the same as the bar graph above, just drawn in lines) you can see that in both the software and the CPACF case the lines for before and after the upgrade follow the same trend with respect to the block size.  If these lines followed different trends &#8212; for example if the Z01 CPACF line was flat across the block size range instead of a gently falling slope like the F01 line &#8212; I&#8217;d suspect something else was affecting the result.  Looked at a different way, the right-hand graph above shows the &quot;times-X&quot; improvement between software and CPACF.  You can see that the performance multiplier (i.e. the relative performance improvement between software and hardware; CPACF speed is 16x software at 8192 byte blocks) was the same for each block size.</p>
<p>Now, just to confuse things&#8230;  Although I&#8217;ve used OpenSSL on Linux as the testing platform for this experiment, most Linux customers will never see the effects I&#8217;ve demonstrated here.  Why?  Because Linux is usually run on IFLs, and the IFL always runs at full speed!  Even if there are sub-capacity CPs installed in a machine with IFLs, the IFLs run at full speed and so to does the CPACF associated with the IFLs.  I&#8217;ll say again: CPACF follows the speed of the associated CP, so if you&#8217;re running Linux on IFLs the CPACF on those IFLs will be full capacity just like the IFLs themselves.  If you have sub-capacity CPs for z/OS workload on the same machine as IFLs, the CPACF on the CPs will appear slower than CPACF on the IFLs.</p>
<p>As far as the actual peak number is concerned, it looks like a big number!  If I understand it right, 250MB/sec would be more than enough speed to have a server doing SSL/TLS traffic driving a Gigabit Ethernet at line speed (traffic over connected sessions, NOT the certificate exchange for connection establishment; the public key crypto for certificate verification takes more hardware than just CPACF, at least on the z9 anyway).  And that&#8217;s just one CP!  Enabling more CPs (or IFLs, of course) gives you that much more CPACF capacity again.  Keep in mind that these results are using hardware that is two generations old &#8212; I would expect z10 and z196 hardware to get higher results on any of these tests.  Regardless, these are not formal, official measurements and should not be treated as such &#8212; do NOT use any of these figures as input to system sizing estimates or other important business measurements!  Always engage IBM to work with you for sizing or performance evaluations. </p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2011/05/openssl-speed-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another round of Gentoo fun</title>
		<link>http://veejoe.net/blog/2011/03/another-round-of-gentoo-fun/</link>
		<comments>http://veejoe.net/blog/2011/03/another-round-of-gentoo-fun/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 06:47:05 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[emerge]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5545</guid>
		<description><![CDATA[A little while back I did an &#8220;emerge system&#8221; on my VPS and didn&#8217;t think much more about it.  First time back to the box today to emerge something else, and was greeted with this: &#62;&#62;&#62; Unpacking source&#8230; &#62;&#62;&#62; Unpacking traceroute-2.0.15.tar.gz to /var/tmp/portage/net-analyzer/traceroute-2.0.15/work touch: setting times of `/var/tmp/portage/net-analyzer/traceroute-2.0.15/.unpacked&#8217;: No such file or directory &#8230;and the [...]]]></description>
			<content:encoded><![CDATA[<p>A little while back I did an &#8220;emerge system&#8221; on my VPS and didn&#8217;t think much more about it.  First time back to the box today to emerge something else, and was greeted with this:</p>
<p>&gt;&gt;&gt; Unpacking source&#8230;<br />
&gt;&gt;&gt; Unpacking traceroute-2.0.15.tar.gz to /var/tmp/portage/net-analyzer/traceroute-2.0.15/work<br />
touch: setting times of `/var/tmp/portage/net-analyzer/traceroute-2.0.15/.unpacked&#8217;: No such file or directory</p>
<p>&#8230;and the emerge error output.  Took me a little while to get the answer, but it was (of course) caused by a new version of something that came in with the system update.  <a href="http://bugs.gentoo.org/show_bug.cgi?id=224483#c37" target="_blank">This bug comment</a> had the crude hack I needed to get back working again, but longer-term I obviously need to fix the mismatch between the version of linux-headers and the kernel version my VPS is using (it&#8217;s Xen on RHEL5).</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2011/03/another-round-of-gentoo-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6: SSDM?</title>
		<link>http://veejoe.net/blog/2011/02/ipv6-ssdm/</link>
		<comments>http://veejoe.net/blog/2011/02/ipv6-ssdm/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 14:58:31 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Networks]]></category>
		<category><![CDATA[Soapbox]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[observation]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5541</guid>
		<description><![CDATA[Two of the four keynotes at LCA 2011 referenced the depletion of the IPv4 address space (and I reckon if I looked back through the other two I could find some reference in them as well).  I think there&#8217;s a good chance Geoff Huston was lobbying his APNIC colleagues to lodge the &#8220;final request&#8221; (for [...]]]></description>
			<content:encoded><![CDATA[<p>Two of the four keynotes at <a title="Linux Conf AU 2011 Brisbane" href="http://lca2011.linux.org.au" target="_blank">LCA 2011</a> referenced the depletion of the IPv4 address space (and I reckon if I looked back through the other two I could find some reference in them as well).  I think there&#8217;s a good chance Geoff Huston was lobbying his APNIC colleagues to lodge the &#8220;final request&#8221; (for the two /8s that triggered the final allocation of the remaining 5, officially exhausting IANA) a week earlier than they did, as it would have made the message of his LCA keynote a bit stronger.  Not that it was a soft message: we went from Vint Cerf the day before, who said &#8220;I&#8217;m the guy who said that a 32-bit address would be enough, so, sorry &#8217;bout that&#8221;, to Geoff Huston saying &#8220;Vint Cerf is a professional optimist.  I&#8217;m not.&#8221;.  But I digress&#8230;</p>
<p>I did a bit of playing with IPv6 over the years, but it was too early and too broken when I did (by &#8220;too broken&#8221; I refer to the immaturity of dual-stack implementations and the lack of anything actually reachable on the IPv6 net).  However, with the bell of IPv4 exhaustion tolling, I had another go.</p>
<p>Freenet6, who now goes alternatively as gogonet or gogo6, was my first point-of-call.  I had looked at Gogo6 most recently, and still had an account.  It was just a matter of deciding whether or not I needed to make a new account (hint: I did) and reconfiguring the <strong>gw6c</strong> process on my router box.  Easy-as, I had a tunnel &#8212; better still, my IPv6-capable systems on the LAN also had connectivity thanks to <strong>radvd</strong>.  From Firefox (and Safari, and Chrome) on the Mac I could score both 10/10 scores on <a href="http://test-ipv6.com" target="_blank">http://test-ipv6.com</a>!</p>
<p>My joy was short-lived, however.  <strong>gw6c</strong> was proving to be about as stable as a one-legged tripod, and not only that Gogo6 had changed the address range they allocated me.  That wouldn&#8217;t be too bad, except that all my IPv6-capable systems still had the old address and were trying to use that &#8212; looks like IPv6 auto-configuration doesn&#8217;t <em>un-</em>configure an address that&#8217;s no longer valid (at least by default).  I started to look for possible alternatives.</p>
<p>Like many who&#8217;ve looked at IPv6 I had come across <a title="Hurricane Electric" href="http://www.he.com" target="_blank">Hurricane Electric</a> &#8212; in the countdown to IPv4 exhaustion I used their iOS app &#8220;ByeBye v4&#8243;.  They offer free v6-over-v4 tunneling, and the configuration in Gentoo is very simple.  I also get a static allocation of an IPv6 address range that I can see in the web interface.  The only downside I can see is that I had to nominate which of their locations I wanted to terminate my tunnel; they have no presence in Australia, the geographically-nearest location being Singapore.  I went for Los Angeles, thinking that would probably be closest network-wise.  The performance has been quite good, and it has been quite reliable (although I do need to set up some kind of monitoring over the link, since everything that can talk IPv6 is now doing so).</p>
<p>In typical style, after I&#8217;d set up a stable tunnel and got everything working, I decided to learn more about what I&#8217;d done.  What is IPv6 anyways?  Is there substance to the anecdotes flying around that are saying that &#8220;every blade of grass on the planet can have an IPv6 address&#8221; and similar?  Well, a 128-bit address provides for an enormous range of addresses.  The ZFS guys are on the same track &#8212; ZFS uses 128-bit counters for blocks and inodes, and there have been ridiculous statements made about how much data could theoretically be stored in a filesystem that uses 128-bit block counters.  To quote the Hitchhiker&#8217;s Guide to the Galaxy:</p>
<blockquote>
<p style="text-align: left;">Space is big. Really big. You just won&#8217;t believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it&#8217;s a long way down the  road to the chemist&#8217;s, but that&#8217;s just peanuts to space.</p>
<p style="text-align: right;">The Guide, <em>The Hitchhiker&#8217;s Guide To The Galaxy</em>, Douglas Adams, Pan Books 1979</p>
</blockquote>
<p>Substitute IPv6 (or ZFS) for space.  To try and put into context just how big the IPv6 address range is, let&#8217;s use an example: the smallest common subnetwork.</p>
<p>When IPv4 was first developed, there were three address <em>classes</em>, named, somewhat unimaginatively, A B and C.  Class A was all the networks from 1.x.x.x to 127.x.x.x, and each had about 16 million addresses.  Class B was all the networks from 128.0.x.x to 191.255.x.x, each network with 65 534 usable addresses.  Class C went from 192.0.0.x to 223.255.255.x, and each had 254 usable addresses.  Other areas, such as 0.x.x.x and the networks after 224.x.x.x, have been reserved.  So, in the early days, the smallest network of hosts you could have was a network of 254 hosts.  After a while IP introduced something called Classless Inter-Domain Routing (CIDR) which meant that the fixed boundaries of the classes were eliminated and it became possible to &#8220;subnet&#8221; or &#8220;supernet&#8221; networks &#8212; divide or combine the networks to make networks that were just the right size for the number of hosts in the network (and, with careful planning, could be grown or shrunk as plans changed).  With CIDR, since the size of the network was now variable, addresses had to be written with the subnet mask &#8212; a format known as &#8220;CIDR notation&#8221; came into use, where an address would have the number of bits written after the address like this: 192.168.1.42/24.</p>
<p>Fast-forward to today, with IPv6&#8230;  IPv4&#8242;s CIDR notation is used in IPv6 (mostly because the masks are so huge).  In IPv6, the smallest network that can be allocated is what is called a &#8220;/64&#8243;.  This means that out of the total 128-bit address range, 64 bits represent what network the address belongs to.  Let&#8217;s think about that for a second.  There are 32 bits in an IPv4 address &#8212; that means that the <em>entire IPv4 Internet</em> would fit in an IPv6 network with a /96 mask (128-32=96).  But the default smallest IPv6 subnet is /64 &#8212; the size of the existing IPv4 Internet <em>squared</em>!</p>
<p>Wait a second though, it gets better&#8230;  When I got my account with Gogo6, they offered me up to a /56 mask &#8212; that&#8217;s a range that covers 256 /64s, or 256 Internet-squareds!  Better still, the Hurricane Electric tunnel-broker account gave me one /64 <strong>and one /48</strong>!  <em>Sixty-five thousand networks, each the size of the IPv4 Internet squared!</em> And how much did I pay for any of these allocations?  Nothing!</p>
<p>I can&#8217;t help but think that folks are repeating similar mistakes from the early days of IPv4.  A seemingly limitless address range (Vint said that 32 bits would be enough, right?) was given away in vast chunks.  In the early days of IPv4 we had networks with two or three hosts on them using up a Class C because of the limitations of addressing &#8212; in IPv6 we have LANs of maybe no more than a hundred or so machines taking up an entire /64 because of the way we designed auto-configuration.  IPv6 implementations now will be characterised not by how well their dual-stack implementations work, or how much more secure transactions have become thanks to the elimination of NAT, but by how much of the addressable range they are wasting.  So, is IPv6 just Same Sh*t, Different Millennium?</p>
<p>Like the early days of IPv4 though, things will surely change as IPv6 matures.  I guess I&#8217;m just hoping that the folks in charge are thinking about it, and not just high on the amount of space they have to play with now.  Because one day all those blades of grass will want their IP addresses, and the Internet had better be ready.</p>
<p><em><strong>Update 16 May 2011</strong>:</em> I just listened to Episode <a href="http://twit.tv/sn297" target="_blank">297</a> of the <a href="http://twit.tv/sn" target="_blank">Security Now</a> program&#8230;  Steve Gibson relates some of his experience getting IPv6 allocation from his upstream providers (he says he got a /48).  In describing how much address space that is, he made the same point (about the &#8220;wasteful&#8221; allocation of IPv6).  At about 44:51, he starts talking about the current &#8220;sky is falling&#8221; attitude regarding IPv4, and states &#8220;you&#8217;d think, maybe they&#8217;d learn the lesson, and be a little more parsimonious with these IPs&#8230;&#8221;.  He goes on to give the impression that the 128-bit range of IPv6 is <strong>so</strong> big that there&#8217;s just no need to worry about it.  I hope you&#8217;re right, Steve!</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2011/02/ipv6-ssdm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharing an OSA port in Layer 2 mode</title>
		<link>http://veejoe.net/blog/2010/11/sharing-an-osa-port-in-layer-2-mode/</link>
		<comments>http://veejoe.net/blog/2010/11/sharing-an-osa-port-in-layer-2-mode/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 11:28:56 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[z/VM]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5508</guid>
		<description><![CDATA[I posted on my developerWorks blog about an experience I had sharing an OSA port in Layer 2 mode.  Thrilling stuff.  What&#8217;s more thrilling is the context of where I had my OSA-port-sharing experience: my large-scale Linux on System z cloning experiment.  One of these days I&#8217;ll get around to writing that up.]]></description>
			<content:encoded><![CDATA[<p>I posted on my <a title="Vic's dW blog" href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/viccross/?lang=en" target="_blank">developerWorks blog</a> about an experience I had sharing an OSA port in Layer 2 mode.  Thrilling stuff.  What&#8217;s more thrilling is the context of where I had my OSA-port-sharing experience: my large-scale Linux on System z cloning experiment.  One of these days I&#8217;ll get around to writing <strong>that</strong> up.</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2010/11/sharing-an-osa-port-in-layer-2-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk and a Patton SmartNode</title>
		<link>http://veejoe.net/blog/2010/07/asterisk-and-a-patton-smartnode/</link>
		<comments>http://veejoe.net/blog/2010/07/asterisk-and-a-patton-smartnode/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 11:12:57 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Telephony]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[capi]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[isdn]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5504</guid>
		<description><![CDATA[It&#8217;s been ages since I did an update on the main network machine here, and I bit the bullet over the weekend. 250+ packages emerged with surprisingly little trouble, and all I was left to do was build the updated kernel and reboot. I usually end up with something that doesn&#8217;t restart after the reboot, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been ages since I did an update on the main network machine here, and I bit the bullet over the weekend.  250+ packages emerged with surprisingly little trouble, and all I was left to do was build the updated kernel and reboot.<br />
I usually end up with something that doesn&#8217;t restart after the reboot, usually because of a kernel module that needs to be rebuilt after the kernel (because I forget to remerge the package before the reboot, oops).  This time the culprit was Asterisk (the phone system), which I also often have trouble with after an update due to a couple of codec modules external to the Asterisk build.  This time however the problem ended up being due to the Asterisk CAPI channel driver failing.<br />
Thinking it was the usual didn&#8217;t-rebuild-the-module problem, I went looking for the package I had to rebuild&#8230; only to find it was masked.  Turns out the driver for the ISDN card in the box, a FritzCard PCI, is no longer maintained and doesn&#8217;t build on modern kernels, which has resulted in the Gentoo folks hard-masking the entire set of AVM&#8217;s out-of-tree drivers.<br />
Help was at hand in the form of a Patton SmartNode 4552 ISDN VoIP router I&#8217;d bought months ago to replace the Fritz card.  Even though there isn&#8217;t much information about how to configure the SmartNode for Asterisk around, I managed to get the setup working in only a couple of hours.  I even managed to get the outgoing routing for the work line set up right!<br />
Eventually I&#8217;ll get something posted here that goes into a bit more detail about the configuration.  Let me know in a comment if you need to hurry me up! <img src='http://veejoe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2010/07/asterisk-and-a-patton-smartnode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ppc Linux on the PowerMac G5</title>
		<link>http://veejoe.net/blog/2010/04/ppc-linux-on-the-powermac-g5/</link>
		<comments>http://veejoe.net/blog/2010/04/ppc-linux-on-the-powermac-g5/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 23:42:10 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[ppc]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/2010/04/ppc-linux-on-the-powermac-g5/</guid>
		<description><![CDATA[With Apple&#8217;s abandonment of PPC as of Snow Leopard, I began wondering what to do with the old PowerMac. It&#8217;s annoying that so (comparatively) recent a piece of equipment should be given up by its manufacturer, but that&#8217;s a rant for another day. Yes, we can still run Leopard until it goes out of support, [...]]]></description>
			<content:encoded><![CDATA[<p>With Apple&#8217;s abandonment of PPC as of Snow Leopard, I began wondering what to do with the old PowerMac. It&#8217;s annoying that so (comparatively) recent a piece of equipment should be given up by its manufacturer, but that&#8217;s a rant for another day. Yes, we can still run Leopard until it goes out of support, but with S and I both on MacBook Pros with current OS I know that we would both become frustrated with a widening functionality gap between the systems.</p>
<p>I had always resisted runing Linux on the PowerMac, thinking that the last thing I needed was yet another Linux box in the house. I had tried a couple of times, but it was in the early days of support for the liquid cooling system in the dual-2.5Ghz model and those attempts failed dismally. I figured that by now those issues would be resolved and I would have a much better time.</p>
<p>I assumed that Yellow Dog was still the &#8216;benchmark&#8217; PPC Linux distro, so I went to their site. I saw a lot of data there about PS3 and Cell; it seems that YDL is transitioning to the cluster and/or research market by focussing on Cell.</p>
<p>The next thing I discovered is the lack of distributions that have a PPC version, even as a secondary platform. My old standby Gentoo still supports PPC, as does Fedora (I think: I saw a reference to downloading a PPC install disk, bit didn&#8217;t follow it), but every other major distro has dropped it &#8212; openSUSE, for example, with their very latest release (their download page still has a picture of a disc labelled &#8220;ppc&#8221;, but no such download exists, oops). I guess that since the major producer of desktop PPC systems stopped doing so, the distros saw their potential install base disappear. Unfortunately for those distros, I can see the reverse happening: now that Apple has fully left PPC behind, plenty of folks like me who have moderately recent G4 and G5 hardware and who still want to run a current OS will come to Linux looking for an alternative&#8230; I guess time will tell who is right on this one.</p>
<p>So I went to install Gentoo, and to cut a long story short I had exactly the same problem as before: critical temperature condition leading to emergency system power-off. I found that if I capped the CPU speed to 2Ghz I could stay up long enough to get things built, but then the system refused to boot because it couldn&#8217;t find the root filesystem. Probably something to do with yaboot, SATA drives and OpenFirmware. So again I&#8217;m putting it aside.</p>
<p>My next plan was to treat it as a file server. Surely a BSD would support my G5 hardware: after all, Mac OS X is BSD at heart&#8230; Well, no. FreeBSD has no support for SATA on ppc, OpenBSD specifically mentioned liquid-cooled G5s as having no support, and I don&#8217;t think I saw any ppc support on NetBSD more recent than G3 [1].</p>
<p>This is one of the things that annoys me about the computer industry: that somehow it&#8217;s okay to so completely disregard your older releases. What if the automotive industry worked that way?</p>
<p>So I may yet try Fedora, or give the game away for another year or so and see what the situation looks like then.</p>
<p>[1] I may have mixed up a couple of these details.</p>
<p><strong><em>Edit</em></strong>: Gentoo&#8217;s yaboot has managed to make it so that I can&#8217;t boot Mac OS X on the machine any more.  Oh dear.</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2010/04/ppc-linux-on-the-powermac-g5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LDAP-backed DNS and DHCP&#8230;?</title>
		<link>http://veejoe.net/blog/2009/07/ldap-backed-dns-and-dhcp/</link>
		<comments>http://veejoe.net/blog/2009/07/ldap-backed-dns-and-dhcp/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 10:42:47 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5437</guid>
		<description><![CDATA[I&#8217;m having a bit of an infrastructure redesign here at the Crossed Wires campus.  Each time I have an outage (the last one was caused by a power failure) I learn a little more about the holes in my current setup and what I can do better. I&#8217;m implementing a router box on an old [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having a bit of an infrastructure redesign here at the Crossed Wires campus.  Each time I have an outage (the last one was caused by a power failure) I learn a little more about the holes in my current setup and what I can do better.</p>
<p>I&#8217;m implementing a router box on an old low(-ish)-power PC that will be backed up by a virtual machine on my main virt-box.  I&#8217;ve already done most of the preparation of using <a href="http://www.keepalived.org" target="_blank">keepalived</a> to implement VRRP, and a colleague has given me some pointers in using the <a href="http://www.linux-ha.org" target="_blank">Linux-HA</a> tools like <a href="http://www.linux-ha.org/Heartbeat" target="_blank">Heartbeat</a> and <a href="http://www.drbd.org/" target="_blank">DRBD</a> to make services like e-mail and Samba redundant.</p>
<p>I&#8217;ve had a soft spot for LDAP for ages; I&#8217;ve always thought that putting as much backend data into LDAP as you can would be a really good way to get failover and redundancy.  Instead of having to deal with every single server&#8217;s different way of doing replication and failover, just bung everything into LDAP and get <em>that</em> replicating.  Sounds good in theory, but in a nutshell it&#8217;s not working out that way for the two least-celebrated but most important components of my (arguably any) network: DNS and DHCP.</p>
<p>There are a number of LDAP-backed DNS projects out there.  If I&#8217;m willing to go to the bleeding edge with BIND on my Gentoo build I can get access to the two most talked-about ones (<a href="http://bind9-ldap.bayour.com/" target="_blank">bind9-sdb-ldap</a> and the <a href="http://bind-dlz.sourceforge.net/ldap_driver.html" target="_blank">BIND DLZ LDAP driver</a>), and other solutions like <a href="http://www.powerdns.com" target="_blank">PowerDNS</a> and <a href="http://ldapdns.sourceforge.net" target="_blank">ldapdns</a> are available.  But none of them offer integration with DHCP, and I&#8217;m currently using dhcpd&#8217;s &#8220;interim DDNS update method&#8221; to make sure that hostnames are seen in my DNS when a lease is granted (okay, there&#8217;s a Perl daemon that goes with bind9-sdb-ldap, but it seems like a sort-of clunky afterthought).</p>
<p>Speaking of DHCP, LDAP backends for it are virtually non-existent.  The only LDAP-enablement I&#8217;ve found for ISC DHCP involves putting the <em>config file</em> into LDAP, not the leases&#8230;  I actually used that for a few days a while ago and pulled it out because it was actually more work to do it that way (and for no benefit in failover).</p>
<p>It seems to me it would be a project ripe for the picking: take an integrated DNS/DHCP server like <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html" target="_blank">dnsmasq</a> and make it write into LDAP instead of to a file.  If I had more free time I&#8217;d probably have a go at it, except for the fact that no-one really seems to be that interested in storing DNS and DHCP in LDAP: that it hasn&#8217;t been done says to me that there&#8217;s no demand for it, and it&#8217;d end up being a big waste of time and effort.</p>
<p>Over to you, lazyweb&#8230;  Is this a yawning chasm of unfulfilled networking dreams, or a case of me trying to make something more complex than it needs to be?  After all, the rest of the world gets by with DNS master-slave and DHCP failover, they should be good enough for me too, right?  <img src='http://veejoe.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2009/07/ldap-backed-dns-and-dhcp/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>FreePBX device-and-user mode, part two</title>
		<link>http://veejoe.net/blog/2009/07/freepbx-device-and-user-mode-part-two/</link>
		<comments>http://veejoe.net/blog/2009/07/freepbx-device-and-user-mode-part-two/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 09:53:21 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Telephony]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[freepbx]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5407</guid>
		<description><![CDATA[In part one, I described how I reconsidered device-and-user mode in FreePBX, and did the initial changeover.  Read on to find out how I overcame a major issue with the configuration! I have an ISDN phone line coming into my Asterisk system.  One of the indials is for our home number, the other is one [...]]]></description>
			<content:encoded><![CDATA[<address>In <a title="Revisiting device-and-user mode in FreePBX" href="http://veejoe.net/blog/2009/07/revisiting-device-and-user-mode-in-freepbx/" target="_self">part one</a>, I described how I reconsidered device-and-user mode in FreePBX, and did the initial changeover.  Read on to find out how I overcame a major issue with the configuration!</address>
<p>I have an ISDN phone line coming into my Asterisk system.  One of the indials is for our home number, the other is one I use for work.  Before I found FreePBX, I had manually worked the Asterisk dialplan to have calls made from my work phone(s) appear from the work phone number&#8211;useful not just for Caller-ID, but also required for the long-distance provider I use to bill calls for work.  With FreePBX I was able to use a custom context to pre-select a route that dialled the provider override prefix to send the calls through the other provider, but it was a bit of a hack using hand-written dialplan code and a bit of luck.</p>
<p>Before I changed to device-and-user, I naively assumed that FreePBX would allow a user to be associated with a context in the same way a device/extension can be.  This is not the case, and the context of the device is still used for routing.  This meant that I could not use a device for either work or personal calls without having to log onto FreePBX and change the device context (logging on as the work user was not enough).  I was back to square one&#8230;</p>
<p>I did a little research.  Firstly, I rediscovered how I was making the existing routing work.  The ISDN interface I use (driven by <strong>chan_capi</strong> in Asterisk) simply uses the outgoing caller-id of the call to select from available MSNs[1].  So I had one route that had the &#8220;normal&#8221; MSN set as the outbound caller-id, another route with the &#8220;work&#8221; MSN (plus the rewrites to add the long-distance override code at the front), and a custom context for the work devices that made only the route with the work MSN available.</p>
<p>Looking more closely at the user definition page, I saw that there is an &#8220;Outgoing Caller-ID&#8221; field.  By using this field, I was able to do away with the separate route and the custom context and set the work MSN there instead.  This gives me just what I need: a way to control my outbound MSN on a per-user basis!  This got me half-way there, as I still needed a way to set the long-distance override codes for work calls.  A bit more research turned up a predialling macro hook that the FreePBX folks made available.  With a bit of code to test the caller-id and the number dialled (the long distance company doesn&#8217;t handle free calls, for instance) I get just what I need.</p>
<p>Here&#8217;s the macro hook (this is added to extensions_custom.conf):</p>
<blockquote>
<pre>[macro-dialout-trunk-predial-hook]
exten =&gt; s,1,NoOp(Trunk is ${OUT_${DIAL_TRUNK}}, CallerID ${CALLERID(num)} calling ${OUTNUM} )
exten =&gt; s,n,GotoIf($["${CALLERID(num)}" != "xxxxxxxxx"]?endit)
exten =&gt; s,n,GotoIf($["${OUT_${DIAL_TRUNK}:4:11}" != "CAPI/contr1"]?endit)
exten =&gt; s,n,GotoIf($["${OUTNUM}:0:4}" = "1800"]?endit)
exten =&gt; s,n,Set(OUTNUM=1xxx${OUTNUM})
exten =&gt; s,n(endit),MacroExit()</pre>
</blockquote>
<p>So I&#8217;m now a happy device-and-user user!</p>
<address>[1] Actually I don&#8217;t know if that&#8217;s chan_capi doing it for me or whether it&#8217;s just the way the ISDN network works.</address>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2009/07/freepbx-device-and-user-mode-part-two/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Revisiting device-and-user mode in FreePBX</title>
		<link>http://veejoe.net/blog/2009/07/revisiting-device-and-user-mode-in-freepbx/</link>
		<comments>http://veejoe.net/blog/2009/07/revisiting-device-and-user-mode-in-freepbx/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 09:49:09 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Telephony]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[freepbx]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=5405</guid>
		<description><![CDATA[Buoyed by the success of a colleague I introduced to Asterisk and FreePBX a little while ago, I decided to have another look at the extension configuration mode I use on our system. Check this post for a recap of the FreePBX configuration modes and my first thoughts. Last time I looked at this I [...]]]></description>
			<content:encoded><![CDATA[<p>Buoyed by the success of a colleague I introduced to Asterisk and FreePBX a little while ago, I decided to have another look at the extension configuration mode I use on our system.</p>
<address>Check <a title="FreePBX Modes" href="http://veejoe.net/blog/2007/10/freepbx-modes/" target="_blank">this post</a> for a recap of the FreePBX configuration modes and my first thoughts.</address>
<p>Last time I looked at this I thought there were some problems with the way it was implemented that meant it didn&#8217;t work for my installation, so I ended up hacking together a mess of fake extensions, ring groups and queues that more-or-less reimplemented the good parts of device-and-user mode and still letting me use things from extensions mode.  Doing this however meant that FreePBX always complained about what it called &#8220;invalid destinations&#8221;, and I had to use some custom logic for doing something simple like a common voicemail access number.</p>
<p>What won me over to device-and-user mode again though was the ability to log a device on and off from a number.  I have a couple of Nokia handsets that have SIP clients now, and it&#8217;s handy to just have one device that all my work calls (for example) arrive on.  After-hours though, I didn&#8217;t want that device to still be tied up to the work line; it made more sense to be able to use that device for home calls.  To do that with extensions mode and my ring-group hack would mean reprogramming the ring-group (and one other change, which I&#8217;ll talk about later) when I wanted to switch over.  Presumably I could write some script or AGI logic that I could tie to a feature code in FreePBX, but I&#8217;d simply be making more custom modifications for little real gain.</p>
<p>In the end, I realised that the main thing keeping me in extensions mode&#8211;the ability to call a device by it&#8217;s &#8220;extension&#8221; number regardless of who&#8217;s logged on to it&#8211;wasn&#8217;t something I used often enough to warrant all the work I&#8217;d have to do to make extensions mode do what I needed.  With that in mind, I edited <strong>amportal.conf</strong> and made the all-important change:</p>
<blockquote>
<pre>AMPEXTENSIONS=deviceanduser</pre>
</blockquote>
<p>I had to reload the FreePBX admin page a couple of times, but eventually the &#8220;Extensions&#8221; tab changed into two tabs, &#8220;Devices&#8221; and &#8220;Users&#8221;.  True to the description of extension and device-and-user modes given in the FreePBX doco, the Devices and Users tabs had the same number of entries.  All I needed to do was delete the users that were no longer required (i.e. almost all of them) and the devices that belonged to the voicemail extensions from my original setup.  I then ran through each of the device definitions and correctly assigned them as either &#8220;Fixed&#8221; (statically allocated to a user) or &#8220;Ad-Hoc&#8221; (able to be logged on to a user).</p>
<p>This was the point at which I worked out a solution to my original dial-a-device-directly problem.  I realised that the majority of times I need that functionality is when testing.  So, for those devices that I use for testing, I left the user definition in place and made it the &#8220;default&#8221; user for that device.  This means that when I log out of the real user from that device it is reachable by the default user number, and I can dial it directly for testing.  The other use for direct-connection to a device, the intercom, requires a separate SIP endpoint anyway (due to the Cisco phones not adhering to the SIP command for remote off-hook) so I need to keep those as separate users too.</p>
<p>I&#8217;m quite happy with how it&#8217;s turned out&#8211;at least, I was once I&#8217;d overcome the showstopper I found!  Read about that in <a title="FreePBX device-and-user mode part two" href="http://veejoe.net/blog/2009/07/freepbx-device-and-user-mode-part-two/" target="_self">part two</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2009/07/revisiting-device-and-user-mode-in-freepbx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are we letting Microsoft define our industry?</title>
		<link>http://veejoe.net/blog/2008/03/are-we-letting-microsoft-define-our-industry/</link>
		<comments>http://veejoe.net/blog/2008/03/are-we-letting-microsoft-define-our-industry/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 01:28:26 +0000</pubDate>
		<dc:creator>Vic</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Soapbox]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://veejoe.net/blog/?p=371</guid>
		<description><![CDATA[I&#8217;ve been trying to solve a problem at work for a few weeks now &#8212; one of those tricky &#8220;it&#8217;s only software so it shouldn&#8217;t be this hard&#8221; sort-of problems for which you know the solution is just a matter of putting the right bits and pieces together. At work, I&#8217;m more-or-less forced into using [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to solve a problem at work for a few weeks now &#8212; one of those tricky &#8220;it&#8217;s only software so it shouldn&#8217;t be this hard&#8221; sort-of problems for which you know the solution is just a matter of putting the right bits and pieces together. At work, I&#8217;m more-or-less forced into using Red Hat Enterprise Linux (the distro <a href="http://www.redhatmagazine.com/2008/02/04/tips-and-tricks-rhel-ref/">formerly known as RHEL</a>), and one of the pieces I&#8217;m looking at is <a href="http://www.openldap.org">OpenLDAP</a>.</p>
<p>My first stage in the process was to get OpenLDAP set up with the right config &#8212; but when I started it, slapd complained about an error in slapd.conf. The overlay I was trying to use, it claimed, was not found. I spent the next couple of hours trying to find additional packages, trying different things, reading doco, searching Google, to no avail. The overlay I want is missing from Red Hat&#8217;s build of OpenLDAP.</p>
<p>So &#8220;boo hoo&#8221;, you say, &#8220;just build from source&#8221;. Well, remember how I said I was forced into RHEL? The corollary to that is that I am only allowed to use <em>exactly</em> what the Shadowman ships on the DVD. No build-from-source, no other OSS, is allowed.</p>
<p>But what does any of this have to do with Microsoft?</p>
<p>In my research, I found the release notes for Red Hat Enterprise Linux 5. In it was the following text (highlighting mine):<br />
<em><br />
OpenLDAP Server and Red Hat Directory Server<br />
Red Hat Directory Server is an LDAP-based server that centralizes enterprise and network data into an OS-independent, network-based registry. It is set to replace OpenLDAP server components, which <b>will be deprecated</b> </em>after<em> Red Hat Enterprise Linux 5. For more information about Red Hat Directory Server, refer to http://www.redhat.com/software/rha/directory/.<br />
</em></p>
<p>You guessed it: Red Hat Directory Server is a pay-for product. So Red Hat&#8217;s setting a direction here: server platforms comprising only the base OS, and additional function provided through extra-cost modules &#8212; now where have we seen this before?</p>
<p>Does this now mean that on RHEL-next, in order to run a Samba server with an LDAP IDMAP backend, companies will have to pay for RDS? That won&#8217;t fly at my work: &#8220;we already have a corporate directory, we&#8217;re not paying for another&#8221; will the customer sayeth. </p>
<p>&#8220;Okay&#8221;, you say, &#8220;so don&#8217;t use Red Hat&#8221;. As far as I&#8217;m allowed (this is at my employer remember) the only other choice is SLES&#8230; from Novell&#8230; that organisation that felt the need to cross-licence with Microsoft to &#8220;protect&#8221; against undisclosed and unproven patent infringement.</p>
<p>(Note that this post is not about Novell-Microsoft, nor is their deal a reason not to use SLES in my opinion. The thought only popped into my head because I was already thinking about Microsoft as a result of the Red Hat thing with RDS.)</p>
<p>So it seems like the two biggest names in corporate Linux are marching to Microsoft&#8217;s drum. Have I misread something? Am I overreacting?</p>
]]></content:encoded>
			<wfw:commentRss>http://veejoe.net/blog/2008/03/are-we-letting-microsoft-define-our-industry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

