Sie sind auf Seite 1von 33

Link Load Balancing

2015-01-16 04:48:33 UTC


2015 Citrix Systems, Inc. All rights reserved. Terms of Use | Trademarks | Privacy Statement

Contents

Link Load Balancing ..........................................................................................

Configuring a Basic LLB Setup ..................................................................

Configuring Services........................................................................

Configuring an LLB Virtual Server and Binding a Service .............................

Configuring the LLB Method and Persistence...........................................

11

Configuring an LLB Route..................................................................

15

Creating and Binding a Transparent Monitor ...........................................

19

Configuring RNAT with LLB .....................................................................

24

Configuring a Backup Route ....................................................................

26

Resilient LLB Deployment Scenario ...........................................................

29

Monitoring an LLB Setup ........................................................................

31

Link Load Balancing


Link load balancing (LLB) balances outbound traffic across multiple Internet connections
provided by different service providers. LLB enables the Citrix NetScaler appliance to
monitor and control traffic so that packets are transmitted seamlessly over the best
possible link. Unlike with server load balancing, where a service represents a server, with
LLB, a service represents a router or the next hop. A link is a connection between the
NetScaler and the router.
To configure link load balancing, many users begin by configuring a basic setup with default
settings. Configuring a basic setup involves configuring services, virtual servers, monitors,
routes, an LLB method, and, optionally, configuring persistence. Once a basic setup is
operational, you can customize it for your environment.
Load balancing methods that are applicable to LLB are round robin, destination IP hash,
least bandwidth, and least packets. You can optionally configure persistence for
connections to be sustained on a specific link. The available persistence types are source IP
address-based, destination IP address-based, and source IP and destination IP
address-based. PING is the default monitor but configuring a transparent monitor is
recommended.
You can customize your setup by configuring reverse NAT (RNAT) and backup links.

Configuring a Basic LLB Setup


To configure LLB, you first create services representing each router to the Internet Service
Providers (ISPs). A PING monitor is bound by default to each service. Binding a transparent
monitor is optional but recommended. Then, you create a virtual server, bind the services
to the virtual server, and configure a route for the virtual server. The route identifies the
virtual server as the gateway to the physical routers represented by the services. The
virtual server selects a router by using the load balancing method that you specify.
Optionally, you can configure persistence to make sure that all traffic for a particular
session is sent over a specific link.

Configuring Services
A default monitor (PING) is automatically bound to a service type of ANY when the service
is created, but you can replace the default monitor with a transparent monitor, as
described in " Creating and Binding a Transparent Monitor."

To create a service by using the command line


interface
At the command prompt, type:

add service <name> <IP> <serviceType> <port>

show service <name>

Example

add service ISP1R_svc_any 10.10.10.254 any *


show service ISP1R_svc_any
ISP1R_svc_any (10.10.10.254:*) - ANY
State: DOWN
Last state change was at Tue Aug 31 04:31:13 2010
Time since last state change: 2 days, 05:34:18.600
Server Name: 10.10.10.254
Server ID : 0 Monitor Threshold : 0
Max Conn: 0
Max Req: 0
Max Bandwidth: 0 kbits
Use Source IP: NO
Client Keepalive(CKA): NO
Access Down Service: NO
TCP Buffering(TCPB): YES
HTTP Compression(CMP): NO
Idle timeout: Client: 120 sec Server: 120 sec
Client IP: DISABLED
Cacheable: NO
SC: OFF
SP: OFF
Down state flush: ENABLED
1)

Done

Monitor Name: ping


State: UP
Weight: 1
Probes: 244705 Failed [Total: 0 Current: 0]
Last response: Success - ICMP echo reply received.
Response Time: 1.322 millisec

Configuring Services

To create services by using the configuration utility


Navigate to Traffic Management > Load Balancing > Services, and create a service.

To create services by using the configuration utility


1. Navigate to Traffic Management > Load Balancing > Services.
2. In the details pane, click Add.
3. In the Create Service dialog box, specify values for the following parameters:

Service Name*name

ServerIP

Protocol*serviceType (Select ANY from the drop-down list.)

Port*port
* A required parameter

4. Click Create.
5. Repeat Steps 2-4 to create another service.
6. Click Close.
7. In the Services pane, select the services that you just configured and verify that the
settings displayed at the bottom of the screen are correct.

