Product Documentation

Configuring a Basic LLB Setup

Aug 31, 2016

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

Updated: 2014-10-27

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)      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 
 Done 

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
    • Server—IP
    • 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.

Configuring an LLB Virtual Server and Binding a Service

Updated: 2014-10-28

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    Weight: 1 
 Done 

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.

Configuring the LLB Method and Persistence

Updated: 2014-10-28

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  

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.

Configuring an LLB Route

Updated: 2014-10-28

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              Flags 
     -----------        ---------          -------- 
1)     ::/0         	    llb6_vs              UP 

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.

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.

Creating and Binding a Transparent Monitor

Updated: 2014-10-28

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 

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

 
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.