4.9 Describe what TFTP and FTP do on a network

CCNA 200-301 v1.1 · 4.0 IP Services

Network devices move files for software upgrades, configuration backups and restores. TFTP is the minimal option: UDP 69, no login, no directory listing. FTP runs over TCP with a username and password and separate control and data connections. Neither encrypts; SCP and SFTP do. For the CCNA you compare them and know how IOS copies files.

What you must know

TFTP and FTP compared

TFTPFTP
TransportUDP 69TCP 21 (control) and 20 or a high port (data)
LoginNoneUsername and password, sent in clear text
FeaturesGet and put onlyList directories, rename, delete, resume
ReliabilityIts own acknowledgements, one block at a timeTCP
Typical useQuick image or config copy in a lab or a closed networkLarger files, servers that need a login

FTP opens a control connection to TCP 21 for commands. In active mode the server then opens the data connection from port 20 back to the client, which client firewalls often block. In passive mode the client opens the data connection to a port the server announces, which is why passive is the default in most clients.

Copying files on IOS

R1# copy running-config tftp:
Address or name of remote host []? 10.0.50.30
Destination filename [r1-confg]?
!!
1830 bytes copied in 0.512 secs
!
R1# copy ftp://admin:Pass@10.0.50.30/c1100-universalk9.17.09.05.SPA.bin flash:
R1# verify /md5 flash:c1100-universalk9.17.09.05.SPA.bin

The backup goes to the server (1); the image comes back over FTP (2). Check free space with show flash: first, verify the hash, then set boot system before reloading. For anything outside a lab, prefer SCP (ip scp server enable, copy scp:) or SFTP, which use SSH and encrypt both the login and the file.

Commands

copy running-config tftp:Back up the running configuration to a TFTP server.
copy tftp: flash:Download a file to flash.
show flash:Files in flash and the free space.
verify /md5 flash:<file>Check an image's hash against the published one.

Exam traps

Check yourself

Which protocol, TFTP or FTP, needs a username and password?
FTP.
Why does passive FTP work better through client firewalls?
The client opens both connections outward; in active mode the server connects back in.
Which secure protocol can replace TFTP for copying configs on IOS?
SCP (or SFTP).

More topics in 4.0 IP Services