Cisco 7206 VXR IOS 升级
升级目的:
原用的IOS为c7200-js-mz.122-17.bin,软件版本相对较低,处理性能及抗网络功能的性能较差,最近经常出现该路由器频繁重启的现象。现决定将路由器IOS版本升级到c7200-is-mz.123-5b.bin(软件版本与现MPLS VPN 7206的版本一致),相对性能较好,将大大提高网络的安全性和稳定性。
升级简要说明:
需要升级的路由器叫做LAN 7206,而它需要的IOS来自VPN 7206。
LAN 7206的可用存储空间总共为20M,已经用了16M了,具体如下:
LAN-7206#dir /all
Directory of slot0:/
1 -rw- 6019868 Oct 30 2003 08:49:34 +00:00 c7200-p-mz.120-7.T3.bin
2 -rw- 14111580 Mar 30 2004 00:18:40 +00:00 c7200-js-mz.122-17.bin
20578304 bytes total (446600 bytes free)
而新的IOS需要17M的空间,具体如下:
MPLS|VPN-7206#dir /all
Directory of disk2:/
1 -rw- 17182368 Jan 8 2000 09:04:30 +00:00 c7200-is-mz.123-5b.bin
64253952 bytes total (47071232 bytes free)
由于存储空间的原因,必须先删除LAN 7206里面的IOS,然后copy新的IOS到flash里面。所以升级过程中不能断电,否则要用X-moden重新灌了。
升级步骤:
1. 将需要用到的VPN 7206的IOS备份到TFTP服务器:
MPLS|VPN-7206#copy disk2: tftp:
Source filename []?c7200-is-mz.123-5b.bin
Address or name of remote host []? 192.168.100.115
Destination filename [c7200-is-mz.123-5b.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17182368 bytes copied in 16.95 secs (1013709 bytes/sec)
2. 将LAN 7206的IOS和conf文件备份到TFTP服务器:
LAN-7206#copy running-config tftp:
Address or name of remote host []? 192.168.100.115
Destination filename [lan-7206-confg]?
!!
3108 bytes copied in 0.140 secs (22200 bytes/sec)
LAN-7206#copy slot0:c7200-js-mz.122-17.bin tftp:
Address or name of remote host []? 192.168.100.115
Destination filename [c7200-js-mz.122-17.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14111580 bytes copied in 49.800 secs (283365 bytes/sec)
LAN-7206#copy slot0:c7200-p-mz.120-7.T3.bin tftp:
Address or name of remote host []? 192.168.100.115
Destination filename [c7200-p-mz.120-7.T3.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6019868 bytes copied in 21.308 secs (282517 bytes/sec)
3. 删除LAN 7206里面的IOS以获得空间:
LAN-7206#delete slot0:
Delete filename []? c7200-js-mz.122-17.bin
Delete slot0:c7200-js-mz.122-17.bin? [confirm]
删除后看看
LAN-7206#dir
Directory of slot0:/
No files in directory
20578304 bytes total (6466596 bytes free)
这里看到 slot0没有文件了,但是提示空间仍然被占有着,再看看
LAN-7206#dir /all
Directory of slot0:/
1 -rw- 14111580 Mar 30 2004 00:18:40 +00:00 [c7200-js-mz.122-17.bin]
20578304 bytes total (6466596 bytes free)
可以看到文件确实还存在,没办法,只能把slot0格式化:
LAN-7206#format slot0:
Format operation may take a while. Continue? [confirm]
Format operation will destroy all data in "slot0:". Continue? [confirm]
Enter volume ID (up to 64 chars)[default slot0]:
格式化后才完全删除文件:
LAN-7206#dir /all
Directory of slot0:/
No files in directory
20578304 bytes total (20578304 bytes free)
注意,如果用命令squeeze,同样不会彻底删除文件,而且可以恢复:
LAN-7206#squeeze slot0:
All deleted files will be removed. Continue? [confirm]
Squeeze operation may take a while. Continue? [confirm]
Squeeze of slot0 complete
4. 好了,现在空间够了,在保证路由器不断电也不重新启动的时候,给他装IOS:
由于条件允许,我都是在远程操作的。而且我本来就可以访问LAN 7206,所以我的电脑的IP地址虽然是内网的,但是不影响操作。
LAN-7206#copy tftp: flash:
Address or name of remote host []? 192.168.100.115
Source filename []?c7200-is-mz.123-5b.bin
Destination filename [c7200-is-mz.123-5b.bin]?
Accessing tftp://192.168.100.115/c7200-is-mz.123-5b.bin...
Loading c7200-is-mz.123-5b.bin from 61.143.160.125 (via FastEthernet0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 17182368 bytes]
17182368 bytes copied in 1100.828 secs (15609 bytes/sec)
再次确认以下是否成功
LAN-7206#dir
Directory of slot0:/
1 -rw- 17182368 Aug 25 2005 21:24:57 +00:00 c7200-is-mz.123-5b.bin
20578304 bytes total (3395808 bytes free)
可以看到文件的大小都对,说明copy没问题,可以进行下一步了。
5. 切换版本,即修改LAN 7206启动是加载的映象文件,因为现在只有1个bin文件,所以这里就一步就算不做,重启后系统也会自动读到的:
LAN-7206(config)#boot system flash c7200-is-mz.123-5b.bin
这一步可以不做
6. 保存配置:
LAN-7206(config)# copy running-config startup-config
7. 重新启动:
LAN-7206#reload
8. 这里重新启动后可以看到LAN 7206的IOS版本已经是我们需要的了,升级成功。
保险措施:
其实在这次升级中,因为带了大量的业务;为了防止升级万一失败或中途断电,在升级前已经用另外一块16M的flash卡把LAN 7206的原IOS(14M)装上,然后插入LAN 7206的slot1。这样,LAN 7206在升级前就有2块flash卡slot0和slot1,万一升级失败或slot0(20M)卡在升级中出现了意外而不能使用,slot1可以作为保险。
以下是升级后的详细的文件系统信息:
LAN-7206#dir all-filesystems
Directory of system:/
15 drwx 0 <no date> its
2 dr-x 0 <no date> memory
1 -rw- 3339 <no date> running-config
14 dr-x 0 <no date> vfiles
No space information available
Directory of nvram:/
121 -rw- 3339 <no date> startup-config
122 ---- 27 <no date> private-config
123 -rw- 3339 <no date> underlying-config
1 ---- 0 <no date> persistent-data
2 -rw- 0 <no date> ifIndex-table
3 -rw- 1577 <no date> cerf_report
129016 bytes total (121502 bytes free)
Directory of slot0:/
1 -rw- 17182368 Aug 25 2005 22:24:52 +00:00 c7200-is-mz.123-5b.bin
20578304 bytes total (3395808 bytes free)
Directory of slot1:/
1 -rw- 14111580 Mar 1 1993 01:38:48 +00:00 c7200-js-mz.122-17.bin
16384000 bytes total (2272292 bytes free)
Directory of bootflash:/
1 -rw- 4462908 Mar 1 1993 00:10:46 +00:00 c7200-kboot-mz.121-3a.E5
2 -rw- 220605 May 14 1993 03:06:09 +00:00 crashinfo_19930514-030609
3 -rw- 232221 Mar 1 1993 06:09:15 +00:00 crashinfo_19930301-060915
4 -rw- 226667 Mar 2 1993 21:30:43 +00:00 crashinfo_19930302-213043
5 -rw- 226698 Mar 6 1993 14:37:14 +00:00 crashinfo_19930306-143714
6 -rw- 228155 Mar 2 1993 10:44:39 +00:00 crashinfo_19930302-104439
7 -rw- 220593 Mar 1 1993 03:49:36 +00:00 crashinfo_19930301-034936
8 -rw- 214908 Mar 10 1993 18:45:04 +00:00 crashinfo_19930310-184504
9 -rw- 226568 Mar 1 1993 04:13:26 +00:00 crashinfo_19930301-041326
10 -rw- 227969 Mar 1 1993 03:42:17 +00:00 crashinfo_19930301-034217
11 -rw- 221538 Mar 2 1993 19:50:29 +00:00 crashinfo_19930302-195029
12 -rw- 228982 Mar 1 1993 00:16:21 +00:00 crashinfo_19930301-001621
13 -rw- 215367 Mar 3 1993 03:42:59 +00:00 crashinfo_19930303-034259
14 -rw- 222451 Mar 1 1993 11:25:53 +00:00 crashinfo_19930301-112553
15 -rw- 220900 Mar 1 1993 01:39:53 +00:00 crashinfo_19930301-013953
7602176 bytes total (3704 bytes free)
时钟更改:
因为发现升级后LAN 7206的时钟不对,顺便也做了更改:
LAN-7206#show clock detail
*00:55:23.111 UTC Mon Mar 1 1993
Time source is hardware calendar
LAN-7206#clock set 08:38:20 24 august 2005
LAN-7206#show clock
08:40:26.567 UTC Wed Aug 24 2005