Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Managing Licenses

 

Adding New Licenses (CLI Procedure)

Before adding new licenses, complete the following tasks:

  • Purchase the required licenses.

  • Establish basic network connectivity with the router or switch. For instructions on establishing basic connectivity, see the Getting Started Guide or Quick Start Guide for your device.

There are two ways to add licenses using the Junos OS CLI:

  • The system license keys key configuration statement enables you to configure and delete license keys in a Junos OS CLI configuration file.

  • The request system license add operational command installs a license through URL or using the license file.

On QFabric systems, install your licenses in the default partition of the QFabric system and not on the individual components (Node devices and Interconnect devices).

To add licenses, complete one of the following procedures:

Installing a License Using a Configuration Statement

Starting with Junos OS Release 15.1, you can configure and delete license keys in a Junos OS CLI configuration file. The system license keys key statement at the [edit] hierarchy level installs a license by using a configuration statement.

The system license keys key configuration statement is not required to install a license. The operational command request system license add installs a license immediately. But because the set system license keys key command is a configuration statement, you can use it to install a license as part of a configuration commit, either directly or by configuration file.

The license keys are validated and installed after a successful commit of the configuration file. If a license key is invalid, the commit fails and issues an error message. You can configure individual license keys or multiple license keys by issuing Junos OS CLI commands or by loading the license key configuration contained in a file. All installed license keys are stored in the /config/license/ directory.

Select a procedure to install a license using configuration:

Installing Licenses Using the CLI Directly

To install an individual license key using the Junos OS CLI:

  1. Issue the set system license keys key name statement.

    The name parameter includes the license ID and the license key. For example:

    To install multiple license keys in the Junos OS CLI, issue the set system license keys key name statement for each license key to install. For example:

  2. Issue the commit command.
  3. Verify that the license key was installed.

    For example:

    Alternatively, you can issue the show system license command from operational mode.

Installing Licenses Using a Configuration File

Before you begin, prepare the configuration file. In this example, use the Unix shell cat command to write the license.conf file:

  1. Go to the shell.
  2. Open the new license.conf file.
  3. Type the configuration information for the license key or keys:
    • For a single license, for example, type the following content:

    • For multiple license keys, for example, type something like this:

  4. Press Ctrl+d to save the file.

To install a license key configuration in a file:

  1. Go to the CLI configuration mode.
  2. Load and merge the license configuration file.

    For example:

  3. Issue the show | compare command to see the configuration.

    For example:

  4. Issue the commit command.
  5. To verify that the license key was installed, issue the show system license command.

    For example:

Installing a License Using an Operational Command

Complete the procedure that relates to your system:

Adding a License to a Device with a Single Routing Engine

To add a new license key to the device using an operational command:

  1. From the CLI operational mode, enter one of the following CLI commands:
    • To add a license key from a file or URL, enter the following command, specifying the filename or the URL where the key is located:

    • To add a license key from the terminal, enter the following command:

  2. When prompted, enter the license key, separating multiple license keys with a blank line.

    If the license key you enter is invalid, an error appears in the CLI output when you press Ctrl+d to exit license entry mode.

  3. Go on to Verifying Junos OS License Installation (CLI).

Adding a License to a Device with Dual Routing Engines

On routers that have graceful Routing Engine switchover (GRES) enabled, after successfully adding the new license on the master Routing Engine, the license keys are automatically synchronized on the backup Routing Engine as well. However, in case GRES is not enabled, the new license is added on each Routing Engine separately. This ensures that the license key is enabled on the backup Routing Engine during changeover of mastership between the Routing Engines.

To add a new license key to a router with dual Routing Engines without GRES:

  1. After adding the new license key on the master Routing Engine, use the request chassis routing-engine master switch command to have the backup Routing Engine become the master Routing Engine.

  2. Log in to the active Routing Engine and add the new license key, repeat the same step.

Adding a license key to the router or switch might be delayed if a kernel resynchronization operation is in progress at that time. The following message is displayed on the CLI when the license-adding operation is about to be delayed:

A kernel re-sync operation is in progress. License update may take several minutes to complete.

Deleting License Keys (CLI)

Before deleting a license, ensure that the features enabled by the license will not be needed.

You can use the request system license delete operational command, or the delete or deactivate configuration command to delete a license:

