02-02-2023 10:54 AM
Hello folks,
I may be missing something fundamental but haven't been able to solve this no matter what I try, so any help wold be much appreciated.
I need to upgrade an ASR9006 with a A9K-RSP440-TR currently running 5.3.0. I am trying to copy the upgrade tarballs from a Ubuntu 18.04 desktop running a vsftp server. The vsftp server is configured to accept passive, anonymous connections and does not restrict local users to their home dir - basically i have tried to make it as open as possible (full config at the bottom). From another Ubuntu machine I have verified that I can connect and get/put files to/from this ftp server so afaik it should work however I get the following error messages when trying to copy files from it on the ASR.
RP/0/RSP0/CPU0:x_asr#copy ftp://USER:PSWD@192.168.60.60/asr9k-mini-px.pie-6.1.2 disk0:
Tue Jan 31 16:40:25.532 EST
Destination filename [/disk0:/asr9k-mini-px.pie-6.1.2]?
Accessing ftp://USER:*@192.168.60.60/asr9k-mini-px.pie-6.1.2
%Error copying ftp://USER:*@192.168.60.60/asr9k-mini-px.pie-6.1.2 (Error opening source file): No such file or directory
The error message occurs even if I specify the full path of the file and no matter what the dstination on the ASR.
I can ping the server IP from the ASR.
RP/0/RSP0/CPU0:x_asr#ping 192.168.60.60
Tue Jan 31 16:42:40.304 EST
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.60.60, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
What am I missing?
Thanks much,
Nitin
PS. vsftpd.conf file:
listen=NO
listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
pam_service_name=vsftpd
chmod_enable=YES
chroot_local_user=NO
local_umask=022
dirmessage_enable=NO
write_enable=YES
use_localtime=YES
xferlog_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
connect_from_port_20=NO
pasv_enable=Yes
pasv_min_port=10000
pasv_max_port=10100
allow_writeable_chroot=YES
Solved! Go to Solution.
02-02-2023 03:13 PM
You mention a vrf. Yes if there is a vrf then you can specify the vrf keyword. But from your outputs you can ping in default vrf. I would double check the mgmt port configuration.
On the server use tcpdump to see if the request is making it to the right server.
Sam
02-02-2023 11:12 AM
Are you specifying the FTP transfer with a specific user or anonymous?
What are the permissions on the file?
Is the directory you are copying from included as the root dir in the vsftp configs?
Sam
02-02-2023 12:13 PM
>Are you specifying the FTP transfer with a specific user or anonymous?
Specific username/password, hidden in my paste above as USER:PSWD, but the actual command uses a local username + password, these credentials work when testing from another Ubuntu machine's ftp client
> What are the permissions on the file?
-rw-r--r--
As a comparison here is the output when ftp'ing from the other Ubuntu m/c:
ftp 192.168.60.60
Connected to 192.168.60.60.
220 (vsFTPd 3.0.3)
Name (192.168.60.60:USER):
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
[snip]
226 Directory send OK.
ftp> cd asr9k
250 Directory successfully changed.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 1000 1000 878 Nov 14 2016 README-ASR9K-iosxr-px-k9-6.1.2.txt
-rw-r--r-- 1 1000 1000 27634484 Nov 11 2016 asr9k-asr9000v-nV-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 11454879 Nov 11 2016 asr9k-bng-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 4826355 Nov 11 2016 asr9k-doc-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 421577286 Nov 11 2016 asr9k-fpd-px.pie-6.1.2
-rwxr-x--- 1 1000 1000 24830154 Nov 11 2016 asr9k-k9sec-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 815461 Nov 11 2016 asr9k-li-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 21086729 Nov 11 2016 asr9k-mcast-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 31984073 Nov 11 2016 asr9k-mgbl-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 476398101 Nov 11 2016 asr9k-mini-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 23075312 Nov 11 2016 asr9k-mpls-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 14166 Nov 11 2016 asr9k-optic-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 493943071 Nov 11 2016 asr9k-services-infra-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 4139308 Nov 11 2016 asr9k-services-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 1545750 Nov 11 2016 asr9k-video-px.pie-6.1.2
226 Directory send OK.
> Is the directory you are copying from included as the root dir in the vsftp configs?
No, but I did test by copying one file to the vsftp root dir and checking if I could access it - that did not work. As you can see, the ftp login takes me to the users' home dir and again I tested by copying a file there, which also did not work. I also tried to specify the full path in the copy command, which didn't work. But you raise an interesting point, I will test by making the directory where the files are the located as the vsftp root dir
Thanks,
Nitin
02-02-2023 12:29 PM
> Is the directory you are copying from included as the root dir in the vsftp configs?
That did not work:
From the other machine:
ftp 192.168.60.60
Connected to 192.168.60.60.
220 (vsFTPd 3.0.3)
Name (192.168.60.60:USER):
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 1000 1000 878 Nov 14 2016 README-ASR9K-iosxr-px-k9-6.1.2.txt
-rw-r--r-- 1 1000 1000 27634484 Nov 11 2016 asr9k-asr9000v-nV-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 11454879 Nov 11 2016 asr9k-bng-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 4826355 Nov 11 2016 asr9k-doc-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 421577286 Nov 11 2016 asr9k-fpd-px.pie-6.1.2
-rwxr-x--- 1 1000 1000 24830154 Nov 11 2016 asr9k-k9sec-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 815461 Nov 11 2016 asr9k-li-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 21086729 Nov 11 2016 asr9k-mcast-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 31984073 Nov 11 2016 asr9k-mgbl-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 476398101 Nov 11 2016 asr9k-mini-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 23075312 Nov 11 2016 asr9k-mpls-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 14166 Nov 11 2016 asr9k-optic-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 493943071 Nov 11 2016 asr9k-services-infra-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 4139308 Nov 11 2016 asr9k-services-px.pie-6.1.2
-rw-r--r-- 1 1000 1000 1545750 Nov 11 2016 asr9k-video-px.pie-6.1.2
226 Directory send OK.
From the ASR:
RP/0/RSP0/CPU0:rr_asr#copy ftp://USER:PSWD@192.168.60.60/asr9k-mini-px.pie-6.1.2 disk0:
Wed Feb 1 15:12:49.153 EST
Destination filename [/disk0:/asr9k-mini-px.pie-6.1.2]?
Accessing ftp://USER:*@192.168.60.60/asr9k-mini-px.pie-6.1.2
%Error copying ftp://USER:*@192.168.60.60/asr9k-mini-px.pie-6.1.2 (Error opening source file): No such file or directory
02-02-2023 11:29 AM
copy ftp://USER:PSWD@192.168.60.60/asr9k-mini-px.pie-6.1.2 <<- the extension of file must be .pie not .pie-6.1.2
02-02-2023 12:21 PM
That's the file name on the server and was the name within the release tarball. When this does work I expect I will have to copy the entire release tarball or all the files within it to the ASR. Will I need to rename these files to perform an upgrade?
Or are you saying that the copy command is failing because it doesn't like the filename? Hmm, let me rename it and test.
Thanks,
Nitin
02-02-2023 12:28 PM - edited 02-02-2023 12:30 PM
02-02-2023 12:40 PM
Ahh, this is good to know and will be helpful once I manage to get the files on the ASR.
Thanks,
02-02-2023 12:31 PM
Renamed file to test.pie, same result, sigh!
ftp://USER:PSWD@192.168.60.60/test.pie disk0:
Wed Feb 1 15:13:54.404 EST
Destination filename [/disk0:/test.pie]?
Accessing ftp://USER:*@192.168.60.60/test.pie
%Error copying ftp://USER:*@192.168.60.60/test.pie (Error opening source file): No such file or directory
02-02-2023 01:13 PM
I check the package,
you are right
pie-6.1.2 is correct.
02-02-2023 12:37 PM
Could it be that there's a mgmt VRF* defined and I need to specify that in my copy command?
* - I don't know IOS and don't know how my ex-colleague configured the ASR so this may all be nonsense
02-02-2023 01:18 PM
first return back name as it before
second I find file is under directory /asr9k ?? am I right
ftp> cd asr9k
250 Directory successfully changed.
ftp> ls
If Yes try below
ftp://USER:PSWD@192.168.60.60/asr9k/asr9k-mini-px.pie-6.1.2
02-02-2023 01:28 PM
Same error.
Note that as suggested by @smilstea I made the asr9k directory the home directory of vsftp so that connecting to ftp takes you directly there.
Is there a difference between how ping and copy/ftp reach the destination IP? When looking at the vsftp server log I don't see the connection from the ASR so it appears to be failing before it connects to the destination.
are there any logs on the ASR that I can enable/examine that might help?
are there any network/IOS debugging tools on the ASR I could use?
Thanks much,
Nitin
02-02-2023 03:13 PM
You mention a vrf. Yes if there is a vrf then you can specify the vrf keyword. But from your outputs you can ping in default vrf. I would double check the mgmt port configuration.
On the server use tcpdump to see if the request is making it to the right server.
Sam
02-03-2023 10:11 AM
Solved! Thank you @smilstea and @MHM Cisco World for all your help.
@smilstea In answer to your question, tcpdump on the server did not show a ftp connection being initiated.
The problem turned out to be that the ftp client source-interface was set to GigabitEthernet1/0/2/1. I don't know why this was so, I can see that tftp client source-interface is also set to the same value, which is why trying to use fftp did not work either.
Removing this made ftp work.
Thanks again,
Nitin
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide