When IOS XR Licenses Don’t Activate, What Then?

I came across a small but irritating issue with ASR / IOS XR licensing today, and since I found a way to fix it, I’m sharing my results.

Cisco ASR9006/ IOS XR

Licensing IOS XR on the ASR9k

I have an ASR9006 with two A9K-MOD160-TR linecards on which I need to run VRFs, so I purchased two of the A9K-IVRF-LIC linecard-based VRF licenses. I got the PAK keys from my reseller, and went to Cisco’s licensing portal to fulfill both of them following the usual process with the PID and S/N information taken from admin show license udi. I downloaded the license file and transferred it to an accessible jump server, then from the regular privileged exec mode (rather than the admin exec mode), I used sftp to transfer the file to the router.

Why not use the admin exec to transfer the licenses?

Simple: to transfer the license file within the admin exec means using tftp or ftp:

RP/0/RSP0/CPU0:asr9006-1(admin)#copy ?
  /recurse        Recursively list subdirectories encountered
  WORD            Copy from file
  bootflash:      Copy from bootflash: file system
  disk0:          Copy from disk0: file system
  disk0a:         Copy from disk0a: file system
  disk1:          Copy from disk1: file system
  disk1a:         Copy from disk1a: file system
  disk2:          Copy from disk2: file system
> ftp:            Copy from ftp: file system  <<<
  harddisk:       Copy from harddisk: file system
  harddiska:      Copy from harddiska: file system
  harddiskb:      Copy from harddiskb: file system
  lcdisk0:        Copy from lcdisk0: file system
  lcdisk0a:       Copy from lcdisk0a: file system
  nvram:          Copy from nvram: file system
> rcp:            Copy from rcp: file system  <<<
  running-config  Copy from  current system configuration
> tftp:           Copy from tftp: file system  <<<

RP/0/RSP0/CPU0:asr9006-1(admin)#copy tftp:/license.lic.xml disk0:/license.lic.xml vrf mgmt

There is no other mechanism offered by which to copy the file over. However, exiting the admin exec opens up other options:

RP/0/RSP0/CPU0:asr9006-1#?
[...]
  scp              Secure Copy Protocol
[...]
  sftp             SSH File Transfer Protocol
[...]
RP/0/RSP0/CPU0:asr9006-1# sftp user@jumpbox/license.lic.xml disk0:license.lic.xml vrf mgmt

I care about this because:

  • I despise TFTP;
  • I don't run an FTP server;
  • I despise TFTP;
  • I have servers accepting SSH connections;
  • I despite TFTP.

And did I mention that I'm not totally in favor of TFTP? Any of the above methods will work, but SCP and SFTP are in my opinion wildly preferable to FTP and TFTP. Quite why SCP/SFTP don't appear as an option within the IOS XR (5.3.4 in this case) copy command is a mystery, but there it is. It's even more frustrating when comparing with NXOS (7.3(1)N1(1)):

nexus-1# copy ?
  bootflash:          Select source filesystem
  core:               Select source filesystem
  debug:              Select source filesystem
  ftp:                Select source filesystem
  http:               Select source filesystem
  licenses            Backup license files
  log:                Select source filesystem
  modflash:           Select source filesystem
  nvram:              Select source filesystem
  running-config      Copy running configuration to destination
> scp:                Select source filesystem  <<<
> sftp:               Select source filesystem  <<<
  startup-config      Copy startup configuration to destination
  switch-profile-cfg  Copy switch profile running configuration to destination
  system:             Select source filesystem
  tftp:               Select source filesystem
  usb1:               Select source filesystem
  volatile:           Select source filesystem

At least somebody cares.

Next, the license file needs to be added within IOS XR via the admin mode. Either enter admin mode (admin) then use the license add command, or from the regular exec mode use the admin license add command:

RP/0/RSP0/CPU0:asr9006-1#admin license add disk0:license.lic.xml sdr Owner

Info: License add successful for feature(s): "A9K-iVRF-LIC"

License command "license add disk0:license.lic.xml sdr  Owner " completed successfully.
RP/0/RSP0/CPU0:asr9006-1#show license

FeatureID: A9K-iVRF-LIC (Slot based, Permanent)
  Total licenses 2
  Available for use         1
  Allocated to location     0
  Active                    1
  Store name             Permanent
  Store index               1
    Pool: Owner
      Total licenses in pool: 2
      Status: Available     1    Operational:    1
      Locations with licenses: (Active/Allocated) [SDR]
              0/0/CPU0        (1/0) [Owner]