Using the Operational Command to Delete Licenses

To delete licenses using the request system license delete command:

  1. Display the licenses available to be deleted.
    user@host> request system license delete license-identifier-list ?
  2. To delete a license key or keys from a device using the CLI operational mode, select one of the following methods:
    • Delete a single license by specifying the license ID. Using this option, you can delete only one license at a time.

    • Delete all license keys from the device.

    • Delete multiple license keys from the device. Specify the license identifier for each key and enclose the list of identifiers in brackets.

  3. Verify the license was deleted by entering the show system license command.

Using a Configuration Command to Delete Licenses

Starting in Junos OS Release 16.1, to remove licenses from the configuration, you can use either the delete or deactivate configuration command. The delete command deletes a statement or identifier, and all subordinate statements and identifiers contained within the specified statement path are deleted with it. The deactivate command adds the inactive: tag to a statement, effectively commenting out the statement or identifier from the configuration. Statements or identifiers marked as inactive do not take effect when you issue the commit command. To remove the inactive: tag from a statement, issue the activate command. Statements or identifiers that have been activated take effect when you next issue the commit command.

The following procedure uses the delete command, but you could use the deactivate command as well.

To delete one or all licenses using the delete command:

You can use the deactivate command instead of the delete command in this procedure.

  1. Display the licenses available to be deleted.

    Issue the run request system license delete license-identifier-list ? command from the configuration mode of the CLI.

    A list of licenses on the device is displayed:

  2. Delete the license or licenses you want.
    • To delete a single license, for example:

    • To delete all licenses, for example:

  3. Commit the configuration by entering the commit command.
  4. Verify the license was deleted by entering the show system license command.

Verifying Junos OS License Installation (CLI)

To verify Junos OS license management, perform the following tasks:

Displaying Installed Licenses

Purpose

Verify that the expected licenses are installed and active on the device.

Action

From the CLI, enter the show system license command.

Sample Output

user@host> show system license

Meaning

The output shows a list of the license usage and a list of the licenses installed on the device. Verify the following information:

  • Each license is present. Licenses are listed in ascending alphanumeric order by license ID.

  • The state of each license is permanent.

    A state of invalid indicates that the license key is not a valid license key. Either it was entered incorrectly or it is not valid for the specific device.

  • The feature for each license is the expected feature. The features enabled are listed by license. An all-inclusive license has all features listed.

  • All configured features have the required licenses installed. The Licenses needed column must show that no licenses are required.

Displaying License Usage

Purpose

Verify that the licenses fully cover the feature configuration on the device.

Action

From the CLI, enter the show system license usage command.

Sample Output

user@host> show system license usage

Meaning

The output shows any licenses installed on the device and how they are used. Verify the following information:

  • Any configured licenses appear in the output. The output lists features in ascending alphabetical order by license name. The number of licenses appears in the third column. Verify that you have installed the appropriate number of licenses.

  • The number of licenses used matches the number of configured features. If a licensed feature is configured, the feature is considered used. The sample output shows that the subscriber address pooling feature is configured.

  • A license is installed on the device for each configured feature. For every feature configured that does not have a license, one license is needed.

    For example, the sample output shows that the subscriber address feature is configured but that the license for the feature has not yet been installed. The license must be installed within the remaining grace period to be in compliance.

Saving License Keys (CLI)

To save the licenses installed on a device:

  1. From operational mode, do one of the following tasks
    • To save the installed license keys to a file or URL, enter the following command:

      For example, the following command saves the installed license keys to a file named license.config:

    • To output installed license keys to the terminal, enter the following command:

show system license

List of Syntax

Syntax

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Command introduced in Junos OS Release 13.3 for the MX Series 5G Universal Routing Platform.

Customer ID added to output of data center users in Junos OS Release 15.1.

Corrected output for duration of license added in Junos OS Release 17.4R1.

Description

Display licenses and information about how they are used.

Options

noneDisplay all license information.
key-content filename(Optional) Display license key contents of the specified filename.
installed(Optional) Display installed licenses only.
keys(Optional) Display a list of license keys. Use this information to verify that each expected license key is present.
revoked-info(Optional) Display information about revoked licenses.
usage(Optional) Display the state of licensed features.

Required Privilege Level

maintenance

List of Sample Output

