网络配置思科网络设备系统升级教程3

************************************************************************

以下是在PT5.3中的实验内容(5.3版本软件中的服务器多了ftp服务,增加升级设备系统的选择)

………………………………………………………………………………………………

网络拓扑图:

网络配置思科网络设备系统升级教程3_第1张图片
配置过程:

(1)TFTP方式备份与还原

首先,将路由器上bin文件备份到tftp服务器上。

 

R2#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)         

R2#copy flash: tftp: 
Source filename []? c1841-advipservicesk9-mz.124-15.T1.bin      //没人手写这么长的内容的,直接复制上述的dir 中的bin内容即可。
Address or name of remote host []? 192.168.1.2
Destination filename [c1841-advipservicesk9-mz.124-15.T1.bin]? c1841-new.bin

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

33591768 bytes copied in 24.922 secs (1347000 bytes/sec)    33M数据大概在25秒完成。

查看TFTP服务器,发现c1841-new.bin     已经存在了。



其次,查看一下路由器Flash中有什么,还剩下多大空间,如果空间不够,应该删除点文件。

R2#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)         

请注意,只剩下30M,如果直接再传过来一个33M的系统文件,肯定是存储不够啊。是这样吗?我们可以尝试一下好吧。

R2#copy tftp: flash: 
Address or name of remote host []? 192.168.1.2
Source filename []? c1841-new.bin
Destination filename [c1841-new.bin]?        //在此直接回车表示使用默认的c1841-new.bin 名称

Accessing tftp://192.168.1.2/c1841-new.bin...
Loading c1841-new.bin from 192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 33591768 bytes]                    // 这里貌似显示传送很正常

33591768 bytes copied in 19.218 secs (183525 bytes/sec)
%Error copying tftp://192.168.1.2/c1841-new.bin (Not enough space on device)       //这里显示错误了吧,没有那么大的空间肯定是不行的。

那怎么办呢?只好先删除点路由器flash中的东西了,比如这里把原bin文件删掉。

R2#delete flash: 
Delete filename []?c1841-advipservicesk9-mz.124-15.T1.bin      //没人手写这么长的内容的,直接复制上述的dir 中的bin内容即可。
Delete flash:/c1841-advipservicesk9-mz.124-15.T1.bin? [confirm]      //回车确认

R2#dir                                                   
Directory of flash:/

    2 -rw-       28282          <no date> sigdef-category.xml
    1 -rw-      227537          <no date> sigdef-default.xml

64016384 bytes total (63760565 bytes free)                  //这次发现空间大了很多吧

在这里请注意:如果直接reload重启一下,你会发现路由器不可能进去系统了。这台路由器暂时就要歇着了。 切忌:删除bin文件后,不能reload

R2#reload 
Proceed with reload? [confirm]
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.

Boot process failed...

The system is unable to boot automatically. The BOOT
environment variable needs to be set to a bootable
image.
rommon 1 >                   // 进不去系统了。

第三,从tftp服务器还原升级路由器系统文件

R2#copy tftp: flash: 
Address or name of remote host []? 192.168.1.2
Source filename []? c1841-new.bin
Destination filename [c1841-new.bin]?     // 回车确认文件名称

Accessing tftp://192.168.1.2/c1841-new.bin...
Loading c1841-new.bin from 192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 33591768 bytes]

33591768 bytes copied in 25.671 secs (137392 bytes/sec)

在完成系统升级后,重启路由器,bin文件才会生效。

R2#reload

--- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]: n


Press RETURN to get started!

Router>                         // 重启后发现名称变成默认,说明系统升级成功了。

注意一点:在系统升级传输过程中灯一直在闪烁状态。

 

 

 

 

 

(2)FTP方式备份与还原

…………………………………………
我利用ftp方式实验,备份、还原同样大小系统bin文件,需要15分钟。
那tftp和ftp到底有何区别呢?在此解释一下:

简单文件传输协议tftp是一种用来传输文件的简单协议,运行在 UDP (用户数据报协议)上。 TFTP 的被设计为小而简单容易的运行,因此,它缺乏标准 FTP 协议的许多特征。 TFTP 只能从远程服务器上读、写文件(邮件)或者读、写文件传送给远程服务器。它不能列出目录并且当前不提供用户认证。 

tftp和ftp区别:
基于的传输协议不一样:FTP是基于TCP ,TFTP是基于UDP 
端口号不一样:FTP是用21.20 ,TFTP是69
速度和安全方面:FTP在速度方面没有TFTP快,但是FTP安全性好。
…………………………………………

原理请去看 网络配置教程(0.2)——锐捷、华为(H3C)网络设备系统升级教程2 内容,这里会直接实例验证。

网络拓扑图:

网络配置思科网络设备系统升级教程3_第2张图片

配置过程:

首先,指定与ftp服务器的用户名、密码关联。

R1(config)#ip ftp username cisco
R1(config)#ip ftp password cisco
R1(config)#end
R1# write memory

其次,备份系统文件

R1#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-new.bin
Writing c1841-advipservicesk9-mz.124-15.T1.bin...
[OK - 33591768 bytes]

33591768 bytes copied in 930.381 secs (36000 bytes/sec)    // 33M文件花费15多分钟完成。


最后,还原升级系统文件

R1#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)         

R1#delete flash: 
Delete filename []?c1841-advipservicesk9-mz.124-15.T1.bin      //没人手写这么长的内容的,直接复制上述的dir 中的bin内容即可。
Delete flash:/c1841-advipservicesk9-mz.124-15.T1.bin? [confirm]      //回车确认

R1#copy ftp: flash: 
Address or name of remote host []? 192.168.1.2
Source filename []? c1841-new.bin
Destination filename [c1841-new.bin]?

Accessing ftp://192.168.1.2/c1841-new.bin
...
[OK - 33591768 bytes]

33591768 bytes copied in 1016.79 secs (3468 bytes/sec)   //33M,这次花费17分钟左右。

 

在完成系统升级后,重启路由器,bin文件才会生效。

R1#reload

--- System Configuration Dialog ---

Continue with configuration dialog? [yes/no]: n


Press RETURN to get started!

Router>                         // 重启后发现名称变成默认,说明系统升级成功了。

注意一点:在系统升级传输过程中灯一直在闪烁状态。

转帖注明出处http://hi.baidu.com/5ijsj/blog/item/4fd7a9cb69257210be09e6f5.html

实验到此也就结束了,最后大家注意:

在实验过程中如果出现以下2种报错情况,请自行检查出错原因并予以解决吧……

Accessing tftp://192.168.1.2/c1841-new.bin........
%Error opening tftp://192.168.1.2/c1841-new.bin (Timed out)


Accessing ftp://192.168.1.2/c1841-new.bin...
%Error ftp:///c1841-new.bin (No such file or directory Or Permission denied)

你可能感兴趣的:(职场,休闲,网络配置)