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

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

For an introduction to the new site, click here. And see here for current known issues.

can two server farm share the same VIP?

Hello,

Can i create two server farm and share the same VIP? for example:

is posible this configuration?


rserver host des1
  ip address 10.24.18.34
  inservice
rserver host des2
  ip address 10.24.18.35
  inservice
rserver host was1
  ip address 10.24.18.10
  inservice
rserver host was2
  ip address 10.24.18.11
  inservice

serverfarm host farm1
  rserver des1
    inservice
  rserver des2
    inservice
serverfarm host farm2
  rserver was1
    inservice
  rserver was2
    inservice

class-map type http loadbalance match-all Check-Headers-10
  2 match http url .*
  3 match http header Host header-value "10.24.16.*"
  4 match http header User-Agent header-value ".*MSIE.*"

class-map type http loadbalance match-all Check-Headers-s-10
  2 match http url .*
  3 match http header Host header-value "10.24.16.*"
  4 match http header User-Agent header-value ".*MSIE.*"

class-map type http loadbalance match-all other-http-10
  2 match http url .*
class-map type http loadbalance match-all other-http-s-10
  2 match http url .*

class-map match-all server-vlan-vip-10-http
  2 match virtual-address 10.24.16.10 tcp eq www

class-map match-all server-vlan-vip-10-https
  2 match virtual-address 10.24.16.10 tcp eq https

policy-map type loadbalance first-match http-10-lb
  class Check-Headers-10
    serverfarm farm2
  class other-http-10
    serverfarm farm2

policy-map type loadbalance first-match http-10-s-lb
  class Check-Headers-s-10
    serverfarm farm1
  class other-http-s-10
    serverfarm farm1

policy-map type loadbalance first-match lb-logic-10
  class class-default
    serverfarm farm2

policy-map type loadbalance first-match lb-logic-s-10
  class class-default
    serverfarm farm1

policy-map multi-match server-vip-service-policy-10
  class server-vlan-vip-10-http
    loadbalance vip inservice
    loadbalance policy http-10-lb
    loadbalance policy http-10-s-lb
    loadbalance vip icmp-reply
  class server-vlan-vip-10-https
    loadbalance vip inservice
    loadbalance policy lb-logic-10
    loadbalance policy lb-logic-s-10
    loadbalance vip icmp-reply

interface vlan 233
  description Servidores_Balanceados_outside
  peer ip address 10.24.16.7 255.255.255.0
  access-group input anyone
  access-group output anyone
  service-policy input client-vips
  no shutdown
interface vlan 242
  description Servidores_desarrollo1
  peer ip address 10.24.18.33 255.255.255.240
  access-group input anyone
  access-group output anyone
  service-policy input server-vip-service-policy-10
  no shutdown

4 REPLIES
Cisco Employee

Re: can two server farm share the same VIP?

policy-map multi-match server-vip-service-policy-10
  class server-vlan-vip-10-http
    loadbalance vip inservice
    loadbalance policy http-10-lb
    loadbalance policy http-10-s-lb

    loadbalance vip icmp-reply

This is not possible.

You can only have 1 policy.

What are you trying to achieve with this ?

If you want to loadbalance to all rservers, why don't you merge them into a single serverfarm ?

Gilles.

Re: can two server farm share the same VIP?

Hello gdufour,

Actually i've got this configuration:

1.) One serverfarm (farm1).

2.) In this serverfarm, i have two real servers des1 and des2.

3.) The real servers are using VIP 10.24.16.10.

4.) The loadbalance is roundrobin using http with headers.

I want to have:

1.) One new server (a.b.c.d), it can be in the same subnett.

2.) This server don't know if can belong to serverfarm farm1.

2.) When i reach to http://index/url/url1, this has to be to VIP 10.24.16.10.

3.) When i reach the link, the VIP 10.24.16.10 redirect to server a.b.c.d.

4.) When the server a.b.c.d down, the serverfarm farm1 have to take the load of the url.

Is posible this configuration?

Thank you.

Best Regards

Cisco Employee

Re: can two server farm share the same VIP?

What you need to use is backup serverfarm.

ie:

switch/Admin(config)# policy-map type loadbalance first-match vmware-80
switch/Admin(config-pmap-lb)# class class-default
switch/Admin(config-pmap-lb-c)# serverfarm vmware-http backup 10.10.10.10

So, if all servers in my vmware-http farm are down, traffic will be sent to serverfarm 10.10.10.10.

Gilles.

Re: can two server farm share the same VIP?

881
Views
0
Helpful
4
Replies