Contact Support

Customers who viewed this article also viewed

banner icon

Identify Changes in NetScaler build files with

File Integrity Monitoring

Learn More Watch Video
CTX205488 {{tooltipText}}

How do I Load Balance FTP on NetScaler?

Applicable Products

  • Citrix ADC

Objective

Introduction

File transfer protocol is a standard for the exchange of files across a network. It is based on a client/server model with an FTP client on a user machine initiating a connection to a FTP server to send and retrieve files to and from the server. An FTP session is composed of two flows, first an FTP control connection is created to pass FTP commands (such as GET, PUT, etc) back and forth between the client and server. Second a data connection is established for each individual data transfer to be performed. FTP supports either active or passive data connections, allowing either the server or client to initiate the data connection. Multiple data types (ASCI, EBCDIC, image and local) and file types are supported to allow flexibility for various types of transfers.

In active FTP, the FTP server initiates a data transfer connection back to the client. Client connects to the FTP server by establishing FTP control connection to port 21 of the server. Whenever the client requests data over the control connection, the server initiates data transfer connection back to the client. The source port of data transfer connection is always port 20 on the server, and the destination port is a high port (greater than 1024) on the client.

For passive FTP, the connection is initiated from the FTP client. Client connects to the FTP server by establishing an FTP control connection to port 21 of the server. Whenever the client requests data over the control connection, the client initiates the data transfer connections to the server. The source port of data transfer connection is always a high port on the client with a destination port of a high port on the server. Passive FTP should be viewed as the server never making an active attempt to connect to the client for FTP data transfers. Because the client always initiates the required connections.

Note: NetScaler supports both active FTP and passive FTP which is decided on the runtime, so there is no specific configuration to be done for active FTP/passive FTP.


Instructions

To configure FTP load balancing:

  1. Create a service of type FTP.
  2. Bind a FTP monitor to the service.
    (The NetScaler appliance has two built-in monitors for FTP services: the FTP monitor and the FTP-EXTENDED monitor. The FTP monitor checks basic functionality; the FTP-EXTENDED monitor also verifies that the FTP server is able to transmit a file correctly. These monitors have special parameters user Name and Password which are used to connect to FTP servers that need authentication)
  3. Create a Virtual Server of type FTP.
  4. Bind FTP Service to the FTP virtual server.
Step 1: Go to System > Traffic Management > Load Balancing > Services.
User-added image
Step 2: Add a new service by filling all the required information (Select the protocol as FTP) and click OK to finish the basic settings.
User-added image
Step 3: Click 1 Service to Load Balancing Monitor Binding to configure the FTP monitor.
User-added image
Step 4: Click Add Binding to add a Monitor.
User-added image
Step 5: Click Click to select to select the FTP monitor.
User-added image
Step 6: Select ftp and click Select to select the ftp monitor.
User-added image
Step 7: Click Bind to bind the monitor to service.
User-added image
Step 8: Click Close to complete the monitor binding configuration.
User-added image
Step 9: Click Done to complete the creation of service.
User-added image
Step 10: Go to System > Traffic Management > Load Balancing > Virtual Servers.
User-added image
Step 11: Add Virtual Servers.
User-added image
Step 12:  Fill the “Basic Settings” with Protocol as FTP. Click o k to complete the Basic settings.
User-added image
Step 13: Click No Load Balancing Virtual Server Service Binding.
User-added image
Step14: Click Click to Select to select the FTP service.
User-added image
Step15: Select the FTP service to be bound and click Select.
User-added image
Step 16: Click Bind to bind the FTP service to virtual server.
User-added image

Step17: Click Done to complete the configuration of virtual server.

To configure FTP load balancing using command line interface, at the command prompt, type:

  • add service <name> <serverName> FTP 21
  • bind lb monitor ftp <ServiceName>
  • add lb vserver <name> FTP <ip> 21
  • bind lb vserver <name> <serviceName>

Example:
User-added image
User-added image
User-added image


Additional Resources

Citrix Documentation - Load Balancing for a Group of FTP Servers

Refer to "NetScaler: How Do I?" page for more easy to implement articles on commonly used features of NetScaler.