Parameter Descriptions (of commands listed in the


CLI procedure)
add service
name
Name for the service. Must begin with an ASCII alphabetic or underscore (_) character,
and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon
(:), at (@), equals (=), and hyphen (-) characters. Cannot be changed after the service
has been created.
IP
IP to assign to the service.
serviceType
Protocol in which data is exchanged with the service.

Configuring Services
Possible values: HTTP, FTP, TCP, UDP, SSL, SSL_BRIDGE, SSL_TCP, DTLS, NNTP, RPCSVR,
DNS, ADNS, SNMP, RTSP, DHCPRA, ANY, SIP_UDP, DNS_TCP, ADNS_TCP, MYSQL, MSSQL,
ORACLE, RADIUS, RDP, DIAMETER, SSL_DIAMETER, TFTP
port
Port number of the service.
View description(s) in command reference Top

show service
name
Name of the service for which to display configuration details.
View description(s) in command reference Top

Configuring an LLB Virtual Server and


Binding a Service
After you create a service, create a virtual server and bind services to the virtual server.
The default LB method of least connections is not supported in LLB. For information about
changing the LB method, see " Configuring the LLB Method and Persistence."

To create a link load balancing virtual server and bind


a service by using the command line interface
At the command prompt, type:

add lb vserver <name> <serviceType>

bind lb vserver < name> <serviceName>

show lb vserver < name>

Example

add lb vserver Router1-vip any


bind lb vserver Router-vip ISP1R_svc_any
sh lb vserver router-vip
Router-vip (0.0.0.0:0) - ANY Type: ADDRESS
State: DOWN
Last state change was at Thu Sep 2 10:51:32 2010
Time since last state change: 0 days, 17:51:46.770
Effective State: DOWN
Client Idle Timeout: 120 sec
Down state flush: ENABLED
Disable Primary Vserver On Down : DISABLED
No. of Bound Services : 1 (Total)
0 (Active)
Configured Method: ROUNDROBIN
Mode: IP
Persistence: NONE
Connection Failover: DISABLED
1) ISP1R_svc_any (10.10.10.254: *) - ANY State: DOWN
Done

Weight: 1

Configuring an LLB Virtual Server and Binding a Service

To create a link load balancing virtual server and bind


a service by using the configuration utility
1. Navigate to Traffic Management > Load Balancing > Virtual Servers, and create a virtual
server for link load balancing. Specify ANY in the Protocol field.
Note: Make sure that Directly Addressable is unchecked.
2. Under the Services tab, in the Active column, select the check box for the service that
you want to bind to the virtual server.

Parameter Descriptions (of commands listed in the


CLI procedure)
add lb vserver
name
Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_)
character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.),
space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed
after the virtual server is created.
CLI Users: If the name includes one or more spaces, enclose the name in double or single
quotation marks (for example, "my vserver" or 'my vserver').
serviceType
Protocol used by the service (also called the service type).
Possible values: HTTP, FTP, TCP, UDP, SSL, SSL_BRIDGE, SSL_TCP, DTLS, NNTP, DNS,
DHCPRA, ANY, SIP_UDP, DNS_TCP, RTSP, PUSH, SSL_PUSH, RADIUS, RDP, MYSQL, MSSQL,
DIAMETER, SSL_DIAMETER, TFTP, ORACLE
View description(s) in command reference Top

bind lb vserver
name
Name for the virtual server. Must begin with an ASCII alphanumeric or underscore (_)
character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.),
space, colon (:), at sign (@), equal sign (=), and hyphen (-) characters. Can be changed
after the virtual server is created.
CLI Users: If the name includes one or more spaces, enclose the name in double or single
quotation marks (for example, "my vserver" or 'my vserver').
serviceName

Configuring an LLB Virtual Server and Binding a Service


Name of the service.
View description(s) in command reference Top

show lb vserver
name
Name of the virtual server. If no name is provided, statistical data of all configured
virtual servers is displayed.
View description(s) in command reference Top

10

Configuring the LLB Method and


Persistence
By default, the NetScaler appliance uses the least connections method to select the service
for redirecting each client request, but you should set the LLB method to one of the
supported methods. You can also configure persistence, so that different transmissions from
the same client are directed to the same server.

To configure the LLB method and/or persistence by


using the command line interface
At the command prompt, type the following command:

set lb vserver <name> -lbMethod <lbMethod> -persistenceType <persistenceType>

show lb vserver <name>

Example

set lb vserver router-vip -lbmethod ROUNDROBIN -persistencetype SOURCEIP


