MD-CLI command reference

MD-CLI tree hierarchy

Table 1. Command syntax symbols

Symbol

Description

|

A vertical bar represents an ‟or” condition, indicating that only one of the parameters in the brackets or parentheses can be selected.

( )

Parentheses indicate that one of the parameters must be selected.

[ ]

Brackets indicate optional parameters.

Bold

Commands in bold indicate commands and keywords.

Italic

Commands in italics indicate that you must enter text for the parameter.

In the following examples, location and graceful-shutdown are command names. For the location command, keyword must be one of the keywords cf1, cf2, or cf3. For the graceful-shutdown command, boolean must be one of the keywords true or false, although explicitly using the keyword true is optional.

location keyword

keyword - (cf1 | cf2 | cf3)

graceful-shutdown boolean

boolean - ([true] | false)

The configuration branch of the MD-CLI shows the commands and parameters (also known as elements) that are available, shown in a hierarchical structure as in the following figure.

Figure 1. MD-CLI configuration tree example

The configure context is the root level of the configuration branch within the configuration mode in the MD-CLI. Each chapter of this guide describes a configuration branch in the MD-CLI configuration tree.

Commands are linked to their command descriptions in the configuration tree with some exceptions (for example, to reduce repeated content), including the apply-groups, apply-groups-exclude, and groups commands. These commands are used to direct the use of configuration templates called configuration groups in the configure region at all configuration levels. The apply-groups command applies a configuration group at a configuration level and the apply-groups-exclude command excludes a configuration group at a configuration level. See ‟Using configuration groups” in the 7450 ESS, 7750 SR, 7950 XRS, and VSR MD-CLI User Guide for more information.

Some commands require one or more keys to be entered with the command. For example, the collector command has two keys which must be entered: the IP address and the port number. The key name for the IP address (ip-address) is optional, however, the key name port must be entered before the port number.

    - collector (ipv4-address-no-zone | ipv6-address-no-zone) port number

The command description indicates the required syntax for each command. See MD-CLI command descriptions for more information.

collector [ip-address] (ipv4-address-no-zone | ipv6-address-no-zone) port number

Italicized names after a command or parameter name indicate the parameter type. The parameter types include (but are not limited to):

  • Boolean (true and false values)

  • keyword (enumerated values)

  • string

  • number

  • IPv4 address

  • IPv6 address

  • MAC address

The summary-only parameter, for example, requires a Boolean value. The autonomous-system parameter requires a number. For more information about the input values, click the command or parameter name from the MD-CLI tree to be linked to the command description.

    - summary-only boolean
    - autonomous-system number

A parameter type may also be a combination of different base types. These parameters are displayed in the MD-CLI tree with the individual parameter types enclosed in round brackets (()), separated by a vertical bar (|). For example, the indirect parameter can be configured with either an IPv4 address or IPv6 address:

    - indirect (ipv4-address-no-zone | ipv6-address-no-zone)

Allowed values in strings are printable, 7-bit ASCII characters. If the string contains special characters (#, $, spaces, and so on), the entire string must be enclosed within double quotation marks. Double quotation marks within a string are not supported.

Context path

In the CLI tree section, a contextual path at the top of a page refers to the full context of the first command on the page, as shown in the following figure.

Figure 2. Command tree navigation

MD-CLI command descriptions

The command syntax is shown in the command description, where the command is displayed in bold, followed by any key names and a type. From the MD-CLI tree, the configure log accounting-policy command shows that the key for the command is a number:

    - log
        - accounting-policy number

The command description for accounting-policy shows that the key for the command is a policy identifier:

accounting-policy [policy-id] number

The square brackets ([ ]) indicate that the policy-id key name is optional. From the policy-id command description, the range of the identifier is a number from 1 to 99. Therefore, when using the accounting-policy command, the following inputs are acceptable:

accounting-policy policy-id 15
accounting-policy 25
accounting-policy 1
accounting-policy policy-id 99

The following table describes the fields that may be displayed for a command. Not all fields are applicable for all commands.

Table 2. Command descriptions fields

Field

Description

Element Name

Name of the element (command or parameter) and its syntax

Synopsis

Summary description of the element

Context

Full path to the command (with links to parent commands)

Tree

Link to the command in the CLI tree. For key elements, the link is to the parent element.

Description

Detailed description of the element, as needed

String Length

For string elements, the range of the number of characters allowed

Range/Max. Range

For number elements, the range of allowed values. A maximum range may be overridden by a platform-specific range.

Default

Default value for the element. Platform-specific defaults are not displayed.

Units

Base unit type of the element

Options

Enumerated values allowed for the element. Not all options are available on all platforms.

Reference

Reference to an element instance in the configuration or state datastore

Min./Max. Instances

For lists and leaf-lists, the minimum or maximum number of instances for this element

Notes

Information about special attributes of the element, including whether the element is:

  • a key for an element

  • mandatory

  • ordered by the user (instead of by the system)

  • part of a choice of elements

Introduced

Release in which the element was introduced

Deprecated

Release in which the element was deprecated

Platforms

Hardware platforms on which the element is available. See Platforms and terminology for more information about the platforms.

Note: Some SR OS features are platform-specific and therefore may not be available or visible on all platforms. See the SR OS R22.x.Rx Software Release Notes, part number 3HE 18412 000 x TQZZA, for information about platform support.

A description of the element is also available from the online help for the element. For information about using the online help in the MD-CLI, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR MD-CLI User Guide.

Note:

All options for enumerated types and numerical ranges are listed in the MD-CLI command descriptions, however, not all options or ranges are valid on all platforms.