Description

This article provides information on how to transfer a file from one switch to another switch by using FTP.

Symptoms

how to transfer a file from one switch to another switch by using FTP.

Solution

Setup:
Switch 1---------------- Switch 2
Enable the FTP service on Switch 2 via the following command:
set system services ftp
Issue the following command to list the files in the /var/tmp/ directory:
{master:0}
user@switch> file list /var/tmp
/var/tmp:
.snap/
gres-tp/
krt_gencfg_filter.txt
# No jinstall file #

{master:0}
user@switch> show configuration system services
ssh {
     protocol-version v2; # No ftp service #
}
Perform the following procedure to transfer the jinstall-ex-4200-10.0S10.1-domestic-signed.tgz file from Switch1 to Switch2 :
  1. {master:0}
    user@switch> ftp 10.9.221.65
    Connected to 10.9.221.65.
    220 SW_1 FTP server (Version 6.00LS) ready.
    Name (10.9.221.65:root): FTP
    331 Password required for FTP.
  2. Password:
    230 User FTP logged in.
    Remote system type is UNIX.
    Using binary mode to transfer files.
  3. ftp> bin
    200 Type set to I.
  4. ftp> hash
    Hash mark printing on (1024 bytes/hash mark).
  5. ftp> ls -l
    200 PORT command successful.
    150 Opening ASCII mode data connection for '/bin/ls'.
    total 4
    drwxr-xr-x 2 FTP staff 512 Oct 22 22:49 .ssh
    #
    226 Transfer complete.
  6. ftp> cd /var/tmp
    250 CWD command successful.
  7. ftp> ls -l
    200 PORT command successful.
    150 Opening ASCII mode data connection for '/bin/ls'.
    total 211660
    drwxrwxr-x 2 root wheel 512 Jan 1 2005 .snap
    drwxr-xr-x 2 root field 512 Oct 16 21:10 gres-tp
    -rw-r--r-- 1 root field 108313606 Nov 17 18:03 jinstall-ex-4200-10.0S10.1-domestic-signed.tgz
    -rw-r--r-- 1 root field 76 Oct 18 12:55 krt_gencfg_filter.txt
    #
    226 Transfer complete.
  8. ftp> pwd
    257 "/var/tmp" is current directory.
  9. ftp> lcd /var/tmp
    Local directory now /var/tmp
  10. ftp> get jinstall-ex-4200-10.0S10.1-domestic-signed.tgz
    local: jinstall-ex-4200-10.0S10.1-domestic-signed.tgz remote: jinstall-ex-4200-10.0S10.1-domestic-signed.tgz
    200 PORT command successful.
    150 Opening BINARY mode data connection for 'jinstall-ex-4200-10.0S10.1-domestic-signed.tgz' (108313606 bytes).
    100% |********************************************************************************************| 103 MB 00:00 ETA
    226 Transfer complete.
    108313606 bytes received in 25.67 seconds (4.02 MB/s)
  11. ftp> bye
    221 Goodbye.
  12. {master:0}
    user@switch> file list /var/tmp
    /var/tmp:
    .snap/
    gres-tp/
    jinstall-ex-4200-10.0S10.1-domestic-signed.tgz   > The file is present
    krt_gencfg_filter.txt

Modification History

2019-06-25: Article reviewed for accuracy.