1.配置交换机SW1作为客户端
[SW1]interface Vlanif 1
[SW1-Vlanif1]ip address 192.168.0.2 30
2.配置路由器R1作为服务端
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.0.1 30
[R1-GigabitEthernet0/0/0]quit
[R1]
[R1]ftp server enable
Info: Succeeded in starting the FTP server
[R1]aaa
[R1-aaa]local-user ender password cipher qytang001
Info: Add a new user.
[R1-aaa]local-user ender service-type ftp
[R1-aaa]local-user ender privilege level 15
[R1-aaa]local-user ender ftp-directory flash:
[R1-aaa]q
[R1]
<R1>save
3.FTP连接测试
<SW1>ftp 192.168.0.1
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1.
220 FTP service ready.
User(192.168.0.1:(none)):ender
331 Password required for ender.
Enter password:
230 User logged in.
[ftp]dir
200 Port command okay.
150 Opening ASCII mode data connection for *.
drwxrwxrwx 1 noone nogroup 0 Oct 18 12:31 dhcp
-rwxrwxrwx 1 noone nogroup 121802 May 26 2014 portalpage.zip
-rwxrwxrwx 1 noone nogroup 2263 Oct 18 12:31 statemach.efs
-rwxrwxrwx 1 noone nogroup 828482 May 26 2014 sslvpn.zip
-rwxrwxrwx 1 noone nogroup 249 Oct 18 12:36 private-data.txt
drwxrwxrwx 1 noone nogroup 0 Oct 18 12:36 .
-rwxrwxrwx 1 noone nogroup 640 Oct 18 12:36 vrpcfg.zip
226 Transfer complete.
[ftp]get portalpage.zip
200 Port command okay.
150 Opening ASCII mode data connection for portalpage.zip.
1%
2%
6%