Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

FTP

Direct answer

TFTP (UDP 69) and FTP (TCP 21 plus a data connection) transfer IOS images and configurations to and from network devices. TFTP has no authentication; FTP sends credentials in clear text. SCP and SFTP are the secure alternatives.

When to use this

Use it when copying images or configurations to and from devices, and when a transfer fails or must be made secure.

First 30 seconds

1. ping <server> source <if> — reachable?

2. dir flash: — enough free space?

3. Transfer: copy scp://user@server/<file> flash: (or tftp/ftp).

4. Timeout → firewall (UDP 69 for TFTP; TCP 21 + data ports for FTP) or wrong source interface.

5. verify /md5 flash:<file> <hash> matches the vendor value before use.

Operational verification

server reachable from the source interface → protocol allowed through firewalls → authenticated (FTP/SCP) → file copied → size and MD5/SHA verified

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Key commandip ftp username <username>
Scope / prerequisiteUse it when copying images or configurations to and from devices, and when a transfer fails or must be made secure.
Reference · 4
What next?3 suggested next steps
Catalog command links4
Evidence0
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification and output interpretation Verify boundary

Inspect control-channel login and response codes, verify the negotiated data endpoint/mode, show the data transfer completes and validate the downloaded/uploaded artifact independently. Verification should move from route/transport to protocol state and then to the resulting artifact or clock quality. Use protocol counters/status, timestamps or transfer progression, and validate the consumer-side result. A socket/UDP response is useful reachability evidence but should not be mistaken for successful service semantics.

Command lookup Jump straight to Cisco syntax
Key points

Prefer copy scp: (enable ip scp server enable for pushes to the device) or HTTPS. Set the source interface (ip tftp source-interface, ip ftp source-interface) so firewalls see the expected address. TFTP is slow for large images; verify every image with verify /md5 before reloading.

Key checks
  • copy tftp: flash: / copy scp: flash: — transfer with the chosen protocol.
  • dir flash: — file present with the expected size; free space.
  • verify /md5 flash:<image> <md5> — image integrity against the vendor checksum.
  • show running-config | include tftp|ftp|scp — source interfaces and settings.
  • ping <server> source <if> — server reachable from the source interface.
ReferenceWhat it is1 section · depth on demand

What it is

TFTP is a simple UDP-based file transfer without built-in authentication; FTP uses TCP control/data connections and authenticated sessions.

Path: Networking → IP Services → FTP. Local intent: Deep reference for FTP control/data channels, active/passive mode, authentication and transfer-completion evidence.

ReferenceImportant terms & boundaries4 sections · depth on demand

In depth

FTP

FTP transfers files over separate control and data connections. RFC 959 describes the model: the client opens a control connection to the server's standard port and sends commands (Telnet-style text), and file contents travel over a separate data connection, set up either by the client naming a port (PORT, "active") or by the server listening and reporting its address (PASV, "passive").

Commands (RFC 959)

CommandPurpose
USER / PASSLog in
RETRDownload a file
STORUpload a file
LISTDirectory listing over the data connection
TYPERepresentation type: ASCII (default) or Image (binary)
PORT / PASVActive or passive data connection

Reply codes (RFC 959)

First digitMeaning
1Positive preliminary
2Positive completion
3Positive intermediate (more information needed)
4Transient negative (retry possible)
5Permanent negative

Ports in practice

FTP control uses TCP 21 and active-mode data uses TCP 20 from the server; passive mode uses a server port given in the 227 reply. Firewalls need FTP inspection to open the data connections.

R1(config)# ip ftp username backup
R1(config)# ip ftp password 0 <password>
R1(config)# ip ftp source-interface Loopback0
R1(config)# ip ftp passive
R1# copy running-config ftp://10.20.0.61/configs/r1-confg
host$ ftp -p 10.20.0.61
230 Login successful.
ftp> binary
200 Switching to Binary mode.
ftp> get c8000v-universalk9.17.12.04.SPA.bin
227 Entering Passive Mode (10,20,0,61,195,80).
150 Opening BINARY mode data connection.
226 Transfer complete.

Security

Plain FTP sends usernames, passwords and data unencrypted. Use SCP, SFTP (SSH) or FTPS (FTP over TLS) instead, and restrict any remaining FTP servers to specific clients.

FTP versus TFTP

FTPTFTP
TransportTCPUDP
AuthenticationUsername and passwordNone
Directory listingYesNo
Typical network useLarger transfers on legacy systemsBoot, phone configuration, small files

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

FTP transfers files over TCP using a control connection (port 21) and separate data connections, in active or passive mode. It sends credentials in clear text, so it should be replaced by SFTP/SCP or FTPS.

ModeData connection
ActiveServer connects back to the client
PassiveClient connects to a server-chosen port (firewall-friendly)
ip ftp username backup
ip ftp password <secret>
copy running-config ftp://10.0.0.5/sw01.cfg

Documented example, not captured output.

Firewalls and NAT need FTP inspection (ALG) to track the dynamic data ports.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Protocol/service mechanics and state model

FTP uses a control channel for authentication and commands, then creates separate data connections for directory listings and file transfers. Active and passive mode differ in which side opens the data connection, making firewall/NAT behavior part of the transfer path. Response codes on the control channel describe protocol progress but must be correlated with the data channel and resulting file. IP service protocols add operational dependencies above basic routing. Time and file-transfer services each have their own control/state model, transport behavior and quality criteria. Reachability to the service endpoint is only the first step; selection/authentication, protocol exchange, resulting clock/file state and consumer behavior must be interpreted separately.

Limits and common misconceptions

Successful authentication shows only control access. A 2xx control response alone does not show the data file is complete, correct or safe to deploy. Service protocol success has a narrow scope. A synchronized-looking peer relationship may still have poor clock quality; a completed file transfer may still contain the wrong artifact. Keep transport reachability, protocol exchange, security/authentication, resulting state and dependent application behavior as separate evidence layers.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration intent

Prefer passive mode where client-side NAT/firewall traversal is needed, protect credentials with an appropriate secure alternative when possible, and document the server path/account permissions used for network-device workflows. Configure service endpoints, source/VRF context, authentication/security and operational ownership explicitly. Prefer secure protocols where credentials or sensitive artifacts are involved, document path conventions and reference hierarchy, and make fallback/redundancy behavior intentional rather than accidental.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in IP Services → FTP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Embedded reference data

Quick lookup tables

FTP · operational reference

Compact protocol/state/evidence reference for fast lookup.

FTP layerMeaning
Control sessionLogin/commands
Active/passiveData connection model
Data transferFile bytes moved
Hash/sizeArtifact validation
Confirmation

Confirm action

Continue?