交换机如何开启FTP服务

发布时间:  2017-05-24 浏览次数:  137 下载次数:  0
问题描述

交换机如何开启FTP服务

解决方案

将设备配置为FTP服务器,PC配置为FTP客户端

Switch上创建VLAN 10,并配置VLAN 10的接口IP地址为10.1.1.2/24

<Quidway> system-view

[Quidway] vlan 10

[Quidway-vlan10] quit

[Quidway] interface gigabitethernet 0/0/1

[Quidway-GigabitEthernet0/0/1] port hybrid pvid vlan 10

[Quidway-GigabitEthernet0/0/1] port hybrid untagged vlan 10

[Quidway-GigabitEthernet0/0/1] quit

[Quidway] interface vlanif 10

[Quidway-Vlanif10] ip address 10.1.1.2 24

Switch上启动FTP服务,并配置FTP用户名u1,口令ftppwd

[Quidway] ftp server enable  //开启FTP服务

[Quidway] aaa

[Quidway-aaa] local-user u1 password cipher ftppwd

[Quidway-aaa] local-user u1 service-type ftp

[Quidway-aaa] local-user u1 privilege level 15

[Quidway-aaa] local-user u1 ftp-directory flash:/

[Quidway-aaa] return

PC机上,向Switch发起FTP连接,输入用户名u1和口令ftppwd

PC机上的FTP客户端以Window XP操作系统为例说明。

C:\WINDOWS\Desktop> ftp 10.1.1.2

Connected to 10.1.1.2.

220 FTP service ready.

User (10.1.1.1:(none)): u1

331 Password required for u1

Password:

230 User logged in.

ftp>

PC机上,配置二进制传输格式和PC机本地目录

ftp> binary

200 Type set to I.

ftp> lcd c:\temp

Local directory now C:\temp.

PC上,从Switch下载文件vrpcfg.cfg

ftp> get vrpcfg.cfg vrpcfg.cfg

200 Port command okay.

150 Opening BINARY mode data connection for vrpcfg.cfg.

ftp> quit

C:\WINDOWS\Desktop>

PC上,从Switch上传文件vrpcfg.cfg

ftp> put vrpcfg.cfg vrpcfg.cfg
200 Port command okay.
150 Opening BINARY mode data connection for vrpcfg.cfg.
ftp> quit
C:\WINDOWS\Desktop>

END