To configure the Direct Server Return (DSR) feature on the NetScaler appliance, complete the following procedure from the command line interface of the appliance:
- Run the following command to enable the MBF (Mac Based Forwarding) mode:
- Run the following command to create the service:
add service <Service_Name> <IP_Address> ANY * -usip YESNote: Using the ANY protocol type ensures that the NetScaler appliance does not parse the traffic as any of the known protocols.
- Run the following command to create the Load Balancing VServer:
add lb vserver <VServer_Name> ANY <IP_Address> * -m MAC <-connfailover STATELESS>Notes:
- The default type is â€“m IP. However, for DSR to work properly, you must make switching decisions based on the MAC address of the client and send it on the same path it came from excluding the NetScaler appliance from the return path.
- The optional configuration â€œ-connfailover STATELESSâ€ ensure that the appliance does not track the TCP states. Else, some communications, such as â€˜active FTPâ€™ connections, do not work.
- Run the following command to bind the service to the VServer:
bind lb vserver <VServer_Name> <Service_Name>
- Create a non-arping loopback interface on the servers and configure it with the VServer IP (VIP) address. It is critical that the server does not reply to the ARP requests for this IP address.
Refer to the server software documentation for instruction to add this interface.
- In some cases, you must enable persistence on the VServer to ensure that the subsequent client requests are sent to the same server. Run the following command enable the Source IP persistence on the VServer:
set lb vserver <VServer_Name> -persistenceType SOURCEIP -timeout <mins>