Network

Catalyst 2960X IOSバーションアップ

Catalyst2960Xを入手してからしばらく経つので、IOSをバージョンアップすることに。
IOSをバージョンアップするためには、事前準備がいくつかあります。

IOSバージョンアップのための事前準備

以下の事前準備が必要となります

  1. バージョンアップ対象のCatalyst 2960XにIPアドレスが設定されていて、作業用PCとIP通信ができるようにする
  2. 作業用PCにtftpサーバを起動させる
  3. バージョンアップ用のIOSを入手する
  4. バージョンアップIOSをtftpサーバ内に準備する

IP通信が出来る状態に

作業用PCからバージョンアップ用IOSをtftp等でSWへファイル転送する必要があるので、バージョンアップ対象のSWと作業用PC間でIP通信が出来るようにIP設定を行う必要があります。

tftpサーバを起動

バージョンアップ対象のSWへIOSをダウンロードするために、作業用PCでtftpサーバを起動する必要があります。
tftpサーバの起動に関してはこちらのリンク先を参照してください。

最新IOSの入手

SWの購入先にご相談の上、最新IOSを入手してください。
とあるサイトから入手も可能のようですが・・・

最新IOSを転送フォルダに

入手したIOSをtftpサーバの転送用ディレクトリに準備します。

対象機器での空き容量確認

最新IOSをダウンロードする空き容量があるかを以下のコマンドで確認

MainL2sw#sh flash:

Directory of flash:/

    2  -rwx         616   Mar 6 2025 15:14:12 +09:00  vlan.dat
  673  -rwx        3096   Mar 6 2025 15:14:17 +09:00  multiple-fs
    4  -rwx        7048   Mar 6 2025 15:09:17 +09:00  config.text
    5  -rwx        1916   Mar 6 2025 15:09:18 +09:00  private-config.text
    6  drwx         512  Oct 20 2016 18:30:57 +09:00  c2960x-universalk9-mz.152-2.E5
  671  drwx         512  Oct 20 2016 18:30:58 +09:00  dc_profile_dir

122185728 bytes total (95052288 bytes free)

90MB程度の空きがあるのでIOSの転送は可能かと

tftpサーバを利用しIOSを転送

以下のコマンドで最新IOSをバージョンアップ対象のSWへ。

MainL2sw#copy tftp://tftpサーバIPアドレス/c2960x-universalk9-mz.152-7.E11.bin flash:
Destination filename [c2960x-universalk9-mz.152-7.E11.bin]? <-ここでエンターキーを押して継続
Accessing tftp://tftpサーバIPアドレス/c2960x-universalk9-mz.152-7.E11.bin...
Loading c2960x-universalk9-mz.152-7.E11.bin from tftpサーバIPアドレス (via Vlan10): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 26797056 bytes]

26797056 bytes copied in 481.467 secs (55657 bytes/sec)

転送ファイル確認

以下のコマンドを実行し、最新IOSが転送されているかを確認

MainL2sw#show flash:

Directory of flash:/

    2  -rwx         616   Mar 6 2025 15:14:12 +09:00  vlan.dat
  673  -rwx        3096   Mar 6 2025 15:14:17 +09:00  multiple-fs
    3  -rwx    26797056   Apr 1 2025 12:43:49 +09:00  c2960x-universalk9-mz.152-7.E11.bin
    4  -rwx        7048   Mar 6 2025 15:09:17 +09:00  config.text
    5  -rwx        1916   Mar 6 2025 15:09:18 +09:00  private-config.text
    6  drwx         512  Oct 20 2016 18:30:57 +09:00  c2960x-universalk9-mz.152-2.E5
  671  drwx         512  Oct 20 2016 18:30:58 +09:00  dc_profile_dir

122185728 bytes total (68038656 bytes free)

bootファイルを指定し、再起動

以下のコマンドを実行しboot状況を確認

MainL2sw#show boot
BOOT path-list      : flash:/c2960x-universalk9-mz.152-2.E5/c2960x-universalk9-mz.152-2.E5.bin
Config file         : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break        : yes
Manual Boot         : no
Allow Dev Key         : yes
HELPER path-list    :
Auto upgrade        : yes
Auto upgrade path   :
NVRAM/Config file
      buffer size:   524288
Timeout for Config
          Download:    0 seconds
Config Download
       via DHCP:       disabled (next boot: disabled)

以下のコマンドを実行しbootファイル情報を書き換え、再起動

MainL2sw#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
MainL2sw(config)#boot system flash:c2960x-universalk9-mz.152-7.E11.bin
MainL2sw(config)#end
MainL2sw#write memory
MainL2sw#reload
Proceed with reload? [confirm]

バージョンの確認

再起動にはしばらく時間がかかります。
気長に再起動するのを待ちましょう。
再起動後、以下のコマンドでIOSのバージョンを確認

isco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.2(7)E11, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2024 by Cisco Systems, Inc.
Compiled Fri 23-Aug-24 13:25 by mcpre

ROM: Bootstrap program is C2960X boot loader
BOOTLDR: C2960X Boot Loader (C2960X-HBOOT-M) Version 15.2(7r)E, RELEASE SOFTWARE (fc2)

MainL2sw uptime is 15 minutes
System returned to ROM by power-on
System restarted at 13:24:29 JST Tue Apr 1 2025
System image file is "flash:c2960x-universalk9-mz.152-7.E11.bin"
Last reload reason: Reload command

旧IOSファイルの削除

以下のコマンドを実行し旧IOSファイルを削除

MainL2sw#dir flash:
Directory of flash:/

    2  -rwx         616   Apr 1 2025 13:26:48 +09:00  vlan.dat
    3  -rwx        7359   Apr 1 2025 13:27:03 +09:00  config.text
    4  -rwx    26797056   Apr 1 2025 12:43:49 +09:00  c2960x-universalk9-mz.152-7.E11.bin
    5  -rwx        4120   Apr 1 2025 13:27:04 +09:00  multiple-fs
    6  -rwx        1918   Apr 1 2025 13:27:03 +09:00  private-config.text
    7  drwx         512  Oct 20 2016 18:30:57 +09:00  c2960x-universalk9-mz.152-2.E5
  672  drwx         512  Oct 20 2016 18:30:58 +09:00  dc_profile_dir

122185728 bytes total (68037120 bytes free)
MainL2sw#delete /force /recursive flash:c2960x-universalk9-mz.152-2.E5
MainL2sw#dir flash:
Directory of flash:/

    2  -rwx         616   Apr 1 2025 13:26:48 +09:00  vlan.dat
    3  -rwx        7359   Apr 1 2025 13:27:03 +09:00  config.text
    4  -rwx    26797056   Apr 1 2025 12:43:49 +09:00  c2960x-universalk9-mz.152-7.E11.bin
    5  -rwx        4120   Apr 1 2025 13:27:04 +09:00  multiple-fs
    6  -rwx        1918   Apr 1 2025 13:27:03 +09:00  private-config.text
  672  drwx         512  Oct 20 2016 18:30:58 +09:00  dc_profile_dir

122185728 bytes total (94962176 bytes free)

忘れずにtftpサーバを停止

これにてIOSのバージョンアップは終了です。

最後に忘れずにtftpサーバを停止しておきましょう

-Network
-, , , ,