How do I load balance FTP on NetScaler? 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. 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 Step1: Go to System > Traffic Management > Load Balancing > Services Step2: Add a new service by filling all the required information (Select the protocol as FTP) and click OK to finish the basic settings
Step3: Click 1 Service to Load Balancing Monitor Binding to configure the FTP monitor Step4: Click Add Binding to add a Monitor Step5: Click Click to select to select the FTP monitor Step6: Select ftp and click Select to select the ftp monitor
Step7: Click Bind to bind the monitor to service. Step8: Click Close to complete the monitor binding configuration. Step9: Click Done to complete the creation of service Step10: Go to System > Traffic Management > Load Balancing > Virtual Servers
Step11: Add Virtual Servers Step12: Fill the Basic Settings with Protocol as FTP. Click ok to complete the Basic settings Step13: Click No Load Balancing Virtual Server Service Binding Step14: Click Click to Select to select the FTP service Step15: Select the FTP service to be bound and click Select Step16: Click Bind to bind the FTP service to virtual server
Step17: Click Done to complete the configuration of virtual server To configure FTP load balancing using command line interface At the command prompt, type: o add service <name> <servername> FTP 21 o bind lb monitor ftp <ServiceName> o add lb vserver <name> FTP <ip> 21 o bind lb vserver <name> <servicename> Example: References: http://docs.citrix.com/en-us/netscaler/11/traffic-management/load-balancing/load-balancingcommon-protocols/lb-ftp-servers.html