Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

ace - stickines - cookie and source based for the same VIP

hello

we have configured ACE to have cookie based stickiness for a vip address

we have a requirement where  we should maintain a source based cookie for few source  ip addresses for the same VIP

can you suggest how to configure both for the same vip

if the source is say 10.10.1.1 and 10.10.1.2 hiting vip 192.168.254.3 then it should source based stickiness for serverfarm xyz

if any other source htting vip 192.168.254.3 then it should be cookie based stickiness for the same serverfarm xyz

can someone put the config pls

thanks

1 REPLY
Silver

Re: ace - stickines - cookie and source based for the same VIP

Hello,

Yes, this can be done.

You would set up your VIP (ie. class-maps and policy-maps) so that all users connecting to the VIP will be sent to the sticky-group that uses cookie-sticky.  However, you would also have a Layer-7 class-map that matches the two source addresses listed and send them to a sticky-group that uses source-ip sticky.

Might look something like this:

serverfarm host XYZ
  rserver SV1
    inservice
  rserver SV2
    inservice

sticky http-cookie ACE-COOKIE COOKIE-STICKY
  cookie insert
  serverfarm XYZ
sticky ip-netmask 255.255.255.255 address source SOURCE-IP-STICKY
  serverfarm XYZ

class-map match-any VIP-WWW
  2 match virtual-address 10.86.178.160 tcp eq http

class-map type http loadbalance match-any MY-HOSTS
  2 match source-address 10.10.1.1 255.255.255.255
  3 match source-address 10.10.1.2 255.255.255.255

policy-map type loadbalance first-match L7_SLB
  class MY-HOSTS
    sticky-serverfarm SOURCE-IP-STICKY
  class class-default
    sticky-serverfarm COOKIE-STICKY

policy-map multi-match HTTP
  class VIP-WWW
    loadbalance vip inservice
    loadbalance policy L7_SLB
    loadbalance vip icmp-reply active

Hope this helps,

Sean

375
Views
0
Helpful
1
Replies
CreatePlease to create content