Mobile Licensing

> ## Chapter 8

> ## Mobile Licensing

> End users often want to use applications on computers that do not have a continuous connection to a FLEXlm license server. These situations include:

> - Working on a laptop
> - Using a computer both at work and at home
> - Working from several different computers not connected to a license server

> FLEXlm supports licenses that allow one of several kinds of mobile licensing:

> - Node-locked to a laptop
> - Node-locked to a FLEXid (Windows only)
> - Node-locked to a FLEXid with FLOAT_OK keyword (Windows only)
> - License borrowing with BORROW keyword
> - Node-locked to a user name
> - Fulfilled from a prepaid license pool

> License rehosting is the consequence of an end user wanting to move a license without using one of these methods. This means a new node-locked license file is generated by the vendor for each new client computer. Rehosting incurs administrative overhead because the vendor is involved for each move.

> ### 8.1 Node-Locked to a Laptop Computer

> If a license is to be used exclusively on one laptop computer, that license is simply node-locked to an address associated with that computer. The license file resides on the laptop computer.

> ### 8.2 Node-locked to a FLEXid (Windows Only)

> If a license is to be moved between different Windows machines, it is node-locked to a FLEXid (a dongle that connects to a parallel or USB port). This license is moved between machines by installing a copy of the license file on each machine and moving the FLEXid from one machine to another. Since the license is tied to the FLEXid, only the machine with the FLEXid has use of the license.

> ### 8.3 Node-Locked to a FLEXid with FLOAT_OK (Windows Only)

> This method of license mobility has an advantage over simply using a license node-locked to a FLEXid, because the FLEXid is attached to a license server machine and its license floats on the network. Licenses with a FLOAT_OK keyword that are node-locked to a FLEXid are supported only where both the FLEXlm-licensed application and the license server are running on Windows.

> A vendor issues a license file with a FEATURE line node-locked to a FLEXid and containing the FLOAT_OK keyword and a FLEXid for that FEATURE line. One FEATURE line containing the FLOAT_OK keyword and one FLEXid is needed for each instance of a license that is mobile. When the FLEXid is attached to a license server, the license floats on the network. When the FLEXid is removed from the license server, the license is available only on the standalone computer.

> This method supports parallel or USB FLEXids. Because it is simpler to attach multiple USB dongles to a computer, USB FLEXids may be preferable.

> #### 8.3.1 Initiating FLEXid with FLOAT_OK

> A vendor issues the end user a FLEXid, a FLEXid driver installer, and a license file that contains a FEATURE line node-locked to that FLEXid containing the FLOAT_OK keyword. An end user then:

> 1. Installs the license file on the license server machine
> 2. Attaches all of the FLEXids to the license server machine
> 3. Installs the FLEXid driver on the license server machine
> 4. Starts the license server or rereads the license file

> While the FLEXids are attached to the license server machine, the node-locked licenses associated with them float on the network. Each of the FLOAT_OK uncounted node-locked FEATURE lines has a count of one while it is available on the network.

> To transfer a license from the pool of floating licenses to a disconnected computer, the end user:

> 1. Copies the license file containing the FLOAT_OK node-locked FEATURE line from the license file on the license server machine to a license file on the client computer in the location where the licensed application expects to find its license file.
> 2. Moves the FLEXid matching the node-locked FEATURE line from the license server machine to the client computer. When the FLEXid is removed from the license server machine, this license is unavailable on the network.
> 3. Installs the FLEXid drivers on the client computer, if they are not already installed.
> 4. Disconnects the client computer from the network. Now the license is available on the computer with the FLEXid, even though that computer is disconnected from the network.

> #### 8.3.2 Returning a FLEXid with FLOAT_OK License

> To return the license to the license server machine so it floats on the network again, the end user:

> 1. Removes the FLEXid from the client machine and replaces it on the license server machine.
> 2. Rereads the license file for the license server that serves the floating version of the license by running `lmreread`. When the FLEXid is returned to the license server machine, the FLOAT_OK license does not float on the network again until `lmreread` is run.

> #### 8.3.3 FLEXid with FLOAT_OK Example

> The following is a sample license file issued to a customer site. It is shipped with two FLEXids: FLEXID=7-b28520b9 and FLEXID=7-b2857678.

