实验 2:备份和还原IOS

时间:2023-03-09 18:37:55
实验 2:备份和还原IOS

实验 2:备份和还原IOS

SW1配置

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname sw1 sw1(config)#interface vlan
sw1(config-if)#ip add 192.168.1.1 255.255.255.0 sw1(config-if)#no shutdown sw1(config-if)#end
sw1#
%SYS--CONFIG_I: Configured from console by console sw1#ping 192.168.1.2 Type escape sequence to abort.
Sending , -byte ICMP Echos to 192.168.1.2, timeout is seconds:
.!!!!
Success rate is percent (/), round-trip min/avg/max = // ms 查看IOS sw1#show flash:
Directory of flash:/ -rw- <no date> c2960-lanbase-mz.-.FX.bin bytes total ( bytes free) 拷贝 源 到目标
sw1#copy flash: tftp: Source filename []? c2960-lanbase-mz.-.FX.bin
Address or name of remote host []? 192.168.1.2
Destination filename [c2960-lanbase-mz.-.FX.bin]? c296-test.bin Writing c2960-lanbase-mz.-.FX.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - bytes]

实验 2:备份和还原IOS

还原

sw1#copy tftp: flash:
Address or name of remote host []? 192.168.1.2
Source filename []? c296-test.bin
Destination filename [c296-test.bin]? Accessing tftp://192.168.1.2/c296-test.bin...
Loading c296-test.bin from 192.168.1.2: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - bytes] bytes copied in 0.119 secs ( bytes/sec) sw1#show flash:
Directory of flash:/ -rw- <no date> c296-test.bin
-rw- <no date> c2960-lanbase-mz.-.FX.bin bytes total ( bytes free) sw1#delete flash:
Delete filename []?c2960-lanbase-mz.-.FX.bin
Delete flash:/c2960-lanbase-mz.-.FX.bin? [confirm]

路由器配置

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#no ip domain-lo R1(config)#line console 0 R1(config-line)#logging synchronous R1(config-line)#exec-timeout
% Incomplete command.
R1(config-line)#end
R1#
%SYS--CONFIG_I: Configured from console by console R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
t
R1(config)#interface f0/
R1(config-if)#ip add 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#
%LINK--CHANGED: Interface FastEthernet0/, changed state to up %LINEPROTO--UPDOWN: Line protocol on Interface FastEthernet0/, changed state to up R1(config-if)#end
R1#
%SYS--CONFIG_I: Configured from console by console R1#ping 192.168.1.2 Type escape sequence to abort.
Sending , -byte ICMP Echos to 192.168.1.2, timeout is seconds:
.!!!!
Success rate is percent (/), round-trip min/avg/max = // ms R1#show flash: System flash directory:
File Length Name/status
c2800nm-advipservicesk9-mz.-.T1.bin
sigdef-category.xml
sigdef-default.xml
[ bytes used, available, total]
63488K bytes of processor board System flash (Read/Write) R1#copy flash: tftp:
Source filename []? c2800nm-advipservicesk9-mz.-.T1.bin
Address or name of remote host []? 192.168.1.2
Destination filename [c2800nm-advipservicesk9-mz.-.T1.bin]? c2800-test.bin Writing c2800nm-advipservicesk9-mz.-.T1.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - bytes] bytes copied in 1.694 secs ( bytes/sec)

实验 2:备份和还原IOS

还原时候注意报错空间不足

50938004 bytes copied in 1.594 secs (2317041 bytes/sec)
%Error copying tftp://192.168.1.2/c2800-test.bin (Not enough space on device)