Use it when copying images or configurations to and from devices, and when a transfer fails or must be made secure.
FTP
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.
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
Operational reference
Fast context before you go deeper.
ip ftp username <username>Primary Commands
Configuration and operational commands for this Topic.
ip ftp username <username>ReferenceSet the FTP username used for file transfers.
Use when: Use at the TFTP and FTP boundary after prerequisite state is verified.
Quick note: Operational guidance. A completed copy message does not prove the file is authentic, uncorrupted, compatible or safely activated.
Cisco IOS / IOS XE · mixedip ftp password <password>ReferenceSet the FTP password used for file transfers.
Use when: Use at the TFTP and FTP boundary after prerequisite state is verified.
Quick note: Operational guidance. A completed copy message does not prove the file is authentic, uncorrupted, compatible or safely activated.
Cisco IOS / IOS XE · mixedcopy running-config ftp:ReferenceCopy the running configuration to an FTP server.
Use when: Use at the TFTP and FTP boundary after prerequisite state is verified.
Quick note: Operational guidance. A completed copy message does not prove the file is authentic, uncorrupted, compatible or safely activated.
Cisco IOS / IOS XE · mixedcopy ftp: flash:ReferenceCopy a file from an FTP server to flash.
Use when: Use at the TFTP and FTP boundary after prerequisite state is verified.
Quick note: Operational guidance. A completed copy message does not prove the file is authentic, uncorrupted, compatible or safely activated.
Cisco IOS / IOS XE · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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.
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 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)
| Command | Purpose |
|---|---|
| USER / PASS | Log in |
| RETR | Download a file |
| STOR | Upload a file |
| LIST | Directory listing over the data connection |
| TYPE | Representation type: ASCII (default) or Image (binary) |
| PORT / PASV | Active or passive data connection |
Reply codes (RFC 959)
| First digit | Meaning |
|---|---|
| 1 | Positive preliminary |
| 2 | Positive completion |
| 3 | Positive intermediate (more information needed) |
| 4 | Transient negative (retry possible) |
| 5 | Permanent 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
| FTP | TFTP | |
|---|---|---|
| Transport | TCP | UDP |
| Authentication | Username and password | None |
| Directory listing | Yes | No |
| Typical network use | Larger transfers on legacy systems | Boot, phone configuration, small files |
Documented example, not captured output.
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.
| Mode | Data connection |
|---|---|
| Active | Server connects back to the client |
| Passive | Client 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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%Quick lookup tables
FTP · operational reference
Compact protocol/state/evidence reference for fast lookup.
| FTP layer | Meaning |
|---|---|
| Control session | Login/commands |
| Active/passive | Data connection model |
| Data transfer | File bytes moved |
| Hash/size | Artifact validation |