Friday, May 11, 2012

TFTP Issues

We can copy the image files, startup-config, running config, ssl keys etc between a device and a tftp server(linux PC). Several issues might pop up while doing so. Some of them are discussed with the resolution.
1. Problem:
"Error code 1: File not found"
This is a common error obtained when ever we try to tftp a file to the server from a device(switch/router)
Resolution:
Create a file with the same name (the one you will be issuing in the tftp command) in the linux PC using
cd /var/lib/tftpboot
touch <filename>
2. Problem:
'Error Code 0' message (Permission Denied)

Resolution:
This error is obtained due to the permission issue in the tftp server. We will have to change the permission of the file to 777 and chown the file to the current user.
chmod 777


3. Problem:
'Error Code 0' message (Permission Denied)
The above error might persist even after changing the permissions. In that case it might be due to the selinux issue.

Resolution:
The resolution for this issue would be to issue the following command in the PC.
echo 0 > /selinux/enforce
and check if the content of "/selinux/enforce" shows 0

4. Problem
Even after trying all the above resolutions if there is an issue with copying files then try the following:-

Resolution:
Check the content of "/etc/xinetd.d/tftp" file. The server_args should be as follows.
server_args = -s /var/lib/tftpboot
Now the tftp server is ready to go