Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
You may experience some slow load times, errors, and slight inconsistencies. We ask for your patience as we finalize the launch. Thank you.

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Match source-address and url


I have an existing policy-map with vip and port 80. Now I need to do:

1. Match pool of ip address and url /abc then redirect to url /abc1
2. If url is ok but ip is out of the pool then redirect to url /abc2

It's probably possible to achieve but I have problem with mixing class maps (L4 and L7). Please advice how to do it.

Thank you.

  • Application Networking
3 REPLIES
Cisco Employee

HI Kamil,Something like below

HI Kamil,

Something like below. Please try and let me know if it helps.

rserver redirect red
  webhost-redirection www.abc1.com
  inservice

rserver redirect red1
  webhost-redirection www.abc2.com
  inservice

serverfarm redirect red
  rserver red
    inservice

serverfarm redirect red1
  rserver red1
    inservice

class-map type http loadbalance match-all url
  2 match http url abc
  4 match source-address 2.2.2.2 255.255.255.0

class-map type http loadbalance match-all url1
  2 match http url abc

 policy-map type loadbalance first-match url
  class url
    serverfarm red
  class url1
    serverfarm red1
  class class-default
    serverfarm xxxx

 

Regards,

Kanwal

Note: Please mark answers if they are helpful

New Member

Hi Kanwal, it looks ok. Thank

Hi Kanwal, it looks ok. Thank you,

In this configuration is it possible to somehow secure the serverfarm which redirects to url /abc1 from someone who will try entering http://myserver/abc1 directly?

Cisco Employee

Hi Kamil,If user comes

Hi Kamil,

If user comes directly then it will match the VIP and class-map condition and would be loadbalanced to a different serverfarm. Any user coming with /abc will be redirected.

Regards,

Kanwal

Note: Please mark answers if they are helpful.

39
Views
0
Helpful
3
Replies