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

URL redirect/filtring

Hi Ya all!

I have an ace that i am wondering can do the following?

A user comes from the internett and types inn www.test1.com, the user is redirected to my ace, the ace is looking on what type of adress the user typed and then forwarding the traffic to server1. And if the user types www.test2.com then the ace is forwarding the traffic to server 2? Does this work with on one armed as to routed mode?

Everyone's tags (4)
1 REPLY
Cisco Employee

URL redirect/filtring

Hi Erik,

You can do loadbalancing on the basis of L7 information. You can do it on the basis of host header information. Pasting an example below for you.

access-list ANYONE line 10 extended permit ip any any

rserver host QA_SERVER
  ip address 192.168.1.11
  inservice
rserver host PROD_SERVER
  ip address 192.168.1.12
  inservice

serverfarm host QA_FARM
  rserver QA_SERVER
    inservice
serverfarm host PROD_FARM
  rserver PROD_SERVER
    inservice

class-map match-all WEB_VIP
  2 match virtual-address 172.16.1.10 tcp eq www

class-map type http loadbalance match-all QA_HOSTHDR
  2 match http header Host header-value "qa.example.com"
class-map type http loadbalance match-all PROD_HOSTHDR
  2 match http header Host header-value "prod.example.com"

policy-map type loadbalance first-match WEB
  class QA_HOSTHDR
    serverfarm QA_FARM
  class PROD_HOSTHDR
    serverfarm PROD_FARM

policy-map multi-match WEB
  class WEB_VIP
    loadbalance vip inservice
    loadbalance WEB
    loadbalance vip icmp-reply active

interface vlan 10
  description Client vlan
  ip address 172.16.1.2 255.255.255.0
  access-group input ANYONE
  service-policy input WEB
  no shutdown
interface vlan 20
  description Servers vlan
  ip address 192.168.1.1 255.255.255.0
  no shutdown

ip route 0.0.0.0 0.0.0.0 172.16.1.1


Let me know if you have any questions.

Regards,
Kanwal
317
Views
0
Helpful
1
Replies
CreatePlease to create content