FTP协议实验

        将物理机中D:\123.txt文件传输到eNSP中的路由器。

<Huawei>sys

[Huawei]sysname FTP Server

[FTP Server]int g 0/0/0

[FTP Server-GigabitEthernet0/0/0]ip address 192.168.223.10 24

[FTP Server-GigabitEthernet0/0/0]

Sep 11 2024 12:20:44-08:00 FTP Server %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.

[FTP Server-GigabitEthernet0/0/0]q

[FTP Server]ftp server enable

Info: Succeeded in starting the FTP server

[FTP Server]aaa

[FTP Server-aaa]local-user 用户名 password cipher 密码

(创建并配置账号信息)

Info: Add a new user.

[FTP Server-aaa]local-user 用户名 service-type ftp

(来配置本地用户的接入类型为ftp)

[FTP Server-aaa]local-user 用户名 ftp-directory flash:D:\

(指定FTP用户可访问的目录)

[FTP Server-aaa]local-user 用户名 access-limit 100

(定用户名可建立的最大连接数目)

(FTP连接数是会话层的连接个数,比如一个文件可以有5个会话,10个文件是50,如果10个人同时下载就是500)

[FTP Server-aaa]local-user 用户名 idle-timeout 0 0

(指定用户的闲置超时时间)

[FTP Server-aaa]local-user 用户名 privilege level 3

(指定用户的优先级,3-15级)

[FTP Server-aaa]ret

<FTP Server>save

The current configuration will be written to the device.

Are you sure to continue? (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 Server>dir

Directory of flash:/

Idx  Attr   Size(Byte)  Date  Time(LMT)  FileName

0  drw-              -  Sep 11 2024 04:19:53   dhcp

1  -rw-        121,802  May 26 2014 09:20:58   portalpage.zip

2  -rw-          2,263  Sep 11 2024 04:19:46   statemach.efs

3  -rw-        828,482  May 26 2014 09:20:58   sslvpn.zip

4  -rw-            352  Sep 11 2024 04:24:37   private-data.txt

5  -rw-            701  Sep 11 2024 04:24:37   vrpcfg.zip

1,090,732 KB total (784,456 KB free)

<FTP Server>ftp 192.168.223.1

Trying 192.168.223.1 ...

Press CTRL+K to abort

Connected to 192.168.223.1.

220 欢迎访问 Slyar FTPserver!

User(192.168.223.1:(none)):用户名

331 Please specify the password.

Enter password:密码

230 Login successful.

[FTP Server-ftp]binary

200 Type set to I

[FTP Server-ftp]get 123.txt

200 Port command successful.

150 Opening BINARY mode data connection for file transfer.

226 Transfer complete

FTP: 4 byte(s) received in 0.080 second(s) 50.00byte(s)/sec.

[FTP Server-ftp]dir

200 Type set to A

200 Port command successful.

150 Opening ASCII mode data connection for directory list.

drwx------ 1 user group              0 Jun 20 21:23 $RECYCLE.BIN

-rwx------ 1 user group              4 Sep 11 12:11 123.txt

drwx------ 1 user group              0 Jul 16 14:44 BaiduNetdiskDownload

drwx------ 1 user group              0 Aug 25 16:51 BitLocker E盘

drwx------ 1 user group              0 Aug 23 13:50 CloudMusic

drwx------ 1 user group              0 Aug 10 17:35 ddy

drwx------ 1 user group              0 Jun 28 21:27 My Documents

drwx------ 1 user group              0 Jun 21 15:03 Program Files

drwx------ 1 user group              0 Aug 25 16:49 System Volume Information

drwx------ 1 user group              0 Sep 08 22:10 Temp

drwx------ 1 user group              0 Aug 16 10:21 Tor Browser

drwx------ 1 user group              0 Jul 05 21:14 备份

drwx------ 1 user group              0 Jul 16 14:49 电脑壁纸

drwx------ 1 user group              0 Sep 02 09:34 虚拟机

226 Transfer complete

FTP: 904 byte(s) received in 0.030 second(s) 30.13Kbyte(s)/sec.

200 Type set to I

  • 7
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值