Sunday, September 25, 2011

Modify License MAC

Cisco used to bind license file to physical MAC address.  Now, it moves to "License MAC", which is a hash value of multiple system parameters such as NIC speed, NTP, DNS, hostname, etc.

To view the license MAC, you need to install the system first (CUCM, UCCX, CUPS, etc.).  Then use the "show status" command.


This is somehow inconvenient:

1) You cannot get the license file before finishing the installation.

I personally prefer to get everything ready before starting the installation, such as IP address, hostname, password, license file, installation media, etc.  You could run into lots of surprises when trying to get the license file.

2) When the system parameter was changed, the license file yield invalid.

For example, you add/change DNS server settings on the system, which is pretty common during system integration.

It would be better if you could dictate what license MAC the system use.  You may also use some schema like: AABBCCDDEEFF, where AA is the product code, BB is the site code, CC is the node number, DD is the version number, etc.


In the example above, the "License MAC" was changed to "abcdef123456".

Since you can use whatever License MAC you like, you may:
  • Get the license file before the system was installed
  • Keep using the same license file after system parameters was changed (such as DNS)
To specify the license MAC, you need to have root access to the system.  Then you'll modify the file /usr/local/bin/base_scripts/LicenseMac.sh.  To the bottom of the file, replace the line

FinalString=`expr substr "$SHA1sum" 1 12`

to

FinalString="abcdef123456"

In newer versions, you might have to change the /etc/selinux/config file so that selinux runs in permissive mode.
Reminder: Don't be evil.  ;)

11 comments:

  1. Cisco has updated the Answer File Generator (http://www.cisco.com/web/cuc_afg/) to give you the license MAC based on your provided install values. You have to fill in the values EXACTLY as you would during the install, or else the license MAC will be different. But, it's another option besides having to wait til after installation to get the license MAC.

    ReplyDelete
  2. Yes, we all know about the Answer File Generator. There's another reason to temper the License MAC, which I cannot explicitly state here. :)

    ReplyDelete
  3. I noticed that on CUCM 8.6.x Selinux is running in enforcement mode, so the LicenseMac.sh file will not be run after editing it. I had to change the /etc/selinux/config file so that selinux runs in permissive mode. After a reboot the MAC address was set correctly.

    ReplyDelete
  4. echo 0 > /selinux/enforce

    ReplyDelete
  5. For some reason mine shows UNKNOWN... Any idea why? Its a UCCX 8.5

    ReplyDelete
  6. How are you supposed to get root access???

    ReplyDelete
  7. Move the mouse over "root access".

    ReplyDelete
  8. Hi,

    When I install CUCM 8.6 on 7825H3 following error did not find Bios version file for 7825H3-2133 in

    Who can help??

    ReplyDelete
  9. It works but I always get a database communication error and all the services are down after changing the License MAC. Anyone know what's wrong?

    ReplyDelete
  10. It works on CUCM 8.6.2, I takes me some time to find the config file on /mnt/sysimage/partB directory.
    Thanks anyway, very helpful for my testing environment.

    ReplyDelete
  11. This is helpful for upgrades so you don't have to rehost during a bridged upgrade.

    ReplyDelete