ADC

Use case 6: Configure load balancing in DSR mode for IPv6 networks by using the TOS field

You can configure load balancing in Direct Server Return (DSR) mode for IPv6 networks by using the Type of Service (TOS) field when the Citrix ADC appliance and the servers are in different networks.

Note: The TOS field is also called the Traffic Class field.

In DSR mode, when a client sends a request to a VIP6 address on a Citrix ADC appliance, the appliance forwards this request to the server by changing the destination IPv6 address of the packet to the IPv6 address of the server and sets an encoded value of the VIP6 address in the TOS (also called traffic class) field of the IPv6 header. You can configure the server to use the information in the TOS field to derive the VIP6 address from the encoded value, which is then used as source IP address in response packets. Response traffic directly goes to the client, bypassing the appliance.

Consider an example where a load balancing virtual server LBVS1, configured on a Citrix ADC appliance NS1, is used to load balance traffic across servers S1, S2, and S3. The Citrix ADC appliance NS1 and the servers S1, S2, and S3 are in different networks so router R1 is deployed between NS1 and the servers.

dsrmode-ipv6

The following table lists the settings used in this example.

Entities Name
IPv6 address of client C1 C1_IP (for reference purposes only)
Load balancing virtual server on NS1 LBVS1
IPv6 address of LBVS1 LBVS1_VIP6 (for references purpose only)
TOS value TOS_LBVS1_VIP6 (for references purpose only)
Service for server S1 on NS1 SVC_S1
IPv6 address for server S1 S1_IP (for references purpose only)
Service for server S2 on NS1 SVC_S2
IPv6 address for server S1 S2_IP (for references purpose only)
Service for server S3 on NS1 SVC_S3
IPv6 address for server S1 S3_IP (for references purpose only)

Following is the traffic flow in the example scenario:

  1. Client C1 sends a request to virtual server LBVS1.
  2. LBVS1’s load balancing algorithm selects server S1 and the appliance opens a connection to S1. NS1 sends the request to S1 with:
    • TOS field set to TOS_LBVS1_VIP6.
    • Source IP address as C1_IP.
  3. The server S1, on receiving the request, uses the information in the TOS field to derive the LBVS1_VIP6 address, which is the IP address of the virtual server LBVS1 on NS1. The server directly sends the response to C1, bypassing the appliance, with:
    • Source IP address set to the derivedLBVS1_VIP6 address so that the client communicates to the virtual server LBVS1 on NS1 and not to server S1.

To configure load balancing in DSR Mode using TOS, perform the following steps on the appliance

  1. Enable USIP mode globally.
  2. Add the servers as services.
  3. Configure a load balancing virtual server with a TOS value.
  4. Bind the services to the virtual server.

To configure load balancing in DSR Mode using TOS by using the command line interface

At the command prompt, type:

enable ns mode USIP

add service <serviceName> <IP> <serviceType> <port>
<!--NeedCopy-->

Repeat the above command as many times as necessary to add each server as a service on the Citrix ADC appliance.

add lb vserver <name> <serviceType> <ip> <port> -m <redirectionMode> -tosId <positive_integer>

bind lb vserver <vserverName> <serviceName>
<!--NeedCopy-->

To enable USIP mode by using the configuration utility

Navigate to System > Settings > Configure Modes, and select Use Source IP Address.

To create services by using the configuration utility

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

To create a load balancing virtual server and bind services by using the configuration utility

  1. Navigate to Traffic Management > Load Balancing > Virtual Servers, and create a virtual server.
  2. Click in the Service section to bind a service to this virtual server.