copy a file from the FTP Server to the Cisco Devices
copy ftp://user:passwd@ftpserver//ciscoios/3600_ios.bin flash:3600_ios.bin
copy a file from the Cisco Devices to the FTP Server
copy flash:3600_ios.bin ftp://user:passwd@ftpserver//ciscoios/3600_ios.bin
ipmortend ip ftp commands
evil-router(config)#ip ftp ?
passive Connect using passive mode
password Specify password for FTP connections
source-interface Specify interface for source address in FTP connections
username Specify username for FTP connections
FTP active and passive mode
ip ftp passive
-> only passive mode
no ip ftp passive
-> all types of FTP Connections
after some tests, i found out,that most IOS takes the passive mode as default, if nothing
is configured. If "no ip ftp passive" is configured, on some IOS it takes first active FTP, on other
it try first passive. More test are requierd, but not time and no other Hardware and IOS available.
Config Sample, and file prompt quit, for supressing the questions about file overwriting
ip ftp source-interface loopback 0
ip ftp username ftp_username
ip ftp password ftp_password
file prompt quiet
Debug FTP sessions
debug ip ftp
and here the output
Sep 30 18:58:17.507: FTP: 220 (vsFTPd 2.0.6)
Sep 30 18:58:17.507: FTP: ---> USER anonymous
Sep 30 18:58:17.507: FTP: 331 Please specify the password.
Sep 30 18:58:17.507: FTP: ---> PASS
Sep 30 18:58:17.587: FTP: 230 Login successful.
Sep 30 18:58:17.587: FTP: ---> TYPE I
Sep 30 18:58:17.591: FTP: 200 Switching to Binary mode.
Sep 30 18:58:17.591: FTP: ---> PASV
Sep 30 18:58:17.595: FTP: 227 Entering Passive Mode (192,168,2,100,29,184)
Sep 30 18:58:17.599: FTP: ---> RETR hallo
Sep 30 18:58:17.607: FTP: 150 Opening BINARY mode data connection for hallo (6 bytes).
Sep 30 18:58:17.607: FTP: ---> QUIT
Sep 30 18:58:17.619: FTP: 226 File send OK.
Sep 30 18:58:17.623: FTP: 220 (vsFTPd 2.0.6)
Sep 30 18:58:17.623: FTP: ---> USER anonymous
Sep 30 18:58:17.627: FTP: 331 Please specify the password.
Sep 30 18:58:17.627: FTP: ---> PASS
Sep 30 18:58:17.651: FTP: 230 Login successful.
or some error messages
Sep 30 19:03:23.290: FTP: ---> RETR hallo1
Sep 30 19:03:23.294: FTP: 550 Failed to open file.
Backup with ftp and kron
ip ftp source-interface loopback 0
ip ftp username ftp_username
ip ftp password ftp_password
file prompt quiet
!
kron policy-list backup
cli copy running-config ftp://10.20.30.40
!
kron occurrence daily-backup at 0:30 recurring
policy-list backup