Copy Files with FTP

IOS includes a built-in File Transfer Protocol (FTP) client that can be used to transfer images to and from the Cisco device. Unlike TFTP, FTP supports authentication, and you will need to provide a valid FTP server username and password.

The following steps are required for FTP transfers:

  1. create an FTP username and password by using the ip ftp username USERNAME and ip ftp password PASSWORD global configuration command. We need to provide the username and password that were already created on the FTP server.
  2. issue the copy ftp flash exec mode command and follow the wizard.


Here is an example. Let’s say that we want to transfer the image file from the FTP server to a Cisco switch. We can do this using the following set of commands:

SW1(config)#ip ftp username tuna
SW1(config)#ip ftp password peyo
%SYS-5-CONFIG_I: Configured from console by console

SW1#copy ftp flash
Address or name of remote host []?
Source filename []? c2960-lanbasek9-mz.150-2.SE4.bin
Destination filename [c2960-lanbasek9-mz.150-2.SE4.bin]? 

[OK - 4670455 bytes]

4670455 bytes copied in 10.02 secs (37473 bytes/sec)

To verify that the file has indeed been transfered, we can use the show flash: command:

SW1#show flash:
Directory of flash:/

    1  -rw-     4414921            c2960-lanbase-mz.122-25.FX.bin
    4  -rw-     4670455            c2960-lanbasek9-mz.150-2.SE4.bin
    2  -rw-        1052            config.text

We can also transfer files from the IOS device to the FTP server, for example, to backup the startup configuration. Here is an example of copying the startup configuration of a switch to the FTP server:

SW1#copy startup-config ftp
Address or name of remote host []?
Destination filename [SW1-confg]? 

Writing startup-config...
[OK - 1052 bytes]

1052 bytes copied in 0.09 secs (11000 bytes/sec)
64016384 bytes total (54929956 bytes free)

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: