Guest

Cisco Embedded Automation Systems

Cisco Embedded Automation Systems (EASy): ISR G2 License Installer

  • Viewing Options

  • PDF (457.6 KB)
  • Feedback

What You Will Learn

This Embedded Automation Systems (EASy) package automates the installation of licenses on the Cisco ® Integrated Services Router Generation 2 (ISR G2).

Challenge

The ISR G2 has an enforced licensing model that requires installation of permanent licenses for new installations and after device replacement. There are a few methods of installing licenses, including an external tool or a Cisco IOS ® Software local tool, but both methods are tedious and require IP connectivity to Cisco to install the licenses. Using the license installer in Cisco IOS Software requires entering 16 pieces of information plus selecting the license you intend to install. This is an issue with many service providers who may or may not have Internet access in their staging area or who are installing multiple licenses on many devices. See Figure 1.

Figure 1. EASy Can Help Simplify Network Management Deployments

EASy_static_300x425.png

Solution: The EASy ISR G2 License Installer

The Embedded Event Manager (EEM) ISR G2 License Installer automates the build in the Cisco IOS Software Call Home feature to install licenses in a semi automated or fully automated fashion.
See Table 1 for an overview of the aspects of the EASy ISR G2 License Installer.

Table 1. NMS Tester Solution Overview

Aspect

Description

Application or Service

Network Management

Technology

Cisco IOS Software license Call Home feature

Problem

Installing or deploying multiple licenses using the license Call Home feature is time consuming and requires entering a number of repetitive fields and Internet connectivity.

Impact

If permanent licenses are not installed, features will not be available once the temporary licenses expire. Some critical features may be disabled by default.

Non-EASy Solution

There is an external application supplied by Cisco, or the Cisco IOS Software license Call Home feature can be used manually, or licenses can be manually downloaded and installed, but all three options have limitations.

Benefit of EASy Solution

The EASy package will enhance the license Call Home feature in Cisco IOS Software by automating it, allowing you to partially or completely install licenses automatically without user input. In semiautomatic mode it reduces the number of required fields to between two and four, or in fully automatic mode it can be run from the Cisco IOS Software command scheduler, kron, with no user input.

Category

Network Management-Licensing

Background

The following are the operational steps involved in running the EASy ISR G2 License Installer solution.

• The EEM policy can be run manually from the device's command line or from kron automatically.

• EEM reads the data file stored in flash with the list of license requests or gets license information from the command-line interface (CLI)

• EEM contacts the Cisco Licensing Server through a network connection and requests specified licenses.

• If the licenses were previously applied but deleted, EEM will automatically reapply the missing licenses.

• EEM will generate an email if requested to show the status of licenses installed.

Operational Flow

Figure 2 outlines the specific steps the EASy ISR G2 License Installer package will take.

Figure 2. Operational Flow Diagram

Topics Covered

• Package Components

• Preparing for Installation

• Installing the Package

• Deploying the ISR G2 License Installer

• Verifying the Package Installation

• Uninstalling the Package

• Running the ISR G2 License Installer

Package Components

The EASy ISR G2 License installer package includes one EEM Tcl policy, no_licinst.tcl, and one Tcl policy, InstallLicense.tcl. Both policies are run manually from ENABLE mode on a Cisco IOS Software device.

Preparing for Installation

Before installing, verify the following prerequisites are met:

• You have a Cisco IOS Software-based hardware platform with support for EEM 2.4 or later.

• The easy-installer.tcl script should be copied to the device's flash or available on a network server that the device can reach.

• Create a directory on the device's local flash in which EASy packages can be stored (for example, flash0:/easy).

• Make the no_licinst.tar package available either on the device's flash or on a network server that is reachable by the device.

• Optionally, you can create an EXEC alias for the EASy Installer command. For example:

Router#show run | include easy
alias exec easy_installer tclsh flash0:/easy-installer.tcl

Installing the Package

Start the EASy Installer either by running the full tclsh command, or by using the EXEC alias (as was listed in the Preparing for Installation section). Once the package is loaded, the license verification screen will appear.
Router# easy-installer tftp://192.168.1.1/no_licinst.tar flash0:/easy
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Cisco, the name of the copyright holder nor the
names of their respective contributors may be used to endorse or
promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Hit enter to continue...
TECHNICAL ASSISTANCE CENTER (TAC) SUPPORT IS NOT AVAILABLE FOR THIS SCRIPT.
For questions or help, send email to ask-easy@cisco.com.
Hit enter to continue...
Do you agree to this license? (y/n) [n]
You must agree to this license before proceeding. Once you have agreed to the license, the EASy Installer menu will appear.
--------------------------------------------------------------------------------
Configure and Install EASy Package 'ISR_G2_license_installer-1.0'
--------------------------------------------------------------------------------
1. Display Package Description
2. Configure Package Parameters
3. Deploy Package Policies
4. Exit
Enter option:
If Option 1 is entered, the package description will be shown.
This is the ISR G2 Easy Script to automate the license call home feature.
Hit enter to continue...
If Option 2 is entered, you will be first asked if you want change the default properties. The EEM policy uses the default variables, and changing them is not necessary unless you are unhappy with the default values.
Enter option: 2
Do you wish to change the script default properties? (y/n) [n]:
If you choose to change the default values, you will be prompted to specify new values for each variable.
Configure EEM Environment Variables for 'ISR_G2_license_installer-1.0'
Enter the filename of the data file where responses are stored.
[flash0:/datafile.txt]:
Enter the filename to locally store license if downloaded.
[flash0:/licenses.xml]:
ISR_G2_license_installer EEM Environment Variable Configuration:
LIC_FILE : flash0:/datafile.txt
LOCAL_LIC : flash0:/licenses.xml
Are you satisfied with these settings? (y/n) [y]:

