TFTP and FTP — moving files to and from a router
Network engineers move firmware images, configs, and certs constantly. TFTP and FTP are the two foundational transfer protocols. This chapter covers what each is, when to use it, and the exact 'copy' commands.
What you'll learn
- Compare TFTP and FTP on ports, transport, auth, and reliability.
- Back up a running-config to a TFTP server.
- Restore a firmware image from FTP.
TFTP — small, simple, unauthenticated
Trivial File Transfer Protocol runs over UDP port 69. There is no login and no directory listing: the client names a file and either reads it or writes it. Reliability comes from the protocol itself. Every 512-byte block is acknowledged before the next one is sent, and a block that is not acknowledged in time is sent again. Devices use TFTP for configuration backups, boot images and network (PXE) booting.
TFTP has no authentication of any kind. Any host that can reach the server on UDP 69 can read a file whose name it knows, and often write one. The only controls are network ones (filter who can reach UDP 69, and keep the server on a management network) or a protocol that authenticates. A configuration backup holds every type 7 password and community string on the device, so treat the server as sensitive.
R1# copy running-config tftp://10.99.0.20/r1-2026-10.cfgFTP — bigger files, with login
File Transfer Protocol runs over TCP. A control connection to port 21 carries the login and the commands, and each file travels over a separate data connection: from port 20 in active mode, or to a port the server picks in passive mode. FTP does authenticate, with a username and password, but both cross the wire in clear text, and so does the data. For anything sensitive use SCP or SFTP, which run over SSH.
On a router the FTP credentials are set once in configuration and the copy names the server and file. The commands below are standard syntax; the NetForge lab does not simulate FTP.
R1(config)# ip ftp username netadmin
R1(config)# ip ftp password Ftp-Pass-26
R1(config)# end
R1# copy ftp://10.99.0.21/nf-os-4.3.1.bin flash:9 more sections in this chapter, plus a 4-question quiz.
Modules 2–8 are part of the Course & Lab Pass and All-Access Max — start with a free account
You can see the title, summary, learning objectives and the opening sections. The rest of this chapter, like all of modules 2–8, comes with the Course & Lab Pass and All-Access Max. A free account opens Module 1: How Networks Work end-to-end and saves your labs — start there, no card required.
- Read every chapter in Module 1 — How Networks Work
- Save labs of up to 5 devices
- Save up to 3 topologies
- See the full course syllabus + chapter titles
Free account · no card required · compare plans any time