다른 스위치의 ios를 다운로드 받아서 ios 업그레이드 하기.
시스코 스위치의 ios는 시스코 홈페이지에서 다운로드 받을 수 있으나, 시스코의 서비스를 받을 수 없는 상황이라면 동일 기종의 ios를 다운로드 받아 ios를 업그레이드 할 수 있다.
여기서는 구형 시스코 C3550 스위치를 사용하였다.
1. 기존 스위치에서 이미지 파일 다운로드
* ios 버전 확인.
Switch_exist#show version Cisco IOS Software, C3550 Software (C3550-IPBASE-M), Version 12.2(44)SE6, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2009 by Cisco Systems, Inc. Compiled Mon 09-Mar-09 14:33 by gereddy ...
* ios 파일을 확인한다. 아래 보면 두 가지 버전이 존재하는데, 상위버전인 c3550-ipbase-mz.122-44.SE6.bin 파일을 다운로드 하자.
Switch_exist#dir flash: Directory of flash:/ 2 -rwx 11449 Jan 5 2022 15:01:48 +09:00 config.text 4 -rwx 5585 Mar 1 1993 09:06:06 +09:00 config.text.renamed 5 -rwx 5 Jan 5 2022 15:01:48 +09:00 private-config.text 6 -rwx 0 Feb 28 2011 14:49:58 +09:00 env_vars 8 drwx 192 Mar 1 1993 09:04:21 +09:00 c3550-i9q3l2-mz.121-19.EA1c 7 -rwx 5 Mar 1 1993 09:06:06 +09:00 private-config.text.renamed 88 -rwx 315 Feb 28 2011 14:49:58 +09:00 system_env_vars 89 -rwx 6719771 Feb 10 2011 12:12:14 +09:00 c3550-ipbase-mz.122-44.SE6.bin 90 -rwx 2072 Jan 5 2022 15:01:50 +09:00 multiple-fs 91 -rwx 676 Mar 1 1993 09:00:55 +09:00 vlan.dat 15998976 bytes total (2847744 bytes free)
* 파일을 tftp 서버로 다운로드한다.
Switch_exist#copy flash:/c3550-ipbase-mz.122-44.SE6.bin tftp: Address or name of remote host []? 192.168.0.17 Destination filename [c3550-ipbase-mz.122-44.SE6.bin]? !!!!!!!!!!!!!!!!!!!!!!!!!!!! 6719771 bytes copied in 91.796 secs (73203 bytes/sec)
2. 다운로드받은 파일로 ios 업그레이드
* 업그레이드할 스위치 버전 확인.
Switch#show version Cisco IOS Software, C3550 Software (C3550-IPSERVICES-M), Version 12.2(35)SE5, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Thu 19-Jul-07 21:08 by nachen Image text-base: 0x00003000, data-base: 0x00D45C28 ...
* 스위치로 ios 파일 전송
Switch#copy tftp flash: Address or name of remote host []? 192.168.0.17 Source filename []? c3550-ipbase-mz.122-44.SE6.bin Destination filename [c3550-ipbase-mz.122-44.SE6.bin]? Accessing tftp://192.168.0.17/c3550-ipbase-mz.122-44.SE6.bin... Loading c3550-ipbase-mz.122-44.SE6.bin from 192.168.0.17 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O!!!O!!!O!!!!O!!!O!!!O!!!O!!!O!!!!O!!!O!!!O!!!O!!!O!!!!O!!!O!!!O!!!O!!!O!!!!O!!!O!!!O!!!O!!!O!!!!O!!!O!!!O!!!O!!!O!!!!O!!!O!!!O!!!O!!!O!!!!O!!!OO!!!OO!!!O... [timed out] %Error reading tftp://192.168.0.17/c3550-ipbase-mz.122-44.SE6.bin (Timed out)
파일 업로드를 실패했다.
Switch#dir flash: Directory of flash:/ 2 -rwx 916 Mar 1 1993 00:02:18 +00:00 vlan.dat 4 -rwx 6743730 Mar 1 1993 00:14:53 +00:00 c3550-ipservices-mz.122-35.SE5.bin 7 drwx 192 Mar 1 1993 00:03:14 +00:00 c3550-i9q3l2-mz.121-11.EA1 15998976 bytes total (4878336 bytes free)
파일시스템의 남은 공간이 이미지 파일보다 적다. 업로드할 파일 크기는 아래처럼 약 7MB인데 남은 공간은 약 4MB정도.
2022-04-20 오전 10:27 6,719,771 c3550-ipbase-mz.122-44.SE6.bin
* c3550-i9q3l2-mz.121-11.EA1 디렉토리내 파일있는지 확인해 본다.
Switch#dir flash:/c3550-i9q3l2-mz.121-11.EA1 Directory of flash:/c3550-i9q3l2-mz.121-11.EA1/ 8 drwx 704 Mar 1 1993 00:02:14 +00:00 html 20 -rwx 2995583 Mar 1 1993 00:03:14 +00:00 c3550-i9q3l2-mz.121-11.EA1.bin 21 -rwx 252 Mar 1 1993 00:03:14 +00:00 info 15998976 bytes total (4878336 bytes free)
이 오래된 버전의 파일을 삭제하여 저장 공간을 확보하도록 한다.
Switch#delete /force /recursive flash:c3550-i9q3l2-mz.121-11.EA1
이제 업로드에 필요한 파일시스템을 확보했다.
Switch#dir flash: Directory of flash:/ 2 -rwx 916 Mar 1 1993 00:02:18 +00:00 vlan.dat 4 -rwx 6743730 Mar 1 1993 00:14:53 +00:00 c3550-ipservices-mz.122-35.SE5.bin 15998976 bytes total (9252864 bytes free) Switch#
* 이미지파일을 다시 업로드한다.
Switch#copy tftp flash Address or name of remote host [192.168.0.17]? Source filename [c3550-ipbase-mz.122-44.SE6.bin]? Destination filename [c3550-ipbase-mz.122-44.SE6.bin]? Accessing tftp://192.168.0.17/c3550-ipbase-mz.122-44.SE6.bin... Loading c3550-ipbase-mz.122-44.SE6.bin from 192.168.0.17 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 6719771 bytes]
* 업로드한 파일로 부팅하도록 설정한다.
Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#boot system flash:c3550-ipbase-mz.122-44.SE6.bin Switch(config)#end
부팅경로를 확인해보면 새 파일로 잘 바뀐것을 확인 할 수 있다.
Switch#show boot BOOT path-list: flash:c3550-ipbase-mz.122-44.SE6.bin Config file: flash:/config.text Private Config file: flash:/private-config.text Enable Break: no Manual Boot: no HELPER path-list: NVRAM/Config file buffer size: 393216
설정을 저장한다.
Switch#write memory Building configuration... [OK]
3. 재 부팅하고 확인한다.
* 스위치 재부팅
Switch#reload Proceed with reload? [confirm]
* 버전을 확인 해 보면 잘 적용된 것을 알 수 있다.
Switch#show version Cisco IOS Software, C3550 Software (C3550-IPBASE-M), Version 12.2(44)SE6, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2009 by Cisco Systems, Inc. Compiled Mon 09-Mar-09 14:33 by gereddy Image text-base: 0x00003000, data-base: 0x00D32668 ROM: Bootstrap program is C3550 boot loader ...