<?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>ardenpackeer.com &#187; Featured Articles</title>
	<atom:link href="http://ardenpackeer.com/category/featured-articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://ardenpackeer.com</link>
	<description>Helping You Become a Network Ninja</description>
	<lastBuildDate>Thu, 16 Jul 2009 06:23:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tutorial: OSPF Network Types &amp; Frame-Relay Series</title>
		<link>http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-frame-relay-series/</link>
		<comments>http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-frame-relay-series/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 10:59:41 +0000</pubDate>
		<dc:creator>Arden Packeer, CCIE #20716</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Routing Protocols]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ccie]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://ardenpackeer.com/?p=261</guid>
		<description><![CDATA[Knowing the OSPF Network Types and how they work with different frame relay topologies is one of those things that you should know inside out if you are attempting the CCIE lab. This five part series of tutorials are designed to take you through all the different OSPF network types and demonstrate how they interact with Frame-Relay over various partial-mesh topologies. <p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-frame-relay-series/">Tutorial: OSPF Network Types &#038; Frame-Relay Series</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Knowing the OSPF Network Types and how they work with different frame relay topologies is one of those things that you should know inside out if you are attempting the CCIE lab. This five part series of tutorials are designed to take you through all the different OSPF network types and demonstrate how they interact with Frame-Relay over various partial-mesh topologies. </p>
<ul class="archives">
<li><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-and-frame-relay-part-1/">Part 1: OSPF Broadcast &#038; Non-Broadcast Network Types</a></li>
<li><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-and-frame-relay-part-2/">Part 2: OSPF Point-to-Multipoint &#038; Point-to-Multipoint Non-Broadcast Network Types</a></li>
<li><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-and-frame-relay-part-3/">Part 3: OSPF Point-to-Point &#038; Loopback Network Types</a></li>
<li><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-and-frame-relay-part-4/">Part 4: Mixing &#038; Matching OSPF Network Types</a></li>
<li><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-and-frame-relay-part-5/">Part 5: OSPF Network Types in Multi-Hub Partial-Mesh Networks</a></li>
</ul>
<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-frame-relay-series/">Tutorial: OSPF Network Types &#038; Frame-Relay Series</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ardenpackeer.com/routing-protocols/tutorial-ospf-network-types-frame-relay-series/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog: The Whole Ethan Thing&#8230;.</title>
		<link>http://ardenpackeer.com/blog/blog-the-whole-ethan-thing/</link>
		<comments>http://ardenpackeer.com/blog/blog-the-whole-ethan-thing/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 00:33:30 +0000</pubDate>
		<dc:creator>Arden Packeer, CCIE #20716</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[CertGuard]]></category>
		<category><![CDATA[Ethan Banks]]></category>
		<category><![CDATA[groupstudy]]></category>
		<category><![CDATA[Networkworld]]></category>

		<guid isPermaLink="false">http://ardenpackeer.com/?p=193</guid>
		<description><![CDATA[No doubt if your a follower of the other CCIE blogs, and a regular reader of groupstudy you would have seen this whole thing about <a href="http://www.networkworld.com/community/node/28444">Robert Williams from CertGuard slamming Ethan Banks</a> for cheating on his exam. <a href="http://cciepursuit.wordpress.com/2008/06/13/certguard-certification-integrity/">CCIEPursuit</a> summed it up nicely, as did <a href="http://www.matthillccie.com/2008/06/13/certguard-slams-ethan-banks/">Matt Hill</a>, <a href="http://www.colinmcnamara.com/2008/06/15/certguard-ethan-banks-network-world-and-common-sense">Collin McNamara</a>, <a href="http://networkninja.co.za/?p=79">Deon Botha</a> and <a href="http://etherealmind.com/2008/06/17/certguard-ethan-banks-exam-cheating-stupid/">Greg Ferro</a>.<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/blog/blog-the-whole-ethan-thing/">Blog: The Whole Ethan Thing&#8230;.</a></p>
]]></description>
			<content:encoded><![CDATA[<p>No doubt if your a follower of the other CCIE blogs, and a regular reader of groupstudy you would have seen this whole thing about <a href="http://www.networkworld.com/community/node/28444">Robert Williams from CertGuard slamming Ethan Banks</a> for cheating on his exam. <a href="http://cciepursuit.wordpress.com/2008/06/13/certguard-certification-integrity/">CCIEPursuit</a> summed it up nicely, as did <a href="http://www.matthillccie.com/2008/06/13/certguard-slams-ethan-banks/">Matt Hill</a>, <a href="http://www.colinmcnamara.com/2008/06/15/certguard-ethan-banks-network-world-and-common-sense">Collin McNamara</a>, <a href="http://networkninja.co.za/?p=79">Deon Botha</a> and <a href="http://etherealmind.com/2008/06/17/certguard-ethan-banks-exam-cheating-stupid/">Greg Ferro</a>.</p>
<p>I wasn&#8217;t going to comment, because frankly I thought it was crap as soon as I read it on Networkworld.  &#8220;This is just some guy drumming up exposure for his company. Nothing to see here&#8230;move along&#8221;, I thought. If you followed Ethan&#8217;s blog, to me it was obvious Ethan didn&#8217;t cheat. I didn&#8217;t want to post about it because I didn&#8217;t think it deserved the attention it has subsequently attracted.</p>
<p>Heck, I find this screenshot I took a couple of minutes ago amusing:</p>
<div class="captionfull"><img title="ethankbanksoncertguard" src="http://ardenpackeer.com/wp-content/uploads/2008/06/ethankbanksoncertguard.gif" alt="Ethan Banks on Certguard Search" /></div>
<p>Here is a site that claims ethanbanks.net is safe. It even states that &#8220;this is the kind of PTP you should be looking for&#8221;. However it appears they see nothing wrong with dragging the name of owner of that site through the mud. I care about the integrity of these exams as well but his comments on Networkworld is bordering on slander. Who in their right mind would want anything to do with this company?</p>
<p>I think this is a sad attack on someone that has tried to give back to our little community. We&#8217;ve all followed Ethan through his preparation attempts and shared his joy when he passed. If you looked through his blog you would have clearly seen the amount of hard work and dedication he put into achieving his CCIE. You can&#8217;t fake that. He knew his stuff. If he was cheating, he was going about it the wrong way :)</p>
<p>This whole things seems like CertGuard trying to drum up free exposure. To me, it seems like they are trying to get you to use their search tool to verify any material you purchase&#8230;so you don&#8217;t end up like Ethan. Kinda like a mafia extortion racket. There must be many people they could have &#8220;made an example of&#8221; so one must wonder, did they target Ethan Banks for vilification due to his high profile, and if so was it also more for publicity than justice.</p>
<p>Having a watchdog protecting the value of our certifications is a good idea in principle, but in this case the implementation is just as evil as the crime. Cisco is the final authority on the matter. They should be the watchdog, not some guy who&#8217;s credentials and methods are questionable. How does CertGuard know material is safe unless they&#8217;ve looked at the questions themselves?</p>
<p>I was going to say that I wouldn&#8217;t be using any sites that have the CertGuard logo on it, but then I couldn&#8217;t find any. :)</p>
<p>Come back Ethan. Our community needs leaders like you.</p>
<p><strong>Update:</strong> Ethan&#8217;s back!&#8230;.and <a href="http://www.networkworld.com/community/node/29041">Robert Williams from CertGuard</a> has issued an apology.</p>
<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/blog/blog-the-whole-ethan-thing/">Blog: The Whole Ethan Thing&#8230;.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ardenpackeer.com/blog/blog-the-whole-ethan-thing/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Tutorial: How to use Cisco MQC &amp; NBAR to filter websites like Youtube</title>
		<link>http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/</link>
		<comments>http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 01:32:47 +0000</pubDate>
		<dc:creator>Arden Packeer, CCIE #20716</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[IOS Features & Management]]></category>
		<category><![CDATA[QoS & VoIP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[dynagen]]></category>
		<category><![CDATA[dynamips]]></category>
		<category><![CDATA[filtering]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[mime]]></category>
		<category><![CDATA[mqc]]></category>
		<category><![CDATA[nbar]]></category>
		<category><![CDATA[qos]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/</guid>
		<description><![CDATA[I was asked a great question by one of my clients regarding filtering of websites. He had filtered youtube and google video at his proxy server but with the number of different video sites popping up (metacafe, jibjab etc etc), his filters just couldn&#8217;t keep up&#8230;and neither could his bandwidth!
One solution to this problem is [...]<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/">Tutorial: How to use Cisco MQC &#038; NBAR to filter websites like Youtube</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I was asked a great question by one of my clients regarding filtering of websites. He had filtered <a href="http://www.youtube.com/">youtube</a> and <a href="http://video.google.com.au/">google video</a> at his proxy server but with the number of different video sites popping up (metacafe, jibjab etc etc), his filters just couldn&#8217;t keep up&#8230;and neither could his bandwidth!</p>
<p>One solution to this problem is the use of Cisco&#8217;s Network Based Application Recognition (NBAR). NBAR is a deep packet inspection and classification engine. It was first introduced in experimental versions of IOS v12.1 and can be used with Cisco&#8217;s <a href="http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hqos_c/part40/qctmcli2.htm">Modular Quality Of Service Command Line (MQC)</a>.</p>
<p>In this article we will look at using MQC to filter websites. I will demonstrate using the <a href="http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cr/hqos_r/qos_m1h.htm#wp1128712">match protocol http</a> command to match a URL, a host or MIME type. We will use the following topology for demonstration:</p>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/12/topology1.gif" alt="Network Topology - Webserver" /></div>
<p>R3 will act as a webserver and R1 as a client. The filtering will be applied on R2. You can download the dynamips .net file the following topology <a href="http://ardenpackeer.com/wp-content/uploads/2007/12/webserver.net">here</a>.<br />
R1 Base Configuration:</p>
<pre>
<code>hostname R1
!
int s1/0
 ip add 10.0.12.1 255.255.255.0
 no shut
!
router ospf 1
 network 10.0.12.1 0.0.0.0 area 0</code></pre>
<p>R2 Base Configuration:</p>
<pre>
<code>hostname R2
!
int s1/0
 ip add 10.0.12.2 255.255.255.0
 no shut
!
int s1/1
 ip add 10.0.23.2 255.255.255.0
 no shut
!
router ospf 1
 network 10.0.12.2 0.0.0.0 area 0
 network 10.0.23.2 0.0.0.0 area 0</code></pre>
<p>R3 Base Configuration:</p>
<pre>
<code>hostname R3
!
int s1/0
 ip add 10.0.23.3 255.255.255.0
 no shut
!
int f0/0
 ip add 192.168.1.100 255.255.255.0
 no shut
!
router ospf 1
 network 10.0.23.3 0.0.0.0 area 0
!
ip http server
ip http path flash:</code></pre>
<p>We have set up R3 as a webserver. Details on how to setup R3 as a webserver using IOS can be found <a href="http://ardenpackeer.com/ios-features-management/how-to-set-up-a-cisco-router-as-a-webserver/">here</a>.</p>
<pre>
<code>R3#sh run | in ip http
ip http server
no ip http secure-server
ip http path flash:</code></pre>
<pre>
<code>R3#dir
Directory of flash:/

    1  -rw-          90                    &lt;no&gt;  picture.gif
    2  -rw-         329                    &lt;no&gt;  picture.jpg
    3  -rw-         174                    &lt;no&gt;  index.html

8388604 bytes total (8387812 bytes free)
&lt;/no&gt;&lt;/no&gt;&lt;/no&gt;</code></pre>
<p><strong>Basic HTTP Filtering using NBAR</strong></p>
<p>Lets set up basic http filtering with MQC on R2.</p>
<pre>
<code>R2(config)#class-map match-all MATCH-HTTP
R2(config-cmap)#match protocol http
R2(config-cmap)#exit
R2(config)#policy-map HTTP-POLICY
R2(config-pmap)#class MATCH-HTTP
R2(config-pmap-c)#set dscp af13
R2(config-pmap-c)#exit
R2(config-pmap)#int s1/0
R2(config-if)#service-policy input HTTP-POLICY</code></pre>
<p>In the code above we have a class map called MATCH-HTTP. The match protocol http command tells NBAR to match the http protocol. This will match all http traffic. The MATCH-HTTP class is then utilized in the HTTP-POLICY policy map. This policy map is used to set a DSCP marking on all traffic that matches the MATCH-HTTP class (ie all http traffic). The policy is then implemented on R2&#8217;s s1/0. Traffic is inspected and marked as it comes into that interface.</p>
<p>We can check how many packets have been marked using the show policy-map command.</p>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http
      QoS Set
        dscp af13
          Packets marked 0

    Class-map: class-default (match-any)
      2 packets, 168 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
R2#</code></pre>
<p>Lets generate some http traffic, and see if our policy marks some packets.</p>
<pre>
<code>R1#copy http://10.0.23.3/index.html null:
Loading http://10.0.23.3/index.html
174 bytes copied in 0.544 secs (320 bytes/sec)</code></pre>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      5 packets, 344 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http
      QoS Set
        dscp af13
          Packets marked 5

    Class-map: class-default (match-any)
      124 packets, 10340 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>We used the <strong>copy http://10.0.23.3/index.html null:</strong> command to generate some http traffic. We can see above that 5 packets were generated and were marked as af13. All other traffic will fall into the class-default class. With the packets marked, we could forward them or drop them.</p>
<p>Instead of matching all of the http protocol we can use NBAR to look further into the packet and classify or drop packets based on the host requested.</p>
<p><strong>Match protocol HTTP host</strong></p>
<p>The match protocol HTTP url command is used to match a url. It takes a regular expression as an argument. For example:</p>
<pre>
<code>match protocol http host *youtube.com*
! This would match anything in youtube.com like http://www.youtube.com or http://video.youtube.com
!
match protocol http host *google*
! This would match anything with google in the host like http://mail.google.com or
http://www.google.com.au
!
match protocol http host google*
! This would match http://google.com but not http://video.google.com</code></pre>
<p>Lets set up R2 to filter based on a host.</p>
<pre>
<code>R2(config)#class-map MATCH-HTTP
R2(config-cmap)#no match protocol http
R2(config-cmap)#match protocol http host 10.0.23.3</code></pre>
<pre>
<code>R2#clear counters s1/0
Clear "show interface" counters on this interface [confirm]
*Mar  1 00:04:42.071: %CLEAR-5-COUNTERS: Clear counter on interface Serial1/0 by console
R2#
R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http host "10.0.23.3"
      QoS Set
        dscp af13
          Packets marked 0

    Class-map: class-default (match-any)
      1 packets, 84 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>We&#8217;ve cleared the counters on R2, so lets generate some traffic on R1 again.</p>
<pre>
<code>R1#copy http://10.0.23.3/index.html null:
Loading http://10.0.23.3/index.html
174 bytes copied in 0.596 secs (292 bytes/sec)</code></pre>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      5 packets, 344 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http host "10.0.23.3"
      QoS Set
        dscp af13
          Packets marked 5

    Class-map: class-default (match-any)
      64 packets, 5300 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>We can see here it matched 5 packets based on the host. We can use this to match whole sites like youtube.com or video.google.com.</p>
<p><strong>Match protocol HTTP url</strong></p>
<p>We can match strings AFTER the host portion of a URL using the match protocol http url command. It also takes a regular expression as an argument. For example:</p>
<pre>
<code>match protocol http url *video*
! This would match http://www.cisco.com/video/index.php or
http://www.google.com/stuff/video.html
!
match protocol http url video*
! This would match http://www.cisco.com/video but not http://www.cisco.com/stuff/video.html
! because stuff precedes the video portion of the url and in the expression above we have said
! it has to start with the string video
!
match protocol http url *.jpeg|*.jpg|*.gif
! This would match any .jpeg or .jpg or .gif extention in the url</code></pre>
<p>Lets set up R2 to match based on a URL.</p>
<pre>
<code>R2(config)#class-map MATCH-HTTP
R2(config-cmap)#no match protocol http host 10.0.23.3
R2(config-cmap)#match protocol http url *.jpg</code></pre>
<p>As you can see above we have used the match protocol http url function of NBAR to match any url that ends in a .jpg. This effectively blocks jpeg images (unless they have a different extension).</p>
<p>Let test it, before we send some traffic we&#8217;ll reset the counters on the interface.</p>
<pre>
<code>R2#clear counters s1/0
Clear "show interface" counters on this interface [confirm]
*Mar  1 00:43:39.135: %CLEAR-5-COUNTERS: Clear counter on interface Serial1/0 by console
R2#
R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http url "*.jpg"
      QoS Set
        dscp af13
          Packets marked 0

    Class-map: class-default (match-any)
      1 packets, 84 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>If we request a gif file we <strong>shouldn&#8217;t</strong> match the class MATCH-HTTP. Lets test that first.</p>
<pre>
<code>R1#copy http://10.0.23.3/picture.gif null:
Loading http://10.0.23.3/picture.gif
90 bytes copied in 0.644 secs (140 bytes/sec)</code></pre>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http url "*.jpg"
      QoS Set
        dscp af13
          Packets marked 0

    Class-map: class-default (match-any)
      18 packets, 1209 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>Great Success! Looks pretty good. Now lets try a .jpg extension. We <strong>should</strong> match this.</p>
<pre>
<code>R1#copy http://10.0.23.3/picture.jpg null:
Loading http://10.0.23.3/picture.jpg
329 bytes copied in 0.820 secs (401 bytes/sec)</code></pre>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      7 packets, 433 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http url "*.jpg"
      QoS Set
        dscp af13
          Packets marked 7

    Class-map: class-default (match-any)
      22 packets, 1469 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>Awesome! You can see above we matched based on a URL.</p>
<p><strong>match protocol http mime</strong></p>
<p>We can also use the match protocol http mime to match internet mime types. The mime type has to be the same mime type that the web server responds with. For a list of valid mime types check out: <a href="http://www.sfsu.edu/training/mimetype.htm">http://www.sfsu.edu/training/mimetype.htm</a>. Lets look at an example:</p>
<pre>
<code>match protocol http mime image/jpeg
! This would match jpeg,jpg,jpe,jfif,pjpeg, and pjp types
!
match protocol http mime image/jpg
! This would not match anything as it is not a proper mime type. Get a list of the mime types
! here: http://www.sfsu.edu/training/mimetype.htm
!
match protocol http mime image*
! This would match all image mime types
!
match protocol http mime application/x-shockwave-flash
! This would not only match swf flash movies, but all of flash.</code></pre>
<p>Lets set up R2 to filter the image/jpeg mime type:</p>
<pre>
<code>R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#class-map MATCH-HTTP
R2(config-cmap)#no match protocol http url *.jpg
R2(config-cmap)#match protocol http mime ?
  WORD  Enter a string as the sub-protocol parameter

R2(config-cmap)#match protocol http mime image/jpeg
R2(config-cmap)#exit
R2(config)#exit</code></pre>
<p>Once again, we&#8217;ll clear the counters so we can verify that this works correctly.</p>
<pre>
<code>R2#clear counters s1/0
Clear "show interface" counters on this interface [confirm]
*Mar  1 01:12:10.759: %CLEAR-5-COUNTERS: Clear counter on interface Serial1/0 

R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http mime "image/jpeg"
      QoS Set
        dscp af13
          Packets marked 0

    Class-map: class-default (match-any)
      1 packets, 84 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>On R1 lets generate some traffic. A gif file will be requested first. This <strong>should not</strong> match our policy.</p>
<pre>
<code>R1#copy http://10.0.23.3/picture.gif null:
Loading http://10.0.23.3/picture.gif
90 bytes copied in 0.808 secs (111 bytes/sec)</code></pre>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http mime "image/jpeg"
      QoS Set
        dscp af13
          Packets marked 0

    Class-map: class-default (match-any)
      10 packets, 689 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>All good! Ok lets do the final test and actually request a jpeg image and see if it matches our policy.</p>
<pre>
<code>R1#copy http://10.0.23.3/picture.jpg null:
Loading http://10.0.23.3/picture.jpg
329 bytes copied in 1.216 secs (271 bytes/sec)</code></pre>
<pre>
<code>R2#sh policy-map int s1/0
 Serial1/0 

  Service-policy input: HTTP-POLICY

    Class-map: MATCH-HTTP (match-all)
      5 packets, 220 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol http mime "image/jpeg"
      QoS Set
        dscp af13
          Packets marked 5

    Class-map: class-default (match-any)
      16 packets, 1162 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any</code></pre>
<p>You can see above that the jpeg image was matched. It works!</p>
<p><strong>Putting it all together</strong></p>
<p>So lets put it all together. We can use all three match protocol http commands in a match-any class map. For example:</p>
<pre>
<code>class-map match-any INTERNET-SCUM
 match protocol http host *youtube.com*|*video.google.com*
 match protocol http mime video/flv|video/x-flv|video/mp4|video/x-m4v|audio/mp4a-latm
 match protocol http mime video/3gpp|video/quicktime
 match protocol http url *.flv|*.mp4|*.m4v|*.m4a|*.3gp|*.mov
! uncomment below if you don't want ANY flash.
! match protocol http mime application/x-shockwave-flash
! match protocol http url *.swf
!
policy-map NOINTERNETVIDEO
 class INTERNET-SCUM
  drop
!
int s1/0
 service-policy input NOINTERNETVIDEO
!</code></pre>
<p>This would match any traffic going to youtube or video.google.com, or any flash applications, or common video mime types, and any swf (flash or flash movie) files! Be aware that NBAR does make your router take a hit in CPU processor usage, I&#8217;d suggest evaluating your processor usage before using this in production.</p>
<p>HTH! Now back to labs!</p>
<p><strong>Summary:</strong></p>
<ul>
<li>Use the <a href="http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cr/hqos_r/qos_m1h.htm#wp1128712">match http protocol</a> command to match the http protocol.</li>
<li>match protocol http host matches the host portion</li>
<li>match protocol http url matches the url after the hostname</li>
<li>match protocol http mime matches mime types</li>
</ul>
<p><strong>Resources</strong><br />
<a href="http://ardenpackeer.com/wp-content/uploads/2007/12/webserver.net" title="Webserver - Dynamips .net configuration file">Webserver &#8211; Dynamips .net configuration file</a><br />
<a href="http://ardenpackeer.com/wp-content/uploads/2007/12/qoshttp-r1.txt" title="QOS HTTP Filtering - R1 Final Configuration">QOS HTTP Filtering &#8211; R1 Final Configuration</a><br />
<a href="http://ardenpackeer.com/wp-content/uploads/2007/12/qoshttp-r2.txt" title="QOS HTTP Filtering - R2 Final Configuration">QOS HTTP Filtering &#8211; R2 Final Configuration</a><br />
<a href="http://ardenpackeer.com/wp-content/uploads/2007/12/qoshttp-r3.txt" title="QOS HTTP Filtering - R3 Final Configuration">QOS HTTP Filtering &#8211; R3 Final Configuration</a></p>
<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/">Tutorial: How to use Cisco MQC &#038; NBAR to filter websites like Youtube</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ardenpackeer.com/qos-voip/tutorial-how-to-use-cisco-mqc-nbar-to-filter-websites-like-youtube/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Tutorial: How to set up a basic Dynamips Lab using Dynagen, Part 1</title>
		<link>http://ardenpackeer.com/featured-articles/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/</link>
		<comments>http://ardenpackeer.com/featured-articles/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/#comments</comments>
		<pubDate>Sat, 07 Jul 2007 08:57:21 +0000</pubDate>
		<dc:creator>Arden Packeer, CCIE #20716</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[dynagen]]></category>
		<category><![CDATA[dynamips]]></category>
		<category><![CDATA[idle-pc]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://ardenpackeer.com/?p=33</guid>
		<description><![CDATA[I get a lot of requests from students asking how they can practice some of the topics I teach on my Cisco courses. Cisco equipment can be pretty expensive especially when you are starting out your networking career, and not having anything to practice on makes that barrier to entry that much higher. Enter Dynamips. Dynamips is a Cisco hardware emulator. Its like VMWare for Cisco! It emulates a basic Cisco hardware platform so all you need to add is an IOS.<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/featured-articles/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/">Tutorial: How to set up a basic Dynamips Lab using Dynagen, Part 1</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I get a lot of requests from students asking how they can practice some of the topics I teach on my Cisco courses. Cisco equipment can be pretty expensive especially when you are starting out your networking career, and not having anything to practice on makes that barrier to entry that much higher. Enter <a title="Dynamips Emulator" href="http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator">Dynamips</a>. Dynamips is a Cisco hardware emulator. Its like VMWare for Cisco! It emulates a basic Cisco hardware platform so all you need to add is an IOS.</p>
<p>Let&#8217;s take a look at how we configure it. This article focuses on the basics, getting two routers to talk to each other in a virtual environment. Part II will focus on setting up a basic lab that we can use for all the examples in this site.</p>
<p>First we need to download <a title="Dynagen Cisco emulator front end" href="http://dynagen.org">Dynagen</a>. Dynagen is a front-end to the Dynamips Cisco emulator. It provides a custom-built windows installer and easy to use configuration file which makes lab set up a whole lot nicer than the basic dynamips. It runs on Windows, Linux and MacOSX (with Intel cpus). This article will focus on the Windows installation and configuration. We can download Dynagen <a title="Dynagen" href="http://sourceforge.net/project/showfiles.php?group_id=160317">here</a>. We will also need WinPcap, which we can download <a title="WinPcap" href="http://www.winpcap.org/install/default.htm">here</a>.Once we have downloaded Dynagen installation is a snap. Just double click the exe files and click next a couple of times!</p>
<p>Once we have Dynagen installed and ready to roll you should see a Dynagen Sample Labs icon, a Dynamips Server icon and a Network device icon placed on your desktop. We&#8217;ll need to reboot the machine after the installation, to make sure windows picks up</p>
<p><strong>Our First Dynagen Lab</strong></p>
<p>Double click on the Dynagen Sample Labs and open up the simple1 folder. In the simple1 folder you&#8217;ll see a simple1.net file. These .net files are used by dynagen to describe a network topology. Lets have a look at the file:</p>
<pre><code>[localhost]
#
[[7200]]
image = \Program Files\Dynamips\images\c7200-advipservicesk9_li-mz.124-11.T.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
npe = npe-400
ram = 160
#
[[ROUTER R1]]
s1/0 = R2 s1/0
#
[[router R2]]
# No need to specify an adapter here, it is taken care of
# by the interface specification under Router R1</code></pre>
<p>The simple1.net configuration file is divided up into three section. The [localhost] tag up the top specifies that the simulated routers defined will run on the local dynamips server. Dynamips allows you to run labs on multiple servers (so it appears as one giant lab), but for the purpose of this example we are only looking at one dynamips server.</p>
<p>The simple1.net file has two routers defined, R1 and R2. They are connected up via Serial 1/0 on both routers. Lets start up the dynamips server by double clicking on the Dynamips Server icon on the desktop.</p>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/dynamips-server-start.jpg" alt="dynamips-server-start.jpg" /></div>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple1net-start.jpg" alt="simple1net-start.jpg" /></div>
<p>You can see above, that R1 and R2 have both started correctly. You should notice that your CPU usage has just shot through the roof. This is because there are no idle-pc values set for the IOS we are using. We will tweak that a bit later, but first lets have a play with our new virtual network.</p>
<p>On the dynagen console, type:</p>
<pre><code>console R1</code></pre>
<p>This allows us to get access to the console port of R1. If you type this in fast enough, you should see R1 IOS startup process. Once the router has finished its startup process we can configure the router as if we were directly connected to its console port!</p>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple2net-r1start.jpg" alt="simple2net-r1start.jpg" /></div>
<p><strong>I feel the need for more speed! Tweaking idle-pc timings for Dynagen</strong></p>
<p>One of the problems you might notice as you progress through this tutorial is the CPU usage for Dynagen. With two routers started, R1 and R2, its probably already utilising 100% CPU usage. If its using 100% for two routers, how in the world are we going to create a 6 router lab? We can tweak the way Dynagen uses this IOS on your PC by changing the idle-pc timings.</p>
<p>What are idle-pc timings? The Dynagen simulator does not know when the router is performing useful router stuff, and just being idle. Setting idle-pc values is a way of getting Dynagen to analyse the IOS that you are running, and figuring out when it is actually idle.</p>
<p>The idle-pc values are specific to the IOS that you are running, so the results i get here might be different than yours.</p>
<p>The first thing we need to do is stop R2. On the Dynagen management console enter:</p>
<pre><code>stop R2</code></pre>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple2net-r2stop.jpg" alt="simple2net-r2stop.jpg" /></div>
<p>You can see above that R2 has been stopped. The CPU usage might drop slightly but we can do a whole lot better than that. For the best analysis results, we should have only one router running so Dynagen can accurately collect idle-pc statistics.</p>
<p>Log into R1 and make sure that R1 is idle. You might need to wait until all the interfaces are initialized.</p>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple2net-r1idlet.jpg" alt="simple2net-r1idlet.jpg" /></div>
<p>You can see above that R1 has completed its boot cycle and all its interfaces are initialized. For all intents and purposes the Router is now idle.</p>
<p>On the Dynagen management console enter:</p>
<pre><code>idlepc get R1</code></pre>
<p>Dynagen will then collect statistics for this router. This can take a minute or two, but once this is complete you should be presented with a list of idle-pc values</p>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple2net-r1gotidlepc.jpg" alt="simple2net-r1gotidlepc.jpg" /></div>
<p>The items with the star next to them are the ones we want to try. Selecting one should drop your cpu-usage dramatically. If it did not drop we can try the following on the Dynagen management console:</p>
<pre><code>idlepc show R1</code></pre>
<p>This should present all the idle-pc values so we can select another value to try. Once we are satisfied with the CPU usage, we should save the idle-pc timing so we don&#8217;t have to do this everytime we use dynagen. We can save our idle-pc values by entering the following on the Dynagen management console:</p>
<pre><code>idlepc save R1 db</code></pre>
<p>This will save idle-pc information about the IOS we are running to a dynagen configuration file. Any other routers we now start with the analysed IOS will automatically have the idle-pc applied.</p>
<p><strong>The Finished Lab</strong></p>
<p>We can see in the configuration file for simple1.net that R1 and R2 are connected via there Serial 1/0 interfaces. Lets start up R1 and R2 and get them talking.</p>
<p>On the Dynagen management console enter:</p>
<pre><code>start R2</code></pre>
<p>This should start up R2. R2 uses the same IOS as R1 and should use the same idle-pc values to minimize the CPU resources required. We can log onto R2 by going to the Dynagen management console and entering:</p>
<pre><code>console R2</code></pre>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple2net-r2start.jpg" alt="simple2net-r2start.jpg" /></div>
<p>R2 should go a startup procedure and after it has initialized its interfaces we can configure them both:</p>
<p>R1</p>
<pre><code>Router#
Router# conf t
Router(config)# hostname R1
R1(config)# no ip domain-lookup
R1(config)# line con 0
R1(config-line)# exec-timeout 0 0
R1(config-line)# logging synchronous
R1(config-line)# int s1/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)# end
R1# wr</code></pre>
<p>R2</p>
<pre><code>Router#
Router# conf t
Router(config)# hostname R2
R2(config)# no ip domain-lookup
R2(config)# line con 0
R2(config-line)# exec-timeout 0 0
R2(config-line)# logging synchronous
R2(config-line)# int s1/0
R2(config-if)# ip address 192.168.1.2 255.255.255.0
R2(config-if)# no shut
R2(config-if)# end
R2# wr</code></pre>
<p>Once the virtual routers are set up they should be able to ping each other as if they were physical router connected up to each other.</p>
<div class="captionfull"><img src="http://ardenpackeer.com/wp-content/uploads/2007/07/simple2net-r2ping.jpg" alt="simple2net-r2ping.jpg" /></div>
<p>Looks like we have a working simulation. We will be building on the lab in Part 2 of this article to come up with a topology consisting of 6 routers. Stay Tuned!</p>
<p>Read this article and more like it on <a href="http://ardenpackeer.com">ardenpackeer.com</a>
<br>
Follow me on twitter: <a href="http://twitter.com/ardenpackeer">http://twitter.com/ardenpackeer</a><br/><br/><a href="http://ardenpackeer.com/featured-articles/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/">Tutorial: How to set up a basic Dynamips Lab using Dynagen, Part 1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ardenpackeer.com/featured-articles/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
	</channel>
</rss>