> SERVER myhost ANY
> VENDOR sampled
> FEATURE f1 sampled 1.0 permanent uncounted FLOAT_OK \
> HOSTID=FLEXID=7-b28520b9 SIGN=123456789012
> FEATURE f1 sampled 1.0 permanent uncounted FLOAT_OK \
> HOSTID=FLEXID=7-b2857678 SIGN=ABCDEF123456

> The customer installs the license file and the two FLEXids on the license server machine. When attached to the license server machine, each uncounted FLOAT_OK license floats on the network and allows a single use. Therefore, up to two users can use “f1” on the customer’s network, except on the license server machine itself, where the license use is disallowed.

> If an end user wants to work at home, the end user installs a license file that contains the FEATURE line node-locked to FLEXID=7-b28520b9 (this only needs to be done once), transfers the FLEXid FLEXID=7-b28520b9 from the license server machine to the client computer, and installs the FLEXid driver on the client computer (this also only needs to be done once). The end user disconnects the client computer from the network and uses the transferred FLOAT_OK license on the client computer. The license server allows only the single remaining FLOAT_OK license to float on the network.

> After returning the FLEXid to the license server machine, the end user (or the system administrator) runs `lmreread` so the returned license can float again.

> ### FLEXlm Version Notes

> - FLOAT_OK keyword introduced in v8.0 FLEXlm client library, license manager daemon, and vendor daemon. All components must be v8.0+ in order to use FLOAT_OK.

> ### 8.4 License Borrowing with BORROW

> If a license is to be used on a computer that is intermittently connected to a license server, that license can be issued as a floating license with the BORROW keyword. A BORROW license can be borrowed from a license server via a special checkout and used later to run an application on a computer that is no longer connected to the license server. License borrowing must be enabled by a vendor before an end user can borrow licenses.

> With license borrowing, a vendor issues a floating license with a FEATURE line that contains the BORROW keyword. An end user specifies the expiration date a borrowed license is to be returned and runs the application while connected to the network which writes borrowing information on the client computer. The license server keeps the borrowed license checked out. The FLEXlm-licensed application automatically uses the local borrowing data to do checkouts during the borrow period. If enabled by the vendor, borrowed licenses can be returned early, that is, before the borrow period expires. Upon the earlier of either the expiration of the borrow period or the early return of a borrowed license, the local borrowing data no longer authorizes checkouts and the license server returns the borrowed license to the pool of available licenses. No clock synchronization is required between the license server machine and the machine running the FLEXlm-licensed application.

> #### 8.4.1 Initiating License Borrowing

> If a vendor has enabled license borrowing by issuing a license file that contains a FEATURE line with the BORROW keyword, an end user initiates license borrowing in one of three ways:

> - Using the borrowing interface in application, if provided in the application
> - Running the `lmborrow` utility to set `LM_BORROW`
> - Setting the `LM_BORROW` environment variable directly

> ##### Application Interface

> The user initiates license borrowing this way only if the application provides a borrowing interface. Information about this is supplied by the vendor.

> ##### Running the lmborrow Utility

> `lmborrow` is one of the `lmutil`/LMTOOLS utilities. To initiate borrowing, the user runs `lmborrow` from the command line or through LMTOOLS:

> lmborrow {`vendor`|all} `enddate` [`time`]

> where `vendor` is the vendor daemon that serves the licenses to be borrowed, or `all` specifies all vendor daemons in the license server. `enddate` is the date the license is to be returned in `dd``-``mmm``-``yyyy` format. `time` is optional and is specified in 24-hour format (`hh``:``mm`) in the FLEXlm-licensed application’s local time. If `time` is unspecified, the checkout lasts until the end of the given end date.

> For example:

> lmborrow sampled 20-aug-2001 13:00

> ##### Setting the LM_BORROW Environment Variable Directly

> The `lmborrow` utility is a user interface to set `LM_BORROW` in either the registry (Windows) or in `$HOME/.flexlmrc` (UNIX). `LM_BORROW` can also be set directly as an environment variable:

> `today`:{`vendor`|all}:`enddate`[:`time`]

> where:

> `today` | Today’s date in `dd``-``mmm``-``yyyy` format. Any checkouts done on this date create local borrow information. If a checkout is done on a different date than this date, no local borrowing information is created.
> `vendor` | Vendor daemon that serves the licenses to be borrowed, or `all` specifies all vendor daemons in the license server.
> `enddate` | Date the license is to be returned in `dd``-``mmm``-``yyyy` format.
> `time` | Optional. `time` is specified in 24-hour format (`hh``:``mm`) in the FLEXlm-licensed application’s local time. If `time` is unspecified, the checkout lasts until the end of the given end date.

