<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Moose and Squirrel Files</title>
	<atom:link href="http://networknerd.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://networknerd.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Thu, 19 Jan 2012 19:42:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='networknerd.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Moose and Squirrel Files</title>
		<link>http://networknerd.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://networknerd.wordpress.com/osd.xml" title="The Moose and Squirrel Files" />
	<atom:link rel='hub' href='http://networknerd.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Geotagging Photos with a Garmin Edge 200 GPS</title>
		<link>http://networknerd.wordpress.com/2012/01/08/geotagging-photos-with-a-garmin-edge-200-gps/</link>
		<comments>http://networknerd.wordpress.com/2012/01/08/geotagging-photos-with-a-garmin-edge-200-gps/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 06:37:07 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[GPS]]></category>
		<category><![CDATA[Exiftool]]></category>
		<category><![CDATA[Garmin]]></category>
		<category><![CDATA[Geotag]]></category>
		<category><![CDATA[Wintec]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=506</guid>
		<description><![CDATA[After receiving a Garmin Edge 200 cycling GPS for Christmas I began to wonder if I could use it for geotagging my photographs. After doing a few side by side tests against my old Wintec WBT201 I was quite impressed  with it&#8217;s precision and accuracy.  The Garmin was definitely going to be the favoured device [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=506&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After receiving a Garmin Edge 200 cycling GPS for Christmas I began to wonder if I could use it for geotagging my photographs. After doing a few side by side tests against my old Wintec WBT201 I was quite impressed  with it&#8217;s precision and accuracy.  The Garmin was definitely going to be the favoured device from now on.  The only problem I had was how to read and use the proprietary fit file format.</p>
<p>Google told me that others had attempted this <a title="Geotagging without a dedicated camera gps, part 2" href="http://astoryworthtelling.wordpress.com/2011/01/03/geotagging-without-a-dedicated-camera-gps-part-2/" target="_blank">before</a>.  That solution seems to have been designed around linux and while it is all pretty much perl and it should have run on windows I just didn&#8217;t have the patience to get it working.  I could see that the solution used the truly excellent <a title="Exiftool Metadata Editor" href="http://www.sno.phy.queensu.ca/~phil/exiftool/" target="_blank">exiftool</a>  by Phil Harvey.  I also knew that there was a standalone windows executable for exiftool.  Upon closer inspection I found that it could read GPS track logs in various formats and tag photos accordingly.</p>
<p>In the end I settled for just uploading the activity file to Garmin Connect, exporting it in GPX format and then using exiftool to batch process all the photos in the directory.</p>
<p>Update:  After loading my geotagged pictures in to Picasa and then pressing the geotag button I was surprised to find that the photos were not showing the correct location.  It seems that I had forgotten to check the time on the camera and it was out by almost 6 minutes. Exiftool came to the rescue again with its <a title="Exiftool Date/Time shifting" href="http://www.sno.phy.queensu.ca/~phil/exiftool/#shift" target="_blank">date/time shift feature</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/506/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/506/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/506/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=506&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2012/01/08/geotagging-photos-with-a-garmin-edge-200-gps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>A bash Telnet Client for Checkpoint Secureplatform</title>
		<link>http://networknerd.wordpress.com/2011/09/26/a-bash-telnet-client-for-checkpoint-secureplatform/</link>
		<comments>http://networknerd.wordpress.com/2011/09/26/a-bash-telnet-client-for-checkpoint-secureplatform/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 11:27:53 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=471</guid>
		<description><![CDATA[Checkpoints secureplatform doesn&#8217;t come with a telnet client pre-installed.  While this generally isn&#8217;t a major problem there are times where life would be simpler if you had telnet to connect to an adjacent router, or even to check connectivity with an SMTP relay. The bash shell script below is simple yet still capable enough to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=471&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Checkpoints secureplatform doesn&#8217;t come with a telnet client pre-installed.  While this generally isn&#8217;t a major problem there are times where life would be simpler if you had telnet to connect to an adjacent router, or even to check connectivity with an SMTP relay.</p>
<p>The bash shell script below is simple yet still capable enough to meet these occasional demands.  Without all the niceties the script amounts to just three lines.</p>
<ol>
<li>The exec statement to connect file handle 3 to our socket.</li>
<li>Reading the input of the file handle and using cat to send it to the screen.</li>
<li>Reading STDIN  (keyboard) and writing it to our file handle.</li>
</ol>
<p>A great example of how powerful  linux IO redirection can be.<br />
<code>
<pre>#! /bin/bash
#
# Workaround for lack of telnet client on Secureplatform
# Uses Bash IO redirection to tcp sockets
#
usage(){
     echo "USAGE: $0 host port" &gt;&amp;2
}
#Check we have the right number of args on the command line
if [ -z "$1" -o -z "$2" ]; then
     usage
#Check if the script is sourced.
#We use return if it is to avoid exiting the parent shell
    if [ "$0" == "bash" ]; then
        return -1
    else
       exit -1
    fi
fi
#Redirect input and output from the socket to filehandle
exec 3&lt;&gt;/dev/tcp/$1/$2
#Output from the file handle goes to the screen,we run this process in background
cat &lt;&amp;3 &amp;
#Input from the keyboard goes to our file handle. CTRL-C to exit.
cat &gt;&amp;3
#Close Output then input
exec 3&gt;&amp;-
exec 3&lt;&amp;-</pre>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/471/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=471&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2011/09/26/a-bash-telnet-client-for-checkpoint-secureplatform/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Converting Unix (Epoch) Times with Excel</title>
		<link>http://networknerd.wordpress.com/2011/03/26/converting-unix-epoch-times-with-excel/</link>
		<comments>http://networknerd.wordpress.com/2011/03/26/converting-unix-epoch-times-with-excel/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 11:56:05 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[epoch]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=459</guid>
		<description><![CDATA[Unix time is defined by wikipedia as &#8220;&#8230;a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.&#8221; Unix times are used by a number of Cisco products like in callmanager call record reports, as the OSPF cryptographic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=459&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Unix time is defined by wikipedia as &#8220;&#8230;a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.&#8221;</p>
<p>Unix times are used by a number of Cisco products like in callmanager call record reports, as the OSPF cryptographic sequence number, and as the time measurements were taken using snmp bulkstats.</p>
<p>Taking leap seconds and leap years into account can be a messy business, but excel can help simplify the calculations to normal date and time by using the  vba DateAdd function.</p>
<p>Unfortunately it can&#8217;t be used directly in a cell formula but you can create a macro (vba function) that can be used in a cell formula.  The vba code I used is shown below.  Note that there is a second optional parameter  UTCOffset, the number of hours from UTC , that can be used to calculate local times. If omitted you will get UTC times.</p>
<p><code>Private Const SecondsPerHour = 3600<br />
Private Const EpochStart = "1/1/1970" '1 Jan 1970 00:00:00 UTC<br />
Function epochconvert(epochtime, Optional UTCOffset)<br />
    If IsMissing(UTCOffset) Then<br />
        epochconvert = DateAdd("s", epochtime, EpochStart)<br />
    Else<br />
        epochconvert = DateAdd("s", epochtime + SecondsPerHour * UTCOffset, EpochStart)<br />
    End If<br />
End Function</code></p>
<p><code>Function ToEpoch(dtDate, Optional UTCOffset)<br />
    If IsMissing(UTCOffset) Then<br />
        ToEpoch = DateDiff("s", dtDate, EpochStart)<br />
    Else<br />
        ToEpoch = DateDiff("s", EpochStart, dtDate) - SecondsPerHour * UTCOffset<br />
    End If<br />
End Function</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=459&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2011/03/26/converting-unix-epoch-times-with-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick and dirty UDP servers with wireshark</title>
		<link>http://networknerd.wordpress.com/2010/12/23/quick-and-dirty-udp-servers-with-wireshark/</link>
		<comments>http://networknerd.wordpress.com/2010/12/23/quick-and-dirty-udp-servers-with-wireshark/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 05:16:43 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Wireshark]]></category>
		<category><![CDATA[netflow]]></category>
		<category><![CDATA[syslog]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=454</guid>
		<description><![CDATA[I&#8217;m not suggesting wireshark is the right choice for production but if you need a udp server for a quick debugging session then this trick might just be worth tucking away for later. If you need to perform a short data collection from  applications like syslog  or netflow that just pump out  udp packets then [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=454&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not suggesting wireshark is the right choice for production but if you need a udp server for a quick debugging session then this trick might just be worth tucking away for later.</p>
<p>If you need to perform a short data collection from  applications like syslog  or netflow that just pump out  udp packets then wireshark/tshark can work for you in a pinch.</p>
<p>Here&#8217;s the recipe for syslog.</p>
<p style="padding-left:30px;"><code>tshark -i 2 -f "port 514" -T fields -e syslog</code></p>
<p>Using the -T fields switch allows us to specify which data to output with one or more  -e switches.  Since we have specified a protocol (syslog),  tshark prints multiple fields, in this case its the facility(LOCAL7),severity(NOTICE), and the remainder of the output below is the actual message.</p>
<p style="padding-left:30px;"><code>Syslog message: LOCAL7.NOTICE: 27403: Dec 23 14:44:29: %SYS-5-CONFIG_I: Configured from console by root on vty0 (10.0.2.19)</code></p>
<p>The people that wrote the dissectors in wireshark have done all the hard work of interpreting the binary fields for us.  It&#8217;s worth noting that there is no documentation (that I am aware of)  for the field names. I usually just capture a couple of packets and export them in PDML format.  You can then open that file in any text editor and determine the field names from the XML.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/454/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/454/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/454/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=454&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2010/12/23/quick-and-dirty-udp-servers-with-wireshark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Cisco IPSEC MTU Bug</title>
		<link>http://networknerd.wordpress.com/2010/06/11/cisco-ipsec-mtu-bug/</link>
		<comments>http://networknerd.wordpress.com/2010/06/11/cisco-ipsec-mtu-bug/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 23:52:09 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[mtu]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=424</guid>
		<description><![CDATA[Cisco made the process of site to site ipsec encrypted communications fairly easy with the introduction of virtual tunnel interfaces (VTI) in IOS version 12.2(13)T.  The problems caused by the overhead of ipsec/ESP encapsulation of a payload are fairly well documented in their knowledge base document &#8220;Resolve IP Fragmentation, MTU, MSS, and PMTUD Issues with GRE and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=424&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Cisco made the process of site to site ipsec encrypted communications fairly easy with the introduction of virtual tunnel interfaces (VTI) in IOS version 12.2(13)T.  The problems caused by the overhead of ipsec/ESP encapsulation of a payload are fairly well documented in their knowledge base document <a href="http://www.cisco.com/en/US/tech/tk827/tk369/technologies_white_paper09186a00800d6979.shtml">&#8220;Resolve IP Fragmentation, MTU, MSS, and PMTUD Issues with GRE and IPSEC&#8221;</a>. The &#8220;Readers Digest&#8221; version of the above article is that you need to reduce the IP mtu of the tunnel interface to a size that allows for the additional overhead of ipsec and/or GRE encapsulation.</p>
<p>Now as luck would have it I stumbled across a bug with tunnel interfaces miscalculating the IP mtu after the router is rebooted.   For  readers who just want the short story, the workaround is to always specify tunnel source by interface name, not ip address. Cisco TAC report that the bug exists across a large number of IOS versions and platforms. <span style="text-decoration:line-through;">A bug ID has been requested from Cisco so that we can follow it. I&#8217;ll post it here once they allocate it.</span>  The bug ID is <a title="Cisco Bug ID" href="http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&amp;bugId=CSCth31172" target="_blank">CSCth31172</a>. For those that would like proof of the bug read on.</p>
<p>To test this I configured two 2811 routers in the lab.  The configs can be viewed here for <a title="Router 1 config" href="http://networknerd.files.wordpress.com/2010/06/r1-txt.doc" target="_blank">R1</a> and <a title="Router 2 config" href="http://networknerd.files.wordpress.com/2010/06/r2-txt.doc" target="_blank">R2</a>.  The relevant interface configurations for each are below.<br />
<strong>R1 config</strong></p>
<pre>interface Tunnel2
  ip address 10.0.0.1 255.255.255.252
  ip mtu 1400  ip tcp adjust-mss 1360
 <strong> tunnel source Serial0/0/0.100 </strong>
  tunnel destination 192.168.0.2
  tunnel mode ipsec ipv4
  tunnel path-mtu-discovery
  tunnel protection ipsec profile MY_VTI
!
interface Serial0/0/0
  no ip address
  encapsulation frame-relay IETF
  clock rate 2000000
!
interface Serial0/0/0.100 point-to-point
  ip address 192.168.0.1 255.255.255.252
  frame-relay interface-dlci 100</pre>
<p><strong>R2 Config</strong></p>
<pre>interface Tunnel1
  ip address 10.0.0.2 255.255.255.252
  ip mtu 1400
  ip tcp adjust-mss 1360
 <strong> tunnel source 192.168.0.2
</strong>  tunnel destination 192.168.0.1
  tunnel mode ipsec ipv4
  tunnel protection ipsec profile MY_VTI
!
interface Serial0/0/0
  no ip address
  encapsulation frame-relay IETF
  frame-relay intf-type dce
!
interface Serial0/0/0.100 point-to-point
  ip address 192.168.0.2 255.255.255.252
  frame-relay interface-dlci 100</pre>
<p>The serial interface on router R1 that carries the tunnel traffic should have an mtu of 1500 bytes. We verify this by doing a ping with the df bit set.</p>
<pre>R1#ping 192.168.0.2 df size 1500
Type escape sequence to abort.
Sending 5, 1500-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
Packet sent with the DF bit set
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/12/16 ms</pre>
<p>The IP  mtu of the tunnel2 interface is configured to 1400 bytes, an allowance of 100 bytes for ESP header/trailer and GRE headers.  That&#8217;s plenty, and we should be able to send 1400 bytes through with the DF bit set.</p>
<pre>R1#ping 10.0.0.2 df size 1400

Type escape sequence to abort.
Sending 5, 1400-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
Packet sent with the DF bit set
.....
Success rate is 0 percent (0/5)</pre>
<p>Something is not quite right. We can check the IP mtu of the crypto SA by issuing the command.</p>
<pre>R1#show crypto ipsec sa | include mtu|interface
 interface: Tunnel2
      path mtu 1500, ip mtu 1500, ip mtu idb Serial0/0/0.100
 interface: Tunnel21
      path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0</pre>
<p>Nothing obvious there, time to move on to router R2 and repeat the tests.  First confirm the mtu of the underlying interface.</p>
<pre>R2#ping 192.168.0.1 df size 1500
 Type escape sequence to abort.
 Sending 5, 1500-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds: Packet sent with the DF bit set
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 12/12/16 ms</pre>
<p>All good, now we can test the tunnel to R1 with 1400 byte packets.</p>
<pre>R2#ping 10.0.0.1 df size 1400
 Type escape sequence to abort. Sending 5, 1400-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds: Packet sent with the DF bit set
 M.M.M
*Jun  7 01:08:10.855: CRYPTO_ENGINE: locally-sourced pkt w/DF bit set is too big,ip-&gt;tl=1400, mtu=1343
*Jun  7 01:08:10.855: CRYPTO_ENGINE: locally-sourced pkt w/DF bit set is too big,ip-&gt;tl=1400, mtu=1343
*Jun  7 01:08:12.855: CRYPTO_ENGINE: locally-sourced pkt w/DF bit set is too big,ip-&gt;tl=1400, mtu=1343
*Jun  7 01:08:12.855: CRYPTO_ENGINE: locally-sourced pkt w/DF bit set is too big,ip-&gt;tl=1400, mtu=1343
*Jun  7 01:08:14.855: CRYPTO_ENGINE: locally-sourced pkt w/DF bit set is too big,ip-&gt;tl=1400, mtu=1343</pre>
<p>Okay, so now we&#8217;re on to something.  The crypto engine tells us the mtu is 1343 or 57 bytes short of our expectation. Coincidentally that is suspiciously close to the 52 bytes overhead for ESP that Cisco has documented in &#8220;<em><a title="QoS DESIGN FOR IPsec VPNs" href="http://www.cisco.com/en/US/technologies/tk543/tk759/technologies_white_paper0900aecd80295ab0.pdf" target="_blank">QoS DESIGN FOR IPsec VPNs</a><span style="color:#888888;">&#8220;.</span> </em></p>
<pre>R2#show crypto ipsec sa | include interface|mtu
interface: Tunnel1
      path mtu 1400, ip mtu 1400, ip mtu idb Tunnel1
interface: Tunnel12
      path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0</pre>
<p>Notice the differences between tunnel 2 on R1 and Tunnel 1 on R2.  The IP mtu is 1400 bytes and the idb (<span style="text-decoration:line-through;">I have no idea what idb means</span> Interface Descriptor Block, thanks for the correction Ivan) is the actual tunnel interface and not the transit interface of the tunnel. We can reset the tunnel interfaces and the crypto SA&#8217;s by briefly shutting the interface.</p>
<pre>R2#conf t
 Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int tu1
R2(config-if)#shut
R2(config-if)#no shut
*Jun  7 01:10:48.571: %LINK-5-CHANGED: Interface Tunnel1, changed state to administratively down
*Jun  7 01:10:49.571: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to down
*Jun  7 01:11:07.555: %LINK-3-UPDOWN: Interface Tunnel1, changed state to up
*Jun  7 01:11:08.555: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up
R2(config-if)#end
*Jun  7 01:11:18.515: %SYS-5-CONFIG_I: Configured from console by console
R2#show crypto ipsec sa | include interface|mtu
interface: Tunnel1
      path mtu 1500, ip mtu 1500, ip mtu idb Serial0/0/0.100
interface: Tunnel12
      path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0</pre>
<p>The difference to tunnel1 after shutting down the interface is readily apparent. The IP mtu is now 1500 bytes and the idb is now the serial subinterface.  A 1400 byte ping should now be possible.</p>
<pre>R2#ping 10.0.0.1 df size 1400
Type escape sequence to abort.
Sending 5, 1400-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
Packet sent with the DF bit set
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms
R2#</pre>
<p>It&#8217;s not really viable resetting  tunnel  interfaces after every reboot, but our testing has found that Cisco&#8217;s workaround of specifying tunnel source by interface name rather than IP address has been 100% effective so far.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/424/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=424&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2010/06/11/cisco-ipsec-mtu-bug/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Using VRF&#8217;s to Simulate Physical Routers</title>
		<link>http://networknerd.wordpress.com/2010/03/19/using-vrfs-to-simulate-physical-routers/</link>
		<comments>http://networknerd.wordpress.com/2010/03/19/using-vrfs-to-simulate-physical-routers/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 05:36:19 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=396</guid>
		<description><![CDATA[I recently had the need to test a frame-relay configuration that was soon to be commissioned, but didn&#8217;t have a spare pair of routers to connect  to. VRF to the rescue.  VRF&#8217;s are a technology that allow multiple instances of the routing table to exist within one physical device. NB: This is not a new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=396&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently had the need to test a frame-relay configuration that was soon to be commissioned, but didn&#8217;t have a spare pair of routers to connect  to. VRF to the rescue.  VRF&#8217;s are a technology that allow multiple instances of the routing table to exist within one physical device. NB: This is not a new concept (see <a title="VRF Notes" href="http://www.digivill.net/~binary/ccie/ccie-notes/vrf-notes">here</a>), just a record of my work. The only real limitation when you do this on a production router is that you need one  interface per VRF interconnection. </p>
<p>I had an unused two port E1 card in a Cisco 3845 router, making the testing easy.  One VRF for each E1 interface,  an E1 crossover cable and I was good to go.  Once the E1 controller channel group is configured a new serial port is created. This was the final config I used, and fortunately the frame relay pvc&#8217;s came up straight away. Mission accomplished. </p>
<p>An important point to remember with VRF&#8217;s is that many of the usual commands have VRF specific variations. To do a ping test with this configuration you need to use the ping VRF command as shown below, or else you&#8217;ll just be using what&#8217;s in the global routing table.<br />
<code>router#ping vrf E1-0/0/0<br />
Protocol [ip]:<br />
Target IP address: 192.168.1.2<br />
Repeat count [5]:<br />
Datagram size [100]:<br />
Timeout in seconds [2]:<br />
Extended commands [n]: y<br />
Source address or interface: Serial0/0/0:0.37<br />
Type of service [0]:<br />
Set DF bit in IP header? [no]:<br />
Validate reply data? [no]:<br />
Data pattern [0xABCD]:<br />
Loose, Strict, Record, Timestamp, Verbose[none]:<br />
Sweep range of sizes [n]:<br />
Type escape sequence to abort.<br />
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:<br />
Packet sent with a source address of 192.168.1.1<br />
!!!!!<br />
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms<br />
router#sh ip route vrf E1-0/0/0</p>
<p>Routing Table: E1-0/0/0<br />
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP<br />
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area<br />
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2<br />
E1 - OSPF external type 1, E2 - OSPF external type 2<br />
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2<br />
ia - IS-IS inter area, * - candidate default, U - per-user static route<br />
o - ODR, P - periodic downloaded static route</p>
<p>Gateway of last resort is not set</p>
<p>192.168.1.0/30 is subnetted, 1 subnets<br />
C 192.168.1.0 is directly connected, Serial0/0/0:0.37</p>
<p>! Create the two VRF's and assign route distinguishers<br />
ip vrf E1-0/0/0<br />
rd 100:0<br />
!<br />
ip vrf E1-0/0/1<br />
rd 200:1<br />
! Configure the E1 controllers. They need to be joined with an E1 crossover cable<br />
controller E1 0/0/0<br />
  channel-group 0 timeslots 1-31 speed 64<br />
!<br />
controller E1 0/0/1<br />
  channel-group 0 timeslots 1-31 speed 64</p>
<p>! Configure the serial controller on E1 0/0/0 with frame-relay encapsulation<br />
! Note that one of the two serial interfaces has to be Frame-relay DCE when using a crossover.<br />
interface Serial0/0/0:0<br />
  no ip address<br />
  encapsulation frame-relay IETF<br />
  frame-relay lmi-type q933a<br />
  frame-relay intf-type dce<br />
!<br />
interface Serial0/0/0:0.37 point-to-point<br />
  no ip address<br />
  ip vrf forwarding E1-0/0/0<br />
  ip address 192.168.1.1 255.255.255.252<br />
  frame-relay interface-dlci 37<br />
!<br />
interface Serial0/0/1:0<br />
  no ip address<br />
  encapsulation frame-relay IETF<br />
  frame-relay lmi-type q933a<br />
!<br />
interface Serial0/0/1:0.37 point-to-point<br />
  ip vrf forwarding E1-0/0/1<br />
  ip address 192.168.1.2 255.255.255.252<br />
  frame-relay interface-dlci 37</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/396/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/396/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/396/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=396&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2010/03/19/using-vrfs-to-simulate-physical-routers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Detecting which .Net Framework Versions are Installed</title>
		<link>http://networknerd.wordpress.com/2009/11/03/detecting-which-net-framework-versions-are-installed/</link>
		<comments>http://networknerd.wordpress.com/2009/11/03/detecting-which-net-framework-versions-are-installed/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 06:30:44 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=388</guid>
		<description><![CDATA[In the previous post I used some C# code to detect if bootworks was installed prior to installing full disk encryption.  That all works well provided the appropriate .Net framework is installed. Unfortunately with a freshly re-imaged computer there is no .Net framework in the base image causing the bootworks detection to bomb out. After [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=388&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the previous post I used some C# code to detect if bootworks was installed prior to installing full disk encryption.  That all works well provided the appropriate .Net framework is installed. Unfortunately with a freshly re-imaged computer there is no .Net framework in the base image causing the bootworks detection to bomb out.</p>
<p>After a bit of googling I came up with this small script to gather all the installed .Net versions and a support function to test for a particular release version.  The same thing could be accomplished using a registry key as described by <a id="ctl00___ctl00___bth___BlogTitle" href="http://blogs.msdn.com/astebner/default.aspx">Aaron Stebner&#8217;s </a>blog post. </p>
<p><code></p>
<pre>option explicit
'Detect which versions of DotNet Framework are installed.
'From Microsoft KB Article http://support.microsoft.com/kb/318785/
'By NetworkNerd 3/11/2009

Const WindowsFolder = 0
Const SystemFolder = 1
Const TemporaryFolder = 2
const DOTNET_10 = "v1.0.3705"
const DOTNET_11 = "v1.1.4322"
const DOTNET_20 = "v2.0.50727"
const DOTNET_30 = "v3.0"
const DOTNET_35 = "v3.5"

dim objFrameworkVers

set objFrameworkVers = CreateObject("Scripting.Dictionary")
wscript.echo "Found " &amp; getFrameWorkVersions(objFrameworkVers) &amp; " .NET Frameworks installed."
if HasDotNet(DOTNET_20) then
  wscript.echo "Has .Net Framework 2.0 installed"
end if

function HasDotNet(ver)
  if objFrameworkVers.exists(ver) then
    HasDotNet = True
  else
    HasDotNet = False
  end if
end function

function getFrameWorkVersions(byref objDict)
  dim fso, winfolder, strPath, basefolder, f
  Set fso = CreateObject("Scripting.FileSystemObject")
  set winfolder = fso.GetSpecialFolder(WindowsFolder)
  strPath = winfolder.path &amp; "\Microsoft.NET\Framework"
  set basefolder = fso.getfolder(strPath)
  objDict.removeAll
  for each f in basefolder.subfolders
	objDict.add f.name, f.name
  next
  getFrameWorkVersions = objDict.count
end function</pre>
<p>&nbsp;</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/388/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=388&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2009/11/03/detecting-which-net-framework-versions-are-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Detecting when Altiris Bootworks is Installed</title>
		<link>http://networknerd.wordpress.com/2009/10/22/detecting-when-altiris-bootworks-is-installed/</link>
		<comments>http://networknerd.wordpress.com/2009/10/22/detecting-when-altiris-bootworks-is-installed/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 20:14:47 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[altiris]]></category>
		<category><![CDATA[bootworks]]></category>
		<category><![CDATA[physical disk]]></category>
		<category><![CDATA[sector read]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=372</guid>
		<description><![CDATA[When installing Checkpoint full disk encryption we ran into some problems on computers with Altiris Bootworks still installed. Normally Bootworks can be detected through a registry key, and uninstalled if the key is present. However we found a number of computers with Bootworks were missing the key. The quick solution to detect bootworks was to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=372&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When installing Checkpoint full disk encryption we ran into some problems on computers with Altiris Bootworks still installed. Normally Bootworks can be detected through a registry key, and uninstalled if the key is present. However we found a number of computers with Bootworks were missing the key.</p>
<p>The quick solution to detect bootworks was to read the bootsector of the disk and look for some identifying strings. The code below shows how to read from a physical disk.  Note this has only been tested in Windows XP, and you require admin privileges.  The code below was called from a startup script so privilege wasn&#8217;t an issue.</p>
<p>When reading from a physical disk we need to seek, read and write in multiples of sector size and on sector boundaries. See Microsoft <a title="INFO: Direct Drive Access Under Win32" href="http://support.microsoft.com/kb/q100027" target="_blank">KB article 100027</a>.  I use WMI to get the number of bytes per sector for the drive.</p>
<p>I found the signature by extracting the bootsector using a copy of dcfldd that was compiled for cygwin. I dumped it to file using the command below.<br />
dcfldd if=&#8221;\\\\.\\physicaldrive0 of =&#8221;bootsec.bin&#8221; count=1</p>
<p>The file bootsec.bin can then be opened using good old debug to get the hex/ascii display</p>
<p>The same result can be achieved by booting to a linux live cd and using the command below.</p>
<p> dd if=/dev/sda count=1 | hexdump -C</p>
<p><strong> Listing 1</strong></p>
<pre><code>
using System;
using System.IO;
using System.Management;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;

namespace bwcheck
{
    class Program
    {
        [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError=true)]
        internal static extern SafeFileHandle CreateFile(string lpFileName, int dwDesiredAccess, int dwShareMode,
            IntPtr lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, SafeFileHandle hTemplateFile);

        internal const int GENERIC_READ = unchecked((int)0x80000000);
        internal const int OPEN_EXISTING = 3;
        internal const int FILE_ATTRIBUTE_NORMAL = 0x80;
        const String SIGNATURE = "Altiris EBootMastr";
        const int SEEKOFFSET = 3;
        const int LENGTH_TO_READ = 18;   // LENGTH_TO_READ = SIGNATURE.Length;
        const int RETCODE_SUCCESS = 0;
        const int RETCODE_IOERROR = 1;
        const int RETCODE_BADSIGNATURE = 2;
        const int RETCODE_HIT_EOF = 3;
// NB The where clause requires additional escaping even with the @string literal
        const String WMIQRY = @"Select * from win32_diskdrive where Name='\\\\.\\PhysicalDrive0'";
        const String WMI_NS = @"\\.\root\cimv2";
        //const String WMIQRY = "Select * from win32_diskdrive ";

        public static int Main(string[] args)
        {

            // TODO: Implement Functionality Here
            int retcode = RETCODE_SUCCESS;
            SafeFileHandle h = null;
            h = CreateFile("\\\\.\\PhysicalDrive0",
                            GENERIC_READ, 0, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
                            new SafeFileHandle(IntPtr.Zero, true));

            if (! h.IsInvalid ) {
                try {
                    //Find the bytes per sector for the disk
                    //We must read, write and seek in multiples of sector size (ref: http://support.microsoft.com/kb/q100027)
                    //This is true even when we convert the handle to a filestream.
                    ManagementObjectSearcher objSearch = new ManagementObjectSearcher(WMI_NS, WMIQRY);
                    int bytespersector = 0;
                    foreach (ManagementObject objResult in objSearch.Get()){
                        bytespersector = Convert.ToInt32(objResult["BytesPerSector"]);
                    }
                    FileStream fstream = new FileStream(h, FileAccess.Read);
                    // Read from stream
                    Byte[] chunk = new Byte[bytespersector];
                    int bytesRead;
                    int bytesTotal = 0;
                    int bytesToRead =  bytespersector;
                    while (bytesToRead &gt; 0) {
                        bytesRead = fstream.Read(chunk,bytesTotal,bytesToRead);
                        if (bytesRead == 0) {
                            break; //end of filestream condition
                        }
                        bytesToRead -= bytesRead;
                        bytesTotal += bytesRead;
                    }
                    if (bytesToRead &gt; 0 ) {
                        retcode = RETCODE_HIT_EOF;
                    }
                    System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
                    String s = enc.GetString(chunk,SEEKOFFSET,LENGTH_TO_READ);
                    Console.WriteLine("{0}", s);
                    if (! s.Equals(SIGNATURE)){
                        retcode = RETCODE_BADSIGNATURE;
                    }

                } catch (Exception e) {
                    Console.WriteLine(e.ToString());
                    retcode = RETCODE_IOERROR;
                }
            }
            else
            {
                // get error code and throw
                int error = Marshal.GetLastWin32Error();
                Console.WriteLine("Last WIN32 Error: {0}", error);
                retcode = RETCODE_IOERROR;
            }
            return retcode;
        }
    }
}

</code></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/372/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=372&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2009/10/22/detecting-when-altiris-bootworks-is-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Cisco Embedded Event Manager Applets</title>
		<link>http://networknerd.wordpress.com/2009/09/11/cisco-embedded-event-manager-applets/</link>
		<comments>http://networknerd.wordpress.com/2009/09/11/cisco-embedded-event-manager-applets/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 06:11:35 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[EEM]]></category>
		<category><![CDATA[HSRP]]></category>
		<category><![CDATA[multicast]]></category>
		<category><![CDATA[windows load balancing]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=365</guid>
		<description><![CDATA[Embedded event manager is a feature incorporated into most new cisco equipment. You can find more information on the Cisco site and some excellent examples at the IOSHINTS blog. This applet is used to add/delete static arp entries on 6509 core switches in a HSRP pairing, since you can&#8217;t have a static arp configured more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=365&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Embedded event manager is a feature incorporated into most new cisco equipment. You can find more information on the <a title="Cisco IOS Embedded Event Manager" href="http://www.cisco.com/en/US/products/ps6815/products_ios_protocol_group_home.html">Cisco site</a> and some excellent examples at the <a title="Ios Hints" href="http://blog.ioshints.info/search/label/EEM">IOSHINTS blog</a>.</p>
<p>This applet is used to add/delete static arp entries on 6509 core switches in a HSRP pairing, since you can&#8217;t have a static arp configured more than once on the HSRP cluster.  The mac address is a multicast mac address of a windows network load balanced server.</p>
<p><strong>Listing 1</strong></p>
<p><code>event manager applet deletearpvlan234<br />
event syslog occurs 1 pattern "%HSRP-5-STATECHANGE: Vlan234 Grp 1 state Speak -&gt; Standby"<br />
action 0.0 cli command "enable"<br />
action 1.0 cli command "configure terminal"<br />
action 2.0 cli command "no arp vrf SERVERS 192.168.1.100 0100.5e7f.00ac ARPA"<br />
action 4.0 syslog msg "EEM deleted arp entry for 192.168.1.100"</code></p>
<p><code>event manager applet addarpvlan234<br />
event syslog occurs 1 pattern "%HSRP-5-STATECHANGE: Vlan234 Grp 1 state Standby -&gt; Active"<br />
action 0.0 cli command "enable"<br />
action 1.0 cli command "configure terminal"<br />
action 2.0 cli command "arp vrf SERVERS 192.168.1.100 0100.5e7f.00ac ARPA"<br />
action 4.0 syslog msg "EEM added arp entry for 192.168.1.100"</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/365/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=365&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2009/09/11/cisco-embedded-event-manager-applets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
		<item>
		<title>Viewing Checkpoint fw monitor files in Wireshark</title>
		<link>http://networknerd.wordpress.com/2009/08/27/viewing-checkpoint-fw-monitor-files-in-wireshark/</link>
		<comments>http://networknerd.wordpress.com/2009/08/27/viewing-checkpoint-fw-monitor-files-in-wireshark/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 01:48:29 +0000</pubDate>
		<dc:creator>networknerd</dc:creator>
				<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://networknerd.wordpress.com/?p=357</guid>
		<description><![CDATA[Checkpoints fw monitor utility performs packet captures similar to tcpdump and wireshark. Unlike these utilities it operates above layer 2 and contains no mac address information.  It does contain additional information from the firewall on interface and direction. To view this additional information in wireshark some extra configuration is required. Select edit/preferences/protocols/ethernet Check the box [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=357&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Checkpoints fw monitor utility performs packet captures similar to tcpdump and wireshark. Unlike these utilities it operates above layer 2 and contains no mac address information.  It does contain additional information from the firewall on interface and direction.</p>
<p>To view this additional information in wireshark some extra configuration is required.</p>
<ol>
<li>Select edit/preferences/protocols/ethernet</li>
<li>Check the box labelled &#8220;Attempt to interpret as Firewall-1 monitor file&#8221; and press ok</li>
<li>Select edit/preferences/User Interface/columns</li>
<li>Click add to add a new column and name it interface.</li>
<li>From the format dropdown listbox select FW-1 monitor if/direction and press ok</li>
</ol>
<p>Save the text below to a file colorise.txt</p>
<p style="padding-left:30px;"><code># DO NOT EDIT THIS FILE!  It was created by Wireshark<br />
@FW-Mon-i @ fw1.direction contains "i"@[65535,65535,0][0,0,0]<br />
@FW-Mon-I @fw1.direction contains "I"@[37008,61166,37008][0,0,0]<br />
@FW-Mon-o@fw1.direction contains "o"@[44461,55512,59110][0,0,0]<br />
@FW-Mon-O@ fw1.direction contains "O"@[31161,49051,54875][0,0,0]</code></p>
<ol>
<li>Select View/coloring rules</li>
<li>Click import and open the saved file from above</li>
<li>Select the last 4 rules and move them to the top of the list by clicking the up button</li>
<li>Press ok</li>
</ol>
<p>Your now ready to view the fw monitor files in wireshark.</p>
<h2>References</h2>
<p><a href="http://www.cpug.org/forums/off-topic/8625-wireshark-modification-fw-monitor-files.html#post32733">Wireshark modification for FW Monitor files</a></p>
<div id="_mcePaste" class="mcePaste" style="position:absolute;left:-10000px;top:362px;width:1px;height:1px;overflow:hidden;">http://www.cpug.org/forums/off-topic/8625-wireshark-modification-fw-monitor-files.html#post32733</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/networknerd.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/networknerd.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/networknerd.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/networknerd.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/networknerd.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/networknerd.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/networknerd.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/networknerd.wordpress.com/357/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=networknerd.wordpress.com&amp;blog=4592836&amp;post=357&amp;subd=networknerd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://networknerd.wordpress.com/2009/08/27/viewing-checkpoint-fw-monitor-files-in-wireshark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/efd28f9d49151171e4946eb362055f7c?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">networknerd</media:title>
		</media:content>
	</item>
	</channel>
</rss>
