### Troubleshooting TFTP

Use this procedure to verify that TFTP is working correctly on your UNIX host. This procedure is only valid on a UNIX system.

#### Procedure

1. Access a root prompt on the UNIX host.

2. Make sure that you are not in the /tftpboot directory.

3. Enter this command:

   `tftp ipaddress`

   where ipaddress is the IP address of the UNIX host. A TFTP prompt should appear.

4. Enter this command at the TFTP prompt:

   `tftp > get tftp_file_name`

   where tftp_file_name is the name of the PortServer boot image in the /tftpboot directory.

   Result | Action
   This message appears: received [number] bytes in [number] seconds | Continue to step 6 of this procedure.
   An error message appears | Skip to step 7 of this procedure.

5. Enter this command at the TFTP prompt to exit TFTP:

   `tftp> quit`

6. Compare the size of the original file against the transferred file using this command:

   `ls -l tftp_file_name /tftpboot/tftp_file_name`

   Result | Action
   The file sizes match. | TFTP is working correctly. Exit this procedure and continue troubleshooting.
   The file sizes do not match. | Continue to the next step in this procedure.

7. Verify that the /tftpboot directory exists and has read, write and execute (777) permissions with this command:

   `ls -l /tftpboot`

   If necessary, use this command to create the directory:

   `mkdir /tftpboot`

   If necessary, use this command to change permissions of the directory to read, write and execute:

   `chmod 777 /tftpboot`

8. Verify that the file /tftpboot/ftp_file_name exists and has read and execute permissions with this command:

   `ls -l /tftpboot/ftp_file_name`

   where `ftp_file_name` is the name of the firmware boot image specified by the PortServer.

   If necessary, use this command to change permissions of the file to read and execute:

   `chmod 666 /tftpboot/ftp_file_name`

9. Verify that the inetd.conf file is properly configured for tftp by displaying the file /etc/inetd.conf.

   An entry similar to this should be uncommented:

   `tftp dgram udp something`

   where something will vary with each operating system.

   For controlled TFTP access, make sure that the file /etc/tftpaccess.ctl exists and verify that it only allows access to public directories. If this file is not present, tftp will allow full access. A sample file is located in the directory /usr/lpp/tcpip/samples.

10. Restart the inetd process with these two commands:

    `ps -ef | grep inetd`

    This will report back the inetd process number.``

    Kill -1 inetd_PID

    Where inetd_PID is the process number for the inetd process reported by the previous command.

11. Test TFTP by repeating steps 1-7.

12. If successful, reboot the PortServer.

13. Choose Back to return to and continue with the Master Troubleshooting Process.