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

[经验分享] Packet Tracer 5.3实验(十六) 网络设备系统升级

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-3-31 09:31:05 | 显示全部楼层 |阅读模式
一、TFTP简介
     TFTP(Trivial File Transfer Protocol,简单文件传输协议)是TCP/IP协议族中的一个用来在客户机与服务器之间进行简单文件传输的协议,提供不复杂、开销不大的文件传输服务。TFTP承载在UDP上,使用69号端口。提供不可靠的数据流传输服务,不提供存取授权与认证机制,使用超时重传方式来保证数据的到达。与FTP相 比,TFTP的大小要小的多。
TFTP与FTP的区别
1、TFTP --简单文件传输协议,udp,69;
2、FTP  --文件传输协议,tcp,20,21;
3、TFTP传输速度比FTP快,但是相对没有FTP安全。
二、TFTP实验环境
     一台装有TFTP服务器软件的电脑,交换机(或者路由器)设备,以太网线;
三、TFTP配置过程
  • 配置主机、设备ip地址;
  • 使用copy命令;
四、下面将在模拟器中来看一下系统bin文件的TFTP备份过程
1、拓扑图
2012072520575450.jpg
2、设置服务器的IP地址192.168.1.2, 子网掩码255.255.255.0;
3、设置交换机的虚接口IP地址192.168.1.1, 子网掩码255.255.255.0;
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int vlan 1
Switch(config-if)#ip add 192.168.1.1 255.255.255.0
Switch(config-if)#no shut

%LINK-5-CHANGED: Interface Vlan1, changed state to up

Switch(config-if)#



4、显示交换机flash目录;


Switch#dir
Directory of flash:/

    1  -rw-     3058048          <no date>  c2950-i6q4l2-mz.121-22.EA4.bin

64016384 bytes total (60958336 bytes free)
Switch#



说明:交换机里有一个名为“c2950-i6q4l2-mz.121-22.EA4.bin”的文件。

5、在升级前先备份该文件;


Switch#copy flash: tftp:                                            //从flash中复制到tftp服务器中
Source filename []?c2950-i6q4l2-mz.121-22.EA4.bin                   //要复制的源文件名
Address or name of remote host []? 192.168.1.2                      //目标服务器地址
Destination filename [c2950-i6q4l2-mz.121-22.EA4.bin]? c2950.bin    //目标文件名
.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 3058048 bytes]

3058048 bytes copied in 4.953 secs (617000 bytes/sec)



6、下面到TFTP服务器上去看是否有了这个文件?

进入服务器,单击配置,选择TFTP,在右边的文件列表中可以看到c2950.bin。说明文件已经写入TFTP服务器了。
2012072521135540.jpg
7、现在要实现从TFTP服务器上传升级bin文件;
1)首先在交换机上删除c2950-i6q4l2-mz.121-22.EA4.bin这个文件;
Switch#delete c2950-i6q4l2-mz.121-22.EA4.bin
Delete filename [c2950-i6q4l2-mz.121-22.EA4.bin]?                 //回车
Delete flash:/c2950-i6q4l2-mz.121-22.EA4.bin? [confirm]           //回车

Switch#dir
Directory of flash:/

No files in directory

64016384 bytes total (64016384 bytes free)
Switch#



交换机flash的目录中已经没有文件了。在此,先将bin文件删除了。请注意:在现实中如果空间足够的话,不要删除bin文件。

8、从TFTP服务器中下载升级文件;


Switch#copy tftp: flash:                                               //从tftp服务器到交换机flash
Address or name of remote host []? 192.168.1.2                         //源主机IP地址
Source filename []? c2950.bin                                          //源文件名称
Destination filename [c2950.bin]? c2950-i6q4l2-mz.121-22.EA4.bin       //目标文件名称
Accessing tftp://192.168.1.2/c2950.bin....
Loading c2950.bin from 192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 3058048 bytes]

3058048 bytes copied in 4.907 secs (623201 bytes/sec)



下载完成

9、使用dir显示文件


Switch#dir
Directory of flash:/

    2  -rw-     3058048          <no date>  c2950-i6q4l2-mz.121-22.EA4.bin

64016384 bytes total (60958336 bytes free)
Switch#



