[ftpserver-Vlanif1]ip address 10.0.0.1 24
ip address 10.0.0.1 24
[ftpserver-Vlanif1]
Jan 1 2019 17:14:11-08:00 ftpserver %%01IFNET/4/LINK_STATE(l)[52]:The line protocol IP on the interface Vlanif1 has entered the UP state.
--显示一下ip
[ftpserver-Vlanif1]disp this
disp this
#
interface Vlanif1
ip address 10.0.0.1 255.255.255.0
#
return
[ftpserver-Vlanif1]
--设置客户端,方法同上
<Huawei>system-view
system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname ftpclient
sysname ftpclient
[ftpclient]
Jan 1 2019 17:16:00-08:00 ftpclient DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 5, the change loop count is 0, and the maximum number of records is 4095.
[ftpclient-Vlanif1]
Jan 1 2019 17:17:41-08:00 ftpclient %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Vlanif1 has entered the UP state.
[ftpclient-Vlanif1]
[ftpclient-Vlanif1]disp this
disp this
#
interface Vlanif1
ip address 10.0.0.2 255.255.255.0
#
return
--测试一下联通性
[ftpclient-Vlanif1]ping 10.0.0.1
ping 10.0.0.1
PING 10.0.0.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.0.1: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 10.0.0.1: bytes=56 Sequence=2 ttl=255 time=40 ms
Reply from 10.0.0.1: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 10.0.0.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 10.0.0.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 10.0.0.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/36/50 ms
[ftpclient-Vlanif1]
--以上表明联通性配置成功。
2.开启ftp服务
2.1 启动ftp
[ftpserver-Vlanif1]ftp server enable
ftp server enable
Info: Succeeded in starting the FTP server.
[ftpserver]
2.2 查看ftp
[ftpserver]display ftp-server
display ftp-server
FTP server is running
Max user number 5
User count 0
Timeout value(in minute) 30
Listening port 21
Acl number 0
FTP server's source address 0.0.0.0
[ftpserver]
[ftpserver]
2.3 开启3A
2.3.1 进入 aaa
[ftpserver]aaa
aaa
[ftpserver-aaa]
<ftpserver>save sztech.cfg
save sztech.cfg
Are you sure to save the configuration to flash:/sztech.cfg?[Y/N]:Y
Y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<ftpserver>
2.3.6 显示一下当前文件
<ftpserver>dir
dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 06 2015 21:26:42 src
1 drw- - Jan 01 2019 17:08:33 compatible
2 -rw- 1,567 Jan 01 2019 17:28:37 sztech.cfg
32,004 KB total (31,968 KB free)
<ftpserver>
3.实施ftp
3.1 客户端 登陆ftp
<ftpclient>ftp 10.0.0.1
ftp 10.0.0.1
Trying 10.0.0.1 ...
Press CTRL+K to abort
Connected to 10.0.0.1.
220 FTP service ready.
User(10.0.0.1:(none)):sztech
sztech
331 Password required for sztech.
Enter password:sztech
230 User logged in.
[ftp]
3.2 查看一下文件情况
[ftp]dir
dir
200 Port command okay.
150 Opening ASCII mode data connection for *.
drwxrwxrwx 1 noone nogroup 0 Aug 06 2015 src
drwxrwxrwx 1 noone nogroup 0 Jan 01 17:08 compatible
-rwxrwxrwx 1 noone nogroup 1567 Jan 01 17:28 sztech.cfg
226 Transfer complete.
[ftp]
3.3 下载sztech.cfg文件
[ftp]get sztech.cfg
get sztech.cfg
200 Port command okay.
150 Opening ASCII mode data connection for sztech.cfg.
226 Transfer complete.
FTP: 1567 byte(s) received in 0.220 second(s) 7.12Kbyte(s)/sec.
[ftp]
--确认已经下载到本地
[ftp]quit
quit
221 Server closing.
<ftpclient>dir
dir
Directory of flash:/
Idx Attr Size(Byte) Date Time FileName
0 drw- - Aug 06 2015 21:26:42 src
1 drw- - Jan 01 2019 17:08:33 compatible
2 -rw- 1,567 Jan 01 2019 17:32:28 sztech.cfg
32,004 KB total (31,968 KB free)
<ftpclient>