show lb vserver Router-vip
Router-vip (0.0.0.0:0) - ANY Type: ADDRESS
State: DOWN
Last state change was at Fri Sep 3 04:46:48 2010
Time since last state change: 0 days, 00:52:21.200
Effective State: DOWN
Client Idle Timeout: 120 sec
Down state flush: ENABLED
Disable Primary Vserver On Down : DISABLED
No. of Bound Services : 0 (Total)
0 (Active)
Configured Method: ROUNDROBIN
Mode: IP
Persistence: SOURCEIP
Persistence Mask: 255.255.255.255
Persistence v6MaskLength: 128 Persistence Timeout: 2 min
Connection Failover: DISABLED

11

Configuring the LLB Method and Persistence

To configure the link load balancing method and/or


persistence by using the configuration utility
1. Navigate to Traffic Management > Load Balancing > Virtual Servers and select the
virtual server for which you want to configure the load balancing method and/or
persistence settings.
2. In the Advanced section, select Method and configure the load balancing method.
3. In the Advanced section, select Persistence and configure the persistence parameters.

Parameter Descriptions (of commands listed in the


CLI procedure)
set lb vserver
name
Name of the virtual server.
lbMethod
Load balancing method. The available settings function as follows:
* ROUNDROBIN - Distribute requests in rotation, regardless of the load. Weights can be
assigned to services to enforce weighted round robin distribution.
* LEASTCONNECTION (default) - Select the service with the fewest connections.
* LEASTRESPONSETIME - Select the service with the lowest average response time.
* LEASTBANDWIDTH - Select the service currently handling the least traffic.
* LEASTPACKETS - Select the service currently serving the lowest number of packets per
second.
* CUSTOMLOAD - Base service selection on the SNMP metrics obtained by custom load
monitors.
* LRTM - Select the service with the lowest response time. Response times are learned
through monitoring probes. This method also takes the number of active connections into
account.
Also available are a number of hashing methods, in which the appliance extracts a
predetermined portion of the request, creates a hash of the portion, and then checks
whether any previous requests had the same hash value. If it finds a match, it forwards
the request to the service that served those previous requests. Following are the hashing
methods:
* URLHASH - Create a hash of the request URL (or part of the URL).

12

Configuring the LLB Method and Persistence


* DOMAINHASH - Create a hash of the domain name in the request (or part of the domain
name). The domain name is taken from either the URL or the Host header. If the domain
name appears in both locations, the URL is preferred. If the request does not contain a
domain name, the load balancing method defaults to LEASTCONNECTION.
* DESTINATIONIPHASH - Create a hash of the destination IP address in the IP header.
* SOURCEIPHASH - Create a hash of the source IP address in the IP header.
* TOKEN - Extract a token from the request, create a hash of the token, and then select
the service to which any previous requests with the same token hash value were sent.
* SRCIPDESTIPHASH - Create a hash of the string obtained by concatenating the source IP
address and destination IP address in the IP header.
* SRCIPSRCPORTHASH - Create a hash of the source IP address and source port in the IP
header.
* CALLIDHASH - Create a hash of the SIP Call-ID header.
Possible values: ROUNDROBIN, LEASTCONNECTION, LEASTRESPONSETIME, URLHASH,
DOMAINHASH, DESTINATIONIPHASH, SOURCEIPHASH, SRCIPDESTIPHASH,
LEASTBANDWIDTH, LEASTPACKETS, TOKEN, SRCIPSRCPORTHASH, LRTM, CALLIDHASH,
CUSTOMLOAD, LEASTREQUEST
Default value: PEMGMT_LB_LEASTCONNS
persistenceType
Type of persistence for the virtual server. Available settings function as follows:
* SOURCEIP - Connections from the same client IP address belong to the same persistence
session.
* COOKIEINSERT - Connections that have the same HTTP Cookie, inserted by a Set-Cookie
directive from a server, belong to the same persistence session.
* SSLSESSION - Connections that have the same SSL Session ID belong to the same
persistence session.
* CUSTOMSERVERID - Connections with the same server ID form part of the same session.
For this persistence type, set the Server ID (CustomServerID) parameter for each service
and configure the Rule parameter to identify the server ID in a request.
* RULE - All connections that match a user defined rule belong to the same persistence
session.
* URLPASSIVE - Requests that have the same server ID in the URL query belong to the
same persistence session. The server ID is the hexadecimal representation of the IP
address and port of the service to which the request must be forwarded. This persistence
type requires a rule to identify the server ID in the request.
* DESTIP - Connections to the same destination IP address belong to the same persistence
session.