RP/0/RSP0/CPU0:asr9006-1#

The output from show license confirms that my two licenses were installed. Interestingly, one license is already activated and assigned to 0/0/CPU0, and the other is listed as available for use. This is slightly odd because normally licenses have to be manually assigned, but I'll proceed and make the assignments anyway and hopefully it will fix things. The two locations needing a license are 0/0/CPU0 and 0/1/CPU0:

RP/0/RSP0/CPU0:asr9006-1#admin config
RP/0/RSP0/CPU0:asr9006-1(admin-config)# license A9K-iVRF-LIC type permanent location 0/0/CPU0
RP/0/RSP0/CPU0:asr9006-1(admin-config)# license A9K-iVRF-LIC type permanent location 0/1/CPU0
RP/0/RSP0/CPU0:asr9006-1(admin-config)# commit
RP/0/RSP0/CPU0:asr9006-1(admin-config)# end
RP/0/RSP0/CPU0:asr9006-1#    
RP/0/RSP0/CPU0:asr9006-1#admin show run license A9K-iVRF-LIC
license A9K-iVRF-LIC
 type permanent
  location 0/0/CPU0
  location 0/1/CPU0
 !
!

And next validate that the licenses have been applied:

RP/0/RSP0/CPU0:asr9006-1#show license

FeatureID: A9K-iVRF-LIC (Slot based, Permanent)
  Total licenses 2
  Available for use         1
  Allocated to location     0
  Active                    1
  Store name             Permanent
  Store index               1
    Pool: Owner
      Total licenses in pool: 2
      Status: Available     1    Operational:    1
      Locations with licenses: (Active/Allocated) [SDR]
              0/0/CPU0        (1/0) [Owner]


RP/0/RSP0/CPU0:asr9006-1#

Apparently, the licenses have not been applied to 0/1/CPU0 despite my configuration. Comparing this to another reference source such as Jeff Fry's IOS XR guide, this seems a bit odd. Jeff's guide shows IOS XR behaving the way I would have expected, with the licenses applied to 0/0/CPU0 and 0/1/CPU0 after issuing the sequence of commands above.

The solution

The solution to this problem appears to be to ask IOS XR to move one of the licenses:

RP/0/RSP0/CPU0:asr9006-1#license move A9K-iVRF-LIC slot from 0/0/CPU0 to 0/1/CPU0

Info: Note: The movement of license from one slot
Info: to another slot can impact the licensed
Info: service running on the first slot .
Do you wish to proceed? [yes/no]: yes

Info: This request will revoke active licenses.
Do you wish to proceed? [yes/no]: yes

License command "license move A9K-iVRF-LIC slot count 1 from 0/0/CPU0 to 0/1/CPU0" completed successfully.
RP/0/RSP0/CPU0:asr9006-1#

One might assume based on the previous output from show license that this would remove the previously-applied license from 0/0/CPU0 and re-apply it to 0/1/CPU0, and I'd have the same problem but in a different location. I was indeed concerned that this is what would happen. Instead, verifying the license showed a different result:

RP/0/RSP0/CPU0:asr9006-1#show license

FeatureID: A9K-iVRF-LIC (Slot based, Permanent)
  Total licenses 2
  Available for use         0
  Allocated to location     1
  Active                    1
  Store name             Permanent
  Store index               1
    Pool: Owner
      Total licenses in pool: 2
      Status: Available     0    Operational:    2
      Locations with licenses: (Active/Allocated) [SDR]
              0/0/CPU0        (1/0) [Owner]
              0/1/CPU0        (0/1) [Owner]


RP/0/RSP0/CPU0:asr9006-1#

By some miracle, this worked and now I show both licenses active and assigned to the two line cards. Confusing? Yes. It is to me at least; thankfully I don't have to apply IOS XR licenses very often, and this result encourages me that I have made the right choice in that matter!

Why?

Why did the licensing do what it did, and why did moving a license fix it? I have no idea. If you can tell me—and I have a suspicion the answer will be blindingly obvious to somebody out there—I would be grateful. Meanwhile this will be a useful reference for me next time I get confused about license installation on IOS XR!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


 

This site uses Akismet to reduce spam. Learn how your comment data is processed.