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

layer 7 class map on ace

would like to use layer 7 class map and policy on ace

requirement
have a single vip address 1.1.1.1 for url vprsoa.test.co.uk, vprgat.test.co.uk, vprgatadm.co.uk

what to use in LB so the above should work
also when i type vprsoa.test.co.uk/em it should be directed to the correct server farm
so /* for any of the above url should also work
what regular expressions to use

thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: layer 7 class map on ace

Example:

class-map match-all VIP
  2 match virtual-address 1.1.1.1 tcp eq www

class-map type http loadbalance match-all VPRSOA_EM
  2 match http header Host header-value "vprsoa.test.co.uk"
  4 match http url /em

policy-map type loadbalance first-match VPR_URL_SLB
  class VPRSOA_EM
    serverfarm FARM1
  class class-default
    serverfarm FARM_DEFAULT

policy-map multi-match VIP_SLB
  class VIP
    loadbalance vip inservice
    loadbalance policy VPR_URL_SLB
    loadbalance vip icmp-reply

In case each host name+URL needs to go to a different serverfarm then please create separate class-map for each.

Example:

class-map type http loadbalance match-all VPRSPA_TEST
  2 match http header Host header-value "vprsoa.test.co.uk"
  4 match http url /.*

policy-map type loadbalance first-match VPR_URL_SLB
  class VPRSOA_EM               
    serverfarm FARM_EM
  class VPRSOA_TEST
    serverfarm FARM_TEST
  class class-default
    serverfarm FARM_DEFAULT

Note: Order of class-map is important.

Adding Case Insensitive:

parameter-map type http HTTP-Params
case-insensitive

policy-map multi-match VIP_SLB
  class VIP
    loadbalance vip inservice
    loadbalance policy VPR_URL_SLB
    loadbalance vip icmp-reply
    appl-parameter http advanced-options HTTP-Params

Hope this helps.

Thanks - Shubha

3 REPLIES
Cisco Employee

Re: layer 7 class map on ace

Example:

class-map match-all VIP
  2 match virtual-address 1.1.1.1 tcp eq www

class-map type http loadbalance match-all VPRSOA_EM
  2 match http header Host header-value "vprsoa.test.co.uk"
  4 match http url /em

policy-map type loadbalance first-match VPR_URL_SLB
  class VPRSOA_EM
    serverfarm FARM1
  class class-default
    serverfarm FARM_DEFAULT

policy-map multi-match VIP_SLB
  class VIP
    loadbalance vip inservice
    loadbalance policy VPR_URL_SLB
    loadbalance vip icmp-reply

In case each host name+URL needs to go to a different serverfarm then please create separate class-map for each.

Example:

class-map type http loadbalance match-all VPRSPA_TEST
  2 match http header Host header-value "vprsoa.test.co.uk"
  4 match http url /.*

policy-map type loadbalance first-match VPR_URL_SLB
  class VPRSOA_EM               
    serverfarm FARM_EM
  class VPRSOA_TEST
    serverfarm FARM_TEST
  class class-default
    serverfarm FARM_DEFAULT

Note: Order of class-map is important.

Adding Case Insensitive:

parameter-map type http HTTP-Params
case-insensitive

policy-map multi-match VIP_SLB
  class VIP
    loadbalance vip inservice
    loadbalance policy VPR_URL_SLB
    loadbalance vip icmp-reply
    appl-parameter http advanced-options HTTP-Params

Hope this helps.

Thanks - Shubha

New Member

Re: layer 7 class map on ace

Thanks for the reply

other 2 url are working but

but unosoagat.mfltest.co.uk/* isnt working, i am not sure if its the server or the config

btw: all 3 urls are pointed to the same server farm, for stickiness i have used

sticky http-cookie SFARM-UNOgateway-endpoint-STICKY SFARM-COOKIE-INSERT-UNO-gateway-endpoint-7777
  cookie insert browser-expire
  replicate sticky
  serverfarm unogateway_adm_int
sticky http-cookie SFARM-UNOgatewayADM-endpoint-STICKY SFARM-COOKIE-INSERT-UNO-gatewayADM-endpoint-7777
  cookie insert browser-expire
  replicate sticky
  serverfarm unogateway_adm_int
sticky http-cookie SFARM-UNOgatewayINT-endpoint-STICKY SFARM-COOKIE-INSERT-UNO-gatewayINT-endpoint-7777
  cookie insert browser-expire
  replicate sticky
  serverfarm unogateway_adm_int


class-map type http loadbalance match-all L7unosoagat
  2 match http Host header-value "unosoagat.mfltest.co.uk"
  3 match http url /.*
class-map type http loadbalance match-all L7unosoagatadm
  2 match http Host header-value "unosoagatadm.mfltest.co.uk"
  3 match http url /.*
class-map type http loadbalance match-all L7unosoagatint
   2 match http Host header-value "unosoagatint.mfltest.co.uk"
   3 match http url /.*

Cisco Employee

Re: layer 7 class map on ace

Hello,

I would suggest that you check the "show service-policy detail" output to see if the hit count for class L7unosoagat is incrementing or not.

If it is and the connection is not successful then check the "show serverfarm detail" for any failed conenctions.

However if the hit count is not incrementing then a client side capture would be helpful to see how the host name looks like.

Hope this helps.
Thanks. - Shubha

1169
Views
4
Helpful
3
Replies
CreatePlease to create content