========= Licensing ========= OSDx products include a licensing mechanism. Depending on the active license, some features and functionalities may be available (or not). To activate some characteristics, you will need a license bundle. Types of licenses ================= Different licenses can be used to get the most out of OSDx. Licenses define and restrict the characteristics the user has access to. There are two types of characteristics: functionalities and features. * A functionality is something that can be enabled or not. For instance, connectivity to the CNM platform, or Netflow configuration. * A feature is something that can take a range of values. For example, the number of processor cores enabled. There are some licenses in OSDx and they may be different depending on the running device. For example, the ``Config`` license is a basic one that gives access to CLI configuration menus. If ``Config`` is disabled, the configuration menu will be inaccessible. *Example:* .. code-block:: none admin@osdx$ conf CLI Error: The current license does not allow access to configuration mode License overview ================ The lifetime of a license characteristic is determined by a validity period. This period is measured in days and can be infinite (i.e., the characteristic is permanently active). This validity period is automatically controlled by the OSDx system. Once the license has expired, the specific functionality is disabled or, if the characteristic is a feature, the default value is set. License bundles are generated for one or more devices. As a result, a license can only be applied in the specific device for which it was generated. When requesting a license bundle it's crucial to provide the appropriate device identifier. In the case of devices with ``amd64`` architecture, the UUID (*Universal Unique IDentifier*) has to be provided by the customer in order to generate a valid license bundle. On the other hand, in the case of devices with ``arm64`` architecture, the SN (*Serial Number*) has to be provided by the customer instead. .. dropdown:: How to get the device identifier in ``amd64`` platforms :: admin@OSDx$ show system uuid UUID: c81cb535-b8c8-5a0d-bafa-28316f9451bb █████████████████████████████████████ █████████████████████████████████████ ████ ▄▄▄▄▄ █▀█ █▄ ▀ ██ ▄▄█ ▄▄▄▄▄ ████ ████ █ █ █▀▀▀█ ▄▀▀█▀▀▄▄█ █ █ ████ ████ █▄▄▄█ █▀ █▀▀██▀▄▄▄▄ █ █▄▄▄█ ████ ████▄▄▄▄▄▄▄█▄▀ ▀▄█ █▄█▄█▄█▄▄▄▄▄▄▄████ ████▄ ▄▄▄▀▄▄▄▄▀▄▀▀▀▄▀▄▄▀▀▄▀▄▀▄█ ▀████ ██████▀█▀▀▄█▀█▄█▀ ▄ ▄▄ ▀█ ▄▄▀ ▄██████ ████▄▄ ▄██▄▄█▄█▄▄▄ ▄▀▀ ▀▀▀█▄▄▀████ ████▀██ ▄▄▄█ ▄▄ ▄█▀ █ █ █▄█▄█▄ █████ ████ ▄█▄▄▄▄▀█ ▀▄▀▀▀▄▄▄▄ █▄▀▄▀ ▄▄ ████ ████ █ █▀█▄▄██▀█▀ ▄ ▀▄▄█▀███▀▄█▄▀████ ████▄█▄█▄█▄█▀ █▄█▄▄▄▄▄█ ▄▄▄ ▄▄ ▀████ ████ ▄▄▄▄▄ █▄█▀ ▄█▀ ▄█▄ █▄█ ▄▄▀█████ ████ █ █ █ █▄▀▀▀█▄▄▄█▄▄▄▄▄ ▄▀▀████ ████ █▄▄▄█ █ ▄██▀ ▄▄▀▄▀▀▀ ▄ ▄█ █████ ████▄▄▄▄▄▄▄█▄▄██▄█▄▄█▄█████▄██▄██████ █████████████████████████████████████ █████████████████████████████████████ .. dropdown:: How to get the device identifier in ``arm64`` platforms :: admin@OSDx$ show version | grep S/N Hardware S/N: DAALZ-000274 .. important:: Take into account the following aspects of OSDx licenses: * When the license status is modified (e.g., when a characteristic expires, or when a new license bundle is applied), the OSDx system is automatically rebooted. * License bundles are only valid for a specific device. * A license bundle cannot be loaded in the same device multiple times. Basic operational commands ========================== Command :osdx:op:`license show` ------------------------------- Shows license status information. *Example:* .. code-block:: none admin@osdx$ license show +-----------------+---------+---------------+ | License Item | Status | Validity | +-----------------+---------+---------------+ | CNM | Enabled | Forever | | Config | Enabled | 5w 4d 23h 14m | | N-Cores | 1 | Forever | | Netflow | Enabled | 2w 23h 14m | | eth-Rate-Permit | 10Mbps | Forever | +-----------------+---------+---------------+ Command :osdx:op:`license load *` --------------------------------- Loads a license file previously stored in the file system. *Example:* .. code-block:: none admin@osdx$ license load running://license.bin License information: +-----------------+---------+----------+ | License Item | Status | Validity | +-----------------+---------+----------+ | Netflow | Enabled | 24h | | CNM | Enabled | 24h | | Config | Enabled | 24h | | N-Cores | 1 | 24h | | eth-Rate-Permit | 10Mbps | 24h | +-----------------+---------+----------+ Do you want to load the license? The system will reboot automatically (y/n): Command :osdx:op:`license read` ------------------------------- Similar to the license load command, except that it allows the license to be directly pasted into the CLI (Command Line Interface). *Example:* .. code-block:: none admin@OSDx$ license read Paste your license and press ENTER: 5433305344784C49028B3AD149E3BA48ECBD84D9997B39838B00000001000000020000000B000 00001074D322D4F5344780F6574682D526174652D5065726D6974000000000000000001074E2D 436F72657300000000000000000103434E4D00000001000000000106436F6E666967000000010 00000000103445049000000010000000000084669726577616C6C000000010000000000054857 534543000000010000000000074E6574666C6F770000000100000000010752442D45545349000 0000000000000000652442D4643430000000000000000000652442D4E4F4D0000000000000000 000652442D524F5700000000000000000004574C414E0000000000000000000454657374754B5 95FFEAA7B36CA0014E540C04A96810CF6DE963C2B4044696F366A28164A59A64304277C35F6CC 0D9AE03426158CAD76C9C1D9A17AB68EAC8C2A7ABB8B646A09E6405B6D13B2366D7BA4BA45102 B7ABE686BCEA438B6BEDF6DF19F730648F33AC9F22A748BFD1D47683DDBB379C6CED4D4FBA86E 2EE6A738E7883F69293470ED80936B607D0464FC7CA71892D530C9773A769D9FB0F5E85033C9A 648E1D7B463B849DC49F175F8D350DE430782BC816314B88993299E3AB29A0C9FB2EC7B2C26DA CC147760587B26CF38BBAE464AC680151EF98EC7A729165C8808FEE0BD961664B4EE2CDC2F995 License information: +-----------------+---------+----------+ | License Item | Status | Validity | +-----------------+---------+----------+ | Netflow | Enabled | 24h | | CNM | Enabled | 24h | | Config | Enabled | 24h | | N-Cores | 1 | 24h | | eth-Rate-Permit | 10Mbps | 24h | +-----------------+---------+----------+ Do you want to load the license? The system will reboot automatically (y/n): As mentioned above, if a license bundle is attempted to be loaded in a device different than the one for which it was generated, the following error will be displayed: .. code-block:: none admin@OSDx$ license read Paste your license and press ENTER: 5433305344784C49028B3AD149E3BA48ECBD84D9997B39838B00000001000000020000000B000 00001074D322D4F5344780F6574682D526174652D5065726D6974000000000000000001074E2D 436F72657300000000000000000103434E4D00000001000000000106436F6E666967000000010 00000000103445049000000010000000000084669726577616C6C000000010000000000054857 534543000000010000000000074E6574666C6F770000000100000000010752442D45545349000 0000000000000000652442D4643430000000000000000000652442D4E4F4D0000000000000000 000652442D524F5700000000000000000004574C414E0000000000000000000454657374754B5 95FFEAA7B36CA0014E540C04A96810CF6DE963C2B4044696F366A28164A59A64304277C35F6CC 0D9AE03426158CAD76C9C1D9A17AB68EAC8C2A7ABB8B646A09E6405B6D13B2366D7BA4BA45102 B7ABE686BCEA438B6BEDF6DF19F730648F33AC9F22A748BFD1D47683DDBB379C6CED4D4FBA86E 2EE6A738E7883F69293470ED80936B607D0464FC7CA71892D530C9773A769D9FB0F5E85033C9A 648E1D7B463B849DC49F175F8D350DE430782BC816314B88993299E3AB29A0C9FB2EC7B2C26DA CC147760587B26CF38BBAE464AC680151EF98EC7A729165C8808FEE0BD961664B4EE2CDC2F995 Error: invalid license. Reason: License is not valid for this device. CLI Error: Command error This will also occur if the device identifier (SN or UUID) changes at some point. If it happens, the license bundle will not be valid anymore. Therefore, *make sure to purchase the license bundle for the appropriate identifier*. Loading a license bundle ======================== As previously discussed, there are two operational commands to load a license bundle on OSDx: :osdx:op:`license load *` and :osdx:op:`license read`. The latter can only be used if the clipboard content can be directly pasted in the OSDx CLI. Although this is often the fastest way, it is not always possible to paste the clipboard content in some terminals. In this case, :osdx:op:`license load *` can be used after copying the license bundle into the OSDx file system. .. tip:: There are many ways to transfer a file to OSDx. We could use an external USB flash drive. *Example:* .. code-block:: none admin@osdx$ file copy usb:///license.bin running://license.bin 173.9KB done Alternatively, we could download it from a reachable URL. *Example:* .. code-block:: none admin@osdx$ file copy http://192.168.215.1/server/license.bin running:// % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 393 100 393 0 0 39300 0 --:--:-- --:--:-- --:--:-- 39300 Or we could make use of scp to copy a file from an external system. *Example:* .. code-block:: none $ scp license.bin admin@192.168.213.18:license.bin admin@192.168.213.18's password: license.bin 100% 375 173.9KB/s 00:00 Autolicense =========== OSDx includes a mechanism to automatically load a license bundle whenever OSDx starts. Every time OSDx starts, the system checks if there is an *autolicense.bin* file at *running://*. If there is, the system will attempt to load it. Once the process has finished, the license bundle is deleted. This mechanism is essential when upgrading from a different OSDx image. Before upgrading, we need to store a valid license bundle in the file path mentioned above. Once this is done, we can upgrade. Otherwise, some functionality may not work. .. tip:: This file can be transferred in different ways, as discussed in the previous sections: from an external device, using the scp protocol or by downloading it from a reachable url. Once the file has been successfully loaded, it is safe to reboot by typing :osdx:op:`reboot now` in operational mode. Logging ======= Whenever a license item is about to expire, an emergency message is sent to all users logged in to OSDx to warn them that the system is going to reboot in one minute. *Example:* .. code-block:: none admin@osdx$ Broadcast message from systemd-journald@osdx (Sun 2021-06-20 08:22:51 UTC): osdx-licd[2110]: System will reboot in 60 seconds. Reason: the following license items are about to expire: N-Cores Furthermore, after a license bundle is loaded (or when a license characteristic expires and the system reboots) the :osdx:op:`show version` command can be executed to see the reason for the reboot. *Example:* .. code-block:: none admin@osdx$ show version OS vendor: Teldat OS name: OSDx OS version: v3.1.1.1 ... Last reboot reason: Updated license ...