show system license (Virtual devices such as vMX and vSRX)

show system license

show system license installed

show system license keys

show system license usage

show system license (MX104 Routers)

show system license installed (MX104 Routers)

show system license keys (MX104 Routers)

show system license usage (MX104 Routers)

show system license (MX104 Routers)

show system license installed (MX104 Routers)

show system license keys (MX104 Routers)

show system license usage (MX104 Routers)

show system license (MX104 Routers)

show system license installed (MX104 Routers)

show system license keys (MX104 Routers)

show system license usage (MX104 Routers)

show system license (QFX Series)

show system license (QFX5110 Switch with Disaggregated Feature License)

show system license key-content srx_1year_sub.lic

Output Fields

Table 1 lists the output fields for the show system license command. Output fields are listed in the approximate order in which they appear.

Table 1: show system license Output Fields

Field Name

Field Description

Feature name

Name assigned to the configured feature. You use this information to verify that all the features for which you installed licenses are present.

Licenses used

Number of licenses used by a router or switch. You use this information to verify that the number of licenses used matches the number configured. If a licensed feature is configured, the feature is considered used.

In Junos OS Release 10.1 and later, the Licenses used column displays the actual usage count based on the number of active sessions or connections as reported by the corresponding feature daemons. This is applicable for scalable license-based features such as Subscriber Access (scale-subscriber), L2TP (scale-l2tp), Mobile IP (scale-mobile-ip), and so on.

Licenses installed

Information about the installed license key:

  • License identifier—Identifier associated with a license key.

  • State—State of the license key:valid or invalid. An invalid state indicates that the key was entered incorrectly or is not valid for the specific device.

  • License version—Version of a license. The version indicates how the license is validated, the type of signature, and the signer of the license key.

  • Customer ID—Name of the customer license is for. Feature added as of Junos OS Release 15.1 for data center customers (for example QFX Series platform users).

  • Valid for device—Device that can use a license key.

  • Group defined—Group membership of a device.

  • Features—Feature associated with a license, such as data link switching (DLSw).

Licenses needed

Number of licenses required for features being used but not yet properly licensed.

Expiry

Amount of time left within the grace period before a license is required for a feature being used.

Sample Output

show system license (Virtual devices such as vMX and vSRX)

user@host> show system license

show system license

user@host> show system license

show system license installed

user@host> show system license installed

show system license keys

user@host> show system license keys

show system license usage

user@host> show system license usage

show system license (MX104 Routers)

In the following output, ports 0 and 1 are activated by installing the license to activate the first two built-in ports.

user@host> show system license

show system license installed (MX104 Routers)

In the following output, ports 0 and 1 are activated by installing the license to activate the first two built-in ports.

user@host > show system license installed

show system license keys (MX104 Routers)

In the following output, ports 0 and 1 are activated by installing the license to activate the first two built-in ports.

user@host > show system license keys

show system license usage (MX104 Routers)

In the following output, ports 0 and 1 are activated by installing the license to activate the first two built-in ports.

user@host > show system license usage

show system license (MX104 Routers)

In the following output, ports 2 and 3 are activated by installing the license to activate the next two built-in ports after installing the license to activate the first two built-in ports.

user@host > show system license

show system license installed (MX104 Routers)

In the following output, ports 2 and 3 are activated by installing the license to activate the next two built-in ports after installing the license to activate the first two built-in ports.

user@host > show system license installed

show system license keys (MX104 Routers)

In the following output, ports 2 and 3 are activated by installing the license to activate the next two built-in ports after installing the license to activate the first two built-in ports.

user@host > show system license keys

show system license usage (MX104 Routers)

In the following output, ports 2 and 3 are activated by installing the license to activate the next two built-in ports after installing the license to activate the first two built-in ports.

user@host > show system license usage

show system license (MX104 Routers)

In the following output, ports 0,1,2, and 3 are activated by installing a single license key to activate all four built-in ports.

user@host > show system license

show system license installed (MX104 Routers)

In the following output, ports 0,1,2, and 3 are activated by installing a single license key to activate all four built-in ports.

user@host > show system license installed

show system license keys (MX104 Routers)

In the following output, ports 0,1,2, and 3 are activated by installing a single license key to activate all four built-in ports.

user@host > show system license keys

