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
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.
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.
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).
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.
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.