13

Configuring the LLB Method and Persistence


* SRCIPDESTIP - Connections that have the same source IP address and destination IP
address belong to the same persistence session.
* CALLID - Connections that have the same CALL-ID SIP header belong to the same
persistence session.
* RTSPSID - Connections that have the same RTSP Session ID belong to the same
persistence session.
Possible values: SOURCEIP, COOKIEINSERT, SSLSESSION, RULE, URLPASSIVE,
CUSTOMSERVERID, DESTIP, SRCIPDESTIP, CALLID, RTSPSID, DIAMETER, NONE
View description(s) in command reference Top

show lb vserver
name
Name of the virtual server. If no name is provided, statistical data of all configured
virtual servers is displayed.
View description(s) in command reference Top

14

Configuring an LLB Route


After configuring the IPv4 or IPv6 services, virtual servers, LLB methods, and persistence,
you configure an IPv4 or IPv6 LLB route for the network specifying the virtual server as the
gateway. A route is a collection of links that are load balanced. Requests are sent to the
virtual server IP address that acts as the gateway for all outbound traffic and selects the
router based on the LLB method configured.

To configure an IPv4 LLB route by using the


command line interface
At the command prompt, type:

add lb route <network> <netmask> <gatewayName>

show lb route [<network> <netmask>]

Example

add lb route 0.0.0.0 0.0.0.0 Router-vip


show lb route 0.0.0.0 0.0.0.0
Network
Netmask
Gateway/VIP
Flags
----------------------- --------------------1)
0.0.0.0
0.0.0.0
Router-vip
UP

To configure an IPv6 LLB route by using the


command line interface
At the command prompt, type:

add lb route6 <network> <gatewayName>

show lb route6

add lb route6 ::/0 llb6_vs


show lb route6
Network
VIP
------------------1)
::/0
llb6_vs

15

Flags
-------UP

Configuring an LLB Route


Example

To configure an LLB route by using the configuration


utility
Navigate to System > Network > Routes, and select LLB, and configure the LLB route.
Note: Select LLBV6 to configure an IPV6 route.

To configure an LLB route by using the configuration


utility
1. Navigate to System > Network > Routes.
2. In the details pane, select one of the following:

Click LLB to configure an IPv4 route.

Click LLBV6 to configure an IPv4 route.


3. In the Create LB Route or Create LB IPV6 Routedialog box, set the following
parameters:

Network*

Netmask*Required for IPV4 routes.

Gateway Name*gatewayName
* A required parameter

4. Click Create, and then click Close. The route that you just created appears on the LLB
or the LLB6 tab in the Routes pane.
The following diagram shows a basic LLB setup. A service is configured for each of the two
links (ISPs) and PING monitors are bound by default to these services. A link is selected
based on the LLB method configured.

16

Configuring an LLB Route

Figure 1. Basic LLB Setup

Note: If your Internet service provider has provided an IPv6 address, replace the IPv4
service with an IPv6 service in the above figure.

Parameter Descriptions (of commands listed in the


CLI procedure)
add lb route
network
The IP address of the network to which the route belongs.
netmask
The netmask to which the route belongs.
gatewayName

17

Configuring an LLB Route


The name of the route.
View description(s) in command reference Top

show lb route
network
The destination network or host.
View description(s) in command reference Top

add lb route6
network
The destination network.
gatewayName
The name of the route.
View description(s) in command reference Top

show lb route6
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

18

Creating and Binding a Transparent


Monitor
You create a transparent monitor to monitor the health of upstream devices, such as
routers. You can then bind the transparent monitor to services. The default PING monitor
monitors the connectivity only between the NetScaler appliance and the upstream device.
The transparent monitor monitors all the devices existing in the path from the appliance to
the device that owns the destination IP address specified in the monitor. If a transparent
monitor is not configured and the status of the router is UP but one of the next hop devices
from that router is down, the appliance includes the router while performing load balancing
and forwards the packet to the router. However, the packet is not delivered to the final
destination because one of the next hop devices is down. By binding a transparent monitor,
if any of the devices (including the router) are down, the service is marked as DOWN and
the router is not included when the appliance performs link load balancing.

To create a transparent monitor by using the


command line interface
At the command prompt, type:

add lb monitor <monitorName> <type> -destIP <ip_addr|*> -transparent YES

