<?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>CCIE Blog &#187; Stuart Hare</title>
	<atom:link href="http://blog.ipexpert.com/author/stuarthare_ipx/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ipexpert.com</link>
	<description>CCIE Candidates blog for all technical overviews relating to CCIE R&#38;S, CCIE Voice, CCIE Security &#38; CCIE SP</description>
	<lastBuildDate>Wed, 08 Feb 2012 15:19:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>ASA Accelerated Security Path</title>
		<link>http://blog.ipexpert.com/2010/07/29/asa-accelerated-security-path/</link>
		<comments>http://blog.ipexpert.com/2010/07/29/asa-accelerated-security-path/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 13:24:07 +0000</pubDate>
		<dc:creator>Stuart Hare</dc:creator>
				<category><![CDATA[CCIE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Strategy]]></category>
		<category><![CDATA[Techtorials]]></category>
		<category><![CDATA[Accelerated Path]]></category>
		<category><![CDATA[ASA]]></category>
		<category><![CDATA[CCIE 3.0 Security]]></category>

		<guid isPermaLink="false">http://blog.ipexpert.com/?p=2590</guid>
		<description><![CDATA[This post will provide a brief overview of a seldom referred to part of the ASA, the Accelerated Security Path (ASP). As we know the ASA’s Adaptive Security Algorithm is responsible for inspecting all traffic that traverses the ASA, and based on its configured security policies will either permit or deny the traffic. As a [...]]]></description>
			<content:encoded><![CDATA[<p>This post will provide a brief overview of a seldom referred to part of the ASA, the Accelerated Security Path (ASP). As we know the ASA’s Adaptive Security Algorithm is responsible for inspecting all traffic that traverses the ASA, and based on its configured security policies will either permit or deny the traffic.<span id="more-2590"></span></p>
<p>As a new connection enters the ASA it is processed using the Session Management Path.</p>
<p>Part of the Session Management Path’s processing is to inspect and create the relevant entry in the ASA’s state/connection table, if a policies exists allowing the traffic.</p>
<p>Generally any further packets received for these established connections, does not require further inspection and are subsequently handled by the Fast Path. Although, there may be certain packets that would continue to use the session management path or be passed to the control plane path, such as flows requiring HTTP inspection, FTP or H.232 etc.</p>
<p>This is akin to Process switching and CEF switching in IOS Routers.</p>
<p>The Session Management Path and Fast Path combined are what make up the Accelerated Security Path.</p>
<p>ASP can come in handy when we want to troubleshoot traffic flows through the ASA. This is done via a suite of ASP show commands, and can also be incorporated into packet captures, using a capture type of asp-drop.</p>
<p>With ASP debugging we can drill down into the output to see what functions or methods are responsible for dropping the traffic on the ASA. There are two set of commands available to us, both of which have a substantial amount of optional keywords; these are, ‘show asp drop’ and show asp table’.</p>
<p>Starting with ‘show asp drop’ will give us a summary of packets or connections that have been denied by ASP providing an associated reason and hits on each. As we can see from the output below it is split into 2 sections; Frame Drop &#8211; which is based on packet failures; and Flow Drop &#8211; based on inspected traffic flow failures.</p>
<p>It gives us a brief breakdown of denies based on malformed TCP sessions, Reverse Path Forwarding violations, or simply denies based on ACL entries etc.</p>
<pre>ASA# <span style="background-color: gray">show asp drop</span>
Frame drop:
Reverse-path verify failed (rpf-violated)                                 1432
Flow is denied by configured rule (acl-drop)                         100495787
First TCP packet not SYN (tcp-not-syn)                                    2234
TCP failed 3 way handshake (tcp-3whs-failed)                                20
TCP packet SEQ past window (tcp-seq-past-win)                               28
TCP replicated flow pak drop (tcp-fo-drop)                                   8
TCP RST/SYN in window (tcp-rst-syn-in-win)                                   2
TCP packet failed PAWS test (tcp-paws-fail)                                  3
Slowpath security checks failed (sp-security-failed)                         1
Expired flow (flow-expired)                                                  2
ICMP Inspect seq num not matched (inspect-icmp-seq-num-not-matched)          6
FP L2 rule drop (l2_acl)                                               7911378
Interface is down (interface-down)                                        1143
Dropped pending packets in a closed socket (np-socket-closed)               19
Last clearing: Never
Flow drop:
Inspection failure (inspect-fail)                                            2
Last clearing: Never</pre>
<p>You can also further drill into more specific output using optional keywords, based on either frame or flow drop, such as &#8220;show asp drop frame ifc-classify&#8221; &#8211; when in virtual firewall mode shows counts for packets that failed to be classified to context; or &#8220;show asp drop flow conn-limit-exceeded&#8221; &#8211; increments when the value applied to set connection conn-max is breached.</p>
<p>These are just a couple of the vast amount of options available for use. Check out the ASA Command Reference document for a full listing.</p>
<p>A key point with the ASP drop output is when running in Multi Context Mode, the information provided is a summary for all of the virtual contexts not just the context you are currently logged into.</p>
<p>The other side of ASP is the &#8220;show asp table&#8221; commands. These are typically used by TAC, so contain a great deal of info on a production appliance. These tables are primarily used for debugging, so the output is prone to regular changes.</p>
<p>Below are the asp tables available:</p>
<pre>ASA# <span style="background-color: gray">show asp table ?</span>
arp
classify    Show ASP classifier tables
interfaces  Show ASP interfaces tables
routing     Show ASP route tables
socket      Show ASP socket info</pre>
<p>The &#8220;show asp table arp&#8221; for instance can be used to check that traffic is flowing to/from a specific host/s based on an incrementing hit count. It is important to remember that this is dynamic real time output though and will be subject to resetting.</p>
<pre>ASA# <span style="background-color: gray">sh asp table arp</span>
Context: LEFT, Interface: Inside
10.1.1.66                            Active   0050.56a5.35b9 hits 15
10.1.1.65                            Active   0050.56a5.7d06 hits 0</pre>
<p>The &#8220;show asp table routing&#8221; can give us further info into how specific nets are routed. This is provided based on two tables; an input routing table and an output routing table, each showing the routable nets and their associated interfaces.</p>
<pre>ASA# <span style="background-color: gray">sh asp table routing</span>
in   	10.1.1.64   	255.255.255.192	Inside
out  	10.1.1.64   	255.255.255.192	Inside
in 	0.0.0.0		0.0.0.0			Outside
out 	0.0.0.0		0.0.0.0			via 10.1.1.254, Outside</pre>
<p>And to finish off a quick look at the classify table. This table consists of multiple classifier domains which correspond to a specific rule action within the ASA, I.e. Inspection rules, filtering rules nat rules etc. Again check out the command reference for a list of the options.</p>
<p>Below is an example showing SMTP traffic is being inspected and allowed to the inside interface:</p>
<pre>ASA# <span style="background-color: gray">sh asp table classify domain inspect-smtp</span>
Interface Inside:
in  id=0x1d43bbf0, priority=70, domain=inspect-smtp, deny=false
hits=89, user_data=0x1d1a18f0, cs_id=0x0, use_real_addr, flags=0x0, protocol=6
src ip=0.0.0.0, mask=0.0.0.0, port=0
dst ip=0.0.0.0, mask=0.0.0.0, port=25, dscp=0x0</pre>
<p>The documentation for ASP is minimal, the best way forward with this is get your head into the output and retain what you feel is useful.</p>
<p>So the next time your caught in a troubleshooting exercise check out the ASP output and see whether combining this with your debug, captures and logs, can assist in resolving your issues!!</p>
<p>&#8211;<br />
Stuart Hare<br />
CCIE #25616 (Security), CCSP, Microsoft MCP<br />
Sr. Support Engineer – IPexpert, Inc.<br />
URL: <a href="http://www.ipexpert.com">http://www.ipexpert.com</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="1" href="http://blog.ipexpert.com/2010/07/29/asa-accelerated-security-path/"></g:plusone></div><div style="text-align:left; margin: 0px 0px 0px 0px;" ><a href="http://blog.ipexpert.com/2010/07/29/asa-accelerated-security-path/?pfstyle=wp" style="text-decoration: none; outline: none; color: #990000;"><img class="printfriendly" src="http://cdn.printfriendly.com/pf-icon.gif" alt="Print Friendly"/><span style="font-size:14px; margin-left:3px; color: #990000;">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ipexpert.com/2010/07/29/asa-accelerated-security-path/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ASA: Local CA Server</title>
		<link>http://blog.ipexpert.com/2010/07/28/asa-local-ca-server/</link>
		<comments>http://blog.ipexpert.com/2010/07/28/asa-local-ca-server/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 13:03:36 +0000</pubDate>
		<dc:creator>Stuart Hare</dc:creator>
				<category><![CDATA[Ask the Expert]]></category>
		<category><![CDATA[CCIE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Strategy]]></category>
		<category><![CDATA[Techtorials]]></category>
		<category><![CDATA[ASA]]></category>
		<category><![CDATA[CCIE 3.0 Security]]></category>
		<category><![CDATA[Certficate Authority]]></category>
		<category><![CDATA[Local CA Server]]></category>
		<category><![CDATA[PKI]]></category>

		<guid isPermaLink="false">http://blog.ipexpert.com/?p=4017</guid>
		<description><![CDATA[Another new addition to the ASA v8.x code was the introduction of the Local Certificate Authority Server. Although this is not specifically mentioned in the current CCIE Security Lab blueprint I thought it a useful topic to touch on, in case of future inclusion, or for potential real world applications. The ASA’s Local CA Server [...]]]></description>
			<content:encoded><![CDATA[<p>Another new addition to the ASA v8.x code was the introduction of the Local Certificate Authority Server. Although this is not specifically mentioned in the current CCIE Security Lab blueprint I thought it a useful topic to touch on, in case of future inclusion, or for potential real world applications.</p>
<p>The ASA’s Local CA Server provides the appliance with a basic level of Certificate provisioning functionality. The primary use for the Local CA is to provide registered users the ability to enroll for certificates, which can then be used with features such as WebVPN.</p>
<p><span id="more-4017"></span></p>
<p>Some of the available features of the Local CA are as follows:</p>
<ul>
<li>Issuing of Certificates for enrolled users</li>
<li>Secure certificate revocation</li>
<li>Browser based enrollment</li>
<li>SSL VPN Support</li>
<li>Local database and external filesystem support</li>
<li>Support for both CLI and ASDM configuration</li>
</ul>
<p>As usual there are also some restrictions related to the Local CA:</p>
<ul>
<li>Support for Root CA mode only, no Subordinate or RA modes available.</li>
<li>Not supported when Active/Active Failover mode is in use</li>
<li>Not supported when VPN load balancing is in use</li>
<li>The ASA can only contain a single Local CA instance at any one time.</li>
</ul>
<p>In truth the Local CA is pretty basic and easy to configure, but before we look at the config lets define some of the core components:</p>
<ul>
<li> The Default Local CA Server &#8211; minimal configuration is required to create a CA Server instance which utilizes of a number of default parameters.</li>
<li>CRL &#8211; Certificate Revocation List &#8211; a distributed update list containing details for revoked or un-revoked certificates.</li>
<li>CDP &#8211; The CRL Distribution Point &#8211; typically the URL for the local or remote copy of the CRL.</li>
<li>CA Database Storage &#8211; information regarding certificates, users, CRL’s etc. are held in this database, which can utilize both local flash storage and remote CIFS or FTP external storage.</li>
</ul>
<p>OK so lets delve into the basic setup of the Local CA. As stated above it has a number of predefined default settings, that allows us to quickly enable the CA. This can be carried out in 4 easy steps:</p>
<ol>
<li>Enter CA server config mode</li>
<li>Specify a valid ‘from email address’ used by the ca server to send emails to users that contain one time passwords for enrollment.</li>
<li>Define a default DN to be included in issued certificates.</li>
<li>Enable the CA server.</li>
</ol>
<p>The minimum config we need is as follows:</p>
<pre>crypto ca server
smtp from-address &lt;email.address&gt;
  subject-name-default &lt;distinguished.name&gt;
  no shutdown</pre>
<p>Upon enabling the CA server, a passphrase will be requested to protect the CA’s private key, and a Certificate and key pair will be generated.</p>
<p>By default this setup provides us with the following configuration:</p>
<ul>
<li>1024 bit modulus for our keys and certificates;</li>
<li>A CDP URL of: <a href="http://hostname.domain/+CSCOCA+/asa_ca.crl">http://hostname.domain/+CSCOCA+/asa_ca.crl</a>;</li>
<li>And an issuer-name of: cn=FQDN</li>
<li>Default storage is local flash memory</li>
<li>(Full default values are listed in the ASA Config guide, under the Local CA table 41-1)</li>
</ul>
<p>Its key to note that the once the CA server has been enabled with the no shutdown command, the values for the ‘issuer-name’ and ‘keysize server’ commands cannot be changed.</p>
<p>You need to completely remove and recreate the CA server config to amend these values prior to enabling the server.  You will be warned during the process.</p>
<p>Removal of the CA can be done using the ‘clear config crypto ca server’ command.</p>
<p>Example:</p>
<pre>LocalCA#<span style="background-color: gray;">conf t</span>
LocalCA(config)#<span style="background-color: gray;">crypto ca server</span>
LocalCA(config-ca-server)#<span style="background-color: gray;">smtp from-address ipxca@ipexpert.com</span>
LocalCA(config-ca-server)#<span style="background-color: gray;">subject-name-default cn=ipxca, o=ipexpert, c=US</span>
LocalCA(config-ca-server)#<span style="background-color: gray;">no shutdown</span>
% Some server settings cannot be changed after CA certificate generation.
% Please enter a passphrase to protect the private key
% or press return to exit
Passphrase: <span style="background-color: gray;">********</span>
Re-enter passphrase: <span style="background-color: gray;">********</span>
Keypair generation process begin. Please wait...
Completed generation of the certificate and keypair...
Archiving certificate and keypair to storage... Complete
INFO:
Certificate Server enabled.</pre>
<p>We can quickly see the status of the CA using the following:</p>
<pre>LocalCA#<span style="background-color: gray;">show crypto ca server</span>
Certificate Server LOCAL-CA-SERVER:
Status: enabled
State: enabled
Server's configuration is locked  (enter "shutdown" to unlock it)
Issuer name: CN=LocalCA.ipexpert.com
CA certificate fingerprint/thumbprint: (MD5)
1b934fa8 dbe60db9 6c77f919 dd692935
CA certificate fingerprint/thumbprint: (SHA1)
354ced13 7e4fe4a8 06920a8a 4624b524 daf56a9f
Last certificate issued serial number: 0x1
CA certificate expiration timer: 17:57:26 UTC Mar 17 2013
CRL NextUpdate timer: 23:57:26 UTC Mar 18 2010
Current primary storage dir: flash:/LOCAL-CA-SERVER/
Auto-Rollover configured, overlap period 30 days
Autorollover timer: 17:57:25 UTC Feb 15 2013</pre>
<p>Notice that the Status and State are both enabled, the server configuration is locked while enabled, and that the Issuer name has defaulted to the Fully qualified domain name of the ASA as expected. Checking our keys also proves the default 1024bit key size has been used.</p>
<pre>LocalCA# <span style="background-color: gray;">show crypto key mypubkey rsa</span>
Key pair was generated at: 17:57:26 UTC Mar 18 2010
Key name: LOCAL-CA-SERVER
Usage: General Purpose Key
Modulus Size (bits): 1024
Key Data:
30819f30 0d06092a 864886f7 0d010101 05000381 8d003081 89028181 00968a49
9a082f87 d6243001 0652a2a3 974265ce 20168adf aca83ead 1a8588a2 48112537
5cd2b3c2 bc2e0e12 3a250852 a31400e2 0e5da985 87e4324c 1d7ad4c3 19eb286f
31896f71 19a8e8f6 6ac56aa5 466438fe 599b7046 41548bee 0a91ad45 cb4ad283
52188306 f082cc14 ba42219d b051aeeb c69cbbc9 df17c5eb 0f1c07e5 ed020301 0001</pre>
<p>And confirmation that our CA files have been stored in flash:</p>
<pre>LocalCA# <span style="background-color: gray;">sh flash: | i CA</span>
103  8192        Mar 18 2010 17:57:27  LOCAL-CA-SERVER
106  32            Mar 18 2010 17:57:26  LOCAL-CA-SERVER/LOCAL-CA-SERVER.ser
107  114          Mar 18 2010 17:57:26  LOCAL-CA-SERVER/LOCAL-CA-SERVER.cdb
108  0              Mar 18 2010 17:57:26  LOCAL-CA-SERVER/LOCAL-CA-SERVER.udb
110  230          Mar 18 2010 17:57:26  LOCAL-CA-SERVER/LOCAL-CA-SERVER.crl
111  1595        Mar 18 2010 17:57:27  LOCAL-CA-SERVER/LOCAL-CA-SERVER.p12</pre>
<p>Before we can enroll though we have a few more tasks that need to be completed; first off is to enable the WebVPN component; and then add a user that will be registered and authorized for enrollment. Enter WebVPN config mode and enable it on the inside interface.</p>
<pre>LocalCA(config)# <span style="background-color: gray;">webvpn</span>
LocalCA(config-webvpn)# <span style="background-color: gray;">enable inside</span>
INFO: WebVPN and DTLS are enabled on 'inside'.
LocalCA(config-webvpn)# <span style="background-color: gray;">exit</span>
Next step is to register a new user on the ASA and authorize it to enroll with the CA Server:
LocalCA(config)# <span style="background-color: gray;">crypto ca server user-db add ipxuser</span>
LocalCA(config)# <span style="background-color: gray;">crypto ca server user-db allow ipxuser display-otp</span>
Username: ipxuser
OTP: 8A87D45D637E3E45
Enrollment Allowed Until: 20:32:57 UTC Sun Mar 21 2010</pre>
<p>By issuing the display-otp keyword we have chosen to have the one time password dumped to the screen instead of via email delivery. Now we need to enroll with the CA which is easily done using a web browser to access the enrollment page, ‘<a href="https://hostname/+CSCOCA+/enroll.html">https://hostname/+CSCOCA+/enroll.html</a>’.</p>
<p><img class="aligncenter" title="Enroll" src="http://blog.ipexpert.com/wp-content/uploads/2010/06/Enroll.png" alt="Enroll" width="690" height="507" /></p>
<p>Enter the username and One Time Password in the login fields provided.  This then triggers the certificate download.</p>
<p><img class="aligncenter" title="CERTDL" src="http://blog.ipexpert.com/wp-content/uploads/2010/06/CERTDL.png" alt="CERTDL" width="690" height="515" /></p>
<p>Open and install the certificate into the store. Once completed verify that the certificate is installed via the internet options panel in your browser.</p>
<p><img class="aligncenter" title="CERTVERIFY" src="http://blog.ipexpert.com/wp-content/uploads/2010/06/CERTVERIFY.png" alt="CERTVERIFY" width="690" height="515" /></p>
<p>Going back to the ASA we can now check to see if the user status has changed to enrolled:</p>
<pre>LocalCA# sh crypto ca server user-db
username: ipxuser
email:    ipxuser@ipexpert.com
dn:       &lt;None&gt;
allowed:  20:32:57 UTC Sun Mar 21 2010
notified: 1 times
enrollment status: Enrolled, Certificate valid until 20:38:58 UTC Fri Mar 18 2011,
Renewal: Allowed</pre>
<p>Excellent so we have now enrolled with the Local CA and installed our certificate, but now what!</p>
<p>Lets give it a test. Nice easy way to do this is to enable certificate authentication on the ASA’s WebVPN, which will allow us to login using the certificate instead of a username and password.</p>
<p>Using the default webvpn tunnel group we need to change the authentication type to certificate:</p>
<pre>LocalCA(config)# <span style="background-color: gray;">tunnel-group DefaultWEBVPNGroup webvpn-attributes</span>
LocalCA(config-tunnel-webvpn)# <span style="background-color: gray;">authentication certificate</span>
LocalCA(config-tunnel-webvpn)# <span style="background-color: gray;">exit</span></pre>
<p>Now try and logon to the WebVPN: https://hostname/</p>
<p><img class="aligncenter" title="CERTLOGIN" src="http://blog.ipexpert.com/wp-content/uploads/2010/06/CERTLOGIN.png" alt="CERTLOGIN" width="690" height="510" /></p>
<p>Highlight your installed certificate in the Choose Digital Certificate window and click ok. You should then be directed to the WebVPN homepage.</p>
<p><img class="aligncenter" title="WEBVPN" src="http://blog.ipexpert.com/wp-content/uploads/2010/06/WEBVPN.png" alt="WEBVPN" width="690" height="512" /></p>
<p>There you have it a successful login to WebVPN using user based certificates and the Local CA.</p>
<p>Further confirmation of successful certificate login can be seen by simply enabling debug level logging to the buffer.</p>
<pre>LocalCA(config)# <span style="background-color: gray;">sh log</span>
Syslog logging: enabled
Facility: 20
Timestamp logging: disabled
Standby logging: disabled
Debug-trace logging: disabled
Console logging: disabled
Monitor logging: disabled
Buffer logging: level debugging, 1961 messages logged
Trap logging: disabled
History logging: disabled
Device ID: disabled
Mail logging: disabled
ASDM logging: disabled
%ASA-7-725012: Device chooses cipher : RC4-SHA for the SSL session with client inside:10.4.4.100/1311
%ASA-7-717025: Validating certificate chain containing 1 certificate(s).
%ASA-7-717029: Identified client certificate within certificate chain. serial number: 03, subject name: cn=ipxuser,cn=ipxca,o=ipexpert,c=US.
%ASA-7-717030: Found a suitable trustpoint LOCAL-CA-SERVER to validate certificate.
%ASA-6-717022: Certificate was successfully validated. serial number: 03, subject name:  cn=ipxuser,cn=ipxca,o=ipexpert,c=US.
%ASA-6-717028: Certificate chain was successfully validated with warning, revocation status was not checked.
%ASA-6-725002: Device completed SSL handshake with client inside:10.4.4.100/1311
%ASA-6-113009: AAA retrieved default group policy (DfltGrpPolicy) for user = ipxca
%ASA-6-716038: Group &lt;DfltGrpPolicy&gt; User &lt;ipxca&gt; IP &lt;10.4.4.100&gt; Authentication: successful, Session Type: WebVPN.
%ASA-7-734003: DAP: User ipxca, Addr 10.4.4.100: Session Attribute aaa.cisco.grouppolicy = DfltGrpPolicy
%ASA-7-734003: DAP: User ipxca, Addr 10.4.4.100: Session Attribute aaa.cisco.username = ipxca
%ASA-7-734003: DAP: User ipxca, Addr 10.4.4.100: Session Attribute aaa.cisco.tunnelgroup = DefaultWEBVPNGroup
%ASA-6-734001: DAP: User ipxca, Addr 10.4.4.100, Connection Clientless: The following DAP records were selected for this connection: DfltAccessPolicy
%ASA-6-716001: Group &lt;DfltGrpPolicy&gt; User &lt;ipxca&gt; IP &lt;10.4.4.100&gt; WebVPN session started.
%ASA-6-302013: Built inbound TCP connection 129 for inside:10.4.4.100/1312 (10.4.4.100/1312) to identity:10.4.4.10/443 (10.4.4.10/443)
%ASA-6-725001: Starting SSL handshake with client inside:10.4.4.100/1312 for TLSv1 session.
%ASA-6-725003: SSL client inside:10.4.4.100/1312 request to resume previous session.
%ASA-6-725002: Device completed SSL handshake with client inside:10.4.4.100/1312
%ASA-6-716002: Group &lt;DfltGrpPolicy&gt; User &lt;ipxca&gt; IP &lt;10.4.4.100&gt; WebVPN session terminated: Idle Timeout.
%ASA-4-113019: Group = DefaultWEBVPNGroup, Username = ipxca, IP = 10.4.4.100, Session disconnected. Session Type: SSL, Duration: 0h:34m:52s, Bytes xmt: 145676, Bytes rcv: 30042, Reason: Idle Timeout</pre>
<p>Check out the ASA configuration guide under ‘Configuring Certificates’ for Version 8.0 and above, if you want to delve into more of the customizable features available to the ASA’s Local CA.</p>
<p><a href="http://www.cisco.com/en/US/docs/security/asa/asa80/configuration/guide/cert_cfg.html#wp1067484" target="_blank">http://www.cisco.com/en/US/docs/security/asa/asa80/configuration/guide/cert_cfg.html#wp1067484</a></p>
<p>&#8211;<br />
Stuart Hare<br />
CCIE #25616 (Security), CCSP, Microsoft MCP<br />
Sr. Support Engineer – IPexpert, Inc.<br />
URL: <a href="http://www.ipexpert.com">http://www.ipexpert.com</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="1" href="http://blog.ipexpert.com/2010/07/28/asa-local-ca-server/"></g:plusone></div><div style="text-align:left; margin: 0px 0px 0px 0px;" ><a href="http://blog.ipexpert.com/2010/07/28/asa-local-ca-server/?pfstyle=wp" style="text-decoration: none; outline: none; color: #990000;"><img class="printfriendly" src="http://cdn.printfriendly.com/pf-icon.gif" alt="Print Friendly"/><span style="font-size:14px; margin-left:3px; color: #990000;">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ipexpert.com/2010/07/28/asa-local-ca-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quality of Service for VPN Part 3 &#8211; DMVPN</title>
		<link>http://blog.ipexpert.com/2010/02/08/quality-of-service-for-vpn-part-3-dmvpn/</link>
		<comments>http://blog.ipexpert.com/2010/02/08/quality-of-service-for-vpn-part-3-dmvpn/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:24:54 +0000</pubDate>
		<dc:creator>Stuart Hare</dc:creator>
				<category><![CDATA[Ask the Expert]]></category>
		<category><![CDATA[CCIE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Techtorials]]></category>

		<guid isPermaLink="false">http://blog.ipexpert.com/?p=2443</guid>
		<description><![CDATA[We conclude this multi-part techtorial with Part 3, QoS for Dynamic Multipoint VPN. DMVPN provides the ability for large scale VPN’s, in a Hub and Spoke topology, while using a simplified Dynamic deployment model for the spokes. This is due to the reduced configuration required on the Hub device. DMVPN combines the use of four [...]]]></description>
			<content:encoded><![CDATA[<p>We conclude this multi-part techtorial with Part 3, QoS for Dynamic Multipoint VPN.</p>
<p>DMVPN provides the ability for large scale VPN’s, in a Hub and Spoke topology, while using a simplified Dynamic deployment model for the spokes. This is due to the reduced configuration required on the Hub device.</p>
<p><span id="more-2443"></span></p>
<p>DMVPN combines the use of four key technologies; IPSec, Generic Routing Encapsulation (GRE) Tunnels, Next Hop Resolution Protocol (NHRP) and a Dynamic Routing Protocol (OSPF, EIGRP etc.). In DMVPN we need to look to the NHRP protocol to provide us with a method of implementing Per Tunnel QoS; this feature is called NHRP Groups.</p>
<p>We should start to see a pattern emerging here; Tunnel Groups on the ASA; QoS Groups for IOS VPN; and now NHRP Groups for DMVPN! All of which, we use as classifiers for our QoS policies.</p>
<p>NHRP groups are configured on the Spokes GRE tunnel interfaces, and acts to identify each tunnel to the Hub device. The NHRP group is passed to the Hub during the NHRP registration process, which is sent from Spoke to Hub. Static mappings are applied to each spoke so they can identify where to initiaite their registration to. This is the key to the operation of DMVPN as a whole, as its responsible for dynamically updating the Hubs NHRP tables with the registering spokes information. This spoke info allows the establishment of the IPSec SA’s in both directions.</p>
<p>Assuming that the DMVPN configuration is already in place, several requirements/restrictions exist for NHRP groups:</p>
<p>•	CEF must be enabled to use NHRP Groups</p>
<p>•	You can only use 1 NHRP Group Per DMVPN Tunnel Interface</p>
<p>•	If multiple tunnel interfaces exist on the spoke then seperate groups names can be used on each interface.</p>
<p>The slight difference we have over the previous examples for VPN QoS, is although the groups are defined on the spoke router, the policy is defined and applied on the Hub.</p>
<p>The Spoke side configuration is pretty simple, all we need to do is enter tunnel interface config mode and apply the group to the GRE Interface, so for example set an NHRP group of SpokeGrp1 to the interface for Tunnel1:</p>
<pre>interface Tunnel 1
 ip nhrp group SpokeGrp1</pre>
<p>Simple huh! The bulk of the configuration is actually done on the Hub router, so all were doing here is tagging the tunnel with an ID. Now for the Hub.</p>
<p>In comparison to our previous examples the NHRP group is not matched within the Class Map, instead we use an NHRP Map command to associate the group to a defined QoS policy. This leaves us the flexibility to match on specific traffic in our class maps.</p>
<p>For example on the Hub GRE interface map the group to a policy:</p>
<pre>Interface Tunnel 1
 ip nhrp map group SpokeGrp1 service-policy output SpokeGrp1_QoS</pre>
<p>Ok lets move on to an example scenario.</p>
<p><a href="http://blog-dev.ipexpert.com/wp-content/uploads/2010/02/DMVPN_QOS1.jpg"><img class="aligncenter size-medium wp-image-2444" title="DMVPN_QOS" src="http://blog.ipexpert.com/files/2010/02/DMVPN_QOS-300x259.jpg" alt="" width="300" height="259" /></a></p>
<p>Above we have a simple Hub and two spoke DMVPN setup. The tunnel for R4 Spoke 1 will be tagged with the NHRP Group of WEST, and R5 Spoke 2 will be tagged as EAST.</p>
<p>QoS policies will be defined on the Hub router using the following:</p>
<p style="padding-left: 30px">•	R4’s WEST group requires to be shaped to 1Mb</p>
<p style="padding-left: 30px">•	R5’s EAST group requires a nested policy for the following:</p>
<p style="padding-left: 30px">•	Prioritise critical application traffic marked as DSCP AF43 to 512k</p>
<p style="padding-left: 30px">•	Shape all traffic to 1mb</p>
<p>Configuration:</p>
<p>So starting with the Spokes we need to assign the NHRP groups:</p>
<p>R4:</p>
<pre>Interface Tunnel 1
 ip nhrp group WEST</pre>
<p>R5:</p>
<pre>Interface Tunnel 1
 ip nhrp group EAST</pre>
<p>Then we move to the Hub router to define the QoS policies and associate them to each group:</p>
<p>R2:</p>
<pre>class-map match-all PRIORITY
 match ip dscp af43
!
policy-map PRIORITY_QOS
 class PRIORITY
 priority 512
!
policy-map WEST_QOS
 class class-default
 shape average 1000000
!
policy-map EAST_QOS
 class class-default
 shape average 1000000
 service-policy PRIORITY_QOS
!
interface Tunnel1
 ip nhrp map group EAST service-policy output EAST_QOS
 ip nhrp map group WEST service-policy output WEST_QOS</pre>
<p>There you have it, the configuration for the above requirements. Class defaults are used to match on any traffic flow. The small addition here is the inclusion of the hierarchical nested policy. This is made up of two separate policies, a Child policy (PRIORITY_QOS) that is in turn applied to the Parent policy (EAST_QOS). The Parent / Child relationship allows a more granular approach, by providing the ability to assign different actions to both Parent and Child, based on the traffic flows defined with their respective classes.</p>
<p>A nice plus point to this method is that the QoS is applied on the arrival of the next packet without the need to restart the IPSec SA’s.</p>
<p>Verification:</p>
<p>Now we have the config in place next step is to verify it. Verification should be done on the Hub Router. Show DMVPN Detail is a good place to start. Here we can see the peer information, the group mapping and the applied service policies.</p>
<pre>R2_Hub#show dmvpn detail
Legend: Attrb --&gt; S - Static, D - Dynamic, I - Incomplete
N - NATed, L - Local, X - No Socket
# Ent --&gt; Number of NHRP entries with same NBMA peer
NHS Status: E --&gt; Expecting Replies, R --&gt; Responding
UpDn Time --&gt; Up or Down Time for a Tunnel
===================================================================

Intferface Tunnel1 is up/up, Addr. is 10.1.245.2, VRF ""
Tunnel Src./Dest. addr: 192.1.2.2/MGRE, Tunnel VRF ""
Protocol/Transport: "multi-GRE/IP", Protect "DMP"
Type:Hub, Total NBMA Peers (v4/v6): 2

# Ent  Peer NBMA Addr Peer Tunnel Add State  UpDn Tm Attrb    Target Network
----- --------------- --------------- ----- -------- ----- -----------------
1      192.1.2.4      10.1.245.4    UP 01:15:20    D      10.1.245.4/32
NHRP group: WEST
Output QoS service-policy applied: WEST_QOS

1      192.1.2.5      10.1.245.5    UP 01:15:31    D      10.1.245.5/32
NHRP group: EAST
Output QoS service-policy applied: EAST_QOS</pre>
<p>Or alternatively, show ip nhrp group-map provides the more specific information:</p>
<pre>R2_Hub#show ip nhrp group-map
Interface: Tunnel1
NHRP group: EAST
QoS policy: EAST_QOS
Tunnels using the QoS policy:
Tunnel destination overlay/transport address
10.1.245.5/192.1.2.5

NHRP group: WEST
QoS policy: WEST_QOS
Tunnels using the QoS policy:
Tunnel destination overlay/transport address
10.1.245.4/192.1.2.4</pre>
<p>Final piece of verification is to check that the policy is in effect.</p>
<p>Use the show policy-map multipoint to confirm this:</p>
<pre>R2_Hub#show policy-map multipoint

Interface Tunnel1 &lt;--&gt; 192.1.2.4

Service-policy output: WEST_QOS

Class-map: class-default (match-any)
4630 packets, 5171238 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
queue limit 250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 1000000, bc 4000, be 4000
target shape rate 1000000

Interface Tunnel1 &lt;--&gt; 192.1.2.5

Service-policy output: EAST_QOS

Class-map: class-default (match-any)
4979 packets, 1989296 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
queue limit 250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 1000000, bc 4000, be 4000
target shape rate 1000000

Service-policy : PRIORITY_QOS

queue stats for all priority classes:

queue limit 128 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0

Class-map: PRIORITY (match-all)
1000 packets, 124000 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip dscp af43 (38)
Priority: 512 kbps, burst bytes 12800, b/w exceed drops: 0

Class-map: class-default (match-any)
255 packets, 22278 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any

queue limit 122 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
R2_Hub#</pre>
<p>For reference, Ive included the core configs for each router below.</p>
<pre>R2_Hub#
!
hostname R2_Hub
!
crypto isakmp policy 10
 encr aes
 authentication pre-share
 group 5
 crypto isakmp key cisco address 0.0.0.0 0.0.0.0
!
!
crypto ipsec transform-set TS esp-aes esp-sha-hmac
!
crypto ipsec profile DMP
 set transform-set TS
!
class-map match-all PRIORITY
 match ip dscp af43
!
policy-map PRIORITY_QOS
 class PRIORITY
 priority 512
 class class-default
policy-map WEST_QOS
 class class-default
 shape average 1000000
policy-map EAST_QOS
 class class-default
 shape average 1000000
 service-policy PRIORITY_QOS
!
interface Tunnel1
 ip address 10.1.245.2 255.255.255.0
 no ip redirects
 ip mtu 1400
 no ip next-hop-self eigrp 1
 ip nhrp authentication cisco
 ip nhrp map multicast dynamic
 ip nhrp map group EAST service-policy output EAST_QOS
 ip nhrp map group WEST service-policy output WEST_QOS
 ip nhrp network-id 245
 ip nhrp holdtime 300
 ip tcp adjust-mss 1360
 no ip split-horizon eigrp 1
 tunnel source FastEthernet1/1
 tunnel mode gre multipoint
 tunnel protection ipsec profile DMP
!
interface FastEthernet1/0
 no switchport
 ip address 10.1.2.2 255.255.255.0
!
interface FastEthernet1/1
 no switchport
 ip address 192.1.2.2 255.255.255.0
!
router eigrp 1
 network 10.1.2.0 0.0.0.255
 network 10.1.245.0 0.0.0.255
 no auto-summary
!</pre>
<p>  </p>
<pre>R4_Spoke1#
!
crypto isakmp policy 10
 encr aes
 authentication pre-share
 group 5
 crypto isakmp key cisco address 0.0.0.0 0.0.0.0
!
crypto ipsec transform-set TS esp-aes esp-sha-hmac
!
crypto ipsec profile DMP
 set transform-set TS
!
interface Tunnel1
 bandwidth 1000
 ip address 10.1.245.4 255.255.255.0
 no ip redirects
 ip mtu 1400
 ip nhrp authentication cisco
 ip nhrp group WEST
 ip nhrp map multicast 192.1.2.2
 ip nhrp map 10.1.245.2 192.1.2.2
 ip nhrp network-id 245
 ip nhrp holdtime 300
 ip nhrp nhs 10.1.245.2
 ip tcp adjust-mss 1360
 tunnel source FastEthernet0/1
 tunnel mode gre multipoint
 tunnel protection ipsec profile DMP
!
interface FastEthernet0/0
 ip address 10.1.4.4 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.1.2.4 255.255.255.0
 duplex auto
 speed auto
!
router eigrp 1
 network 10.1.4.0 0.0.0.255
 network 10.1.245.0 0.0.0.255
 no auto-summary
!</pre>
<p> </p>
<pre>R5_spoke2#
!
crypto isakmp policy 10
encr aes
authentication pre-share
group 5
crypto isakmp key cisco address 0.0.0.0 0.0.0.0
!
!
crypto ipsec transform-set TS esp-aes esp-sha-hmac
!
crypto ipsec profile DMP
set transform-set TS
!
interface Tunnel1
bandwidth 1000
ip address 10.1.245.5 255.255.255.0
no ip redirects
ip mtu 1400
ip nhrp authentication cisco
ip nhrp group EAST
ip nhrp map multicast 192.1.2.2
ip nhrp map 10.1.245.2 192.1.2.2
ip nhrp network-id 245
ip nhrp holdtime 300
ip nhrp nhs 10.1.245.2
ip tcp adjust-mss 1360
tunnel source FastEthernet0/1
tunnel mode gre multipoint
tunnel protection ipsec profile DMP
!
interface FastEthernet0/0
ip address 10.1.5.5 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.1.2.5 255.255.255.0
duplex auto
speed auto
!
router eigrp 1
network 10.1.5.0 0.0.0.255
network 10.1.245.0 0.0.0.255
no auto-summary
!
end</pre>
<p>Hopefully these three Techtorials have provided some insight into the ways we can incorporate common Quality of Service methods into our VPN deployments, and ultimately bolster the knowledge required for success in your future lab attempts. See ya soon with some more posts :-)</p>
<p>Stu&#8230;</p>
<p>Regards,</p>
<p>Stuart Hare</p>
<p>CCIE #25616 (Security), CCSP, Microsoft MCP</p>
<p>Sr. Support Engineer – IPexpert, Inc.</p>
<p>URL: http://www.IPexpert.com</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="1" href="http://blog.ipexpert.com/2010/02/08/quality-of-service-for-vpn-part-3-dmvpn/"></g:plusone></div><div style="text-align:left; margin: 0px 0px 0px 0px;" ><a href="http://blog.ipexpert.com/2010/02/08/quality-of-service-for-vpn-part-3-dmvpn/?pfstyle=wp" style="text-decoration: none; outline: none; color: #990000;"><img class="printfriendly" src="http://cdn.printfriendly.com/pf-icon.gif" alt="Print Friendly"/><span style="font-size:14px; margin-left:3px; color: #990000;">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ipexpert.com/2010/02/08/quality-of-service-for-vpn-part-3-dmvpn/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Quality of Service for VPN Part 2 &#8211; IOS</title>
		<link>http://blog.ipexpert.com/2010/02/03/quality-of-service-for-vpn-part-2-ios/</link>
		<comments>http://blog.ipexpert.com/2010/02/03/quality-of-service-for-vpn-part-2-ios/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 04:00:45 +0000</pubDate>
		<dc:creator>Stuart Hare</dc:creator>
				<category><![CDATA[Ask the Expert]]></category>
		<category><![CDATA[CCIE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Strategy]]></category>
		<category><![CDATA[Techtorials]]></category>

		<guid isPermaLink="false">http://blog.ipexpert.com/?p=2310</guid>
		<description><![CDATA[Here in part 2 we are going to continue with QoS for IOS VPN’s. In Part 1 for the ASA we showed that QoS policies were defined and applied using MPF (Modular Policy Framework). With IOS we also use another modular component called MQC, or Modular QoS Command-Line Interface. MQC although similar in nature to [...]]]></description>
			<content:encoded><![CDATA[<p>Here in part 2 we are going to continue with QoS for IOS VPN’s. In Part 1 for the ASA we showed that QoS policies were defined and applied using MPF (Modular Policy Framework). With IOS we also use another modular component called MQC, or Modular QoS Command-Line Interface. MQC although similar in nature to MPF, is far more powerful and granular.<span id="more-2310"></span></p>
<p>The similarities appear when we look into the methods of configuration, both use Classes, Polices and Service-policies to define and apply the required methods of QoS.</p>
<p>The big difference is that we have far more granularity in terms of the match criteria within the Classes, and the Set / Action criteria we can apply in these Policies. Not only can we control the traffic flow, we can also mark the traffic to a specific DSCP or IP Precedence value, so it can be controlled in another part of the network.</p>
<p>There are too many methods to list here so check out the following QoS documentation for a detailed list of supported match and action criteria:</p>
<p>http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/qos_mqc.html#wp1043620</p>
<p>When it comes to QoS and IPSec in IOS we have a nice feature called qos-groups.</p>
<p>Qos-groups allow us to tag IPSec flows with a group id or number, which we can use as match criteria in a class map, to differentiate between multiple tunnels (similar to the match tunnel-group on the ASA).</p>
<p>To use qos-groups we also need to utilize another VPN feature, the ISAKMP profile.</p>
<p>The ISAKMP Profile provides us with the ability, to uniquely identify, different flows of VPN traffic, using its own version of match statements. Match statements here typically match on identities using peer IP addresses, hostnames, or even groups as used in EZVPN.</p>
<p>They can be used to set IKE Phase 1.5 (XAUTH) parameters, such as client configs, authentication and authorization lists, and also CA Trustpoint’s and VRF’s etc.</p>
<p>Note that qos groups cannot be used currently without the ISAKMP profile.</p>
<p>Ok so lets see how we combine these two features for our QoS configuration.</p>
<p>First off we need to create an ISAKMP profile, and define the match type. Then from within the profile we set the qos group tag or id.</p>
<p>Valid values for the qos-group number are 1 &#8211; 1023.</p>
<pre>crypto isakmp profile &lt;profile name&gt;</pre>
<pre>match identity address &lt;ip address&gt;</pre>
<pre>qos-group &lt;number&gt;</pre>
<p>What we are actually doing here is very much like QoS marking, if this is matched then mark with this. So effectively if the VPNs peer IP address is X, then set the qos group for this VPN to Y. Now we have the basic ISAKMP profile defined and the qos-group set, we then need to look at how we manipulate this.</p>
<p>Thinking back to part 1, what we needed to do next was to identify our interesting traffic using Class Maps. And this is where we will look to use our qos group as part of the match criteria.</p>
<pre>class-map match-all &lt;class_name&gt;</pre>
<pre>match qos-group &lt;number&gt;</pre>
<p>Then we are back in the land of policies and service polices, where we call our classes and apply our required QoS methods.</p>
<p>Lets look at a scenario to tie this all together.</p>
<p style="text-align: center;"><a href="http://blog-dev.ipexpert.com/wp-content/uploads/2010/01/IOS_QOS111.jpg"><img class="size-medium wp-image-2323 aligncenter" title="IOS_QOS1" src="http://blog.ipexpert.com/files/2010/01/IOS_QOS11-300x140.jpg" alt="" width="300" height="140" /></a></p>
<p>Here we have a basic Head Office, Branch Office environment with support for Remote Access VPN. R1 is our Hub device and is terminating both a Site to Site VPN for the Branch to R2, and Remote Access VPN for remote users using EZVPN.</p>
<p>As we used both Policing and LLQ/Priority Queueing for the ASA example in Part 1, we will look at utilizing two different methods here. Traffic Shaping will be used for the Branch Office,  while the RAS VPN will be dedicated a percentage of the available interface bandwidth.</p>
<p>Assuming the VPN’s have an existing setup, and that we are applying our QoS to R1, lets first look at the config for the Branch office. Recapping, we need to first create our ISAKMP profile, define the match for the peer IP address of R2, and set the qos-group, which we will assign the value of 1. One extra step is that we will also use a Crypto keyring for the pre shared key.</p>
<pre>crypto keyring Branch</pre>
<pre>pre-shared-key address 192.1.2.2 key cisco</pre>
<pre>crypto isakmp profile Branch</pre>
<pre>keyring Branch</pre>
<pre>match identity address 192.1.2.2 255.255.255.255</pre>
<pre>qos-group 1</pre>
<pre>crypto map CM 10 ipsec-isakmp</pre>
<pre>set isakmp-profile Branch</pre>
<p>If we now reestablish the VPN to R2 we should see that IPSec SA now has the qos-group assigned to it:</p>
<pre>R1#show crypto ipsec sa</pre>
<pre>interface: FastEthernet0/1</pre>
<pre>Crypto map tag: CM, local addr 192.1.2.1</pre>
<pre>protected vrf: (none)</pre>
<pre>local  ident (addr/mask/prot/port): (10.1.1.0/255.255.255.0/0/0)</pre>
<pre>remote ident (addr/mask/prot/port): (192.1.1.0/255.255.255.0/0/0)</pre>
<pre>current_peer 192.1.2.2 port 500</pre>
<pre>PERMIT, flags={origin_is_acl,}</pre>
<pre>#pkts encaps: 134, #pkts encrypt: 134, #pkts digest: 134</pre>
<pre>#pkts decaps: 134, #pkts decrypt: 134, #pkts verify: 134</pre>
<pre>#pkts compressed: 0, #pkts decompressed: 0</pre>
<pre>#pkts not compressed: 0, #pkts compr. failed: 0</pre>
<pre>#pkts not decompressed: 0, #pkts decompress failed: 0</pre>
<pre>#send errors 1, #recv errors 0</pre>
<pre>qos group is set to 1</pre>
<p>Next step is to define our QoS policy and assign it. Remembering our three main steps, we need to use the class map to classify our interesting traffic, create a policy map to assign our QoS method and the Service Policy to apply the policy to an interface.</p>
<pre>class-map match-all Branch_QoS</pre>
<pre>match qos-group 1</pre>
<pre>policy-map VPN_QoS</pre>
<pre>class Branch_QoS</pre>
<pre>shape average 8000</pre>
<pre>interface FastEthernet0/1</pre>
<pre>ip address 192.1.2.1 255.255.255.0</pre>
<pre>crypto map CM</pre>
<pre>service-policy output VPN_QoS</pre>
<p>So in a nutshell the above configuration is taking any VPN traffic marked with qos group 1, and applying traffic shaping to an average rate of 8kbps.</p>
<p>Note that when we apply the service policy to an interface to enable the QoS features, we need to ensure that it is assigned to the same interface that your crypto map is assigned to. Also note that QoS groups can only be applied to outbound service policies.</p>
<p>Moving on to the Remote Access clients, we pretty much follow the same procedure as we did for the branch office VPN. Main difference here is the match criteria for the ISAKMP profile. As the peer addresses of the clients can change regularly, we cant match on the peers IP address. But as we are using EZVPN we can match on its group name. For the RAS VPN we are using qos group 4.</p>
<pre>crypto isakmp profile RAS</pre>
<pre>match identity group RASGrp</pre>
<pre>qos-group 4</pre>
<pre>crypto dynamic-map RASDM 20</pre>
<pre>set isakmp-profile RAS</pre>
<pre>class-map match-all RAS</pre>
<pre>match qos-group 4</pre>
<pre>policy-map VPN_QoS</pre>
<pre>class RAS</pre>
<pre>bandwidth percent 1</pre>
<p>For the RAS VPNs the ISAKMP profile is applied to the existing dynamic crypto map, and the QoS method applies a set percentage of interface bandwidth (1%) for the VPN traffic.</p>
<p>The amount of actual bandwidth that gets assigned, will vary based on the interface and the hardware used. Once we have a RAS VPN established we can check the IPSec SA’s once more, to verify they are up and that the qos group has been set correctly:</p>
<pre>R1#show crypto ipsec sa</pre>
<pre>interface: FastEthernet0/1</pre>
<pre>Crypto map tag: CM, local addr 192.1.2.1</pre>
<pre>protected vrf: (none)</pre>
<pre>local  ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)</pre>
<pre>remote ident (addr/mask/prot/port): (10.4.4.7/255.255.255.255/0/0)</pre>
<pre>current_peer 192.1.2.100 port 1326</pre>
<pre>PERMIT, flags={}</pre>
<pre>#pkts encaps: 327095, #pkts encrypt: 327095, #pkts digest: 327095</pre>
<pre>#pkts decaps: 196642, #pkts decrypt: 196642, #pkts verify: 196642</pre>
<pre>#pkts compressed: 0, #pkts decompressed: 0</pre>
<pre>#pkts not compressed: 0, #pkts compr. failed: 0</pre>
<pre>#pkts not decompressed: 0, #pkts decompress failed: 0</pre>
<pre>#send errors 0, #recv errors 0</pre>
<pre>qos group is set to 4</pre>
<p>The final step we need to take is to generate some traffic to verify that our traffic is being classified correctly, matched on and ultimately have our QoS features applied to the traffic flows. Firing some large ICMP traffic between HostA and HostB, and, HostA and RAS Client will suffice for this test.</p>
<pre>R1#show policy-map interface f0/1</pre>
<pre>FastEthernet0/1</pre>
<pre>Service-policy output: VPN_QoS</pre>
<pre>Class-map: Branch_QoS (match-all)</pre>
<pre>304 packets, 242280 bytes</pre>
<pre>5 minute offered rate 0 bps, drop rate 0 bps</pre>
<pre>Match: qos-group 1</pre>
<pre>Traffic Shaping</pre>
<pre>Target/Average   Byte   Sustain   Excess    Interval  Increment</pre>
<pre>Rate           Limit  bits/int  bits/int  (ms)      (bytes)</pre>
<pre>8000/8000      2000   8000      8000      1000      1000</pre>
<pre>Adapt  Queue     Packets   Bytes     Packets    Bytes      Shaping</pre>
<pre>Active  Depth                         	      Delayed   Delayed   Active</pre>
<pre>-      		1         239       229090    202          215964    yes</pre>
<pre>Class-map: RAS (match-all)</pre>
<pre>314399 packets, 257760858 bytes</pre>
<pre>5 minute offered rate 2551000 bps, drop rate 0 bps</pre>
<pre>Match: qos-group 4</pre>
<pre>Queueing</pre>
<pre>Output Queue: Conversation 265</pre>
<pre>Bandwidth 1 (%)</pre>
<pre>Bandwidth 1000 (kbps)Max Threshold 64 (packets)</pre>
<pre>(pkts matched/bytes matched) 4/3352</pre>
<pre>(depth/total drops/no-buffer drops) 0/0/0</pre>
<pre>Class-map: class-default (match-any)</pre>
<pre>1624 packets, 181439 bytes</pre>
<pre>5 minute offered rate 0 bps, drop rate 0 bps</pre>
<pre>Match: any</pre>
<pre>R1#</pre>
<p>From the policy-map output above, starting with the Branch Class, we see that 304 packets  have been successfully matched for qos group 1, the traffic is being actively shaped to 8k, with packets being queued as the token bucket fills.</p>
<p>With the RAS class output, we needed to generate quite a bit more traffic as you can see. Again the successful matches are occurring based on qos group 4. And similar to shaping we see that by using the bandwidth method, we are also assigned a queue. The bandwidth queue comes into play as the bandwidth percentage is exceeded. Packets are placed into the queue, and are transmitted as and when it becomes available. This queue also has a threshold limit, and if this is exceeded then further packets will be dropped.</p>
<p>Looking at the pkts matched/bytes matched counter we see that 4 pkts and 3352 bytes were placed in to the queue, with no packets being dropped. Happy days :)</p>
<p>Just for completeness see R1’s configuration below.</p>
<p>Hopefully this post has provided some insight into how the simple use of QoS groups can be integrated to assist us in applying different QoS features to IOS VPN’s.</p>
<pre>R1#sh run</pre>
<pre>Building configuration...</pre>
<pre>Current configuration : 2414 bytes</pre>
<pre>!</pre>
<pre>version 12.4</pre>
<pre>service timestamps debug datetime msec</pre>
<pre>service timestamps log datetime msec</pre>
<pre>no service password-encryption</pre>
<pre>!</pre>
<pre>hostname R1</pre>
<pre>!</pre>
<pre>boot-start-marker</pre>
<pre>warm-reboot</pre>
<pre>boot-end-marker</pre>
<pre>!</pre>
<pre>aaa new-model</pre>
<pre>!</pre>
<pre>aaa authentication login XAUTH local</pre>
<pre>aaa authorization network XAUTH local</pre>
<pre>!</pre>
<pre>aaa session-id common</pre>
<pre>memory-size iomem 15</pre>
<pre>!</pre>
<pre>dot11 syslog</pre>
<pre>!</pre>
<pre>ip cef</pre>
<pre>!</pre>
<pre>multilink bundle-name authenticated</pre>
<pre>!</pre>
<pre>voice-card 0</pre>
<pre>no dspfarm</pre>
<pre>!</pre>
<pre>vtp domain ipexpert</pre>
<pre>vtp mode transparent</pre>
<pre>username vpnuser password 0 cisco</pre>
<pre>!</pre>
<pre>crypto keyring Branch</pre>
<pre>pre-shared-key address 192.1.2.2 key cisco</pre>
<pre>!</pre>
<pre>crypto isakmp policy 10</pre>
<pre>encr aes</pre>
<pre>authentication pre-share</pre>
<pre>group 5</pre>
<pre>!</pre>
<pre>crypto isakmp policy 20</pre>
<pre>encr aes</pre>
<pre>authentication pre-share</pre>
<pre>group 2</pre>
<pre>crypto isakmp key cisco address 192.1.2.2</pre>
<pre>!</pre>
<pre>crypto isakmp client configuration group RASGrp</pre>
<pre>key cisco</pre>
<pre>pool RASPOOL</pre>
<pre>acl 100</pre>
<pre>save-password</pre>
<pre>netmask 255.255.255.0</pre>
<pre>!</pre>
<pre>crypto isakmp profile Branch</pre>
<pre>keyring Branch</pre>
<pre>match identity address 192.1.2.2 255.255.255.255</pre>
<pre>qos-group 1</pre>
<pre>!</pre>
<pre>crypto isakmp profile RAS</pre>
<pre>match identity group RASGrp</pre>
<pre>client authentication list XAUTH</pre>
<pre>isakmp authorization list XAUTH</pre>
<pre>client configuration address respond</pre>
<pre>qos-group 4</pre>
<pre>!</pre>
<pre>crypto ipsec transform-set TS esp-aes esp-sha-hmac</pre>
<pre>!</pre>
<pre>crypto dynamic-map RASDM 20</pre>
<pre>set transform-set TS</pre>
<pre>set isakmp-profile RAS</pre>
<pre>reverse-route</pre>
<pre>!</pre>
<pre>crypto map CM 10 ipsec-isakmp</pre>
<pre>set peer 192.1.2.2</pre>
<pre>set transform-set TS</pre>
<pre>set isakmp-profile Branch</pre>
<pre>match address VPN</pre>
<pre>crypto map CM 20 ipsec-isakmp dynamic RASDM</pre>
<pre>!</pre>
<pre>archive</pre>
<pre>log config</pre>
<pre>hidekeys</pre>
<pre>!</pre>
<pre>class-map match-all Branch_QoS</pre>
<pre>match qos-group 1</pre>
<pre>!</pre>
<pre>class-map match-all RAS</pre>
<pre>match qos-group 4</pre>
<pre>!</pre>
<pre>policy-map VPN_QoS</pre>
<pre>class Branch_QoS</pre>
<pre>shape average 8000</pre>
<pre>class RAS</pre>
<pre>bandwidth percent 1</pre>
<pre>!</pre>
<pre>interface FastEthernet0/0</pre>
<pre>ip address 10.1.1.1 255.255.255.0</pre>
<pre>duplex auto</pre>
<pre>speed auto</pre>
<pre>!</pre>
<pre>interface FastEthernet0/1</pre>
<pre>ip address 192.1.2.1 255.255.255.0</pre>
<pre>duplex auto</pre>
<pre>speed auto</pre>
<pre>crypto map CM</pre>
<pre>service-policy output VPN_QoS</pre>
<pre>!</pre>
<pre>ip local pool RASPOOL 10.4.4.0 10.4.4.10</pre>
<pre>ip forward-protocol nd</pre>
<pre>ip route 192.1.1.0 255.255.255.0 192.1.2.2</pre>
<pre>!</pre>
<pre>no ip http server</pre>
<pre>no ip http secure-server</pre>
<pre>!</pre>
<pre>ip access-list extended VPN</pre>
<pre>permit ip 10.1.1.0 0.0.0.255 192.1.1.0 0.0.0.255</pre>
<pre>!</pre>
<pre>access-list 100 permit ip 10.1.1.0 0.0.0.255 any</pre>
<pre>!</pre>
<pre>control-plane</pre>
<pre>!</pre>
<pre>line con 0</pre>
<pre>exec-timeout 0 0</pre>
<pre>line aux 0</pre>
<pre>line vty 0 4</pre>
<pre>!</pre>
<pre>scheduler allocate 20000 1000</pre>
<pre>!</pre>
<pre>end</pre>
<pre>R1#</pre>
<p>Stuart Hare</p>
<p>CCIE #25616 (Security), CCSP, Microsoft MCP</p>
<p>Sr. Support Engineer – IPexpert, Inc.</p>
<p>URL: http://www.IPexpert.com</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="1" href="http://blog.ipexpert.com/2010/02/03/quality-of-service-for-vpn-part-2-ios/"></g:plusone></div><div style="text-align:left; margin: 0px 0px 0px 0px;" ><a href="http://blog.ipexpert.com/2010/02/03/quality-of-service-for-vpn-part-2-ios/?pfstyle=wp" style="text-decoration: none; outline: none; color: #990000;"><img class="printfriendly" src="http://cdn.printfriendly.com/pf-icon.gif" alt="Print Friendly"/><span style="font-size:14px; margin-left:3px; color: #990000;">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ipexpert.com/2010/02/03/quality-of-service-for-vpn-part-2-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quality of Service for VPN Part 1 &#8211; ASA</title>
		<link>http://blog.ipexpert.com/2010/01/04/quality-of-service-for-vpn-part-1-asa/</link>
		<comments>http://blog.ipexpert.com/2010/01/04/quality-of-service-for-vpn-part-1-asa/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:56:47 +0000</pubDate>
		<dc:creator>Stuart Hare</dc:creator>
				<category><![CDATA[CCIE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Strategy]]></category>
		<category><![CDATA[Techtorials]]></category>

		<guid isPermaLink="false">http://blog.ipexpert.com/?p=2242</guid>
		<description><![CDATA[Hi everyone and welcome to this my first post on the IPexpert Blog.  I’m going to kick off here with a multipart post on Quality of Service for VPN’s. Part 1 will concentrate on the VPN QoS for the ASA firewall, with Part 2 covering VPN QoS for IOS routers. So lets start by diving [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone and welcome to this my first post on the IPexpert Blog.  I’m going to kick off here with a multipart post on Quality of Service for VPN’s.</p>
<p>Part 1 will concentrate on the VPN QoS for the ASA firewall, with Part 2 covering VPN QoS for IOS routers. So lets start by diving straight into the ASA.  Firstly, lets take a quick look at what Quality of Service features are available for the ASA:</p>
<p>Priority or Low Latency Queueing &#8211; This is the primary method used when dealing with traffic flows that do not react well to network latency, such as voice and video etc. Traffic in the Priority queue will be processed and transmitted ahead of all other traffic.</p>
<p><span id="more-2242"></span></p>
<p>Policing &#8211; Uses a token bucket to limit the flow of traffic to the specified rate. If there are not enough tokens in the bucket, any further packets arriving are discarded.</p>
<p>Shaping &#8211; Uses a token bucket and data buffer to queue traffic so it can be transmitted at a specified rate, within the timing interval. Unlike Policing if the token bucket is full then the packets must wait in the queue until there is sufficient space to continue transmission.</p>
<p>Now we know whats available lets take a look at how to implement it for our VPN’s.</p>
<p>Well I guess we can go about looking at this in two different ways:</p>
<p>VPN traffic flowing through the ASA</p>
<p>OR</p>
<p>VPNs terminating on the ASA</p>
<p>Lets begin with VPN traffic through the ASA.</p>
<p><a href="http://blog-dev.ipexpert.com/wp-content/uploads/2010/01/ASA-QOS-21.jpg"><img class="alignnone size-medium wp-image-2243" src="http://blog.ipexpert.com/files/2010/01/ASA-QOS-2-300x42.jpg" alt="ASA QOS-2" width="300" height="42" /></a></p>
<p>The above image shows a basic setup of two remote networks, separated by an ASA Firewall. In this instance imagine we have a LAN to LAN VPN terminating between routers R1 and R2. With ISAKMP &amp; IPSEC traffic being permitted bidirectionally on the ASA.</p>
<p>The first step we have with any QoS deployment is to identify and classify the traffic we want to control. So with VPN traffic passing through the ASA, we potentially see three different protocols commonly in use.</p>
<p>ISAKMP &#8211; 	UDP 500</p>
<p>ESP &#8211; 		Protocol 50</p>
<p>NAT-T -	UDP 4500</p>
<p>So that&#8217;s our interesting traffic identified, now we have to classify it. On the ASA, QoS is part of the Modular Policy Framework or MPF for short. In MPF we use class maps to classify the traffic we want to match against. Within the class map we have different criteria available for us to match on, for this scenario we will use an ACL which will permit any VPN traffic to be matched.</p>
<pre>access-list VPNQOS permit udp any any eq 500
access-list VPNQOS permit esp any any
access-list VPNQOS permit udp any any eq 4500
class-map VPNQOS_CM
 description “Match ACL classifying any vpn traffic”
 match access-list VPNQOS</pre>
<p>The next stage after classification is to apply an action to this traffic via the use of a policy map. In the policy map we will first call the previously configured class map and from the class sub-configuration mode we apply our desired method of QoS. For this instance we will police the outbound VPN traffic to a conform rate of 1Mb with a burst capacity of 37.5Kb</p>
<pre>policy-map VPNQOS_PM
class VPNQOS_CM
police output 1000000 37500</pre>
<p>The final stage is to enable the policy. This is done by assigning the policy map to either an interface or to the global plane. As there is a global policy map by default (policy-map global_policy), if we wanted to enable this globally we could have called the class VPNQOS_CM within the global policy instead, this would enable the VPN QoS on all available interfaces. Instead we are going to assign it to the outside interface of the ASA, this is done using the following:</p>
<pre>service-policy VPNQOS_PM interface outside</pre>
<p>To verify your configuration and statistics for policing use the following show command:</p>
<p>show service-policy police</p>
<pre>asa# show service-policy police
Interface outside:
Service-policy: VPNQOS_PM
Class-map: VPNQOS_CM
Output police Interface outside:
cir 1000000 bps, bc 37500 bytes
conformed 2462 packets, 2005204 bytes; actions:  drop
exceeded 53 packets, 42926 bytes; actions:  drop
conformed 235616 bps, exceed 5048 bps
asa#</pre>
<p>So there you have a QoS configuration using policing, for any VPN traffic traversing the ASA.</p>
<p>Now lets move on to QoS for VPN’s terminating on the ASA.</p>
<p><a href="http://blog-dev.ipexpert.com/wp-content/uploads/2010/01/ASA-QOS-31.jpg"><img class="alignnone size-medium wp-image-2244" src="http://blog.ipexpert.com/files/2010/01/ASA-QOS-3-300x109.jpg" alt="ASA QOS-3" width="300" height="109" /></a></p>
<p>So here we extend our topology to include a branch office and an external partner. Both sites will have a VPN terminating on the ASA, using the VPN Tunnel Groups 192.1.2.2 and 192.1.2.3 respectively.</p>
<p>As the branch office will be using IP telephony, extending from the head office, we want to make sure that this VPN will have priority over any others. To accommodate this we will use LLQ (Priority) queue for the branch office VPN and For the External Partner VPN we will police the traffic to 2Mb.</p>
<p>Again as in the previous example we use the 3 stages for QoS configuration:</p>
<p>•	Identify &amp; Classify traffic</p>
<p>•	Apply Action</p>
<p>•	Assign &amp; enable the Policy</p>
<p>OK, so when dealing with directly terminating VPN’s on the ASA, we have some different options to use in terms of the classification of the traffic. As we can differentiate between the two VPN’s, via the separate tunnel groups for each, we can also use this as a valid classifier in a match statement. In addition to this we can also match on flow characteristics, as well as QoS marking such as DSCP &amp; IP Precedence.</p>
<p>The following defines a set of example class maps for this scenario:</p>
<pre>class-map Branch_CM
 description “match on Branch Tunnel Group based on flows”
 match tunnel-group 192.1.2.2
 match dscp ef
class-map ExPart_CM
 description “match on External Partner Tunnel Group based on flows”
 match tunnel-group 192.1.2.3
 match flow ip destination-address</pre>
<p>Each class map has 2 statements, and works in a first match, next match approach. For the Branch class our first match is the tunnel group 192.1.2.2, followed by our EF (DSCP 46) marked Voice traffic. In comparison the ExPart class first matches on the tunnel group 192.1.2.3, with the next match then based on each flow going through the tunnel based on the destination IP address.</p>
<p>Next on our list is applying the action, but as we are using Priority Queuing for the branch, we have an extra step, which is creating the Priority Queue itself. This has two parts; create the queue by assigning to an interface; and an optional stage of changing the size of the queue limit and the transmit ring limit. Defaults settings being 1024 and 128 packets respectively. So lets create our queue on the outside interface, using the optional values:</p>
<pre>priority-queue outside
 queue-limit 512
 tx-ring-limit 64</pre>
<p>Next comes the policy actions, as we can only have one policy assigned to an interface at any one time we will nest the classes into a single policy:</p>
<pre>policy-map VPNQOS_PM
 class Branch_CM
 priority
 class ExPart_PM
 police output 2000000 25000</pre>
<p>There we have our nested policy, first defining the Priority method for our Branches Voice traffic, and finally policing our external partners traffic.</p>
<p>We then finish off with assigning the policy to the outside interface as before.</p>
<p>service-policy VPNQOS_PM interface outside</p>
<p>The following show commands can be used to verify the QoS statistics for each method:</p>
<p>show service-policy police</p>
<pre>asa# show service-policy police
Interface outside:
Service-policy: VPNQOS_PM
Class-map: ExPart_CM
Output police Interface outside:
cir 2000000 bps, bc 25000 bytes
conformed 25 packets, 4550 bytes; actions:  drop
exceeded 0 packets, 0 bytes; actions:  drop
conformed 0 bps, exceed 0 bps
asa#</pre>
<p>show service-policy priority</p>
<pre>asa# show service-policy priority
Interface outside:
Service-policy: VPNQOS_PM
Class-map: Branch_CM
Priority:
Interface outside: aggregate drop 0, aggregate transmit 25
asa#</pre>
<p>show priority-queue statistics</p>
<pre>asa# show priority-queue statistics
Priority-Queue Statistics interface outside
Queue Type         = BE
Tail Drops         = 0
Reset Drops        = 0
Packets Transmit   = 252
Packets Enqueued   = 0
Current Q Length   = 0
Max Q Length       = 0
Queue Type         = LLQ
Tail Drops         = 0
Reset Drops        = 0
Packets Transmit   = 25
Packets Enqueued   = 0
Current Q Length   = 0
Max Q Length       = 0</pre>
<p>As you can see form the output the Voice traffic is correctly place in the Low Latency Queue while all other traffic is transmitted via the Best Effort Queue.</p>
<p>There concludes this post for QoS For ASA VPN’s. Next up will be part 2 featuring the QoS for IOS VPN’s</p>
<p>Regards,</p>
<p>Stuart Hare<br />
CCIE #25616 (Security), CCSP, Microsoft MCP<br />
Sr. Support Engineer – IPexpert, Inc.<br />
URL: http://www.IPexpert.com</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="medium" count="1" href="http://blog.ipexpert.com/2010/01/04/quality-of-service-for-vpn-part-1-asa/"></g:plusone></div><div style="text-align:left; margin: 0px 0px 0px 0px;" ><a href="http://blog.ipexpert.com/2010/01/04/quality-of-service-for-vpn-part-1-asa/?pfstyle=wp" style="text-decoration: none; outline: none; color: #990000;"><img class="printfriendly" src="http://cdn.printfriendly.com/pf-icon.gif" alt="Print Friendly"/><span style="font-size:14px; margin-left:3px; color: #990000;">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ipexpert.com/2010/01/04/quality-of-service-for-vpn-part-1-asa/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

