Experiment configuration one: Back up and restore the switch iOS
1 : Establish communication between the switch and the TFTP server
SW1 (config) #hostnameSW1
SW1 (config) #interfacevlan 1
SW1 (config-if) #ipaddress 192.168.1.1 255.255.255.0
SW1 (config-if) #noshutdown
To test the communication between the switch and the TFTP server:
sw1#ping192.168.1.2
Typeescape sequence to abort.
Sending5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
.!!!!
Successrate is percent (4/5), round-trip Min/avg/max = 0/0/3 ms
2 : Back up the Switch's iOS
Sw1#showflash:
Directoryof flash:/
1-rw-4414921 <no date> C2960-lanbase-mz.122-25.fx.bin
64016384bytes Total (59601463 bytes free)
SW1#COPYFLASH:TFTP:
sourceFileName []? C2960-lanbase-mz.122-25.fx.bin
Addressor name of remote host []? 192.168.1.2
Destinationfilename [C2960-lanbase-mz.122-25.fx.bin]? C2960-text.bin
Writingc2960-lanbase-mz.122-25.fx.bin ....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
[OK-4414921 bytes]
4414921bytes copied in 3.098 secs (1425000 bytes/sec)
3 : Restore the Switch's iOS
Sw1#copytftp:flash:
Addressor name of remote host []? 192.168.1.2
sourceFileName []? C2960-text.bin
Destinationfilename [C2960-text.bin]?
Accessingtftp://192.168.1.2/c2960-text.bin ...
Loadingc2960-text.bin from 192.168.1.2:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
[OK-4414921 bytes]
4414921bytes copied in 0.076 secs (1578338 bytes/sec)
Sw1#showflash:
Directoryof flash:/
1-rw-4414921 <no date> C2960-lanbase-mz.122-25.fx.bin
2-rw-4414921 <no date> C2960-text.bin
64016384bytes Total (55186542 bytes free)
SW1 (config) #bootsystem Flash:c2960-text.bin
Sw1#reload
Sw1#deleteflash:
Deletefilename []?c2960-text.bin
Deleteflash:/c2960-text.bin? [Confirm]
Sw1#showflash:
Directoryof flash:/
1-rw-4414921 <no date> C2960-lanbase-mz.122-25.fx.bin
64016384bytes Total (59601463 bytes free)
Experiment configuration Two: Backup and restore router iOS
1 : Establish communication between the router and the TFTP server
R1 (config) #interfacefa0/0
R1 (config-if) #ipaddress 192.168.1.1 255.255.255.0
R1 (config-if) #noshutdown
TFTP server address configuration (slightly)
To test the communication between the router and the TFTP server:
R1 (config-if) #doping 192.168.1.2
Typeescape sequence to abort.
Sending5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
.!!!!
Successrate is percent (4/5), round-trip Min/avg/max = 0/0/0 ms
2: backing up your router's iOS
R1#showflash:
Systemflash directory:
File Length Name/status
3 50938004 C2800nm-advipservicesk9-mz.124-15.t1.bin
2 28282 Sigdef-category.xml
1 227537 sigdef-default.xml
[51193823bytes used, 12822561 available, 64016384 total]
63488Kbytes of processor Board System Flash (read/write)
R1#COPYFLASH:TFTP:
sourceFileName []? C2800nm-advipservicesk9-mz.124-15.t1.bin
Addressor name of remote host []? 192.168.1.2
Destinationfilename [C2800nm-advipservicesk9-mz.124-15.t1.bin]? C2800-text.bin
Writingc2800nm-advipservicesk9-mz.124-15.t1.bin ...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ( slightly)
[OK-50938004 bytes]
50938004bytes copied in 0.849 secs (59997000 bytes/sec)
3 : Restore the router's iOS:
R1#copytftp:flash:
Addressor name of remote host []? 192.168.1.2
sourceFileName []? C2800-text.bin
Destinationfilename [C2800-text.bin]?
Accessingtftp://192.168.1.2/c2800-text.bin ...
Loadingc2800-text.bin from 192.168.1.2:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (slightly)
[OK-50938004 bytes]
50938004bytes copied in 0.876 secs (4216168 bytes/sec)
%error Copyingtftp://192.168.1.2/c2800-text.bin (not enough space on device)
R1#deleteflash:
Deletefilename []?c2800nm-advipservicesk9-mz.124-15.t1.bin
Deleteflash:/c2800nm-advipservicesk9-mz.124-15.t1.bin? [Confirm]
R1#copytftp:flash:
Addressor name of remote host []? 192.168.1.2
sourceFileName []? C2800-text.bin
Destinationfilename [C2800-text.bin]?
Accessingtftp://192.168.1.2/c2800-text.bin ...
Loadingc2800-text.bin from 192.168.1.2:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (slightly)
[OK-50938004 bytes]
50938004bytes copied in 0.865 secs (4269784 bytes/sec)
R1#showflash:
Systemflash directory:
File Length Name/status
4 50938004 C2800-text.bin
2 28282 Sigdef-category.xml
1 227537 sigdef-default.xml
[51193823bytes used, 12822561 available, 64016384 total]
63488Kbytes of processor Board System Flash (read/write)
Companion Video Demo Address:
Http://edu.51cto.com/course/course_id-1992.html
This article is from the Cisco Technology Exchange blog, so be sure to keep this source http://szcisco.blog.51cto.com/532091/1558350
Experiment configuration one: Back up and restore the switch iOS