一、实验扩扑
二、实验思路
1、首先在服务器端这边实现ftp服务的开启。
2、通过save后加文件名使得代码保存到对应的文件中。
3、在客户端这边在用户视图下通过ftp加地址通过安全认证进入ftp服务。
三、实验步骤
FTP:<Huawei>sys
[Huawei]sysname Ftp
[Ftp]int g0/0/0
[Ftp-GigabitEthernet0/0/0]ip add 100.1.1.1 24
[Ftp-GigabitEthernet0/0/0]q
[Ftp]ftp server enable
[Ftp]aaa
[Ftp-aaa]local-user wangdaye password cipher wdy12345 privilege level 15
[Ftp-aaa]local-user wangdaye service-type ftp
[Ftp-aaa]local-user wangdaye ftp-directory flash:
[Ftp-aaa]q
[Ftp]q
<Ftp>save test.zip
Are you sure to save the configuration to test.zip? (y/n)[n]:y
It will take several minutes to save configuration file, please wait........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated<Ftp>dir
Client:<Huawei>sys
[Huawei]sysname client
[client]int g0/0/0
[client-GigabitEthernet0/0/0]ip add 100.1.1.2 24
<client>ftp 100.1.1.1
Trying 100.1.1.1 ...
Press CTRL+K to abort
Connected to 100.1.1.1.
220 FTP service ready.
User(100.1.1.1:(none)):wangdaye
331 Password required for wangdaye.
Enter password:
230 User logged in.[client-ftp]get test.zip
200 Port command okay.
150 Opening ASCII mode data connection for test.zip.
226 Transfer complete.
FTP: 635 byte(s) received in 0.200 second(s) 3.17Kbyte(s)/sec.
[client-ftp]put test.zip
200 Port command okay.
150 Opening ASCII mode data connection for test.zip.
100%
226 Transfer complete.
FTP: 635 byte(s) sent in 0.120 second(s) 5.29Kbyte(s)/sec.
[client-ftp]bye
221 Server closing.
四、实验总结
FTP总的来说还是比较简单的,这是虚拟机上的实验,不能细看很多的东西,不过可以用来练手。代码需要记的也不是很多,主要的应该是原理以及逻辑的理解,以及养成一个好习惯,多去抓包看看指令在代码之间的交流到底是怎么样的,这样也便于理解和记忆。