show system license usage (MX104 Routers)

In the following output, ports 0,1,2, and 3 are activated by installing a single license key to activate all four built-in ports.

user@host > show system license usage

show system license (QFX Series)

user@switch> show system license

show system license (QFX5110 Switch with Disaggregated Feature License)

user@switch> show system license

show system license key-content srx_1year_sub.lic

show system license (View)

List of Syntax

Syntax

Syntax

Release Information

Command introduced in Junos OS Release 9.5. Logical system status option added in Junos OS Release 11.2.

Description

Display licenses and information about how licenses are used.

Options

noneDisplay all license information.
installed(Optional) Display installed licenses only.
keys(Optional) Display a list of license keys. Use this information to verify that each expected license key is present.
status(Optional) Display license status for a specified logical system or for all logical systems.
usage(Optional) Display the state of licensed features.

Required Privilege Level

view

List of Sample Output

show system license

show system license installed

show system license keys

show system license usage

show system license status logical-system all

Output Fields

Table 2 lists the output fields for the show system license command. Output fields are listed in the approximate order in which they appear.

Table 2: show system license Output Fields

Field Name

Field Description

Feature name

Name assigned to the configured feature. You use this information to verify that all the features for which you installed licenses are present.

Licenses used

Number of licenses used by the device. You use this information to verify that the number of licenses used matches the number configured. If a licensed feature is configured, the feature is considered used.

Licenses installed

Information about the installed license key:

  • License identifier—Identifier associated with a license key.

  • License version—Version of a license. The version indicates how the license is validated, the type of signature, and the signer of the license key.

  • Valid for device—Device that can use a license key.

  • Features—Feature associated with a license.

Licenses needed

Number of licenses required for features being used but not yet properly licensed.

Expiry

Time remaining in the grace period before a license is required for a feature being used.

Logical system license status

Displays whether a license is enabled for a logical system.

Sample Output

show system license

user@host> show system license

show system license installed

user@host> show system license installed

show system license keys

user@host> show system license keys

show system license usage

user@host> show system license usage

show system license status logical-system all

user@host> show system license status logical-system all

traceoptions (System License)

Syntax

Hierarchy Level

Release Information

Statement introduced in Junos OS Release 8.5 for SRX Series and vSRX.

Statement introduced in Junos OS Release 14.1X53-D10 for EX Series and QFX Series.

Statement introduced in Junos OS Release 15.1 for M Series, MX Series, and T Series.

Description

Set trace options for licenses.

Options

fileConfigure the trace file information.
filenameName of the file to receive the output of the tracing operation. Enclose the name within quotation marks. All files are placed in the directory /var/log. By default, the name of the file is the name of the process being traced.
files numberMaximum number of trace files. When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and so on, until the maximum number of trace files is reached. Then the oldest trace file is overwritten.

If you specify a maximum number of files, you also must specify a maximum file size with the size maximum file-size option.

Range: 2 through 1000 files

Default: 10 files

match regular-expressionRefine the output to include lines that contain the regular expression.
size sizeMaximum size of each trace file, in kilobytes (KB), megabytes (MB), or gigabytes (GB). If you specify a maximum file size, you also must specify a maximum number of trace files with the files number option.

Range: 10 KB through 1 GB

Default: 128 KB

world-readable | no-world-readableBy default, log files can be accessed only by the user who configures the tracing operation. The world-readable option enables any user to read the file. To explicitly set the default behavior, use the no-world-readable option.
flag flagSpecify which tracing operation to perform. To specify more than one tracing operation, include multiple flag statements. You can include the following flags.
  • all—Trace all operations.

  • config—Trace license configuration processing.

  • events—Trace licensing events and their processing.

no-remote-traceDisable the remote tracing.

Required Privilege Level

trace—To view this statement in the configuration.

trace-control—To add this statement to the configuration.

request system license add

List of Syntax

Syntax

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Command introduced in Junos OS Release 9.5 for SRX Series devices.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Added additional information section on XML RPC in Junos OS Release 17.4.

Description

Adding a license key to the Junos OS devices to activate the feature.

Starting in Junos OS Release 18.3R1, the display xml rpc CLI option is supported for request system license add and request system license save commands while installing licenses on Juniper Networks devices.

Options