show lb monitor [<monitorName>]

Example

add lb monitor monitor-1 PING -destIP 10.10.10.11 -transparent YES


> show lb monitor monitor-1
1) Name.......: monitor-1 Type......:
PING State....: ENABLED
Standard parameters:
Interval.........:
5 sec Retries...........:
3
Response timeout.:
2 sec Down time.........:
30 sec
Reverse..........:
NO Transparent.......:
YES
Secure...........:
NO LRTM..............:
ENABLED
Action...........: Not applicable Deviation.........:
0 sec
Destination IP...:
10.10.10.11
Destination port.: Bound service
Iptunnel.........:
NO
TOS..............:
NO TOS ID............:
0
SNMP Alert Retries:
0
Success Retries..:
1
Failure Retries..:
0

19

Creating and Binding a Transparent Monitor

To create a transparent monitor by using the


configuration utility
Navigate to Traffic Management > Load Balancing > Monitors and configure a transparent
monitor.

To create a transparent monitor by using the


configuration utility
1. Navigate to Traffic Management > Load Balancing > Monitors.
2. In the Monitors pane, click Add.
3. In the Create Monitor dialog box, set the following parameters:

Name*

Type*

Destination IP

Transparent
* A required parameter

4. Click Create, and then click Close.


5. In the Monitors pane, select the monitor that you just configured and verify that the
settings displayed in the Details pane are correct.

To bind a monitor to a service by using the


configuration utility
1. Navigate to Traffic Management > Load Balancing > Services.
2. On the Monitors tab, under Available, select the monitor that you want to bind to the
service, and then click Add.

To bind a monitor to a service by using the command


line interface
At the command prompt, type:

bind lb monitor <monitorName> <serviceName>

show service <name>

Example
20

Creating and Binding a Transparent Monitor

bind lb monitor monitor-HTTP-1 isp1R_svc_any


Done
> show service isP1R_svc_any
ISP1R_svc_any (10.10.10.254:*) - ANY
State: UP
Last state change was at Thu Sep 2 10:51:07 2010
Time since last state change: 0 days, 18:41:55.130
Server Name: 10.10.10.254
Server ID : 0 Monitor Threshold : 0
Max Conn: 0
Max Req: 0
Max Bandwidth: 0 kbits
Use Source IP: NO
Client Keepalive(CKA): NO
Access Down Service: NO
TCP Buffering(TCPB): YES
HTTP Compression(CMP): NO
Idle timeout: Client: 120 sec Server: 120 sec
Client IP: DISABLED
Cacheable: NO
SC: OFF
SP: OFF
Down state flush: ENABLED
1)

Monitor Name: monitor-HTTP-1


State: UP Weight: 1
Probes: 1256
Failed [Total: 0 Current: 0]
Last response: Success - ICMP echo reply received.
Response Time: 1.322 millisec

Done

To bind a monitor to a service by using the


configuration utility
1. Navigate to Traffic Management > Load Balancing > Services.
2. In the details pane, select a service to which you want to bind a monitor, and then click
Open.
3. In the Configure Service dialog box, on the Monitors tab, under Available, select the
monitor that you want to bind to the service, and then click Add.
4. Click OK.
5. In the Services pane, select the service that you just configured and verify that the
settings displayed in the Details pane are correct.

21

Creating and Binding a Transparent Monitor

Parameter Descriptions (of commands listed in the


CLI procedure)
add lb monitor
monitorName
Name for the monitor. Must begin with an ASCII alphanumeric or underscore (_)
character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.),
space, colon (:), at (@), equals (=), and hyphen (-) characters.
CLI Users: If the name includes one or more spaces, enclose the name in double or single
quotation marks (for example, "my monitor" or 'my monitor').
type
Type of monitor that you want to create.
Possible values: PING, TCP, HTTP, TCP-ECV, HTTP-ECV, UDP-ECV, DNS, FTP, LDNS-PING,
LDNS-TCP, LDNS-DNS, RADIUS, USER, HTTP-INLINE, SIP-UDP, LOAD, FTP-EXTENDED, SMTP,
SNMP, NNTP, MYSQL, MYSQL-ECV, MSSQL-ECV, ORACLE-ECV, LDAP, POP3,
CITRIX-XML-SERVICE, CITRIX-WEB-INTERFACE, DNS-TCP, RTSP, ARP, CITRIX-AG,
CITRIX-AAC-LOGINPAGE, CITRIX-AAC-LAS, CITRIX-XD-DDC, ND6, CITRIX-WI-EXTENDED,
DIAMETER, RADIUS_ACCOUNTING, STOREFRONT, APPC, CITRIX-XNC-ECV, CITRIX-XDM
destIP
IP address of the service to which to send probes. If the parameter is set to 0, the IP
address of the server to which the monitor is bound is considered the destination IP
address.
transparent
The monitor is bound to a transparent device such as a firewall or router. The state of a
transparent device depends on the responsiveness of the services behind it. If a
transparent device is being monitored, a destination IP address must be specified. The
probe is sent to the specified IP address by using the MAC address of the transparent
device.
Possible values: YES, NO
Default value: NO
View description(s) in command reference Top

