Configuring Server Load Balancing

Configuration Examples

IOS SLB Network Configuration Example

This section provides a configuration example based on the network layout shown in Figure 24.

Figure 24 IOS SLB Network Configuration

 

 

 

Restricted

Restricted

Web server

Web server

Web server

web server

web server

10.1.1.1

10.1.1.2

10.1.1.3

10.1.1.20

10.1.1.21

10.1.1.x

Virtual server 10.0.0.1

10.4.4.x

Client

29163

Human

Resources

Client Client

As shown in the following sample code, the example topology has three public Web servers and two restricted Web servers for privileged clients in subnet 10.4.4.x. The public Web servers are weighted according to their capacity, with server 10.1.1.2 having the lowest capacity and having a connection limit imposed on it. The restricted Web servers are configured as members of the same sticky group, so that HTTP connections and Secure Socket Layer (SSL) connections from the same client use the same real server.

This configuration is coded as follows:

ip slb

serverfarm PUBLIC

Unrestricted Web server farm

predictor leastconns

Use weighted least connections algorithm

real

10.1.1.1

First real server

weight 16

 

inservice

 

real

10.1.1.2

Second real server

weight 4

 

maxconns 1000

Restrict maximum number of connections

inservice

 

real

10.1.1.3

Third real server

weight 24

 

inservice

 

ip slb

serverfarm RESTRICTED

Restricted Web server farm

predictor leastconns

Use weighted least connections algorithm

real

10.1.1.20

First real server

in-service

 

real

10.1.1.21

Second real server

in-service

 

Cisco IOS IP Configuration Guide

IPC-152

Page 198
Image 198
Cisco Systems 78-11741-02 manual IOS SLB Network Configuration Example, IPC-152