Firmware upgrade using Configlets & Scripts

Overview

Network devices like routers and switches should always be updated to the latest firmware version to ensure optimal network performance. Firmware updates provide free and instant improvements to the functionality of these devices that enhance the user experience. Firmware upgrade also helps you fix any existing bugs and protects you from vulnerabilities. This page is about updating firmware using Configlets in Network Configuration Manager.

Note: Before performing any file transfer, the corresponding file has to be moved to "opmanager-home/tftp_files" folder.

Executing firmware upgrade in NCM

To execute firmware upgrade commands in Network Configuration Manager, follow the steps given below:

  1. Go to Config Automation>>Configlets>>Add Configlets

  2. In the tab that open, provide a name for Configlet.

  3. Choose "Advanced script execution mode" in Configlets.

  4. Provide the Configlet content required to upgrade firmware and click "Save".

Advanced script execution is used to execute a series of interconnected commands on a device. Firmware upgrades can be performed on demand, or they can be scheduled for execution at any future point in time. All you need to do is to create a template containing the required commands, and then use this template to execute repetitive tasks for many devices.

Requirements to upgrade Firmware for a Cisco IOS Router

Configlets offered by Network Configuration Manager are of two types:

  • Memory requirement: The router should have sufficient disk or flash memory to store the Cisco IOS. The router should also have sufficient memory (DRAM) to run the Cisco IOS. If the router does not have sufficient memory (DRAM), the router will have boot problems when it boots through the new Cisco IOS.
  • Interfaces and modules support: You must ensure that the new Cisco IOS supports all the interfaces and modules in the router.
  • Software feature support: You must ensure that the new Cisco IOS supports all the features used with the old Cisco IOS.

Cisco IOS upgrade

Once all the above requirements are satisfied, you must follow the following steps to upgrade Firmware in a Cisco device:

  1. Download the Cisco IOS software image onto the TFTP Server in Network Configuration Manager.

  2. Verify whether the TFTP Server has IP connectivity to the router. In order to achieve connection, the router interface and the TFTP server must have an IP address in the same range or a default gateway configured.

  3. Once the connection is established, copy the IOS image to the router from the TFTP Server.

  4. Save the configuration and reload the router.

  5. After the reload is complete, the router will run the desired Cisco IOS software image.

Sample command for copying an IOS image to the Router

Here's the command required to copy an IOS image to your Cisco Router

2600>enable

Password:xxxxx

2600#copy tftp: flash:

Address or name of remote host []? 10.10.10.2

 

!--- 10.10.10.2 is the IP address of the TFTP server

Source filename []? c2600-adventerprisek9-mz.124-12.bin

Destination filename [c2600-adventerprisek9-mz.124-12.bin]? 

Accessing tftp://10.10.10.2/c2600-adventerprisek9-mz.124-12.bin...

Erase flash: before copying? [confirm]y

!--- If there is not enough memory available, erase the Flash.

!--- If you have sufficient memory you can type n and press enter

Erasing the flash filesystem will remove all files! Continue? [confirm]y

Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeee ...erased

Erase of flash: complete

Loading c2600-adventerprisek9-mz.124-12.bin from 10.10.10.2 (via Ethernet0/0): !!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

[OK - 29654656/49807356 bytes]

Verifying checksum... OK (0xAC8A)

29654656 bytes copied in 56.88 secs (80383 bytes/sec)

The above terminal shows the sample command that will be executed in a TELNET or a putty.

Corresponding Configlet command

The corresponding configlet commands for upgrading Firmware in Network Configuration Manager is shown below:

<command prompt="]?">copy tftp: flash:</command>

<command prompt="]?">$TFTP_SERVER_IP</command>

<command prompt="]?">$SOURCE_FILE_NAME</command>

<command prompt="confirm">$DESTINATION_FILE_NAME</command>

<command timeout="120" suffix="$NO_ENTER">y</command>

Once the commands are given, the configlets can be applied in bulk to multiple devices to upgrade Firmware. Not just that, with the help of configlets you can also execute commands to fix errors and to make bulk changes. Check out "Firmware Vulnerability Management" feature to identify potential vulnerabilities in your network and fix them.

Was this article helpful?