show lb monitor
monitorName
Name of the monitor.
View description(s) in command reference Top

22

Creating and Binding a Transparent Monitor

bind lb monitor
monitorName
Name of the monitor.
serviceName
Name of the service or service group.
View description(s) in command reference Top

show service
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

23

Configuring RNAT with LLB


You can configure an LLB setup for reverse network address translation (RNAT) for outbound
traffic. This ensures that the return network traffic for a specific flow is routed through the
same path. First configure basic LLB, as described in " Configuring a Basic LLB Setup", and
then configure RNAT. You must then enable use subnet IP (USNIP) mode.

To configure RNAT by using the command line


interface
At the command prompt, type:

set rnat <network> <netmask>

show rnat

Example

set rnat 10.102.29.0 255.255.255.0


> show rnat
1)
Network: 10.102.29.0 Netmask: 255.255.255.0
NatIP: *

To configure RNAT by using the configuration utility


1. Navigate to System > Network > Routes.
2. On the RNAT tab, from the Actions drop-down list, select Configure RNAT.
3. Specify the network on which to perform RNAT.

To enable Use Subnet IP mode by using the command


line interface
At the command prompt, type:

enable ns mode USNIP

show ns mode

Example
24

Configuring RNAT with LLB

enable ns mode USNIP


> show ns mode
Mode
------1)
Fast Ramp
2)
.
8)
Use Subnet IP
9)

Acronym
------FR

Status
-----ON

USNIP

ON

To enable Use Subnet IP mode by using the


configuration utility
1. Navigate to System > Settings and, under Modes and Features, click Configure Modes.
2. In the Configure Modes dialog box, select Use Subnet IP, and then click OK.

Parameter Descriptions (of commands listed in the


CLI procedure)
set rnat
network
IPv4 network address on whose traffic you want the NetScaler appliance to do RNAT
processing.
View description(s) in command reference Top

show rnat
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

enable ns mode
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

show ns mode
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

25

Configuring a Backup Route


To prevent disruption in services when the primary route is down, you can configure a
backup route. Once the backup route is configured, the NetScaler appliance automatically
uses it when the primary route fails. First create a primary virtual server as described in
"Configuring an LLB Virtual Server and Binding a Service." To configure a backup route,
create a secondary virtual server similar to a primary virtual server and then designate this
virtual server as a backup virtual server (route).
In the following diagram, Router-vip is the primary virtual server, and Backup_Router-vip
is the secondary virtual server designated as the backup virtual server.

Figure 1. Backup Route Setup

Note: If your Internet service provider has provided an IPv6 address, replace the IPv4
service with an IPv6 service in the above figure.
By default, all traffic is sent through the primary route. However, when the primary route
fails, all traffic is diverted to the backup route as shown in the following diagram.

26

Configuring a Backup Route

Figure 2. Backup Routing in Operation

Note: If your Internet service provider has provided an IPv6 address, replace the IPv4
service with an IPv6 service in the above figure.

To set the secondary virtual server as the backup


virtual server by using the command line interface
At the command prompt, type:
set lb vserver <name> -backupVserver <string>
Example

set lb vserver Router-vip -backupVServer Backup_Router-vip


> show lb vserver Router-vip
Router-vip (0.0.0.0:0) - ANY Type: ADDRESS
State: UP
Last state change was at Fri Sep 3 04:46:48 2010
Time since last state change: 0 days, 03:09:45.600
Effective State: UP
Client Idle Timeout: 120 sec
Down state flush: ENABLED
Disable Primary Vserver On Down : DISABLED
No. of Bound Services : 1 (Total)
1 (Active)

27

Configuring a Backup Route