说明:文件又下载到了交换机的flash中。

10、在完成系统升级后,要reload重启系统;


Switch#
Switch#reload
Proceed with reload? [confirm]     //回车
C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 18:57 by miwang
Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
2950-24 starting...
Base ethernet MAC Address: 0030.A35C.4165
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 1 files, 0 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 64016384
flashfs[0]: Bytes used: 3058048
flashfs[0]: Bytes available: 60958336
flashfs[0]: flashfs fsck took 1 seconds.
...done Initializing Flash.

Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4


Loading "flash:/c2950-i6q4l2-mz.121-22.EA4.bin"...
########################################################################## [OK]
              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
Processor board ID FHK0610Z0WC
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)

63488K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 0030.A35C.4165
Motherboard assembly number: 73-5781-09
Power supply part number: 34-0965-01
Motherboard serial number: FOC061004SZ
Power supply serial number: DAB0609127D
Model revision number: C0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FHK0610Z0WC

Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

Press RETURN to get started!


%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch>en
Switch#show running-config
Building configuration...

Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
ip name-server 0.0.0.0
!
!
interface FastEthernet0/1
!
...
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end


Switch#



此时系统将重装bin文件

11、重新显示配置内容,会发现原来的设置都没了。证明重传成功了。


Switch>en
Switch#show running-config
Building configuration...

Current configuration : 970 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
ip name-server 0.0.0.0
!
!
interface FastEthernet0/1
!
...
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end


Switch#





五、FTP方式备份与还原网络设备系统

     FTP由于使用的是tcp可靠传输模式,速度没有tftp快,但是有了用户名和密码,相对比tftp要安全些。

六、FTP实验环境
     FTP服务器、路由器、以太网线缆;

七、配置过程

1、配置服务器和路由器的ip地址;
2、在ftp服务器中新建用户名和密码;
3、在路由器中指定与ftp服务器中用户名、密码相关联;
4、使用copy命令即可。

八、实验步骤

实验拓扑

2012072521510456.jpg
1、设置FTP服务器的IP地址192.168.1.2, 子网掩码255.255.255.0;
2、设置路由器Fa0/0的IP地址192.168.1.1, 子网掩码255.255.255.0;
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit



3、在FTP服务器中新建用户名和密码;

2012072522194610.jpg
4、在路由器中指定与ftp服务器中用户名、密码相关联;
Router(config)#ip ftp ?
  password  Specify password for FTP connections
  username  Specify username for FTP connections
Router(config)#ip ftp use
Router(config)#ip ftp username david ?
  <cr>
Router(config)#ip ftp username david
Router(config)#ip ftp pass
Router(config)#ip ftp password ?
  <0-7>  Encryption type (0 to disable encryption, 7 for proprietary
  LINE   LINE The password
Router(config)#ip ftp password 123456
Router(config)#end



5、显示路由器flash目录;


Router#dir
Directory of flash:/

    3  -rw-    33591768          <no date>  c1841-advipservicesk9-mz.124-15.T1.bin
    2  -rw-       28282          <no date>  sigdef-category.xml
    1  -rw-      227537          <no date>  sigdef-default.xml

64016384 bytes total (30168797 bytes free)
Router#cop



6、在升级前先备份该文件;


Router#copy fl
Router#copy flash: ?
  ftp:            Copy to ftp: file system
  running-config  Update (merge with) current system configuration
  startup-config  Copy to startup configuration
  tftp:           Copy to tftp: file system
Router#copy flash: ft
Router#copy flash: ftp:
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 192.168.1.2
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]? c1841.bin

Writing c1841-advipservicesk9-mz.124-15.T1.bin...
[OK - 33591768 bytes]

33591768 bytes copied in 346.13 secs (97000 bytes/sec)
Router#


Router#
Router#



7、到FTP服务器上去看是否有了这个文件;

2012072522041225.jpg
有c1841.bin文件了,说明备份成功。
8、还原升级和TFTP升级方法类似,不再赘述。


运维网声明 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-198002-1-1.html 上篇帖子: Packet Tracer 5.2实验(十五) 网络端口地址转换NAPT配置 下篇帖子: cisco 9951型号IP电话注册callmager失败
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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