<?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>Packetslave Industries &#187; Cisco ACE</title>
	<atom:link href="http://www.packetslave.com/category/cisco-ace/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.packetslave.com</link>
	<description>This is my blog.  There are many like it, but this one is mine.</description>
	<lastBuildDate>Tue, 20 Jul 2010 19:04:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Cisco ACE:  Basic HTTP Load Balancing</title>
		<link>http://www.packetslave.com/2010/01/24/cisco-ace-basic-http-load-balancing/</link>
		<comments>http://www.packetslave.com/2010/01/24/cisco-ace-basic-http-load-balancing/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 02:37:53 +0000</pubDate>
		<dc:creator>blanders</dc:creator>
				<category><![CDATA[Cisco ACE]]></category>

		<guid isPermaLink="false">http://www.packetslave.com/?p=187</guid>
		<description><![CDATA[The ACE (Application Control Engine) is Cisco&#8217;s replacement for the CSS and CSM load balancers in their data center product line.  It comes in both a module (or &#8220;blade&#8221;) for the Catalyst 6500 switch and as a standalone appliance.  This post will cover the basics of configuring an ACE to load-balance a farm of HTTP [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.cisco.com/en/US/products/ps5719/Products_Sub_Category_Home.html">ACE</a> (Application Control Engine) is Cisco&#8217;s replacement for the CSS and CSM load balancers in their data center product line.  It comes in both a <a href="http://www.cisco.com/en/US/products/ps6906/index.html">module</a> (or &#8220;blade&#8221;) for the Catalyst 6500 switch and as a <a href="http://www.cisco.com/en/US/products/ps8361/index.html">standalone appliance</a>.  This post will cover the basics of configuring an ACE to load-balance a farm of HTTP servers.  Subsequent posts will cover advanced features such as session persistence, health checks, and more.</p>
<h3>Assumptions</h3>
<ol>
<li>The ACE has been configured (possibly using the setup wizard) with interface and trunking options.</li>
<li>You are deploying the ACE in &#8220;routed mode&#8221;, e.g. the ACE is the default gateway for the backend servers and the VIPs live on a different network on the &#8220;outside&#8221; interface.</li>
<li>You have three web servers, WEB1, WEB2, and WEB3 all listening on port 80.</li>
</ol>
<h3>Configuration</h3>
<p>Unlike a router, the ACE is a &#8220;deny by default&#8221; device.  You must explicitly permit any traffic entering the ACE from the network.  Thus, we need an access list (ACL) to allow traffic to our HTTP virtual IP (VIP).</p>
<pre>access-list VLAN1 extended permit tcp any host 1.1.1.100 eq www
</pre>
<p>Next, we need to define our backend servers.  The &#8220;inservice&#8221; keyword is the ACE equivalent of the &#8220;no shutdown&#8221; command for an interface.  If you forget it, things won&#8217;t work.</p>
<pre>rserver host WWW1
  ip address 2.2.2.101
  inservice

rserver host WWW2
  ip address 2.2.2.102
  inservice

rserver host WWW3
  ip address 2.2.2.103
  inservice</pre>
<p>Now we need to define a health check, so that the ACE can determine if each backend server is functional and should receive traffic.  We&#8217;ll use a very basic HTTP service check at this point.  We configure the probe to check each server every 10 seconds and accept the default behavior of marking a server as &#8220;failed&#8221; if it fails 3 checks.  Also by default, the ACE will use an HTTP GET request for the root or &#8220;/&#8221; URL.  That&#8217;s fine for this example.  Finally, we tell the ACE that a server must respond for at least 60 seconds before it is marked as &#8220;back up&#8221; after a failure.</p>
<p>An important note:  the HTTP probe <strong>must</strong> have an expected status code or range of codes defined.  If you omit this statement, your backend servers will never come up!</p>
<pre>probe http HTTP_PROBE
  interval 10
  passdetect interval 60
  expect status 200
</pre>
<p>Now that we have our backend servers defined, as well as a probe to check their status, we can join them together into a server farm.  Again, don&#8217;t forget to &#8220;inservice&#8221; each rserver, or it won&#8217;t come up.</p>
<pre>serverfarm host HTTP_FARM
  probe HTTP_PROBE
  rserver WWW1
    inservice
  rserver WWW2
    inservice
  rserver WWW3
    inservice</pre>
<p>We need to tell the ACE about the virtual IP (VIP) on which we want it to listen.  This is done with a class-map.</p>
<pre>class-map match-all HTTP_VIP
  2 match virtual-address 1.1.1.100 tcp eq www</pre>
<p>Next, we need to define our load-balancing policy, to tell the ACE what to do with traffic once it hits the VIP.  In this case, we just direct it to the server farm defined above.</p>
<pre>policy-map type loadbalance http first-match HTTP_POLICY
  class class-default
    serverfarm HTTP_FARM</pre>
<p>The last piece we need is something to tie the policy to the VIP.  We do this with a policy-map of type &#8220;multi-match&#8221;.  For convenience, we configure the VIP to respond to ICMP echo request (pings) as long as at least one backend server is up.</p>
<pre>policy-map multi-match VIPs
  class HTTP_VIP
    loadbalance vip inservice
    loadbalance policy HTTP_POLICY
    loadbalance vip icmp-reply active</pre>
<p>Finally, we need to apply our policy to the &#8220;outside&#8221; interface of the ACE, bringing up our VIP.  We also need to apply the ACL we created above to allow the HTTP requests inbound.</p>
<pre>interface vlan 1
  description Public Network
  ip address 1.1.1.1 255.255.255.0
  access-group input VLAN1
  service-policy input VIPs
  no shutdown
</pre>
<p>That&#8217;s the end!  You can grab the full configuration <a href="/wp-content/uploads/2010/01/ace-basic-http.txt">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.packetslave.com/2010/01/24/cisco-ace-basic-http-load-balancing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
