cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2930
Views
10
Helpful
5
Replies

A VIP with multiple ports

billmatthews
Level 1
Level 1

We have a client/server application that uses 3 TCP ports (8080, 8081, and 8082). 

My real servers are rserver1 10.10.151.193 and rserver2 10.10.151.194.  I need to create a single VIP (10.10.151.99) for this application.  But I'm a little confused about how to setup the serverfarms and VIP.  It seems that each serverfarm/VIP are tied to a single port.  So would I create three serverfarms, and three VIPs (using the same IP 10.10.10.99 for each instance).  But it's important they all fail over together.  For example if rserver1 fails, all three ports (8080, 8081, and 8082) should fail over to rserver2. 

Thanks

Bill

1 Accepted Solution

Accepted Solutions

Right, you need a serverfarm, a class-map, a policy-map, then create the VIP as a class under

policy-map multi-match global

serverfarm host REAL_SERVERS

  probe TCP-IIS

  rserver LB-1

    inservice

  rserver LB-2

    inservice

class-map match-any IIS

  2 match virtual-address 10.10.10.99 tcp eq 8080

  3 match virtual-address 10.10.10.99 tcp eq 8081

  4 match virtual-address 10.10.10.99 tcp eq 8082

policy-map type loadbalance first-match IIS_plcymp

  class class-default

    serverfarm REAL_SERVERS

policy-map multi-match global

  class IIS_classmap

    loadbalance vip inservice

    loadbalance policy IIS_plcymp

View solution in original post

5 Replies 5

ajay chauhan
Level 7
Level 7

Each serverfarm will have two rsevers as you have mentioned .193 and 194 so incase one server fails traffic will go to 2nd rserver.

Three vips will call three serverfarms and each serverfarm will have two rservers.

Ajay

pablo.nxh
Level 3
Level 3

Hello Bill,

I think the best option is to configure a class-map with the match-any option so all the ports can be matched under it.

class-map match-any IIS

  2 match virtual-address 10.10.10.99 tcp eq 8080

  3 match virtual-address 10.10.10.99 tcp eq 8081

  4 match virtual-address 10.10.10.99 tcp eq 8082

You don't need to configure a port under the serverfarm since the ACE will pass the dst port used by the client; configure the probe under the serverfam to check any of the aforementioned ports so in case any one of them fail the rserver will be unavailable for any VIP.

serverfarm host REAL_SERVERS

  probe TCP-IIS

  rserver LB-1

    inservice

  rserver LB-2

    inservice

HTH

__ __

Pablo

Thanks Pablo, that looks excellent, I like that approach.

But if I'm doing this command line, it seems I'm missing something to associate the class-map with the serverfarm? Would it just be:

policy-map type loadbalance first-match IIS

  class class-default

    serverfarm REAL_SERVER

I'm new to the CLI, I did most of my config in the GUI originally.  But it seems for class-maps the CLI is easier.  Just want to make sure I'm not missing anything.  Thanks,

Bill

Right, you need a serverfarm, a class-map, a policy-map, then create the VIP as a class under

policy-map multi-match global

serverfarm host REAL_SERVERS

  probe TCP-IIS

  rserver LB-1

    inservice

  rserver LB-2

    inservice

class-map match-any IIS

  2 match virtual-address 10.10.10.99 tcp eq 8080

  3 match virtual-address 10.10.10.99 tcp eq 8081

  4 match virtual-address 10.10.10.99 tcp eq 8082

policy-map type loadbalance first-match IIS_plcymp

  class class-default

    serverfarm REAL_SERVERS

policy-map multi-match global

  class IIS_classmap

    loadbalance vip inservice

    loadbalance policy IIS_plcymp

Hi

I have set up serverfarms with vips, for the same server farms with different ports, you have to use different ip address's for the vips. You can only probe one port per ip address on each VIP per serverfarm.

your class-map should look like this

class-map match-any IIS

  2 match virtual-address 10.10.10.99 tcp eq 8080

  3 match virtual-address 10.10.10.100 tcp eq 8081

  4 match virtual-address 10.10.10.101 tcp eq 8082

Nouraj

Review Cisco Networking for a $25 gift card