Note: The datafile.txt contains all of your responses to the license call home feature in Cisco IOS Software. The licenses.xml file contains the actual licenses and is only used if licenses need to be reapplied.

Deploying the ISR G2 License Installer

After configuration is complete, the ISR G2 License Installer Tcl policy can be deployed to the device. Select Option 3 from the EASy Installer menu. If an EEM user policy directory has not been set up on the device, you will be prompted to specify that directory. The user policy directory should be different from the EASy package directory (for example, flash0:/easy).
--------------------------------------------------------------------------------
Configure and Install EASy Package ' ISR_G2_license_installer-1.0'
--------------------------------------------------------------------------------
1. Display Package Description
2. Configure Package Parameters
3. Deploy Package Policies
4. Exit
Enter option: 3
Copy in progress...CCC
10343 bytes copied in 0.588 secs (17590 bytes/sec)
Copy in progress...C
199 bytes copied in 0.576 secs (345 bytes/sec)
Copy in progress...C
1166 bytes copied in 0.576 secs (2024 bytes/sec)
Copy in progress...C
268 bytes copied in 0.576 secs (465 bytes/sec)
Copy in progress...C
130 bytes copied in 0.580 secs (224 bytes/sec)
Package ISR_G2_license_installer-1.0 successfully installed.
Don't forget to create your data file: licinst -c [filename]
Hit enter to continue...

Verifying the Package Installation

Once the package is installed, you can select Option 4 from the menu to verify it is installed properly.
--------------------------------------------------------------------------------
Configure and Install EASy Package ' ISR_G2_license_installer-1.0'
--------------------------------------------------------------------------------
1. Display Package Description
2. Configure Package Parameters
3. Deploy Package Policies
4. Verify Installed Package
5. Exit
Enter option: 4
INFO: Package ISR_G2_license_installer-1.0 is properly installed.
Hit enter to continue...
You can also check the output of the show event manager policy registered command. The output should show that the no_licinst.tcl script is registered.
Router#show event manager policy registered
No. Class Type Event Type Trap Time Registered Secu Name
1 script user none Off Tue May 4 15:42:57 2010 no_licinst.tcl
policyname {no_licinst.tcl} sync {yes}
nice 1 queue-priority normal maxrun 300.000 scheduler rp_primary Secu none

Uninstalling the Package

The EASy Installer script can be used to uninstall the package as well.
Router#easy_installer --uninstall --pkgname ISR_G2_license_installer
Uninstalling ISR_G2_license_installer...DONE!
INFO: Uninstall of ISR_G2_license_installer completed successfully.
Configuration was changed, do you want to save the running config to
startup? (y/n) [y]

Running the ISR G2 License Installer

The ISR G2 License Installer is run manually from ENABLE mode on the device or can be run from kron.
Router# licinst [-c [filename]]
Use "-c [filename]" to create the data file used to supply input to the license Call Home feature in Cisco IOS Software. The filename is used only if you want to use a file different than the default. If the filename is not supplied, the one in the LIC_FILE environment variable will be used.

router# licinst -c

UserName : CCOusername

Password : ********

FirstName : FirstName

LastName : LastName

Title : Title

Company : Company

Address1 : My address goes here

Address2 (Optional) :

City : MyCity

State : MyState

Province (Optional) :

Zip : 12345

Country : MyCountry

Phone : (555) 555-1234

Fax (Optional) :

Email : myemail@mycompany.com

ereport : emailme@mycompany.com

mailsvr : 192.168.1.1

PAK Name : PAK1

SKU Name : SKU1

....

PAK Name : PAKn

SKU Name : SKUn

PAK Name :

Reboot (Y/N): N

If you choose not to supply the username, the password will not be asked. You need to supply the username and password only if you are going to run this from kron completely automated. Also, the email is what is sent to the Cisco License server when registering for a license. The ereport can be the same email address, but it is the email used by the EEM policy to send you a report. It also requires an email server to be specified if entered. Lastly you can have no PAKs/SKUs or you can have as many as you want.
To run the script manually, use the licinst alias to supply the username and password without being shown.

router# licinst

Username : username

Password : ********

PAK Name :

If you do not supply the PAK name it will read it from the data file and attempt to install licenses in the file. If you supply the PAK you will be asked for the SKU name as well and the SKU/PAK in the data file will be ignored.

For More Information

Future updates to this EASy package will be posted to the EASy website at http://www.cisco.com/go/easy.
For more information on configuring syslog on a Cisco IOS Software device, see http://www.cisco.com/en/US/docs/ios/12_2/configfun/configuration/guide/fcf013.html#wp1001168.
If you have any questions or comments on this package, contact ask-easy@cisco.com.