Configured Method: ROUNDROBIN
Mode: IP
Persistence: DESTIP
Persistence Mask: 255.255.255.255
Backup: Router2-vip
Connection Failover: DISABLED
Done

Persistence v6MaskLength: 128 Persisten

To set the secondary virtual server as the backup


virtual server by using the configuration utility
1. Navigate to Traffic Management > Load Balancing > Virtual Servers and select the
secondary virtual server for which you want to configure the backup virtual server.
2. In the Load Balancing Virtual Server dialog box, under Advanced, select Protection.
3. In the Backup Virtual Server drop-down list, select the secondary backup virtual
server, and then click OK.

Parameter Descriptions (of commands listed in the


CLI procedure)
set lb vserver
name
Name of the virtual server.
backupVserver
Name of the backup virtual server to which to forward requests if the primary virtual
server goes DOWN or reaches its spillover threshold.
View description(s) in command reference Top

28

Resilient LLB Deployment Scenario


In the following diagram, there are two networks: 30.30.30.0 and 30.30.31.0. Link load
balancing is configured based on the destination IP address. Two routes are configured with
gateways Router1-vip and Router2-vip, respectively. Router1-vip is configured as a
backup to Router2-vip and vice versa. All traffic with the destination IP specified as
30.30.30.30 is sent through Router1-vip and traffic with the destination IP specified as
30.30.31.31 is sent through Router2-vip.

Figure 1. Resilient LLB Deployment Setup

Note: If your Internet service provider has provided an IPv6 address, replace the IPv4
service with an IPv6 service in the above figure.
However, if any one of the gateways (Router1-vip or Router2-vip) is DOWN, traffic is
routed through the backup router. In the following diagram, Router1-vip for ISP1 is DOWN,
so all traffic with the destination IP specified as 30.30.30.30 is also sent through ISP2.

29

Resilient LLB Deployment Scenario

Figure 2. Resilient LLB Deployment Scenario

Note: If your Internet service provider has provided an IPv6 address, replace the IPv4
service with an IPv6 service in the above figure.

30

Monitoring an LLB Setup


After the configuration is up and running, you should view the statistics for each service
and virtual server to check for possible problems.

Viewing the Statistics of a Virtual Server


To evaluate the performance of virtual servers or to troubleshoot problems, you can display
details of the virtual servers configured on the NetScaler appliance. You can display a
summary of statistics for all the virtual servers, or you can specify the name of a virtual
server to display the statistics only for that virtual server. You can display the following
details:

Name

IP address

Port

Protocol

State of the virtual server

Rate of requests received

Rate of hits

To display virtual server statistics by using the command


line interface
To display a summary of the statistics for all the virtual servers currently configured on the
NetScaler, or for a single virtual server, at the command prompt, type:
stat lb vserver [-detail] [<name>]
Example

>stat lb vserver -detail


Virtual Server(s) Summary
vsvrIP port
Protocol
State Req/s Hits/s
One
* 80
HTTP
UP
5/s
0/s
Two
*
0
TCP
DOWN
0/s
0/s
Three
* 2598
TCP
DOWN
0/s
0/s
dnsVirtualNS 10.102.29.90 53
DNS
DOWN
0/s
0/s
BRVSERV
10.10.1.1 80
HTTP
DOWN
0/s
0/s
LBVIP
10.102.29.66 80
HTTP
UP
0/s
0/s
Done
31

Monitoring an LLB Setup

To display virtual server statistics by using the configuration


utility
1. Navigate to Traffic Management > Load Balancing > Virtual Servers > Statistics.
2. If you want to display the statistics for only one virtual server, in the details pane,
select the virtual server, and click Statistics.

Viewing the Statistics of a Service


You can view the rate of requests, responses, request bytes, response bytes, current client
connections, requests in surge queue, current server connections, and so forth using the
service statistics.

To view the statistics of a service by using the command line


interface
At the command prompt, type:
stat service <name>
Example

stat service Service-HTTP-1

To view the statistics of a service by using the configuration


utility
1. Navigate to Traffic Management > Load Balancing > Services > Statistics.
2. If you want to display the statistics for only one service, select the service, and click
Statistics.

32

Monitoring an LLB Setup

Parameter Descriptions (of commands listed in the


CLI procedure)
stat lb vserver
name
Name of the virtual server. If no name is provided, statistical data of all configured
virtual servers is displayed.
View description(s) in command reference Top

stat service
name
Name of the service.
View description(s) in command reference Top

33