01-26-2008 01:15 AM - edited 03-03-2019 08:26 PM
Hi guys,
Why can't i copy a file from ftp to my router/switch flash ?
I can upload files to FTP but can't copy from it to router/switch.
Tried:
1. copy ftp flash
2. copy ftp://username:password@ftpserver/path/filename flash:
But failed:
1.
Switch#copy ftp flash
Address or name of remote host []? 10.200.9.21
Source filename []? info3
Destination filename [info3]? info3
Accessing ftp://x.x.x.x/info3...
%Error opening ftp://x.x.x.x/info3 (No such file or directory)
2.
Switch#copy ftp://clone:1234@x.x.x.x/ftproot/info5 flash
Destination filename [info5]? info5
Accessing ftp://clone:1234@x.x.x.x/ftproot/info5...
%Error opening ftp://clone:1234@x.x.x.x/ftproot/info5 (Protocol error)
Need your help guys, badly.
thanks
cliff
01-26-2008 05:35 AM
Hi,
You need to configure the remote FTP Server username and password to the router/switch.
switch# config t
switch(config)# ip ftp username
switch(config)# ip ftp password
switch(config)#^Z
switch#copy ftp:[[[//[username[:password]@]location] /directory]/filename] flash-filesystem:[filename]
i.e.
switch# config t
switch(config)# ip ftp username cisco
switch(config)# ip ftp password cisco123
switch(config)#^Z
switch#copy ftp://cisco:cisco123@ftpserver//iosdirectory/ios_filename.bin slot0:ios_filename.bin
Regards,
Dandy
01-26-2008 10:22 AM
Cliff
Your attempt 1) is pretty clearly an error in specifying the file name and location. I see that in attempt 2) you specify name and location differently and are getting a different error. Perhaps it is an error related to user name and password as Dandy seems to be addressing. But I am not so sure that this is the case. I think if it were a name and password issue the error message would not indicate protocol error.
I have encountered the protocol error in attempting ftp transfers before. Usually the ftp server has a log generated by the ftp program or daemon. I have found that log to be very helpful in finding the cause of the protocol error as it usually has a pretty clear description of the error.
I am sure different implementations of ftp may have different requirements. At a customer site the ftp implementation checks incoming requests and attempts to do a DNS resolution of the address to a name. And if it can not resolve the address to a name it will generate that protocol error message on the router. So given the little bit that we know about your environment that would be my first guess about your problem.
HTH
Rick
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: