실험적 토폴로지 다이어그램 :
실험 구성 아이디어 :
- FTP 서비스 열기
- AAA 인증 사용
실험 요약을위한 주요 명령 :
[R2]ftp server enable //开启FTP服务
실험의 세부 구성 단계 :
인터페이스 IP 주소 구성
R1——配置接口IP地址
<Huawei>system-view //进去全局配置模式
[Huawei]undo info-center enable //关闭信息告警提示
[Huawei]sysname R1 //改名
[R1]int g0/0/0 //进入接口
[R1-GigabitEthernet0/0/0]ip address 10.1.1.1 24 //设置IP地址
[R1-GigabitEthernet0/0/0]quit //退出
[R1]
R2-Configure 인터페이스 IP 주소
<Huawei>system-view //进去全局配置模式
[Huawei]undo info-center enable //关闭信息告警提示
[Huawei]sysname R2 //改名
[R2]int g0/0/0 //进入接口
[R2-GigabitEthernet0/0/0]ip address 10.1.1.2 24 //设置IP地址
[R2-GigabitEthernet0/0/0]quit //退出
[R2]
FTP 켜기
R2-FTP 기능 켜기
[R2]ftp server enable //开启FTP服务
[R2]aaa //AAA认证
[R2-aaa]local-user admin password cipher admin@123 //配置密码
[R2-aaa]local-user admin privilege level 3 //配置用户权限
[R2-aaa]local-user admin ftp-directory flash: //配置用户访问目录
[R2-aaa]local-user admin service-type ftp //配置用户访问服务
[R2-aaa]quit //退出
[R2]
AAA 인증 구성
R2-Configure AAA 인증
[R2]aaa //AAA认证
[R2-aaa]local-user admin password cipher admin@123 //配置密码
[R2-aaa]local-user admin privilege level 3 //配置用户权限
[R2-aaa]local-user admin ftp-directory flash: //配置用户访问目录
[R2-aaa]local-user admin service-type ftp //配置用户访问服务
[R2-aaa]quit //退出
[R2]
파일 복사
R2- 폴더 복사
<R2>dir //查看
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 568 Mar 19 2021 09:11:00 r1
1 drw- - Mar 19 2021 09:03:22 dhcp
2 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
3 -rw- 2,263 Mar 19 2021 09:27:56 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
5 -rw- 249 Mar 19 2021 09:10:10 private-data.txt
6 -rw- 586 Mar 19 2021 09:27:55 vrpcfg.zip
1,090,732 KB total (784,448 KB free)
<R2>copy vrpcfg.zip R2 //拷贝文件并修改名称为R2
Copy flash:/vrpcfg.zip to flash:/r2? (y/n)[n]:y
100% complete
Info: Copied file flash:/vrpcfg.zip to flash:/r2...Done
<R2>
테스트
R1-FTP 액세스 테스트
<R1>ftp 10.1.1.2 //FTP连接
Trying 10.1.1.2 ...
Press CTRL+K to abort
Connected to 10.1.1.2.
220 FTP service ready.
User(10.1.1.2:(none)):admin //输入用户名
331 Password required for admin.
Enter password: //输入密码
230 User logged in.
[R1-ftp]dir //查看文件
200 Port command okay.
150 Opening ASCII mode data connection for *.
drwxrwxrwx 1 noone nogroup 0 Mar 19 09:38 dhcp
-rwxrwxrwx 1 noone nogroup 121802 May 26 2014 portalpage.zip
-rwxrwxrwx 1 noone nogroup 2263 Mar 19 09:38 statemach.efs
-rwxrwxrwx 1 noone nogroup 828482 May 26 2014 sslvpn.zip
-rwxrwxrwx 1 noone nogroup 607 Mar 19 09:48 r2
-rwxrwxrwx 1 noone nogroup 249 Mar 19 09:48 private-data.txt
drwxrwxrwx 1 noone nogroup 0 Mar 19 09:48 .
-rwxrwxrwx 1 noone nogroup 607 Mar 19 09:48 vrpcfg.zip
226 Transfer complete.
FTP: 526 byte(s) received in 0.180 second(s) 2.92Kbyte(s)/sec.
[R1-ftp]
R1-FTP 복사 테스트
[R1-ftp]get r2 //复制R2
200 Port command okay.
150 Opening ASCII mode data connection for r2.
226 Transfer complete.
FTP: 607 byte(s) received in 0.200 second(s) 3.03Kbyte(s)/sec.
[R1-ftp]quit //退出
221 Server closing.
<R1>dir //查看文件
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Mar 19 2021 09:38:46 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 -rw- 2,263 Mar 19 2021 09:38:34 statemach.efs
3 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
4 -rw- 607 Mar 19 2021 09:55:13 r2
1,090,732 KB total (784,456 KB free)
<R1>