filenameLicense key from a file or URL. Specify the filename or the URL where the key is located.
terminalLicense key from the terminal.

Additional Information

The | display xml rpc filter returns “xml rpc equivalent of this command is not available,” the following RPC is supported for license installation:

The following RPC is supported for license installation:

Where key-data is the license key data.

Where source is the URL of the source license key file.

Required Privilege Level

maintenance

List of Sample Output

request system license add

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

request system license add

user@host> request system license add terminal

request system license save

List of Syntax

Syntax

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Command introduced in Junos OS Release 9.5 for SRX Series devices.

Added additional information section on XML RPC in Junos OS Release 17.4.

Description

Save installed license keys to a file or URL.

Starting in Junos OS Release 18.3R1, the display xml rpc CLI option is supported for request system license add and request system license save commands while installing licenses on Juniper Networks devices.

Options

filenameLicense key from a file or URL. Specify the filename or the URL where the key is located.
terminalLicense key from the terminal.

Additional Information

The following RPC is supported for saving installed license keys to a file or URL:

Where destination is the URL of the destination license key file.

Required Privilege Level

maintenance

List of Sample Output

request system license save

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

request system license save

user@host> request system license save ftp://user@host/license.conf

request system license update

Syntax

Release Information

Command introduced in Junos OS Release 9.5.

Description

Starts autoupdating license keys from the license portal.

  • The request system license update command always uses the default Juniper license server: https://ae1.juniper.net/.

  • The request system license update command is supported only on SRX, vSRX, and QFX Series devices.

The products supported by the Juniper Agile Licensing (JAL) portal includes: QFX series, SRX Series, EX Series, NFX, vBNG, vMX, vSRX, and ACX. For other Juniper products (SPACE, JSA, SBR Carrier, Screen OS and so on) access the License Management System (LMS).

Options

trial—Immediately updates trial license keys from the license portal.

Required Privilege Level

maintenance

List of Sample Output

request system license update

request system license update trial

Output Fields

When you enter this command, you are provided feedback on the status of your request.

Sample Output

request system license update

user@host> request system license update

request system license update trial

user@host> request system license update trial

request system license delete

List of Syntax

Syntax

Syntax

Release Information

Command introduced before Junos OS Release 7.4.

Command introduced in Junos OS Release 9.0 for EX Series switches.

Command introduced in Junos OS Release 11.1 for the QFX Series.

Option license-identifier-list introduced in Junos OS Release 13.1.

Description

Delete a license key. You can choose to delete one license at a time, all licenses at once, or a list of license identifiers enclosed in brackets.

Options

license-identifierText string that uniquely identifies a license key.
license-identifier-list [ licenseid001 licenseid002 licenseid003....]Delete multiple license identifiers as a list enclosed in brackets.
allDelete all licenses on the device.

Required Privilege Level

maintenance

license

Syntax

Hierarchy Level

Release Information

Statement introduced in Junos OS Release 8.5 for SRX Series and vSRX.

Options keys introduced in Junos OS Release 14.1X53-D10.

Statement introduced in Junos OS Release 14.1X53-D10 for EX Series and QFX Series, with option keys included.

Statement introduced in Junos OS Release 15.1 for M Series, MX Series, PTX Series, and T Series, with option keys included.

Description

Specify license information for the device.

Options

autoupdateAutoupdate license keys from license servers.
before-expiration numberLicense renewal lead time before expiration, in days.

Range: 0 through 60 days

interval interval-hoursLicense checking interval, in hours.

Range: 1 through 336 hours

keys key keyConfigure one or more license keys. For example,
renewLicense renewal lead time and checking interval.
urlURL of a license server.

The remaining statements are explained separately. See CLI Explorer.

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

license-type

Syntax

Hierarchy Level

Release Information

Statement introduced in Junos OS Release 11.1 for FX Series switches.

Description

Configure the license type and the scope of SDK application deployment.

Options

license—Type of license. Obtain correct value from the application’s provider.

deployment—Scope of SDK application deployment. You can configure a set of deployments. Obtain correct value from the application’s provider.

Required Privilege Level

admin—To view this statement in the configuration.

admin-control—To add this statement to the configuration.

Release History Table
Release
Description
Starting in Junos OS Release 16.1, to remove licenses from the configuration, you can use either the delete or deactivate configuration command.