> For example:

> LM_BORROW=15-aug-2001:sampled:20-aug-2001:13:00

> In this example, one or more licenses served by the `sampled` vendor daemon are borrowed on August 15, 2001, and are scheduled to be returned at 1 pm on August 20, 2001.

> #### 8.4.2 Borrowing a License

> To borrow a license for a desired feature, on the same day and the same machine that the end user runs `lmborrow` or sets `LM_BORROW` (and while still connected to the network), the end user runs the application to check out and borrow the license. If the end user runs the application more than once that day, no duplicate license is borrowed. No license is borrowed if the application is run on a day different than the date borrowing was set to be initiated.

> For example, say that today you want to borrow a license for the PageWizard feature for a week. The PageWizard feature is served by the `sampled` vendor daemon. Today, while you are connected to the network, run `lmborrow` or set `LM_BORROW` directly. For example:

> lmborrow sampled `enddate`

> Today, after you run `lmborrow`, while you are connected to the network, run the application that checks out a license for the PageWizard feature. After the license is checked out, close the application and disconnect your machine from the network. The license that you just checked out stays checked out from the license server until the borrow period expires—that license now is used on your disconnected machine until the borrow period expires. The borrowed license cannot be returned before the end of the borrow period. Once checked out, it remains checked out for the full borrow period. The borrow period cannot be renewed until the period has expired.

> ##### Clearing the Borrow Period

> Once you have borrowed all the licenses that you need for the current borrow period (defined by the `LM_BORROW` environment variable), prevent licenses for any additional features from being borrowed by running `lmborrow -clear`. This clears the LM_BORROW setting in the registry (Windows) or `$HOME/.flexlmrc` (UNIX). `lmborrow -clear` does not clear the local information about licenses you have already borrowed.

> ##### Checking Borrow Status

> To print information about borrowed features, issue the following command on the machine from which they are borrowed:

> lmborrow -status

> The borrowing system does not have to be connected to the network to determine the status.

> ##### Returning a Borrowed License Early

> To return a borrowed license before the borrow period expires, first reconnect the borrowing system back to the network and then, from the same machine that initiated the borrowing, issue the command:

> lmborrow -return [-c `license_file_list`] `feature`

> This option may or may not be allowed by your vendor. Check directly with your vendor to determine if early borrowed-license return is supported.

> Returning the license early has the effect of clearing the LM_BORROW setting for the vendor daemon that serves the returned license.

> #### 8.4.3 Support for License Borrowing

> See the following sections for more information about the utilities and end-user options that support license borrowing:

> - Section 7.3, “lmborrow”
> - Section 7.5, “lmdown”
> - Section 7.12, “lmstat”
> - Section 5.2.1, “BORROW_LOWWATER”
> - Section 5.2.4, “EXCLUDE_BORROW”
> - Section 5.2.10, “INCLUDE_BORROW”

> ### FLEXlm Version Notes

> - BORROW keyword introduced in v8.0 FLEXlm client library, license manager daemon, and vendor daemon. All components must be v8.0+ in order to use BORROW.

> ### 8.5 Node-locked to a User Name

> If a license is to be used exclusively by one user on different machines, that license can be node-locked to the user’s user name. The license file is copied to the different machines on which the user might work; the user’s user name must be identical on each machine. For this method to be useful, individual user names in an organization need to be unique.

> ### 8.6 Fulfilled from a Prepaid License Pool

> In this method, the end user buys a prepaid number of license-days from the vendor. The end user can then fulfill a license using a partial amount of the total license-days for the given borrow period, node-locked to a particular machine. For example, in preparation for a business trip (or even during a business trip), the end user fulfills a license that expires in 5 days that is node-locked to their laptop. Each fulfillment can be node-locked to a different machine (or even multiple times to the same machine), thus allowing mobility of license usage within the pre-paid number of license-days.

> This model is like pay-per-use because each fulfillment is made from a decreasing number license-days. It is different than other pay-per-use models because, once node-locked to a machine, that machine is allowed unlimited use of the application until the license expires. This short-term license cannot be returned early; once fulfilled, those license-days cannot be refunded. Other pay-per-use models charge based on the number of times the application is used.

FLEXlm End Users Guide
July 2003