{"id":999,"date":"2010-08-07T10:11:00","date_gmt":"2010-08-07T09:11:00","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=999"},"modified":"2010-08-07T10:14:44","modified_gmt":"2010-08-07T09:14:44","slug":"wccp-load-distribution-hash-and-mask","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=999","title":{"rendered":"WCCP Load Distribution (Hash and Mask)"},"content":{"rendered":"<p>When multiple WAEs exist in a service group, WCCPv2 automatically  distributes redirected traffic across all WAEs in the service group.  When traffic passes through an IOS device with WCCPv2 redirection  configured, the IOS device assigns traffic for that connection to a  bucket.<!--more--><\/p>\n<p>Each bucket is assigned to a specific WAE. The method that  determines to which bucket traffic is assigned, which determines how  traffic is distributed across multiple WAEs within a service group, is  called the assignment method. <!--more--><\/p>\n<div id=\"attachment_1000\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-hash.gif\"><img aria-describedby=\"caption-attachment-1000\" loading=\"lazy\" class=\"size-full wp-image-1000\" title=\"wccp-hash\" src=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-hash.gif\" alt=\"wccp-hash\" width=\"500\" height=\"232\" srcset=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-hash.gif 500w, http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-hash-300x139.gif 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><p id=\"caption-attachment-1000\" class=\"wp-caption-text\">an example of the hash assignment method and bucket-based distribution model used by WCCPv2.<\/p><\/div>\n<p style=\"text-align: center;\">\n<p>The bucket assignments are communicated  from the lead WAE to all of the IOS devices in the service group. The  assignment method can use either a hashing or masking scheme, and is  negotiated between IOS and WAE during the formation of the <a href=\"http:\/\/darenmatthews.com\/blog\/?p=977\">service  group<\/a>.<\/p>\n<p><strong>1. HASH ASSIGNMENT<\/strong><\/p>\n<p><strong>Hash assignment<\/strong>, which is the <strong>default assignment method<\/strong>, performs a  bitwise hash on a key identified as part of the service group.<\/p>\n<p>In WAAS,  the hash key used for <strong>service group 61<\/strong> is the<strong> source IP address<\/strong>, while  the hash key used for <strong>service group 62<\/strong> is the <strong>destination IP address<\/strong>.<\/p>\n<p>The hash is not configurable, and is deterministic in nature. This means  that all of the routers within the same service group will make the  same load-balancing decision given the same hash key.<\/p>\n<p>This deterministic  behavior is what allows WCCPv2 to support asymmetric traffic flows, so  long as both directions of the flow pass through WCCPv2-enabled IOS  devices in the same service group. Hash assignment uses 256 buckets.<\/p>\n<p><strong>2. MASK ASSIGNMENT<\/strong><\/p>\n<p>The second assignment method is called mask assignment. With mask  assignment, the source IP address, destination IP address, source port,  and destination port are concatenated and ANDed with a 96-bit mask to  yield a value. The resulting 96-bit value is compared to a list of  mask\/value pairs. Each mask\/value pair is associated with a bucket, and  each bucket is in turn assigned to a WAE.<\/p>\n<div id=\"attachment_1009\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-mask.gif\"><img aria-describedby=\"caption-attachment-1009\" loading=\"lazy\" class=\"size-full wp-image-1009\" title=\"wccp-mask\" src=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-mask.gif\" alt=\"an example of the mask assignment method and bucket-based distribution model used by WCCPv2.\" width=\"500\" height=\"303\" srcset=\"http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-mask.gif 500w, http:\/\/darenmatthews.com\/blog\/wp-content\/uploads\/2010\/08\/wccp-mask-300x181.gif 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><p id=\"caption-attachment-1009\" class=\"wp-caption-text\">an example of the mask assignment method and bucket-based distribution model used by WCCPv2.<\/p><\/div>\n<p>Unlike hash assignment, the  number of buckets used with mask assignment depends on the number of  bits used in the mask. By default, WAAS uses a mask of 0x1741. This  results in 2<sup>6<\/sup> buckets that can be assigned across the WAEs in  a service group.<\/p>\n<p>With current Catalyst WCCPv2 implementations, up to 7  bits can be defined for the mask.<\/p>\n<p><a href=\"javascript:popUp('\/content\/images\/chap4_9781587054945\/elementLinks\/dc470409.gif')\"><\/a><\/p>\n<p><a href=\"http:\/\/www.informit.com\/\">source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When multiple WAEs exist in a service group, WCCPv2 automatically distributes redirected traffic across all WAEs in the service group. When traffic passes through an IOS device with WCCPv2 redirection configured, the IOS device assigns traffic for that connection to a bucket.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27],"tags":[46],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/999"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=999"}],"version-history":[{"count":8,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/999\/revisions"}],"predecessor-version":[{"id":1008,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/999\/revisions\/1008"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=999"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}