<?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>Perpetual Complexity &#187; Networking</title>
	<atom:link href="http://www.flex.shallwelearn.com/blog/archives/category/networking/feed" rel="self" type="application/rss+xml" />
	<link>http://www.flex.shallwelearn.com/blog</link>
	<description>Visualize, therefore simplified</description>
	<lastBuildDate>Wed, 19 May 2010 15:46:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Capturing Internal Traffic with Virtual Loopback &amp; Wireshark on XP</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/2157</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/2157#comments</comments>
		<pubDate>Tue, 18 May 2010 17:44:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/?p=2157</guid>
		<description><![CDATA[Create Loopback Interface on Windows XP Select “Start”-&#62;“Settings”-&#62;”Control Panel” Double click “Add Hardware” Click “Next” and select “Yes, I have already connected to the hardware”. Select “Add a new hardware device” and click “Next”.  Click “Install the hardware that I manually select from a list(Advanced)” and then “Next”. Follow the following screenshots to finish installing [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-size: medium;">Create Loopback Interface on Windows XP</span></strong></p>
<ol>
<li>Select “Start”-&gt;“Settings”-&gt;”Control Panel”</li>
</ol>
<p><a name="graphic1C"></a><img src="http://docs.google.com/File?id=df64mjxr_1662g3jb7vfp_b" alt="C:\dev\wireshark\images\Image-0000.png  C:\dev\wireshark\images\Image-0000.png" width="409" height="98" /></p>
<p><span id="more-2157"></span></p>
<ol>
<li>Double click “Add Hardware”</li>
</ol>
<p><a name="graphic1D"></a><img src="http://docs.google.com/File?id=df64mjxr_1663ct36mmgz_b" alt="C:\dev\wireshark\images\Image-0001.png  C:\dev\wireshark\images\Image-0001.png" width="263" height="103" /></p>
<ol>
<li>Click “Next” and select “Yes, I have already connected to the hardware”.</li>
</ol>
<p><a name="graphic1E"></a><img src="http://docs.google.com/File?id=df64mjxr_1664gvvw3kcm_b" alt="C:\dev\wireshark\images\Image-0003.png  C:\dev\wireshark\images\Image-0003.png" width="501" height="387" /></p>
<ol>
<li>Select “Add a new hardware device” and click “Next”. </li>
</ol>
<p><a name="graphic1F"></a><img src="http://docs.google.com/File?id=df64mjxr_1665c4n97tdz_b" alt="C:\dev\wireshark\images\Image-0005.png  C:\dev\wireshark\images\Image-0005.png" width="503" height="386" /></p>
<ol>
<li>Click “Install the hardware that I manually select from a list(Advanced)” and then “Next”.</li>
</ol>
<p><a name="graphic20"></a><img src="http://docs.google.com/File?id=df64mjxr_1666cqd6zwg6_b" alt="C:\dev\wireshark\images\Image-0006.png  C:\dev\wireshark\images\Image-0006.png" width="504" height="383" /></p>
<ol>
<li>Follow the following screenshots to finish installing the loopback device</li>
</ol>
<p><a name="graphic21"></a><img src="http://docs.google.com/File?id=df64mjxr_1667gnv8jw8p_b" alt="C:\dev\wireshark\images\Image-0007.png  C:\dev\wireshark\images\Image-0007.png" width="503" height="385" /></p>
<p><a name="graphic22"></a><img src="http://docs.google.com/File?id=df64mjxr_1668f5k9kmcp_b" alt="C:\dev\wireshark\images\Image-0008.png  C:\dev\wireshark\images\Image-0008.png" width="504" height="384" /></p>
<p><a name="graphic23"></a><img src="http://docs.google.com/File?id=df64mjxr_1669dk2xw3cw_b" alt="C:\dev\wireshark\images\Image-0009.png  C:\dev\wireshark\images\Image-0009.png" width="503" height="384" /> <a name="graphic24"></a><img src="http://docs.google.com/File?id=df64mjxr_1670f72cfzg2_b" alt="C:\dev\wireshark\images\Image-0010.png  C:\dev\wireshark\images\Image-0010.png" width="503" height="386" /></p>
<ol>
<li>Follow the following screenshots to configure the loopback device.  I give the device an IP of 192.168.100.2, with network mask of 255.255.255.0, and gateway of 192.168.100.1.</li>
</ol>
<p><a name="graphic25"></a><img src="http://docs.google.com/File?id=df64mjxr_1671hsjdg23t_b" alt="C:\dev\wireshark\images\Image-0011.png  C:\dev\wireshark\images\Image-0011.png" width="405" height="93" /></p>
<p><a name="graphic26"></a><img src="http://docs.google.com/File?id=df64mjxr_1672th5x3zfv_b" alt="C:\dev\wireshark\images\Image-0012.png  C:\dev\wireshark\images\Image-0012.png" width="274" height="273" /></p>
<p><a name="graphic27"></a><img src="http://docs.google.com/File?id=df64mjxr_1673ftr3rgc9_b" alt="C:\dev\wireshark\images\Image-0013.png  C:\dev\wireshark\images\Image-0013.png" width="366" height="326" /></p>
<p>Assign IP address, subnet mask, and default gateway.</p>
<p><a name="graphic28"></a><img src="http://docs.google.com/File?id=df64mjxr_1674drqmx6fq_b" alt="C:\dev\wireshark\images\Image-0014.png  C:\dev\wireshark\images\Image-0014.png" width="406" height="382" /></p>
<p>Run “ipconfig /all” to get the mac ID assigned to this loopback device . Windows assign 02-00-4C-4F-4F-50 for my MAC ID.</p>
<p>Add the ARP entry for this loopback device, using the MAC ID from last step.</p>
<p><a name="graphic2A"></a><img src="http://docs.google.com/File?id=df64mjxr_1676hcx4rccz_b" alt="C:\dev\wireshark\images\Image-0016.png  C:\dev\wireshark\images\Image-0016.png" width="598" height="81" /></p>
<p>Testing this device by pinging it.</p>
<p><a name="graphic2B"></a><img src="http://docs.google.com/File?id=df64mjxr_1677d8hhpzg2_b" alt="C:\dev\wireshark\images\Image-0017.png  C:\dev\wireshark\images\Image-0017.png" width="452" height="168" /></p>
<ol>
<li>Now you should be able to see this device and monitor traffic through this device from Wireshark.</li>
</ol>
<p><a name="graphic2C"></a><img src="http://docs.google.com/File?id=df64mjxr_1678fnw46fc4_b" alt="C:\dev\wireshark\images\Image-0018.png  C:\dev\wireshark\images\Image-0018.png" width="589" height="191" /></p>
<p><a name="graphic2D"></a><img src="http://docs.google.com/File?id=df64mjxr_1679gs4b96d8_b" alt="C:\dev\wireshark\images\Image-0019.png  C:\dev\wireshark\images\Image-0019.png" width="528" height="226" /></p>
<p><strong><span style="font-size: medium;">Remove the Loopback Device</span></strong></p>
<p><a name="graphic2E"></a><img src="http://docs.google.com/File?id=df64mjxr_1680gjxnfzgh_b" alt="C:\dev\wireshark\images\Image-0020.png  C:\dev\wireshark\images\Image-0020.png" width="268" height="195" /></p>
<p><a name="graphic2F"></a><img src="http://docs.google.com/File?id=df64mjxr_1681dmqz2qft_b" alt="C:\dev\wireshark\images\Image-0021.png  C:\dev\wireshark\images\Image-0021.png" width="358" height="137" /></p>
<p><a name="graphic30"></a><img src="http://docs.google.com/File?id=df64mjxr_1682hrkw4xfx_b" alt="C:\dev\wireshark\images\Image-0022.png  C:\dev\wireshark\images\Image-0022.png" width="311" height="397" /></p>
<p><strong><span style="font-size: medium;">Troubleshooting</span></strong></p>
<p><strong>Problem 1</strong>: WIreshark could not detect the loopback device</p>
<p>Solution: If you don’t see the loopback device after clicking the “List the available capture interfaces” button. Try restart your machine.</p>
<p><a name="graphic31"></a><img src="http://docs.google.com/File?id=df64mjxr_1683vg5frvhp_b" alt="C:\dev\wireshark\images\Image-0030.png  C:\dev\wireshark\images\Image-0030.png" width="226" height="100" /></p>
<p>When it works, Wireshark should detect the loopback device and display it in its Capture Interfaces list.</p>
<p><a name="graphic32"></a><img src="http://docs.google.com/File?id=df64mjxr_1684hh6nnvgx_b" alt="C:\dev\wireshark\images\Image-0029.png  C:\dev\wireshark\images\Image-0029.png" width="588" height="189" /></p>
<p><strong>Problem 2</strong>: The loopback interface does show in the Capture Interface list but there is no packets captured!!</p>
<p>Solution:</p>
<ol>
<li>Check the ARP table</li>
</ol>
<p>Make sure there is an entry for the loopback device in the ARP table. To check, type “arp –a” at the command prompt.</p>
<p> <a name="graphic33"></a><img src="http://docs.google.com/File?id=df64mjxr_1685rhhvxkcw_b" alt="C:\dev\wireshark\images\Image-0033.png  C:\dev\wireshark\images\Image-0033.png" width="474" height="155" /></p>
<p>If there is no entry for the loopback device, add it as followed:</p>
<p><a name="graphic34"></a><img src="http://docs.google.com/File?id=df64mjxr_1686f868xgdr_b" alt="C:\dev\wireshark\images\Image-0032.png  C:\dev\wireshark\images\Image-0032.png" width="592" height="35" /></p>
<ol>
<li>Check the routing table</li>
</ol>
<p>Make sure the packets for 192.168.100.2 is routed corrected to the loopback interface (with 192.168.100.2 IP address). A common mistake is that there is a route of higher priority to the real loopback interface(127.0.0.1).</p>
<p><a name="graphic35"></a><img src="http://docs.google.com/File?id=df64mjxr_1687f8276ksj_b" alt="C:\dev\wireshark\images\Image-0034.png  C:\dev\wireshark\images\Image-0034.png" width="624" height="348" /></p>
<p>To add a static route for packets for 192.168.100.2 to the loopback device, do as followed:</p>
<p><a name="graphic36"></a><img src="http://docs.google.com/File?id=df64mjxr_1688g57d4xpk_b" alt="C:\dev\wireshark\images\Image-0031.png  C:\dev\wireshark\images\Image-0031.png" width="624" height="29" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/2157/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connect PC to Cisco Switch or Router</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/1829</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/1829#comments</comments>
		<pubDate>Tue, 06 Oct 2009 15:47:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/?p=1829</guid>
		<description><![CDATA[To connect a PC which has two network interfaces (one Ethernet and another wireless) to a LAN, you will want to create a default route to the wireless interface, assuming you are using the wiressless network to get to the Internet (WAN). Here is a link on how to set up a default route on [...]]]></description>
			<content:encoded><![CDATA[<p>To connect a PC which has two network interfaces (one Ethernet and another wireless) to a LAN, you will want to create a default route to the wireless interface, assuming you are using the wiressless network to get to the Internet (WAN). Here is a link on how to set up a default route on a Windows machine:</p>
<p>Here is the command to add a default route(assume 192.168.201.1 is your WAN gateway)</p>
<pre>route add 0.0.0.0 mask 0.0.0.0 192.168.201.1</pre>
<p>You will also need to add a static route so that all traffic going to LAN are directed to the LAN gateway, instead of to WAN. Here is how:</p>
<pre>route add 10.100.0.0 mask 255.255.0.0 10.100.0.1</pre>
<p>Useful links:</p>
<p>http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/1829/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install CBQoS(Class-Based Quality-of-Service) Parser and Logger</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/1404</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/1404#comments</comments>
		<pubDate>Fri, 14 Aug 2009 00:24:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[My Projects]]></category>
		<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/?p=1404</guid>
		<description><![CDATA[This article shows one how to set up a PC to run CBQoS Parser and Logger. It covers setting up Net-SNMP, mySQL, ActivePerl, and Perl-based CBQoS Parser and Logger. Step 1: Install Net-SNMP This step is required for IANM server as well as for data collecting laptops. Step 1.1) Step 1.2) Step 1.3) Step 1.4) [...]]]></description>
			<content:encoded><![CDATA[<p>This article shows one how to set up a PC to run CBQoS Parser and Logger. It covers setting up Net-SNMP, mySQL, ActivePerl, and Perl-based CBQoS Parser and Logger.</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1303gjvrfrdv_b" alt="" width="461" height="324" /></p>
<p><span id="more-1404"></span></p>
<p>Step 1: Install <a href="http://net-snmp.sourceforge.net/download.html">Net-SNMP</a></p>
<p>This step is required for IANM server as well as for data collecting laptops.</p>
<p>Step 1.1)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1235djmd6ngt_b" alt="" /></p>
<p>Step 1.2)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1236cbmrppc9_b" alt="" /></p>
<p>Step 1.3)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1237n4t2mvdk_b" alt="" /></p>
<p>Step 1.4)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1238dgv4wkd8_b" alt="" /></p>
<p>Step 1.5)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1239gv56fkf6_b" alt="" /></p>
<p>Step 1.6)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1240gtdjvpd4_b" alt="" /></p>
<p>Step 2: Install <a href="http://dev.mysql.com/downloads/">mySQL database server</a></p>
<p>This step is NOT required for IANM server which already has mySQL installed. This step is required for client machines, lab laptops for examples, to act as a data collector.</p>
<p>Step 2.1 ) Unzip mysql-4.1.22-win32.zip to mysql-4.1.22-win32, in which there is a Setup.exe. Double click Setup.exe</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1242gwcsrzf5_b" alt="" /></p>
<p>Step 2.2)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1243ccvq83gb_b" alt="" /></p>
<p>Step 2.3)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1244f5wg55dn_b" alt="" /></p>
<p>Step 2.4)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1245fbgrkncj_b" alt="" /></p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1246d87cdv4d_b" alt="" /></p>
<p>Step 2.5)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1247cq8848g2_b" alt="" /></p>
<p>Step 2.6)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1248gz4wf2hs_b" alt="" /></p>
<p>Step 2.7)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1249f39xzqfx_b" alt="" /></p>
<p>Step 2.8)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1250dcvhm8gr_b" alt="" /></p>
<p>Step 2.9)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1251gdjjjdg3_b" alt="" /></p>
<p>Step 2.10)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1252hb4hdgc6_b" alt="" /></p>
<p>Step 2.11)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1253d92bjrfs_b" alt="" /></p>
<p>Step 2.12)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1254cm4hrhfb_b" alt="" /></p>
<p>Step 2.13)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1255cmp4djd9_b" alt="" /></p>
<p>Step 2.14)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1256qftxjpc5_b" alt="" /></p>
<p>Step 2.15)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1257f4v3qkcs_b" alt="" /></p>
<p>Step 2.16)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1258fczfqfcb_b" alt="" /></p>
<p>Step 2.17)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1259c3zf27dv_b" alt="" /></p>
<p>Step 2.18)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1260gncpvzch_b" alt="" /></p>
<p>Step 2.19)</p>
<p>Then open a DOS window to verify the installation is working. Assume root password is “22secure”.</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1261c8msgckr_b" alt="" /></p>
<p>(Optional) Install <a href="http://www.webyog.com/en/downloads.php">SQLyog</a>, the mySQL database browser</p>
<p>Step 2.20) Double click SQLyog523.exe, then select “Next” to proceed.</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1263cr5r7nf7_b" alt="" /></p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1264fzzwphgm_b" alt="" /></p>
<p>Step 2.21) Select “I accept …” then click “Next” to proceed</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1265g737z3gn_b" alt="" /></p>
<p>Step 2.22) Keep all options checked and click “Next”</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_12669sfx3gfr_b" alt="" /></p>
<p>Step 2.23) Select installation directory and then click “Next”</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1267hcv682dr_b" alt="" /></p>
<p>Step 2.24) Click “Next” to proceed</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_12688qmkm4cc_b" alt="" /></p>
<p>Step 2.25) Click “Finish” to start running SQLyog</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1269f89fwrhp_b" alt="" /></p>
<p>Step 2.26) Click “New” to create a new connection profile</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_12703g2xgmhq_b" alt="" /></p>
<p>Step 2.27) Enter the new connection name</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1271jjv7thcv_b" alt="" /></p>
<p>Step 2.28)</p>
<p>To view the local database server, enter password you created in Step 2.16. You may leave the “Database(s)” field blank. Then click “Connect”.</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1272gjchpzcm_b" alt="" /></p>
<p>Click “Yes” to save the connection profile change.</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1273dq5njbv6_b" alt="" /></p>
<p>Two databases shown (mysql and test) are created when mySQL database server was installed.</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1274hs7wbhg7_b" alt="" /></p>
<p>Step 3: Install <a href="http://www.activestate.com/activeperl/downloads/">ActivePerl</a>This step is required for IANM server as well as for data collecting laptops.</p>
<p>Step 3.1) Double click ActivePerl-5.8.8.820-MSWin32-x86-274739.msi</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1289f6qnn7dp_b" alt="" /></p>
<p>Step 3.2)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1290p4wk5gd5_b" alt="" /></p>
<p>Step 3.3)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1291g62cmrcv_b" alt="" /></p>
<p>Step 3.4)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1292d79mxdgr_b" alt="" /></p>
<p>Step 3.5</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1293fpmwr9dt_b" alt="" />)</p>
<p>Step 3.6)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1294w2t6j4fv_b" alt="" /></p>
<p>Step 3.7)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1295hqrwmss6_b" alt="" /></p>
<p>Step 3.8) Installed additional Perl modules, unzip LibFiles.zip to the folder Perl was installed to. Since I installed Perl to D:\Perl in step 3.3, I would unzip Perl.zip to D:\Perl</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1296gqsqkwdb_b" alt="" /></p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1297hkzxksfb_b" alt="" /></p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1298f7w52xgn_b" alt="" /></p>
<p>Select “Yes To All”</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1299dzg9zdf6_b" alt="" /></p>
<p>Step 4: Install tkCiscoQosMibParser.pl and CiscoQosBasedMIB.pm by unzipping Qos.code.zip, say C:\.</p>
<p>Step 4.1)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1300f424dzht_b" alt="" /></p>
<p>Step 4.2)</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1301cxh4b2c5_b" alt="" /></p>
<p>Step 4.3) Then double click tkCiscoQosMibParser.pl</p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1302d5jq2phn_b" alt="" /></p>
<p><img src="https://docs.google.com/File?id=df64mjxr_1303gjvrfrdv_b" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/1404/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CBQoS (Class-Based Quality-of-Service) Parser and Logger</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/1341</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/1341#comments</comments>
		<pubDate>Thu, 13 Aug 2009 22:20:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/archives/1341</guid>
		<description><![CDATA[CBQoS Parser and Logger is a Perl-based solution that parses CBQoS MIB query result and allow users to log CBQoS information. CBQoS, Cisco Class-Based Quality-of-Service, can help analyze the pre-policy, post-policy and the drop within each class of traffic on your network and help network administrators make more informed QoS policy decisions. In addition,  CBQoS [...]]]></description>
			<content:encoded><![CDATA[<p>CBQoS Parser and Logger is a Perl-based solution that parses CBQoS MIB query result and allow users to log CBQoS information.</p>
<p><strong><em>CBQoS, Cisco Class-Based Quality-of-Service,</em></strong> can help analyze the pre-policy, post-policy and the drop  within each class of traffic on your network and help network administrators  make more informed QoS policy decisions. In addition,  CBQoS can also provide queuing statistics on each  class of traffic.</p>
<p><span style="font-size:10pt">There are two main parts to <strong>Perl-Based CBQoS</strong> <strong>Logger</strong>: <em>parser</em> and <em>recorder</em>. The <em>parser</em> parses the CiscoQosBasedMIB and obtains information of policy maps applied to each interface, as well as that of the class maps within each policy map. Specifically, the parser obtains the various indices (such as policy indices, object indices, and configuration indices) required to construct the SNMP OID used by the <em>recorder. </em>WIth the SNMP OIDs, the recorder makes the SNMP request to the device and records the result in mySQL database as well as in Excel files. This tool can easily be extended to poll all statistics stored in CiscoQosBasedMIB, but currently it only supports polling the <strong><em>cbQosREDRandomDropByte</em></strong>, which is described in the MIB:<br />
</span></p>
<p><span id="more-1341"></span></p>
<p><span style="font-size:10pt">&#8220;The lower 32 bits count of bytes dropped when the number of packets in the associated queue was greater than the minimum threshold and less than the maximum threshold.&#8221;<br />
</span></p>
<p><span style="font-size:10pt"><strong>Step 1: </strong>To run the parser, go to the installation folder and double click tkCiscoQosMibParser.pl.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop1.png" alt="" /></p>
<p><span style="font-size:10pt"><strong>Step2:<br />
</strong></span></p>
<p><span style="font-size:10pt">To find the &#8220;Policy Index&#8221;, and &#8220;RED Index&#8221;, one needs to click &#8220;Parse MIB&#8221; first to parse the CiscoQosBasedMIB.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop2.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop3.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop4.png" alt="" /></p>
<p><span style="font-size:10pt"><strong>Step 3:<br />
</strong></span></p>
<p><span style="font-size:10pt">Scroll to the interface you are interested. In our case, we are interested in the class map &#8220;class-default&#8221; in the policy map applied to &#8220;Serial2/0&#8243;. This policy map has a policy index of &#8220;1115&#8243; and RED (Random Early Detection) configuration under class map &#8220;class-default&#8221; has an object index of &#8220;1146&#8243;. These two<br />
</span></p>
<p><span style="font-size:10pt">numbers will be used in the next step.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop5.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop6.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop7.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop8.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop9.png" alt="" /></p>
<p><strong>Step 4:<br />
</strong></p>
<p><span style="font-size:10pt"> &#8220;SNMP Host IP&#8221;, enter the IP of the device you wish to poll from; at &#8220;version&#8221;, enter the SNMP version number (1, 2c, or 3); at &#8220;SNMP Community String&#8221;, enter the SNMP read community string; at &#8220;mySQL Host IP&#8221;, enter the IP of the host on which mySQL is installed; at &#8220;User Name&#8221;, enter mySQL user name (we use root here, since no other user</span><br />
<span style="font-size:10pt">has been created); at &#8220;Password&#8221;, enter mySQL user password; at &#8220;Policy Index&#8221; field, enter &#8220;1115&#8243;, which was obtained in Step 3; at &#8220;RED Index&#8221; field, enter &#8220;1146&#8243;, which was also obtained in Step 3; at &#8220;Frequency(milliseconds)&#8221;, enter how often you would like to poll (in this case, we are polling every 5000 milliseconds or every 5 seconds); at &#8220;Excel File Name&#8221;, enter the file name you would like to log to ( the .xls extension is not needed ). After all fields have been filled in, click &#8220;Start Recording&#8221;.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop10.png" alt="" /></p>
<p><span style="font-size:10pt">To stop, click &#8220;Stop Recording&#8221;.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop11.png" alt="" /></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop12.png" alt="" /></p>
<p><span style="font-size:10pt">Now we are ready to examine the log. Go to the CiscoQosMibParser folder, and you should find a file named &#8220;file_name.xls&#8221; there, or &lt;file_name&gt;.xls, &lt;file_name&gt; being the file name you entered.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop13.png" alt="" /></p>
<p><span style="font-size:10pt">Open &#8220;file_name.xls&#8221; and one sees the <em>cbQosREDRandomDropByte</em> value and the recorded time.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop14.png" alt="" /></p>
<p><span style="font-size:10pt">To examine the database, run SQLyog and select the connection profile created in the installation process, described in the &#8220;Installation.doc&#8221;. Click &#8220;Connect&#8221;.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop15.png" alt="" /></p>
<p><span style="font-size:10pt">One can see that a new database name &#8220;ianm_cisco_qos_based&#8221; was created. Expand the &#8220;ianm_cisco_qos_based&#8221; tree.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop16.png" alt="" /></p>
<p><span style="font-size:10pt">Then you should see a list of tables created in this database. Since we&#8217;ve only polled for the <em>cbQosREDRandomDropByte</em> with DSCP 22, only one table was created. To view the data, click the tab labeled &#8220;<span style="text-decoration: underline;">3</span> Table Data&#8221;, located at the lower right-hand corner.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop17.png" alt="" /></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop18.png" alt="" /></p>
<p><span style="font-size:10pt">To <strong>RESET</strong> the logged data before each test, click &#8220;Clear Database&#8221; button. Note that by clicking this button, only the log database will be reset, not any other databases in mySQL database server.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop19.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop20.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop21.png" alt="" /></p>
<p><span style="font-size:10pt">Click &#8220;Yes&#8221;.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop22.png" alt="" /></p>
<p><span style="font-size:10pt">Go back to SQLyog and select &#8220;ianm_qos_based_mib&#8221; database, then select &#8220;Edit&#8221; from the menu, then select &#8220;Refresh ObjectBrowser&#8221; from the dropped-down panel. Hit Enter.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop23.png" alt="" /></p>
<p><span style="font-size:10pt">Now it shows that there are no more tables in &#8220;ianm_cisco_qos_based&#8221;. Also click the &#8220;Refresh&#8221; button to refresh the data view.<br />
</span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop24.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop25.png" alt="" /><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081309-2059-perlbasedop26.png" alt="" /></p>
<p><span style="font-size:10pt">For Excel files, if you use the same file name, then the result of the second test will overwrite the result of the first test. Therefore, there is no action required for resetting Excel files.<br />
</span></p>
<p><span style="font-size:10pt">ERROR CHECKING:<br />
</span></p>
<p><span style="font-size:10pt">Currently, there are minimal error checking. This tool assumes that you know the info pertaining to your SNMP host and mySQL database server. However, though users may make mistakes in those fields required to run CiscoQosMibParser,<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/1341/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SNMP Intro</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/1232</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/1232#comments</comments>
		<pubDate>Wed, 12 Aug 2009 22:39:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[SNMP]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/archives/1232</guid>
		<description><![CDATA[What is SNMP? SNMP stands for Simple Network Management Protocol. It is used in network management systems to monitor network devices. It is part of Internet Protocol (IP) software suite. Using SNMP, one can monitor and control a network device. Moreover, one can receive notification from a network device. A SNMP-managed system consists of three [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-left: 144pt"><span style="font-size:14pt">What is SNMP?<br />
</span></p>
<p>SNMP stands for Simple Network Management Protocol. It is used in network management systems to monitor network devices. It is part of Internet Protocol (IP) software suite.</p>
<p>Using SNMP, one can monitor and control a network device. Moreover, one can receive notification from a network device. A SNMP-managed system consists of three components: <strong>SNMP agents, Managed Devices, and Network Management Systems</strong>. A SNMP agent is a software process that manages network information on a Managed Device. A Managed Device is also called a SNMP-enabled device; routers, switches, PC, lab tops, or even smart phones are all examples of Managed Devices. A Network Management System is a computer that polls from Managed Devices and organizes the data in either textual or visual form.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081209-2239-snmpintro3.png" alt="" width="284" height="276" /></p>
<p><span id="more-1232"></span></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081209-2239-snmpintro1.png" alt="" /></p>
<p> </p>
<p style="background: #f8fcff">Each Managed Device has one or more MIBs, which stand for Management Information Base. A <strong>management information base (MIB)</strong> is a type of database used to manage the devices in a communications network. It comprises a collection of objects to manage network devices such as routers and switches in a network.</p>
<p style="background: #f8fcff">Objects in the MIB are defined using a subset of Abstract Syntax Notation One (<a title="ASN.1" href="http://en.wikipedia.org/wiki/ASN.1">ASN.1</a>) called &#8220;Structure of Management Information Version 2 (SMIv2)&#8221;. The software that performs the parsing is a MIB compiler.</p>
<p style="background: #f8fcff">The database is hierarchical (tree-structured) and entries are addressed through object identifiers. Three most notable MIBs are RFC1155-MIB, RFC1157-MIB, and RFC1213-MIB. These three MIBs are from three RFCs: <a title="http://tools.ietf.org/html/rfc1155" href="http://tools.ietf.org/html/rfc1155">RFC 1155</a>, &#8220;Structure and Identification of Management Information for TCP/IP based internets&#8221;, and its two companions, <a title="http://tools.ietf.org/html/rfc1213" href="http://tools.ietf.org/html/rfc1213">RFC 1213</a>, &#8220;Management Information Base for Network Management of TCP/IP-based internets&#8221;, and <a title="http://tools.ietf.org/html/rfc1157" href="http://tools.ietf.org/html/rfc1157">RFC 1157</a>, &#8220;A Simple Network Management Protocol&#8221;.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081209-2239-snmpintro2.png" alt="" /></p>
<p> </p>
<p> </p>
<p> </p>
<p>This is an example of a SNMP-enabled network. The PC with pale green shadow is a Network Management System in this network (there could be more than one NMS). In this diagram, there are four Managed Devices or SNMP-enabled devices: switch, S0 router, S1 router, and the PC in 219.17.100.0 network.</p>
<p> </p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/08/081209-2239-snmpintro3.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/1232/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Set up Net-SNMP on Windows</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/841</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/841#comments</comments>
		<pubDate>Sat, 13 Jun 2009 13:46:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/archives/841</guid>
		<description><![CDATA[This article shows you how to turn your Windows box into an SNMP-enabled host, using Net-SNMP. Step 1: Installation Obtain installation (binary) package from Net-SNMP site and install using all default setting. By default, the Net-SNMP is installed under C:/usr.  Follow the list of snapshots below to download and install the latest stable version of Net-SNMP. Step [...]]]></description>
			<content:encoded><![CDATA[<p>This article shows you how to turn your Windows box into an SNMP-enabled host, using Net-SNMP.<span id="more-841"></span></p>
<h2>Step 1: Installation</h2>
<p>Obtain installation (binary) package from <a href="http://www.net-snmp.org">Net-SNMP</a> site and install using all default setting. By default, the Net-SNMP is installed under C:/usr.  Follow the list of snapshots below to download and install the latest stable version of Net-SNMP.</p>
<h2>Step 2: Configuration</h2>
<p>Add Net-SNMP to the path. Go to &#8220;Control Panel&#8221;-&gt;&#8221;Performance and Maintenance&#8221;-&gt;&#8221;System&#8221;. Click &#8220;Advanced&#8221; Tab. Then click &#8220;Environment Variables&#8221;. From System Variables list, select Path, then click &#8220;Edit&#8221; button. Append &#8220;C:net-snmpbin&#8221; to Path variable value. Then click &#8220;OK&#8221;-&gt;&#8221;OK&#8221;-&gt;&#8221;OK&#8221; to save.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm14.png" alt="" /></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm15.png" alt="" /></p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm16.png" alt="" /></p>
<p>Select &#8220;Start&#8221;-&gt;&#8221;Run&#8221; to open a DOS prompt. Then at the prompt, type &#8220;snmpconf –i&#8221;. Then select C:/net-snmp/etc/snmp/snmp.conf to read the default setting in.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm17.png" alt="" /></p>
<p>Select snmpd.conf, which is configuration file for the Net-SNMP SNMP agent. It&#8217;s documented on this <a href="http://www.net-snmp.org/docs/man/snmpd.conf.html">SNMPD.CONF</a> page. The snmp.conf file the configuration file for the Net-SNMP applications and it&#8217;s documented on this <a href="http://www.net-snmp.org/docs/man/snmp.conf.html">SNMP.CONF</a> page.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm18.png" alt="" /></p>
<p>The most basic configuration is to set up read and write communities and community strings. To do so, select 1 for &#8220;Access Control Setup&#8221;.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm19.png" alt="" /></p>
<p>Select &#8220;<em>3: a SNMPv1/SNMPv2c read-only access community name</em>&#8220;. Hit Return key.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm20.png" alt="" /></p>
<p>Enter &#8220;<em>public</em>&#8221; as the community string; you can enter any string you like. The community string works a bit like password. Then enter nothing for both &#8220;the hostname or network address to accept…&#8221; and for &#8220;The OID that this community ….&#8221;. By entering nothing, we specify that we will accept SNMP queries from all hostnames and all network addresses and that this community can view all MIBs installed on this SNMP agent.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm21.png" alt="" /></p>
<p>Select &#8220;<em>4: a SNMPv1/SNMPv2c read-write access community name</em>&#8220;. Hit Return key.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm22.png" alt="" /></p>
<p>Enter &#8220;public&#8221; as the community string. Then enter nothing for both &#8220;the hostname or network address to accept…&#8221; and for &#8220;The OID that this community ….&#8221;. By entering nothing, we specify that we will accept SNMP read-write queries for this community from all hostnames and all network addresses and that this community can view all MIBs installed on this SNMP agent.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm23.png" alt="" /></p>
<p>To exit and save snmpd.conf, enter &#8220;finished&#8221; -&gt; &#8220;finished&#8221; -&gt; &#8220;quit&#8221;.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm24.png" alt="" /></p>
<p>To verify the Net-SNMP has been configured correctly, go to C:net-snmpbin and double click &#8220;snmpd.exe&#8221; to run the SNMP agent.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm25.png" alt="" /></p>
<p>You may see this warning message because SNMPD would try to bind to several TCP ports (161 for general SNMP messages and 162 for trap messages), just click &#8220;Unblock&#8221;. If you are not the admin of your machine, you might want to ask your admin whether you can run a SNMP agent on your machine.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm26.png" alt="" /></p>
<p>You should see a terminal that looks like this. This is the log windows of snmpd.exe. Only close it if you want to kill snmpd.exe.</p>
<p><img src="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2009/06/061309-1344-setupnetsnm27.png" alt="" /></p>
<p>Now you are ready to poll network info from your SNMP-enabled box! At the prompt, type &#8220;snmpwalk –v 2c –c public localhost&#8221;. The &#8220;snmpwalk&#8221; command retrieves a subtree of management values using SNMP GETNEXT requests. It&#8217;s syntax is as followed:</p>
<p><strong>snmpwalk</strong> [APPLICATION OPTIONS] [COMMON OPTIONS] [OID] <a name="lbAD"></a></p>
<p>If no argument is given, <strong>snmpwalk</strong> will search the subtree rooted at SNMPv2-SMI::mib-2. The &#8220;-v 2c&#8221; option tells snmpwalk to use SNMP version 2c, whereas the &#8220;-c public&#8221; option specifies the public community string. Lastly, &#8220;localhost&#8221; option tells snmpwalk to query from localhost.</p>
<table border="0" width="99%" bgcolor="#e0e0e0">
<tbody>
<tr>
<td>
<pre>C:\usr\etc\snmp&gt; <strong>snmpwalk -v 2c -c public localhost</strong></pre>
</td>
</tr>
</tbody>
</table>
<p>To set up SNMPv3 security, here is a short instruction, thanks to this <a href="http://www.netadmintools.com/art488.html">article </a>on netadmintools.com. First, add the following two lines to snmpd.conf</p>
<table border="0" width="99%" bgcolor="#e0e0e0">
<tbody>
<tr>
<td>
<pre>createUser jess MD5 "jess_password" DES
rouser jess</pre>
</td>
</tr>
</tbody>
</table>
<p>Make sure you restart the Net-SNMP Agent service after these changes. This will set up a read only user jess that will authenticate with the passphrase <em>jess_password </em>using MD5/DES for encryption. Note that the password is available in plain text in the file, unlike with the GNU/Linux configuration; however, the traffic is still encrypted. Now we can get the sysUpTime, how long snmpd has been running.</p>
<table border="0" width="99%" bgcolor="#e0e0e0">
<tbody>
<tr>
<td>
<pre>C:\usr\etc\snmp&gt; <strong>snmpget -v 3 -u jess -l authNoPriv -a MD5 -A jess_password localhost sysUpTime.0 </strong></pre>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/841/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Demo Video</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/746</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/746#comments</comments>
		<pubDate>Fri, 12 Jun 2009 16:31:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/?p=746</guid>
		<description><![CDATA[This is the video recording of the partial demo I did for my Quality of Service (QoS) Flex-Java application. QoS_ExplorerDemo/QoSConfigDemo.swf&#8217; >]]></description>
			<content:encoded><![CDATA[<p>This is the video recording of the partial demo I did for my Quality of Service (QoS) Flex-Java application.<br />
<span id="more-746"></span></p>
<div class="flvPlayer">				<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="600" height="620"><param name="movie" value="https://media.dreamhost.com/mediaplayer.swf?file=QoS_ExplorerDemo/QoSConfigDemo.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="https://media.dreamhost.com/mediaplayer.swf?file=QoS_ExplorerDemo/QoSConfigDemo.swf" quality="high" wmode="transparent" width="600" height="620" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
				</object></div>
<p>QoS_ExplorerDemo/QoSConfigDemo.swf&#8217; ></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/746/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Port QoSExplorer from Perl to Java</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/57</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/57#comments</comments>
		<pubDate>Mon, 06 Aug 2007 08:52:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/archives/57</guid>
		<description><![CDATA[I want to port my QoSExplorer from Perl to Java. And this blog entry is an effort to document the lessons learned during the process. (NOTE: This is not a complete and clear article so I do apologize if it&#8217;s confusing. It&#8217;s posted mainly for my team members but I am in the process of [...]]]></description>
			<content:encoded><![CDATA[<p>I want to port my QoSExplorer from Perl to Java. And this blog entry is an effort to document the lessons learned during the process. (NOTE: This is not a complete and clear article so I do apologize if it&#8217;s confusing. It&#8217;s posted mainly for my team members but I am in the process of add a Perl-Java series in this blog, so please check back.)</p>
<p><span id="more-57"></span></p>
<p>While porting QoS perl script to Java, I tried these following Java tips:</p>
<p>Access to Class Members: (<a href="http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html">Sun Tutorial</a>), Reflection Java Array (<a href="http://www.java2s.com/Code/Java/Language-Basics/ArrayReflectioncreateinstance.htm">Java2s page</a>), HashMap (<a href="http://www.java-tips.org/java-se-tips/java.util/how-to-use-of-hashmap.html">Example</a>), enum: (<a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html">Sun tutorial</a>), <a href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html">Naming convention</a>, <a href="http://www.java2s.com/Code/Java/Regular-Expressions/JavaRegularExpressionSplittext.htm">Split Text</a>, SNMP4J open source library ( <a href="http://www.snmp4j.org/doc/index.html">JavaDoc </a> ), <a href="http://www.rgagnon.com/javadetails/java-0004.html">Type Conversion</a> <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/CharSequence.html">CharSequence Class</a>, Regex remove duplicate white space, <a href="http://lists.agentpp.org/pipermail/snmp4j/2004-November/000210.html">snmpwalk code</a> using SNMP4j, also found Steven R Brandt’s <a href="http://www.javaregex.com/RegexRecipesV1.pdf">Regex tutorial</a> .</p>
<p>Steps to Port Perl-based QosExplorer to Java</p>
<p><strong>1.Create a Enum type to represent Cisco mapping from an integer to a object type</strong><br />
<code><br />
my %hash_QosType = (<br />
'1' =&gt; "policymap",<br />
'2' =&gt; "classmap",<br />
'3' =&gt; "matchStatement",<br />
'4' =&gt; "queueing",<br />
'5' =&gt; "randomDetect",<br />
'6' =&gt; "trafficShaping",<br />
'7' =&gt; "police",<br />
'8' =&gt; "set"<br />
);</code></p>
<p>Helpful links: <a href="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/ref-126b.htm">Eclipse Enum Wizard</a>, <a href="http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html">Sun&#8217;s Enums page</a>, and <a href="http://mindprod.com/jgloss/final.html">final keyword</a>,</p>
<p><strong>2. Create an empty project using Eclipse.</strong></p>
<p><strong>3. Create a ssc.snmp.qos.Node class </strong><br />
<strong>4. Create a  ssc.snmp.qos.Interface class</strong></p>
<p><strong>5. Create a ssc.snmp.qos.policyMap class</strong></p>
<p><strong>6. Create a ssc.snmp.qos.ClassMap class</strong></p>
<p><strong>7. Create a ssc.snmp.qos.MIBParser class (main class to parse CiscoClassBasedQoSMIB.</strong></p>
<p>Need to create Java equivalent for the following previously global variables:<br />
<code><br />
my %hash_ifDescr;<br />
my %hash_obPolicyMap;<br />
my %hash_obClassMap;<br />
my %hash_obInterface;<br />
my %hash_cbQosPolicyIndex;<br />
my %hash_cbQosPolicyMapName;<br />
my %hash_cbQosCMName;<br />
my %hash_cbQosParentObjectsIndex;<br />
my %hash_cbQosConfigIndex;<br />
my $hash_RED_CM_mapping;<br />
my %hash_CM_PM_mapping;<br />
my %hash_QUE_CM_mapping;<br />
</code></p>
<p>java.util.HashMap(<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html">doc</a>, <a href="http://www.exampledepot.com/egs/java.util/coll_CreateMap.html">sample</a>) is the choice.</p>
<p>For functions<br />
<code><br />
sub print_hash {}<br />
sub print_hash_interface{}<br />
sub print_ClassMap {}<br />
sub print_PolicyMap {}<br />
sub print_hash_PolicyMap{}<br />
</code></p>
<p>I should be able to just use HashMap::toString function.</p>
<p>I will refer to this <a href="http://www.exampledepot.com/egs/java.util.regex/ParseLine.html">Java Almanac page</a> to implement the following functions to obtain a portion of an OID and the value:</p>
<p><code><br />
sub get_index{}<br />
sub get_val{}<br />
</code></p>
<p>For functions which require SNMP utilities, I have two options: calling an external SNMP agent(Net-SNMP to be exact) or using SNMP4j library.</p>
<p><code><br />
sub getREDTransmitBytes {}<br />
sub getCurrentQueueDepth {}<br />
sub getREDRandomDropBytes {}<br />
sub parseMIB {}<br />
sub SNMP_get {}<br />
sub SNMP_request {}<br />
sub SNMP_request_arr {}<br />
</code></p>
<p>Since this is a proof-of-concept (and short) task, I would call Net-SNMP utilities as external programs first, then in the future replace with SNMP4J (<a href="http://www.snmp4j.org/"> official site</a>, <a href="http://www.snmp4j.org/doc/overview-summary.html">official doc</a>, <a href="http://www.javalobby.org/java/forums/c5266.html">sample1</a>, <a href="http://www.snmp4j.org/doc/org/snmp4j/Snmp.html">sameple2</a>, <a title="CableModemSNMPAgent.java" href="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2007/08/cablemodemsnmpagent.txt">CableModemSNMPAgent.java</a>, <a title="CableModemSNMPAgentImpl.java" href="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2007/08/cablemodemsnmpagentimpl.txt">CableModemSNMPAgentImpl.java</a> ).</p>
<p>I first tried calling snmpget.exe from Java, but the program hanged at the line calling snmpget.exe just would not return. I decided to give SNMP4J a quick try.  I downloaded snmp4j-1.8.2 from snmp4j site and then include snmp4j-1.8.2snmp4jdistlibSNMP4j.jar to my QoSExplorer project&#8217;s library.  Quite happily, I created a snippet of code to use SNMP4j and it worked!!</p>
<p><code><br />
package ssc.snmp.qos;</code></p>
<p>import java.io.IOException;</p>
<p>import org.snmp4j.*;<br />
import org.snmp4j.event.*;<br />
import org.snmp4j.mp.*;<br />
import org.snmp4j.smi.*;<br />
import org.snmp4j.transport.*;</p>
<p>public class QoSExplorer {</p>
<p>public static void main(String[] args) throws IOException {</p>
<p>TransportMapping transport = new DefaultUdpTransportMapping();<br />
Snmp snmp = new Snmp(transport);</p>
<p>// setting up target<br />
CommunityTarget target = new CommunityTarget();</p>
<p>target.setCommunity(new OctetString(&#8220;cndl&#8221;));<br />
Address targetAddress = GenericAddress.parse(&#8220;udp:192.168.15.1/161&#8243;);<br />
target.setAddress(targetAddress);<br />
target.setRetries(2);<br />
target.setTimeout(1500);<br />
target.setVersion(SnmpConstants.version1);<br />
transport.listen();</p>
<p>// creating PDU<br />
PDU pdu = new PDU();<br />
pdu.add(new VariableBinding(new OID(new int[] {1,3,6,1,2,1,1,1})));<br />
pdu.setType(PDU.GETNEXT);<br />
ResponseEvent event = snmp.send(pdu,target, transport); // use synchronous event</p>
<p>System.out.println(&#8220;Received response PDU is: &#8220;+event.getResponse());</p>
<p>}</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/57/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build an existing J2EE project on Windows XP SP2</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/49</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/49#comments</comments>
		<pubDate>Fri, 03 Aug 2007 17:10:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/archives/49</guid>
		<description><![CDATA[I need to set up my Windows laptop to build an existing J2EE project, using maven. This J2EE project uses technology including Hibernate, maven, ANDROMDA, mySQL, JBoss, Design Pattern, and many other J2EE technologies. First I download Maven and following instruction from the Maven download site. To install on Windows 2000/XP 1. Unzip maven-2.0.7-bin.zip to [...]]]></description>
			<content:encoded><![CDATA[<p>I need to set up my Windows laptop to build an existing J2EE project, using maven. This J2EE project uses technology including Hibernate, maven, ANDROMDA, mySQL, JBoss, Design Pattern, and many other J2EE technologies. <span id="more-49"></span></p>
<p>First I download Maven and following instruction from the <a href="http://maven.apache.org/download.html">Maven download site</a>.</p>
<p>To install on Windows 2000/XP</p>
<ul>1. Unzip maven-2.0.7-bin.zip to the directory you wish to install Maven 2.0.7. These instructions assume you chose <em>C:Program FilesApache Software Foundationmaven-2.0.7</em></ul>
<ul>2. Add the bin directory to your path, by opening up the system properties (WinKey + Pause), selecting the &#8220;Advanced&#8221; tab, and the &#8220;Environment Variables&#8221; button, then editing the <em>PATH </em>variable in the user variables. eg. &#8220;<em>C:Program FilesApache Software Foundationmaven-2.0.7bin&#8221;;%PATH%</em>In the same dialog, make sure that JAVA_HOME is set to the location of your JDK, eg. <em>C:Program FilesJavajdk</em></ul>
<ul>3. Run <code>mvn --version </code>to verify that it is correctly installed.</ul>
<p>After installing maven 2.0.7, I continued on with building our project. But got this error:</p>
<blockquote><p><code><br />
C:MDADev&gt;mvn<br />
[INFO] Scanning for projects...<br />
[INFO] ------------------------------------------------------------------------<br />
[ERROR] BUILD FAILURE<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] You must specify at least one goal. Try 'install'<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] For more information, run Maven with the -e switch<br />
[INFO] ------------------------------------------------------------------------<br />
[INFO] Total time: &lt; 1 second<br />
[INFO] Finished at: Fri Aug 03 10:21:50 PDT 2007<br />
[INFO] Final Memory: 1M/2M<br />
[INFO] ------------------------------------------------------------------------<br />
</code></p></blockquote>
<p>So I went back to the original maven version: maven-1.0.2. I obtained maven-1.0.2.zip from <a href="http://archive.apache.org/dist/maven/binaries/">Maven repository site</a>. I also saved a copy <a title="maven-1.0.2.zip" href="http://www.flex.shallwelearn.com/blog/wp-content/uploads/2007/08/maven-102.zip">here</a>. Once downloaded, I unzipped maven-1.0.2.zip to <em>C:Program FilesApache Software Foundationmaven-1.0.2</em>, and changed PATH accordingly. But then I still got this error:</p>
<blockquote><p><code><br />
ERROR: MAVEN_HOME not found in your environment.<br />
Please set the MAVEN_HOME variable in your environment to match the<br />
location of the Maven installation<br />
</code></p></blockquote>
<p>This error is easy to fix by adding MAVEN_HOME environment and set it to <em>C:Program FilesApache Software Foundationmaven-1.0.2</em>.</p>
<p>On with the build. this time, I got a different error:</p>
<blockquote><p><code><br />
C:MDADev&gt;maven<br />
__  __<br />
|  /  |  __ _Apache__ ___<br />
| |/|  / _`  V / -_) '       ~ intelligent projects ~<br />
|_|  |___,_|_/___|_||_|  v. 1.0.2</code></p>
<p>Attempting to download nekohtml-0.9.5.jar.<br />
Error retrieving artifact from [http://www.ibiblio.org/maven/nekohtml/jars/nekohtml-0.9.5.jar<br />
WARNING: Failed to download nekohtml-0.9.5.jar.<br />
Attempting to download commons-jelly-tags-interaction-1.0.jar.</p>
<p>Error retrieving artifact from [http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-tags-interaction-1.0.jar</p>
<p>WARNING: Failed to download commons-jelly-tags-interaction-1.0.jar.<br />
The build cannot continue because of the following unsatisfied dependencies:</p>
<p>nekohtml-0.9.5.jar<br />
commons-jelly-tags-interaction-1.0.jar</p>
<p>Total time: 1 seconds<br />
Finished at: Fri Aug 03 10:32:50 PDT 2007</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/49/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing an Installer for Cisco Class-Based MIB Explorer</title>
		<link>http://www.flex.shallwelearn.com/blog/archives/39</link>
		<comments>http://www.flex.shallwelearn.com/blog/archives/39#comments</comments>
		<pubDate>Fri, 13 Jul 2007 18:57:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network Monitoring]]></category>

		<guid isPermaLink="false">http://www.flex.shallwelearn.com/blog/archives/39</guid>
		<description><![CDATA[I would like to create an installer using NSIS for my Cisco Class-Based MIB Explorer. The installer script will have the following features: 1. Call external installer programs(mySQL, JRE, and NetSNMP) 2. Copy library files to local disk 3. Copy README files to local disk 4. Register itself in the register 5. Create an uninstaller [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to create an installer using NSIS for my Cisco Class-Based MIB Explorer. <span id="more-39"></span></p>
<p>The installer script will have the following features:</p>
<ul>
<li>1. Call external installer programs(mySQL, JRE, and NetSNMP)</li>
<li>2. Copy library files to local disk</li>
<li>3. Copy README files to local disk</li>
<li>4. Register itself in the register</li>
<li>5. Create an uninstaller</li>
</ul>
<p>1. Call external installer programs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flex.shallwelearn.com/blog/archives/39/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
