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
- Compare TFTP and FTP: transport, ports, authentication, features.
- Explain FTP's control and data connections and active versus passive mode.
- Copy an IOS image or a configuration with
copyto and from a server. - Name the secure alternatives (SCP, SFTP).
TFTP and FTP compared
| TFTP | FTP | |
|---|---|---|
| Transport | UDP 69 | TCP 21 (control) and 20 or a high port (data) |
| Login | None | Username and password, sent in clear text |
| Features | Get and put only | List directories, rename, delete, resume |
| Reliability | Its own acknowledgements, one block at a time | TCP |
| Typical use | Quick image or config copy in a lab or a closed network | Larger 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.binThe 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
- TFTP uses UDP 69 and has no authentication.
- FTP uses TCP 21 for control and a separate data connection.
- Neither TFTP nor FTP encrypts; use SCP or SFTP for security.
- Check free flash and verify the hash before booting a new image.
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
- 4.1 Configure and verify NAT for inside hosts using static mappings and address pools
- 4.2 Configure and verify NTP clients and servers
- 4.3 Explain what DHCP and DNS do for hosts
- 4.4 Explain how SNMP is used in network operations
- 4.5 Describe syslog, including facilities and severity levels
- 4.6 Configure and verify DHCP client and relay
- 4.7 Explain QoS per-hop behavior: classification, marking, queuing, congestion handling, policing, shaping