设为首页 收藏本站
查看: 1223|回复: 0

[经验分享] 华为设备,通过tftp和ftp上传下载文件

[复制链接]

尚未签到

发表于 2018-7-24 07:28:17 | 显示全部楼层 |阅读模式
DSC0000.jpg

  真机IP192.168.10.10/24
  R1 G0/0/0 IP192.168.10.1/24
  在真机上搭建tftp服务器实现路由上传下载
  使用tftpd32搭建TFTP服务器
DSC0001.jpg

  R1配置
  <R1>system-view                  //进入系统视图
  [R1]interface GigabitEthernet 0/0/0     //进接口
  [R1-GigabitEthernet0/0/0]ip address 192.168.10.1 24   // 配置接口IP
  [R1-GigabitEthernet0/0/0]undo shutdown           //激活接口
  [R1-GigabitEthernet0/0/0]return              //回到用户视图
  <R1>ping 192.168.10.10               //检测线路是否正常
  PING 192.168.10.10: 56  data bytes, press CTRL_C to break
  Reply from 192.168.10.10: bytes=56 Sequence=1 ttl=64 time=10 ms
  Reply from 192.168.10.10: bytes=56 Sequence=2 ttl=64 time=10 ms
  Reply from 192.168.10.10: bytes=56 Sequence=3 ttl=64 time=10 ms
  Reply from 192.168.10.10: bytes=56 Sequence=4 ttl=64 time=1 ms
  Reply from 192.168.10.10: bytes=56 Sequence=5 ttl=64 time=10 ms
  --- 192.168.10.10 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 1/8/10 ms
  <R1>tftp 192.168.10.10 get abc.txt    //下载服务器上abc.txt文件
  Info: Transfer file in binary mode.
  Downloading the file from the remote TFTP server. Please wait...
  100%
  0 bytes received in 1 second.
  TFTP: Downloading the file successfully.
  <R1>dir           //显示文件列表
  Directory of flash:/

  >  0  drw-              -  Jul 07 2015 11:07:32   dhcp
  1  -rw-        121,802  May 26 2014 09:20:58   portalpage.zip
  2  -rw-          2,263  Jul 07 2015 11:07:24   statemach.efs
  3  -rw-        828,482  May 26 2014 09:20:58   ssl***.zip
  4  -rw-            559  Jul 07 2015 11:54:48   vrpcfg.zip
  5  -rw-              0  Jul 07 2015 11:52:08   abc.txt      //下载成功
  1,090,732 KB total (784,528 KB free)
  <R1>tftp 192.168.10.10 put vrpcfg.zip       //下载路由器配置文件
  Info: Transfer file in binary mode.
  Uploading the file to the remote TFTP server. Please wait...
  91%
  TFTP: Uploading the file successfully.
  559 bytes send in 1 second.
DSC0002.jpg

  tftp完成
  在R1上搭建ftp服务器实现真机上传下载
  R1配置
  <R1>system-view
  [R1]ftp server enable    //开启ftp服务
  [R1]aaa                 //进入aaa视图
  [R1-aaa]local-user test password cipher abc123     //创建用户test 密码为abc123
  [R1-aaa]local-user test privilege level 3         //设置用户的级别
  [R1-aaa]local-user test ftp-directory flash:     //设置目录
  [R1-aaa]local-user test service-type ftp        //设置用户的服务类型为ftp
  在真机上打开命令提示符
DSC0003.jpg

DSC0004.jpg

  在真机上搭建ftp服务器
DSC0005.jpg

  R1登录
  <R1>ftp 192.168.10.10         //登录ftp服务器
  Trying 192.168.10.10 ...
  Press CTRL+K to abort
  Connected to 192.168.10.10.
  220 http://idchh.com
  User(192.168.10.10:(none)):test          //输入用户名
  331 Password required for test.
  Enter password:                    //密码
  230 User test logged in.
  [R1-ftp]put test.doc               //上传test.doc到ftp服务器
  200 Port command successful.
  150 Opening data connection for test.doc.
  41%83%
  100%
  226 File received ok
  FTP: 39260 byte(s) sent in 0.190 second(s) 206.63Kbyte(s)/sec.
  [R1-ftp]get 123.txt                 //从服务器上下载文件
  200 Port command successful.
  150 Opening data connection for 123.txt.
  226 File sent ok
  FTP: 9 byte(s) received in 0.080 second(s) 112.50byte(s)/sec.
  [R1-ftp]quit            //退出
  221 Goodbye.
  <R1>dir                 //列出文件
  Directory of flash:/

  >  0  drw-              -  Jul 07 2015 11:07:32   dhcp
  1  -rw-        121,802  May 26 2014 09:20:58   portalpage.zip
  2  -rw-         39,260  Jul 07 2015 12:20:21   test.doc         //上传成功
  3  -rw-              9  Jul 07 2015 12:32:55   123.txt
  4  -rw-          2,263  Jul 07 2015 11:07:24   statemach.efs
  5  -rw-        828,482  May 26 2014 09:20:58   ssl***.zip
  6  -rw-            205  Jul 07 2015 11:54:48   private-data.txt
  7  -rw-              0  Jul 07 2015 11:52:08   abc.txt
  8  -rw-            559  Jul 07 2015 11:54:48   vrpcfg.zip
  1,090,732 KB total (784,432 KB free)
DSC0006.jpg

  dir 查看文件列表
  get 下载
  put 上传
  binary 切换二进制模式

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-540402-1-1.html 上篇帖子: 华为路由器实现负载均衡和冗余备份 下篇帖子: 基于snmp协议监控华为s5720交换机
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表