Configuring PROFILE.TCPIP for FTP

If you have configured the FTP server to have affinity to a specific stack, or you have configured the FTP server to be a generic server in a single stack environment, the FTP server can be started automatically when the TCP/IP address space is started by specifying the name of the FTP server cataloged procedure in the AUTOLOG statement. If you have configured the FTP server as a generic server in a multiple stack environment, you should not use the AUTOLOG statement to automatically start the server. Instead, use some other automation outside of AUTOLOG to automatically start the server.

In the following example, if your procedure is called FTPD, the following statement allows TCP/IP to issue the MVS™ START command for procedure FTPD. The job name of FTPD1 will be used on the port statement shown below. If the daemon job name is fewer than eight characters, the FTP daemon forks a process that has the job name of the original daemon appended with the numeral 1.

AUTOLOG
  FTPD JOBNAME FTPD1
ENDAUTOLOG

To reserve ports 21 and 20 for the FTP server, add the following statement:

 PORT                                          
   21 TCP FTPD1             ; FTP server control port
   20 TCP OMVS NOAUTOLOG   ; FTP server data port   

Specifying FTPD1 on the PORT and AUTOLOG statements directs TCP/IP to restart FTPD if it shound end.

To allow FTP to detect data connection errors when there has been no activity on the data connection for a certain amount of time, set the INTERVAL parameter on the TCPCONFIG statement to a relatively low value. The keepalive packets that the stack sends as specified on the INTERVAL parameter enable the stack to detect errors, such as a reset or terminated peer connection, instead of waiting indefinitely. Be careful when choosing an INTERVAL value on the TCPCONFIG statement because this value will affect all TCP connections at the host for which the interval has been activated, not just FTP connections.

The control connection can also benefit from keepalive packets. Many firewalls require periodic activity on any connection that is made and the control connection can appear idle during a long data transfer. Coding the INTERVAL parameter on the TCPCONFIG statement will, of course, cause keepalive packets to be sent on the control connection as well as the data connection. You can override the keepalive interval that you have configured in the stack for the FTP control connection and data connection with the FTPKEEPALIVE (control connection) and DATAKEEPALIVE (data connection) statements in the FTP.DATA file or data set.

Optimally, FTP needs a buffer size of at least 180K for data connections. You should not set the TCPMAXRCVBUFRSIZE parameter below 180K. The default value for the parameter is 256K. IBM® Health Checker for z/OS® can be used to check whether the TCPMAXRCVBUFRSIZE value is sufficient to provide optimal support to the z/OS Communications Server FTP server. For more details about IBM Health Checker for z/OS, see z/OS Communications Server: IP Diagnosis Guide and IBM Health Checker for z/OS: User's Guide.

For more information about the AUTOLOG, PORT, and TCPCONFIG statements, see z/OS Communications Server: IP Configuration Reference.

If your FTP server accepts connections on a distributed Dynamic VIPA (DVIPA), SYSPLEXPORTS must be specified for the distributed DVIPA if either of the following conditions are true: For more information about the VIPADYNAMIC statement and specifying the SYSPLEXPORTS option on the VIPADISTRIBUTE parameter, see z/OS Communications Server: IP Configuration Reference.