cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3097
Views
10
Helpful
7
Replies

How to copy file from tftpserver to cisco router - c8kv?

dalakshm
Cisco Employee
Cisco Employee

I have a linux server from which I want to copy files to cisco router - c8kv via tftp,

what should I enable on the cisco router?
Or tftp client will be enabled by default?

 

I dont want to trigger the download from cisco router to the tftp server, instead I want to trigger it from tftp server.

7 Replies 7

marce1000
VIP
VIP

 

                            >instead I want to trigger it from tftp server.

  - Not possible, in the sense that the c8kv  can only act as a tftp client.

 M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

Leo Laohoo
Hall of Fame
Hall of Fame

@dalakshm wrote:

what should I enable on the cisco router?


From the TFTP to the router?  Increase the TFTP block size to make the transfer quicker:

ip tftp blocksize 8192

changing the tftp block size is an interesting suggestion. But it does not address the question asked in the original post. As I understand that post they want to initiate the tftp transfer from the server and not from the router. In my experience tftp on Cisco has always depended on the Cisco initiating the transfer.

HTH

Rick

dalakshm
Cisco Employee
Cisco Employee

Thanks @marce1000 @Leo Laohoo @Richard Burts for your responses.
By using the command- `tftp-server`, we can make the router to act as TFTP server right. So now can I use my linux server to act as tftp client and then upload the file from tftp client (linux machine) to tftp server (router)? 

You are correct that it is possible to configure a Cisco router as tftp server. In my experience that has worked to allow the Cisco router/server to have a file which it would send when another device initiated a tftp copy request. I have not seen a Cisco router acting as server accept a copy of a file initiated by a remote device (your linux). You can certainly give it a try, and it will be an interesting thing to observe. But my prediction is that it will not work. If you do try this please update us with the results.

HTH

Rick

The configuration related to tftp server that the cisco device supports is -
tftp-server <filesystem>:<image_name>

So this indicates that tftp server is setup to only provide that file to tftp clients and dont think it accepts any uploading of files - for security reasons.

Tried the below commands from linux server -

tftp <ip_address _of_the_router> -c put myfile theirfile

 And I get an error - Error code 2: Access denied

However, tftp get seems like working.

What you are describing is consistent with my experience. Enabling tftp server on the Cisco router does allow the router to respond to a tftp request from a remote device if the device request the file be sent (tftp get) and to send a file to that device. But the router does not accept the request from a remote device if the remote device wants to send a file to the router. In my experience if you want a file to be sent to the router using tftp then the router must originate the request. 

 

I do not believe that this behavior is inherent in the tftp protocol but is the particular implementation of the protocol by Cisco. If you want files sent from your linux to the router perhaps you could set something up that would make a connection from the linux to the router and then issue a command on the router to request the file.

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: