3. Navigating in the MD-CLI

3.1. The MD-CLI Tree Structure

The MD-CLI tree contains the following elements from the Nokia YANG models:

  1. container — an element that contains other elements. In the following example, tcp-keepalive and gnmi are containers.
    tcp-keepalive {
        admin-state disable
        idle-time 600
        interval 15
        retries 4
    }
    gnmi {
        admin-state enable
        auto-config-save false
    }
  2. leaf — an element that does not contain any other elements and has a data type (for example, string or integer). A leaf can also be defined with no data type where the leaf takes no parameter value (that is, an empty leaf). The bold elements in the following example are leafs.
    tcp-keepalive {
        admin-state disable
        idle-time 600
        interval 15
        retries 4
    }
    gnmi {
        admin-state enable
        auto-config-save false
    }
  3. list entry — an element similar to a container with multiple instances where each list entry is identified by the values of its keys (for example, group “group-2”)
    router "Base" {
        bgp {
            group "group-1" {
                connect-retry 600
                keepalive 33
            }
            group "group-2" {
                description "Text description for group-2"
                local-preference 8
            }
        }
    }
  4. key — a unique identifier for a list entry (for example, “group-1” and “group-2”)
    router "Base" {
        bgp {
            group "group-1" {
                connect-retry 600
                keepalive 33
            }
            group "group-2" {
                description "Text description for group-2"
                local-preference 8
            }
        }
    }
  5. leaf-list — an element that contains a sequence of values of a particular data type (for example, “policy” is a leaf-list in the following example)
        policy ["policy-a" "policy-b" "policy-c"]
  6. list — a sequence of list entries. In the preceding example, the entire set of interfaces is a list.
            group "group-1" {
                connect-retry 600
                keepalive 33
            }
            group "group-2" {
                description "Text description for group-2"
                local-preference 8
            }
  7. leaf-list entry — one of the values of a leaf-list. For example, “policy-a”, “policy-b”, and “policy-c” are leaf-list entries in the following example.
        policy ["policy-a" "policy-b" "policy-c"]

The following terms are also used:

  1. keyword — an element with a name defined by SR OS; for example, enumerated values, leaf names, and container names)
  2. variable parameter — an element with a name defined by the user; for example, descriptions, names, integer or string leaf values)
  3. immutable element — an element that can only be configured in the transaction in which the parent element is created. It cannot be modified while the parent element exists.
  4. choice element — an element which is part of a set of mutually exclusive elements. Setting a choice element clears all configuration from the other choice elements.

In the following example, admin-state (leaf name), enable (enumerated value), and connect-retry (leaf name) are keywords, and “800” is a variable parameter.

*(ex)[configure router "Base" bgp]
A:admin@node-2# info
    admin-state enable
    connect-retry 800

Managing the router configuration using the MD-CLI involves accessing and configuring the appropriate elements (containers, lists, leafs, and leaf-lists).

The MD-CLI tree shows the commands and parameters (also known as elements) that are available in a hierarchical output. In the following tree detail command output, the bold elements are containers (or container lists) which contain leafs (or leaf-lists).

*[ex:configure system]
A:admin@dut-c# tree detail
+-- alarms
|   +-- admin-state <keyword>
|   +-- apply-groups <reference>
|   +-- max-cleared <number>
+-- allow-boot-license-violations <boolean>
+-- apply-groups <reference>
+-- boot-bad-exec <string>
+-- boot-good-exec <string>
+-- central-frequency-clock
|   +-- apply-groups <reference>
|   +-- bits
|   |   +-- input
|   |   |   +-- admin-state <keyword>
|   |   +-- interface-type <keyword>
|   |   +-- output
|   |   |   +-- admin-state <keyword>
|   |   |   +-- line-length <keyword>
|   |   |   +-- ql-minimum <keyword>
|   |   |   +-- source <keyword>
|   |   |   +-- squelch <boolean>
|   |   +-- ql-override <keyword>
|   |   +-- ssm-bit <number>
|   +-- ptp
|   |   +-- admin-state <keyword>
|   |   +-- ql-override <keyword>
|   +-- ql-minimum <keyword>
|   +-- ql-selection <boolean>
|   +-- ref-order
|   |   +-- first <keyword>
|   |   +-- fourth <keyword>
|   |   +-- second <keyword>
|   |   +-- third <keyword>
|   +-- ref1
|   |   +-- admin-state <keyword>
|   |   +-- ql-override <keyword>
|   |   +-- source-port <reference | connector-port>
|   +-- ref2
|   |   +-- admin-state <keyword>
|   |   +-- ql-override <keyword>
 
  <snip>

3.2. The MD-CLI Command Prompt

The MD-CLI command prompt displays on two lines. The first line contains the following information:

  1. baseline status indicator
    This indicator displays an exclamation mark (!) to indicate an out-of-date baseline when in configuration mode.
  2. uncommitted changes indicator
    This indicator displays an asterisk (*) to indicate uncommitted configuration changes when in configuration mode.
  3. configuration mode reference
    When in configuration mode, a configuration mode reference is displayed:
    1. in round brackets for an explicit configuration workflow
    2. prepended to the context, separated by a colon for an implicit configuration workflow
    The configuration mode reference can be one of the following:
    1. pr — private mode
    2. ex — exclusive mode
    3. gl — global mode
    4. ro — read-only mode
  4. context
    The present working context is displayed in square brackets ([]) when in operational or configuration mode.

For an explicit configuration workflow, the format of the first line is as follows:

<baseline status indicator > <uncommitted changes indicator> (<configuration mode>) [context]

Examples:

(ro)[]
 
(ex)[configure router "Base" bgp]

For an implicit configuration workflow, the format of the first line is as follows:

<baseline status indicator > <uncommitted changes indicator> [<configuration mode>:context]

Examples:

[ro:configure]
 
*[ex:configure]

The second line contains the following information:

  1. CPM
    The active CPM slot can be A or B on 7750 SR routers, and A,B,C, or D on 7950 XRS routers.
  2. user
    The user is the name of the current user for this session.
  3. name
    The name is the system name, as configured with the configure system name command. The system name can change dynamically during the session if it is configured to a different name.

The format of the second line is as follows:

CPM:user@name#

The following examples display the two-line prompt in different modes.

  1. prompt in operational mode
    []
    A:admin@my-system#
  2. prompt in the operational root, with exclusive configuration mode
    (ex)[]
    A:admin@my-system#
  3. prompt in operational mode show router bgp
    [show router "Base" bgp]
    A:admin@my-system#
  4. prompt in exclusive configuration mode configure router bgp
    (ex)[configure router "Base" bgp]
    A:admin@my-system#
  5. prompt in exclusive configuration mode configure router bgp with uncommitted changes
    *(ex)[configure router "Base" bgp]
    A:admin@my-system#
  6. implicit configuration workflow prompt for a session in private configuration mode, with present working context of configure router bgp with uncommitted changes in the private candidate datastore, and the baseline datastore out-of-date
    !*[pr:configure router "Base" bgp]
    A:admin@my-system#

3.3. Environment Commands

The environment configuration for the MD-CLI is available in both the classic CLI and in the MD-CLI, but the configuration applies only to MD-CLI sessions.

In the MD-CLI, environment variables are found under the context configure system management-interface cli md-cli:

[gl:configure system management-interface cli md-cli environment]
A:admin@node-2# ?
 command-completion   + Enter the command-completion context
 console              + Enter the console context
 message-severity-    + Enter the message-severity-level context
  level
 more                 - Paging control of the output text
 progress-indicator   + Enter the progress-indicator context
 prompt               + Enter the prompt context
 time-display         - Time to display timestamp before prompt
 time-format          - Format in which time is to be displayed

In the classic CLI, the same variables are found in the same context as follows:

*A:node-2>config>system>management-interface>cli>md>env#?
      command-comple* + Configure keystrokes to trigger command completion
      console         + Configure console parameters
      message-severi* + Configure messages severity
 [no] more            - Configure paging of the output text
      progress-indic* + Settings for progress indicator during command
                        execution
      prompt          + Configure content of displayed prompt
      time-display    - Specify whether timestamp should be displayed in UTC or
                        local time
      time-format     - Specify format in which should be displayed

Changes made to the environment configuration apply only to new sessions and do not affect current sessions.

Refer to the MD-CLI Command Reference Guide for information about the environment commands in the MD-CLI.

3.3.1. Customizing Per-Session Environment Settings

The environment can be customized for all sessions in the configuration under the configure system management-interface cli md-cli environment context, or per session using the environment command. When a new MD-CLI session is started, the per-session environment configuration is copied from the global environment configuration. Changes made to the global environment configuration after the session begins apply only to new sessions and do not affect current sessions. Changes made to the environment parameters for a session apply only for that session.

The per-session environment is accessed by entering environment at the operational root or with /environment from any other mode or context. Changes made in the per-session environment are immediate.

The info command displays the difference between the per-session environment and the configured global environment parameters. Therefore, for a new MD-CLI session, the info command has no output, as the per-session environment is the same as the global environment. The info detail command displays the current values in the global environment for all parameters.

3.3.2. Customizing the Session Prompt

3.3.2.1. Customizing the Uncommitted Changes Indicator

As the default setting of the environment configuration, the uncommitted changes indicator is displayed as part of the command prompt. This setting can be modified per session or it can be changed for all MD-CLI sessions by changing the environment configuration.

The uncommitted-changes-indicator command under the environment prompt context suppresses or displays the change indicator for an MD-CLI session. Environment changes are applied immediately and are lost when the session disconnects.

*[environment prompt]
A:admin@node-2# uncommitted-changes-indicator false
 
[environment prompt]
A:admin@node-2#
 
[environment prompt]
A:admin@node-2# uncommitted-changes-indicator true
 
*[environment prompt]
A:admin@node-2#

3.3.2.2. Customizing the Line Preceding the Command Prompt

By default, a blank line precedes the command prompt. This setting can be modified for each MD-CLI session.

The newline command under the environment prompt context suppresses or displays a new line before the prompt.

 
[]
A:admin@node-2# environment prompt
 
[environment prompt]
A:admin@node-2# newline false
[environment prompt]
A:admin@node-2# newline true
 
[environment prompt]
A:admin@node-2#

3.3.2.3. Customizing the Context Information in the Command Prompt

By default, the context is displayed in the command prompt. This setting can be modified for each MD-CLI session.

The context command under the environment prompt context suppresses or displays the current context.

[environment prompt]
A:admin@node-2# context false
 
[]
A:admin@node-2# context true
 
[environment prompt]
A:admin@node-2#

3.3.2.4. Customizing the Date and Time Output

By default, the timestamp is not displayed before the command prompt. This setting can be modified for each MD-CLI session.

The timestamp command under the environment prompt context suppresses or displays the timestamp.

[environment prompt]
A:admin@node-2# timestamp true
 
SUN 10 JUNE 2018 23:09:51 UTC
[environment prompt]
A:admin@node-2# timestamp false
 
[environment prompt]
A:admin@node-2#

The environment time-display command configures the time zone display to UTC or local time (as configured in configure system time).

[environment]
A:admin@node-2# time-display ?
 
 time-display <keyword>
 <keyword> - (local|utc)
 Default   - local
 
    Time to display timestamp before prompt

The environment time-format command specifies the format for the time display.

[environment]
A:admin@node-2# time-format ?
 
 time-format <keyword>
 <keyword>  - (iso-8601|rfc-1123|rfc-3339)
 Default    - rfc-3339
 
    Format in which time is to be displayed

The following shows the time in the format as defined by ISO 8601:

[state cpm "a" hardware-data]
A:admin@npode-2# software-last-boot-time
    software-last-boot-time "2020-04-16 16:39:22 UTC"

The following shows the time in the format as defined by RFC 1123:

[state cpm "a" hardware-data]
A:admin@node-2# software-last-boot-time
    software-last-boot-time "THU 16 APR 2020 16:39:22 UTC"

The following shows the time in the format as defined by RFC 3339:

[state cpm "a" hardware-data]
A:admin@node-2# software-last-boot-time
    software-last-boot-time 2020-04-16T16:39:22.0+00:00

3.3.3. Customizing the Progress Indicator

The progress indicator appears on the line immediately following the command and disappears when the MD-CLI command completes or when output is available to display. The indicator is a display of dynamically changing dots.

(ex)[configure]
A:admin@node-2# compare
...                    # progress indicator displays here as dots 

The delay interval can be configured with the delay command or the indicator can be disabled with the admin-state disable command under the environment progress-indicator context. For example, the user can disable the progress indicator for logged sessions.

[environment progress-indicator]
A:admin@node-2# ?
 
 admin-state          - Administrative state of the progress indicator
 delay                - Delay before progress indicator is displayed
 type                 - Progress indicator output style

3.3.4. Customizing the Pagination Setting

The environment more command enables pagination when configured to true and disables pagination when configured to false. With pagination enabled, the display output can be paused and continued, based on the “Press Q to quit, Enter to print next line or any other key to print next page” message at the bottom of the screen.

[]
A:admin@node-2# environment more true
[]
A:admin@node-2# show system security profile user-profile-name administrative  
===============================================================================
User Profile
===============================================================================
 
User Profile          : administrative
Def. Action           : permit-all
LI                    : no
Netconf Kill
Authorization         : no
Netconf Lock
Authorization         : no
gRPC gNMI
Capabilities RPC
Authorization         : yes
gRPC gNMI Get RPC
Authorization         : yes
gRPC gNMI Set RPC
Authorization         : yes
gRPC gNMI Subscribe
RPC Authorization     : yes
-------------------------------------------------------------------------------
Cli Session Group     : no
Press Q to quit, Enter to print next line or any other key to print next page.

The pagination setting can be overridden by using | no-more for a single command. As with pagination disabled, the output is displayed completely without any prompts to continue.

[]
A:admin@node-2# show system security profile user-profile-name administrative | no-more

3.3.5. Customizing the Console Settings

The default size for a console window is 24 lines long by 80 characters wide. The environment console command can be used to change these settings.

(ex)[environment]
A:admin@node-2# console ?
 
 length               - Number of lines displayed on the screen
 width                - Number of columns displayed on the screen

3.3.6. Customizing the Message Level Security Settings

The INFO: CLI messages are displayed by default. The environment message-security-level command suppresses the INFO messages by changing the setting to warning.

[environment message-severity-level]
A:admin@node-2# cli ?
 
 cli <keyword>
 <keyword> - (warning|info)
 Default   - info
 
    Message severity threshold for CLI messages

Following are examples of INFO: CLI messages that are suppressed when the setting is changed to warning:

INFO: CLI #2051: Switching to the classic CLI engine
INFO: CLI #2052: Switching to the MD-CLI engine
INFO: CLI #2054: Entering global configuration mode
INFO: CLI #2056: Exiting global configuration mode 
INFO: CLI #2055: Uncommitted changes are present in the candidate configuration
INFO: CLI #2057: Uncommitted changes are kept in the candidate configuration

3.3.7. Preventing Changes to Environment Settings

The environment datastore is subject to AAA command authorization. A user can be prevented from modifying the global environment settings or the per-session environment settings, or both.

In the following configuration output, entry 113 blocks user “tstuser” from modifying the global environment settings. In addition, entry 114 prevents the user from changing the per-session environment settings.

(ro)[configure system security aaa local-profiles profile "tstuser"]
A:admin@node-2# info
    default-action permit-all
    entry 113 {
        action deny
        match "configure system management-interface cli md-cli environment"
    }
    entry 114 {
        action deny
        match "environment"
    }
(ex)[configure system management-interface cli md-cli environment]
A:tstuser@node-2# prompt timestamp
MINOR: MGMT_CORE #2020: Permission denied
 
(ex)[configure system management-interface cli md-cli environment]
A:tstuser@node-2# /environment
MINOR: MGMT_CORE #2020: Permission denied
 
(ex)[configure system management-interface cli md-cli environment]
A:tstuser@node-2#

3.4. Using Online Help

A short help description is displayed immediately when the question mark (?) is entered (without needing to press Enter). The following displays help from the operational root level.

[]
A:admin@node-2#?
 admin                 + Enter the admin context
 clear                 + Clear statistics or reset operational state
 configure             + Enter the configuration context
 environment           + Enter the environment context
 li                    + Enter the lawful intercept context
 show                  + Show operational information
 state                 + Show state information
 tools                 + Enter the tools context for troubleshooting and
                         debugging
 
 Global commands:
 back                  - Move back specified number of levels
 delete                - Delete an element from the candidate datastore
 edit-config           - Enter a candidate configuration mode
 enable                - Enable administrative mode
 exec                  - Execute commands from a file
 exit                  - Return to the previous context or to operational root
 history               - Show the most recently entered commands
 logout                - Exit the CLI session
 oam                   - Enter the oam context
 ping                  - Ping an IP address or DNS name
 pwc                   - Show the present working context
 top                   - Move to the top level of the context
 traceroute            - Trace route to a destination
 tree                  - Show the command tree under the present working context

The ? help is context-sensitive. The following ? help output lists additional commands available in exclusive configuration mode.

(ex)[]
A:admin@node-2#?
 admin                 + Enter the admin context
 clear                 + Clear statistics or reset operational state
 configure             + Enter the configuration context
 environment           + Enter the environment context
 show                  + Show operational information
 state                 + Show state information
 tools                 + Enter the tools context for troubleshooting and
                         debugging
 
 Global commands:
 back                  - Move back specified number of levels
 delete                - Delete an element from the candidate datastore
 edit-config           - Enter a candidate configuration mode
 enable                - Enable administrative mode
 exec                  - Execute commands from a file
 exit                  - Return to the previous context or to operational root
 history               - Show the most recently entered commands
 insert                - Insert an element into a user-ordered list
 logout                - Exit the CLI session
 oam                   - Enter the oam context
 ping                  - Ping an IP address or DNS name
 pwc                   - Show the present working context
 quit-config           - Exit the candidate configuration mode
 top                   - Move to the top level of the context
 traceroute            - Trace route to a destination
 tree                  - Show the command tree under the present working context
 
 Configuration commands:
 commit                - Commit the candidate configuration
 compare               - Compare changes between datastores
 discard               - Discard changes in the candidate datastore
 info                  - Show the configuration for the present context
 update                - Update the candidate baseline
 validate              - Validate changes in the candidate datastore

The help results may depend on the cursor position. The following example shows the router command syntax, followed by available commands after entering the router context.

[ex:configure]
A:admin@node-2# router?
 
 router [[router-name] <string>]
 
 [router-name]         - The administrative name for this virtual router. The
                         router name must be unique among all virtual routers
                         in the system.
 
 aggregates            + Enter the aggregates context
 allow-icmp-redirect   - Allow ICMP redirects on the management interface
 allow-icmp6-redirect  - Allow IPv6 ICMP redirects on the management interface
 apply-groups          - Apply a configuration group at this level
 autonomous-system     - AS number advertised to peers for this router
 bfd                   + Enter the bfd context
 bgp                   + Enter the bgp context
 bier                  + Enter the bier context
 class-forwarding      - Allow class-based forwarding over IGP shortcuts
 confederation         + Enter the confederation context
 description           - Text description
 dhcp-server           + Enter the dhcp-server context
 dns                   + Enter the dns context
 ecmp                  - Maximum equal-cost routes for routing table instance
 
 <snip> 

In the following ? output, similar information is shown, with more details provided for configuring the router command, including the allowable string length and default value for the command.

[ex:configure]
A:admin@node-2# router ?
 
 router [[router-name] <string>]
 
 [[router-name] <string>]
 <string>  - <1..64 characters>
 Default   - "Base"
 
    The administrative name for this virtual router. The router name must be
    unique among all virtual routers in the system.
 
 aggregates            + Enter the aggregates context
 allow-icmp-redirect   - Allow ICMP redirects on the management interface
 allow-icmp6-redirect  - Allow IPv6 ICMP redirects on the management interface
 apply-groups          - Apply a configuration group at this level
 autonomous-system     - AS number advertised to peers for this router
 bfd                   + Enter the bfd context
 bgp                   + Enter the bgp context
 bier                  + Enter the bier context
 class-forwarding      - Allow class-based forwarding over IGP shortcuts
 confederation         + Enter the confederation context
 description           - Text description
 dhcp-server           + Enter the dhcp-server context
 dns                   + Enter the dns context
 ecmp                  - Maximum equal-cost routes for routing table instance
 
 <snip> 

3.4.1. Indicators in the Online Help

Table 2 describes the meaning of the indicators displayed in the online help.

Table 2:  Root Commands  

Symbol

Description

+

Indicates a container or list

-

Indicates a leaf, a leaf-list, a list or container with no leafs, or a global command (if in the operational root)

^

Indicates a mandatory element (an element that must be configured before the configuration is considered valid)

:

Indicates the first element of a group of choice elements that are mutually exclusive with other choice elements

In the following help display example, the containers are eth-cfm, domain, and association. The leafs are apply-groups, dns, format, level, mac, md-index, and name, while level is also a mandatory element.

[ex:configure]
A:admin@node-2# eth-cfm ?
 
 eth-cfm
 
 apply-groups          - Apply a configuration group at this level
 domain                + Enter the domain list instance
[ex:configure eth-cfm]
A:admin@node-2# domain ?
 
 [md-admin-name] <string>
 <string> - <1..64 characters>
 
    Unique domain name
[ex:configure eth-cfm]
A:admin@node-2# domain dom-name ?
 
 domain
 
 Immutable fields      - level, dns, mac, name, format, md-index
 
 apply-groups          - Apply a configuration group at this level
 association           + Enter the association list instance
 level                 ^ Maintenance Domain Level (MD Level)
 md-index              - The index of the Maintenance Domain (MD)
 
 Mandatory choice: md-name
 dns                  :- Domain name like text string derived from a DNS name
 format               :- Maintenance domain name not to be provided
 mac                  :- Maintenance domain MAC name
 name                 :- Maintenance domain name as an ASCII string

3.4.1.1. Descriptions and Format Guidelines for Leafs and Leaf-lists

When online help is entered for a leaf or leaf-list, a short description of the element is displayed after the element type. The valid input values for the element are also listed, as shown in the following examples.

The description string for the VPRN service can have a length of 1 to 80 characters:

*[ex:configure service vprn "5"]
A:admin@node-2# description ?
 
 description <string>
 <string> - <1..80 characters>
 
    Text description

The ? help for the autonomous-system parameter lists the valid number range, followed by a short description of the parameter:

*[ex:configure service vprn "5"]
A:admin@node-2# autonomous-system ?
 
 autonomous-system <number>
 <number> - <1..4294967295>
 
    AS number advertised to peers for this router

A parameter value may have a unit type associated with it, as shown in the following example of the ingress-buffer-allocation parameter:

*[ex:configure qos sap-ingress "sap-pname" policer 6]
A:admin@node-2# mbs ?
 
 mbs (<number> | <keyword>)
 <number>  - <0..16777216> - bytes
 <keyword> - auto          - bytes
 Default   - auto
 
    High priority for the violate threshold of PIR leaky bucket of this policer

This example shows a parameter that is a reference to another parameter. The owner command refers to the script policy name that is configured through the configure system script-control script-policy context. The name is a string of 1 to 32 characters.

*[ex:configure log event-handling handler "h-name" entry 5]
A:admin@node-2# script-policy owner ?
 
 owner <reference>
 <reference> - <1..32            - configure system script-control script-
                characters>         policy <owner>
 
    Name combined with value of owner to launch the script policy

3.4.1.2. Immutable Elements

An immutable element can only be configured in the transaction in which the parent element is created. It cannot be modified while the parent element exists. Any modification to an immutable element in model-driven interfaces causes SR OS to automatically delete the parent element and recreate it with the new value for the immutable element.

Immutable elements are identified in the online help, as seen in the following examples:

[ex:configure eth-cfm]
A:admin@node-2# domain dom-name ?
 
 domain
 
 Immutable fields      - level, dns, mac, name, format, md-index
 
 apply-groups          - Apply a configuration group at this level
 association           + Enter the association list instance
 level                 ^ Maintenance Domain Level (MD Level)
 md-index              - The index of the Maintenance Domain (MD)
 
 Mandatory choice: md-name
 dns                  :- Domain name like text string derived from a DNS name
 format               :- Maintenance domain name not to be provided
 mac                  :- Maintenance domain MAC name
 name                 :- Maintenance domain name as an ASCII string
[ex:configure eth-cfm]
A:admin@node-2# domain dom-name level ?
 
 level <number>
 <number>  - <0..7>
 
 'level' is: mandatory, immutable
 
    Maintenance Domain Level (MD Level)
 
    Warning: Modifying this element will cause the parent element
    'configure eth-cfm domain "dom-name"' to be recreated automatically for the
    new value to take effect.
<snip>
 
[ex:configure router "Base" isis 0]
A:admin@node-2# lsp-lifetime ?
 
 lsp-lifetime <number>
 <number> - <350..65535> - seconds
 Default  - 1200
 
    Amount of time during which an LSP is considered valid
 
    Note: Modifying this element requires
    'configure router "Base" isis 0 admin-state' to be toggled manually for the
    new value to take effect.

Immutable elements also exist in the classic CLI. They are parameters that are on the command line with the create keyword. For example, in the following classic CLI command, all the parameters shown on the command line are immutable. These parameters cannot be changed without deleting and recreating the service.

[]
A:admin@node-2# //
INFO: CLI #2051: Switching to the classic CLI engine
A:node-2# configure service ies
  - ies <service-id> [customer <customer-id>] [create] [vpn <vpn-id>] [name
    <name>]
  - no ies <service-id>

3.4.1.3. Mutually Exclusive Choice Elements

Elements that are part of a choice are listed in a separate section in the online help. Mandatory choices are listed first. Each choice contains a set of mutually exclusive elements or groups of elements. The first element of a group is indicated with a colon (:).

The following example shows a set of two mutually exclusive choice elements for an ingress queue rate. If configuring one of the choice elements, either the cir and fir values can be configured or the police value.

*[pr:configure qos sap-ingress "ing-1" queue 1 rate]
A:admin@node-2#?
 
 pir                   - Administrative PIR
 
 Choice: rate-cir-fir-or-police
 cir                  :- Specifies the administrative CIR.
 fir                   - Specifies the administrative FIR.
 police               :- Specifies that the out of profile traffic feeding into
                         the physical queue instance should be dropped

3.4.1.4. Optional Indicators in the Online Help

The following help display is an example of optional indicators.

The square brackets ([]) around slot-number indicate that the slot-number keyword is optional when entering the command.

[ex:configure]
A:admin@node-2# card ?
 
 [slot-number] <number>
 <number> - <1..20>
 
    IOM slot within a chassis

The card context can be entered as:

[ex:configure]
A:admin@node-2# card slot-number 5

or

[ex:configure]
A:admin@node-2# card 5

Angle brackets (<>) indicate a variable name and the pipe (|) indicates a choice. For the sub-group command, a number in the range of 1 to 8 can be entered, or one of the keywords auto-iom or auto-mda.

[ex:configure lag 8 port 1/1/1]
A:admin@node-2# sub-group ?
 
 sub-group (<number> | <keyword>)
 <number>  - <1..8>
 <keyword> - (auto-iom|auto-mda)
 Default   - 1
 
 'sub-group' is: immutable
 
    Subgroup of the port in the LAG
 
    Warning: Modifying this element will cause the parent element
    'configure lag 8 port 1/1/1' to be recreated automatically for the new
    value to take effect.

For an overall view of the configuration commands available in the MD-CLI, refer to the MD-CLI Command Reference Guide.

3.5. Operational Root and Global Commands

The commands in Table 3 are available at the operational root level of the MD-CLI hierarchy.

Table 3:  Operational Root Commands  

Command

Description

admin

Enter the administrative context for system operations

clear

Clear statistics or reset operational state

configure

Enter the configuration context

environment

Enter the environment configuration context

li

Enter the lawful intercept configuration context

show

Show operational information

tools

Enter the tools context for troubleshooting and debugging

The global commands in Table 4 are available from various levels of the MD-CLI hierarchy.

Table 4:  Global Commands  

Command

Description

back

Move back one or more levels

delete

Delete an element from the candidate datastore

edit-config

Enter a candidate configuration mode

enable

Enable administrative mode

exec

Execute commands from a file

exit

Return to the previous context or to the operational root

history

Show the most recently entered commands

logout

Exit the CLI session

oam

Perform OAM tests. See Using the oam Commands.

ping

Trigger ping of an IP address or DNS name. See Using the ping Command.

pwc

Show the present working context. See pwc under Navigating the MD-CLI Hierarchy Levels.

quit-config

Leave the candidate configuration mode

top

Move to the top level of the context

traceroute

Determine the route to a destination address. See Using the traceroute Command.

tree

Show the command tree under the present working context

Table 5 lists configuration commands that are available in configuration mode.

Table 5:  Configuration Commands  

Command

Description

commit

Commit changes to the running datastore

compare

Show changes between datastores

discard

Discard changes in the candidate datastore

info

Show the running configuration from the present working context

load

Load a configuration from a file

rollback

Rollback to a previous configuration

update

Update the candidate baseline

validate

Validate changes in the candidate datastore

3.5.1. Using the ping Command

Use the ping command in the MD-CLI to verify the reachability of a host. The syntax is as follows:

— ping [destination-address] {ip-address | string } [bypass-routing] [count number] [do-not-fragment] [fc keyword] [interface string] [interval {number | decimal-number}] [next-hop-address {ipv4-address | ipv6-address}] [output-format keyword] [pattern {keyword | number}] [router-instance string] [size number] [source-address {ipv4-address | ipv6-address}] [subscriber string] [timeout number] [tos number] [ttl number]

Example command output:

[]
A:admin@node-2# ping 10.251.72.68
PING 10.251.72.68 56 data bytes
64 bytes from 10.251.72.68: icmp_seq=1 ttl=64 time=1.79ms.
64 bytes from 10.251.72.68: icmp_seq=2 ttl=64 time=1.07ms.
64 bytes from 10.251.72.68: icmp_seq=3 ttl=64 time=1.19ms.
64 bytes from 10.251.72.68: icmp_seq=4 ttl=64 time=1.26ms.
64 bytes from 10.251.72.68: icmp_seq=5 ttl=64 time=1.16ms.
 
---- 10.251.72.68 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss 
round-trip min = 1.07ms, avg = 1.29ms, max = 1.79ms, stddev = 0.254ms
 
[]
A:admin@node-2# ping 10.251.72.68 output-format summary 
PING 10.251.72.68 56 data bytes !!!!!
---- 10.251.72.68 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss 
round-trip min = 0.842ms, avg = 1.02ms, max = 1.34ms, stddev = 0.172ms

Table 6 describes the parameters of the ping command.

Table 6:  Ping Parameters 

Ping Parameter

Description

[destination-address] {ip-address | string}

IP address or DNS name of the remote host to ping, where the IP address can be one of:

  1. ipv4-address-with-zone
  2. ipv4-address
  3. ipv6-address-linklocal-with-zone
  4. ipv6-address
  5. ipv6-address-with-zone

bypass-routing

Bypass the routing table when sending the ping request to a host on a directly-attached network; return an error if the host is not on a directly-attached network

count number

Number of ping requests to send to the remote host

do-not-fragment

Do not fragment the request frame, which is particularly useful in combination with the size parameter for maximum MTU determination (does not apply to ICMPv6)

fc keyword

Forwarding class options for the transmitted ICMP Echo Request packet:

  1. be
  2. l2
  3. af
  4. l1
  5. h2
  6. ef
  7. h1
  8. nc

interface string

Interface name

interval {number | decimal-number}

Time between consecutive ping requests

next-hop-address {ipv4-address | ipv6-address}

Disregard the routing table and send the packet to the specified next hop address, which must be on an adjacent router attached to a common subnet

output-format keyword

Keyword options are:

  1. summary
  2. detail - show extra information in error cases

pattern {keyword | number}

16-bit pattern string to include in the packet (expressed as a decimal integer) or a system-generated sequential pattern (using the keyword sequential)

router-instance string

Router name, CPM router instance, or service ID

size number

Size of request packets, including the ICMP header data (8 bytes) and the ICMP payload of the ICMP Echo Request packets

source-address {ipv4-address | ipv6-address}

Source IP address used in the ICMP Echo Request packets

subscriber string

Subscriber ID used when sending ICMP Echo Request packets

timeout number

Time to wait for reply packet. The timer is started when the last ICMP Echo Request is sent.

tos number

Type-of-Service (ToS) bits in the IP header of the ICMP Echo Request packets

ttl number

Time To Live (TTL) value included in the ICMP Echo Request packets

3.5.2. Using the traceroute Command

Use the traceroute command in the MD-CLI to display the route that packets take to a specified host.

— traceroute [destination-address] {ipv4-address | ipv6-address | string } [detail] [numeric] [router-instance string] [source-address [ipv4-address | ipv6-address] [tos number] [ttl number] [wait number]

Example command output:

[]
A:admin@node-2# traceroute 10.251.72.68
traceroute to 10.251.72.68, 30 hops max, 40 byte packets
  1  10.251.72.1 (10.251.72.1)    1.64 ms  1.71 ms  1.49 ms 
  2  10.251.72.68 (10.251.72.68)    1.21 ms  1.23 ms  1.12 ms 

Table 7 describes the parameters of the traceroute command.

Table 7:  Traceroute Parameters 

Traceroute Parameter

Description

[destination-address] {ip-address | string}

Destination IP address or DNS name, where the IP address can be one of:

  1. ipv4-address
  2. ipv6-address

detail

Display the MPLS label stack information (if available)

numeric

Avoid looking up DNS names when displaying results

router-instance string

Router name, CPM router instance, or service ID

source-address {ipv4-address | ipv6-address}

Source address of the probe packets; return an error If the IP address is not one of the device’s interfaces

tos number

ToS bits in the IP header of the probe packets

ttl number

TTL value included in the traceroute request

wait number

Time to wait for a response to a probe

3.5.3. Using the oam Commands

The following oam commands are available in the MD-CLI.

3.5.3.1. OAM EFM Commands

The following commands issue Ethernet in the First Mile (EFM) OAM loopback tests on the specified port.

— oam efm local-loopback {start | stop} port-id {ethernet-satellite-client-port | connector-port | port | pxc-sub-port}
— oam efm remote-loopback {start | stop} port-id {ethernet-satellite-client-port | connector-port | port | pxc-sub-port}

Table 8 describes the parameters of the available OAM EFM commands.

Table 8:  OAM EFM Parameters 

EFM Parameter

Description

local-loopback {start | stop} port-id {ethernet-satellite-client-port | connector-port | port | pxc-sub-port}

Start or stop the local loopback test on the specified port

remote-loopback {start | stop} port-id {ethernet-satellite-client-port | connector-port | port | pxc-sub-port}

Start or stop the remote loopback test on the specified port

3.5.3.2. OAM ETH-CFM Commands

The following command issues an Ethernet Connectivity Fault Management (ETH-CFM) test. The implementation supports a single ETH-TST PDU to check unidirectional reachability launched from a source Maintenance Association End Point (MEP) and terminated on the remote MEP with no response PDU toward the source.

— oam eth-cfm eth-test {mac-address | number} mep-id number md-admin-name reference ma-admin-name reference [data-length number] [priority number]

The following command issues a linktrace test.

— oam eth-cfm linktrace {mac-address | number} mep-id number md-admin-name reference ma-admin-name reference [ttl number]

The following command issues a loopback test.

— oam eth-cfm loopback {mac-address | multicast | number} mep-id number md-admin-name reference ma-admin-name reference [interval number] [lbm-padding number] [priority number] [send-count number] [size number] [timeout number]

The following command issues an Ethernet CFM one-way delay test.

— oam eth-cfm one-way-delay-test {mac-address | number} mep-id number md-admin-name reference ma-admin-name reference [priority number]

The following command issues an Ethernet CFM two-way delay test.

— oam eth-cfm two-way-delay-test {mac-address | number} mep-id number md-admin-name reference ma-admin-name reference [priority number]

The following command issues an Ethernet CFM two-way SLM test in SAA.

— oam eth-cfm two-way-slm-test {mac-address | number} mep-id number md-admin-name reference ma-admin-name reference [interval number] [priority number] [send-count number] [size number] [timeout number]

Table 9 describes the parameters of the available OAM ETH-CFM commands.

Table 9:  OAM ETH-CFM Parameters 

ETH-CFM Parameter

Description

mac-address | number

Unicast destination MAC address or the remote MEP ID of the peer within the association.

For an ETH-CFM loopback test, the MAC address can be a multicast MAC address.

multicast

Build the class 1 destination multicast address based on the level of the local MEP.

The last nibble of the multicast address must match the level of the local MEP or the command fails and the test is not instantiated.

mep-id number

Local MEP ID

md-admin-name reference

Referenced domain name

ma-admin-name reference

Referenced association name

data-length number

Size of the padding to be added to the frame

interval number

Time between probes within the test run

lbm-padding number

Size of the data portion of the data TLV which does not allow for an optional octet string.

MSDU is not processed with this option.

The lbm-padding and size options are mutually exclusive.

priority number

Priority of the frame, which can be manipulated by QoS policies

send-count number

Number of messages to send

size number

Size of the data portion of the data TLV allowing for an optional octet string to be specified.

The size and lbm-padding options are mutually exclusive.

timeout number

Time that the router waits for a message reply after sending a message request.

Upon expiration of the timeout, the router assumes that the message response is not received. Any response received after the timeout is silently discarded.

ttl number

Time to Live for a returned linktrace

3.5.3.3. OAM OAM-PM Commands

The following command issues an on-demand OAM Performance Monitoring (OAM-PM) test.

— oam oam-pm action {start | stop} session reference test-type {dm | dmm | lmm | slm | twamp-light}

Table 10 describes the parameters of the available OAM-PM commands.

Table 10:  OAM OAM-PM Parameters 

OAM-PM Parameter

Description

action {start | stop}

Start or stop an OAM-PM test

session reference

Referenced OAM-PM session name

test-type {dm | dmm | lmm | slm | twamp-light }

Test type

  1. dm - MPLS Delay Measurement test
  2. dmm - Ethernet Delay Measurement Message test
  3. lmm - Ethernet Loss Measurement Message test
  4. slm - Ethernet Synthetic Loss Measurement test
  5. twamp-light - Two-Way Active Measurement Protocol (TWAMP) Light test

3.6. Navigating the MD-CLI Hierarchy Levels

The following commands can be used to navigate the MD-CLI hierarchy (context) levels:

  1. pwc
    The pwc command shows the present working context with all keyword and variable parameters. The syntax is as follows:
    — pwc [[path-type] {model-path | xpath}] [previous]
    (ex)[]
    A:admin@node-2# configure
     
    (ex)[configure]
    A:admin@node-2# card 1
     
    (ex)[configure card 1]
    A:admin@node-2# mda 2
     
    *(ex)[configure card 1 mda 2]
    A:admin@node-2# network
     
    *(ex)[configure card 1 mda 2 network]
    A:admin@node-2# pwc
    Present Working Context:
      configure
      card 1
      mda 2
      network
    1. pwc previous
      The pwc previous command displays the previous working context.
      *(ex)[configure card 1 mda 2 network]
      A:admin@node-2# pwc previous
      Previous Working Context:
        configure
        card 1
        mda 2
    2. pwc path-type
      The path can be displayed in alternate formats. The model-path format is a YANG-modeled path format that can be used with RESTCONF-based management systems. The xpath format can be used with telemetry systems.
      *(ex)[configure card 1 mda 2 network]
      A:admin@node-2# pwc model-path
      Present Working Context:
      /nokia-conf:configure/card=1/mda=2/network
       
      *(ex)[configure card 1 mda 2 network]
      A:admin@node-2# pwc xpath
      Present Working Context:
      /configure/card[slot-number=1]/mda[mda-slot=2]/network
  2. back
    The back command can be used to go back one or more levels. If no parameter value is specified for the number of levels to go back, the default is one level. Using back at the top of the current command tree moves the context to the operational root level. If the number of levels specified is greater than the current depth, the context moves to the operational root. A closing brace (}) can also be used to go back one level.
    *(ex)[configure card 1 mda 2 network]
    A:admin@node-2# back
     
    *(ex)[configure card 1 mda 2]
    A:admin@node-2# back 2
     
    *(ex)[configure]
    A:admin@node-2# back 5
     
    *(ex)[]
    A:admin@node-2#
  3. top
    The top command moves the context to the top of the current command tree without exiting the mode. This command can be used instead of executing the back command a number of times to move to the top of the command tree.
    *(ex)[]
    A:admin@node-2# configure
     
    *(ex)[configure]
    A:admin@node-2# card 1
     
    *(ex)[configure card 1]
    A:admin@node-2# mda 2
     
    *(ex)[configure card 1 mda 2]
    A:admin@node-2# network
     
    *(ex)[configure card 1 mda 2 network]
    A:admin@node-2# top
     
    *(ex)[configure]
    A:admin@node-2#
  4. exit
    The exit command moves the context to the previous context in the current command tree. If the previous context was up one level, the exit command functions similarly to the back command. Using exit all moves the context to the operational root. A slash (/) can also be used instead of exit all. Using exit at the operational root has no effect. To log out of the system, the logout command must be used.
    *(ex)[]
    A:admin@node-2#
     
    *(ex)[]
    A:admin@node-2# configure card 1 mda 2
     
    *(ex)[configure card 1 mda 2]
    A:admin@node-2# atm
     
    *(ex)[configure card 1 mda 2 network]
    A:admin@node-2# exit all
     
    *(ex)[]
    A:admin@node-2# configure card 1 mda 2 network
     
    *(ex)[configure card 1 mda 2 network]
    A:admin@node-2# /
     
    *(ex)[]
    A:admin@node-2#

3.7. Using the tree Command

The tree command displays the command tree under the present working context, excluding the present working context element. Hierarchy is indicated with a pipe (|), and a “+-- “ separator precedes each element. The tree output is in alphabetical order of elements.

[ex:configure system security aaa remote-servers]
A:admin@node-2# tree
+-- apply-groups
+-- ldap
|   +-- admin-state
|   +-- apply-groups
|   +-- public-key-authentication
|   +-- server
|   |   +-- address
|   |   |   +-- apply-groups
|   |   |   +-- port
|   |   +-- admin-state
|   |   +-- apply-groups
|   |   +-- bind-authentication
|   |   |   +-- password
|   |   |   +-- root-dn
|   |   +-- search
|   |   |   +-- base-dn
|   |   +-- server-name
|   |   +-- tls-profile
|   +-- server-retry
|   +-- server-timeout
|   +-- use-default-template
+-- radius
|   +-- access-algorithm
|   +-- accounting
|   +-- accounting-port
|   +-- admin-state
|   +-- apply-groups
|   +-- authorization
|   +-- interactive-authentication
|   +-- port
|   +-- server
|   |   +-- address
|   |   +-- apply-groups
|   |   +-- secret
|   +-- server-retry
|   +-- server-timeout
|   +-- use-default-template
+-- tacplus
    +-- accounting
    |   +-- record-type
    +-- admin-control
    |   +-- tacplus-map-to-priv-lvl
    +-- admin-state
    +-- apply-groups
    +-- authorization
    |   +-- use-priv-lvl
    +-- interactive-authentication
    +-- priv-lvl-map
    |   +-- apply-groups
    |   +-- priv-lvl
    |       +-- apply-groups
    |       +-- user-profile-name
    +-- server
    |   +-- address
    |   +-- apply-groups
    |   +-- port
    |   +-- secret
    +-- server-timeout
    +-- use-default-template
[]
A:admin@node-2# tree
+-- admin
|   +-- clear
|   |   +-- security
|   |       +-- lockout
|   |       |   +-- all
|   |       |   +-- user
|   |       +-- password-history
|   |           +-- all
|   |           +-- user
|   +-- disconnect
|   |   +-- address
|   |   +-- session-id
|   |   +-- session-type
|   |   +-- username
|   +-- reboot
|   |   +-- now
|   +-- redundancy
|   |   +-- force-switchover
|   |       +-- now
|   +-- save
|   |   +-- li
|   |   +-- nat
|   |       +-- deterministic-script
|   +-- set
|   |   +-- time
|   +-- show
|   |   +-- configuration
|   |       +-- json
|   +-- support-mode
|   +-- system
|       +-- license
|       |   +-- activate
|       |   |   +-- now
|       |   +-- validate
|       +-- security
|       |   +-- hash-control
|       |       +-- custom-hash
|       |           +-- algorithm
|       |           +-- key
|       +-- telemetry
|           +-- grpc
|               +-- cancel
|                   +-- all
|                   +-- subscription-id
+-- back
 
+-- <snip>

3.7.1. Using the flat Option

The flat option displays the command hierarchy under the present working context on one line, excluding the present working context element.

[]
A:admin@node-2# tree flat
admin
admin clear
admin clear security
admin clear security lockout
admin clear security lockout all
admin clear security lockout user
admin clear security password-history
admin clear security password-history all
admin clear security password-history user
admin disconnect
admin disconnect address
admin disconnect session-id
admin disconnect session-type
admin disconnect username
admin reboot
admin reboot now
admin redundancy
admin redundancy force-switchover
admin redundancy force-switchover now
admin save
 
+-- <snip>

3.7.2. Using the detail Option

The detail option displays all key and field values in the output on every line.

[]
A:admin@node-2# tree detail
+-- admin
|   +-- clear
|   |   +-- security
|   |       +-- lockout
|   |       |   +-- all
|   |       |   +-- user <string>
|   |       +-- password-history
|   |           +-- all
|   |           +-- user <string>
|   +-- disconnect
|   |   +-- address <ipv4-address | ipv6-address>
|   |   +-- session-id <number>
|   |   +-- session-type <keyword>
|   |   +-- username <string>
|   +-- reboot
|   |   +-- <keyword>
|   |   +-- now
 
  <snip>

The flat and detail options can be combined in any order.

[]
A:admin@dut-b# tree flat detail
admin
admin clear
admin clear security
admin clear security lockout
admin clear security lockout all
admin clear security lockout user <string>
admin clear security password-history
admin clear security password-history all
admin clear security password-history user <string>
admin disconnect
admin disconnect address <ipv4-address | ipv6-address>
admin disconnect session-id <number>
admin disconnect session-type <keyword>
admin disconnect username <string>
admin reboot
admin reboot <keyword>
admin reboot now
admin redundancy
admin redundancy force-switchover
admin redundancy force-switchover now
 
<snip>

3.8. Using Control Characters and Editing Keystrokes on the Command Line

Table 11 lists the control characters and keystrokes available to execute and edit commands.

Table 11:  Control Characters  

Command

Description

/ (Slash)

Return to the operational root (equivalent to exit all) if used without parameters.

Navigate into context or set the value and remain in current context if used at the beginning of a line (equivalent to exit all, and then the command)

} (Closing Brace)

Go back one level

CTRL-z

Return to operational root. If using CTRL-z after a command, return to the operational root after executing the command (equivalent to pressing Enter after the command and exit all after the command has executed).

CTRL-c

Stop the current command

CTRL-d

Delete the current character

CTRL-w

Delete the word up to the cursor

CTRL-h

Delete the current character and move the cursor left

CTRL-u

Delete text up to the cursor and preserve the character under the cursor

CTRL-k

Delete the text after the cursor, without preserving the character under the cursor

CTRL-a (or Home)

Move to the beginning of the line

CTRL-e (or End)

Move to the end of the line

CTRL-p (or Up arrow)

Display prior command from history

CTRL-n (or Down arrow)

Display next command from history

CTRL-b (or Left arrow)

Move the cursor one space to the left

CTRL-f (or Right arrow)

Move the cursor one space to the right

ESC+b

Move back one word, or to the beginning of the current word if the cursor is not at the start of the word

CTRL-l

Clear the screen

3.9. Displaying Available Commands using Tab

Variables, keywords, global commands, and configuration commands and units are separated by a blank line in the output, in the following order:

  1. values or units (mutually exclusive)
  2. keywords
  3. global commands
  4. configuration commands
[ex:configure log]
A:admin@node-2# Press Tab
 
 accounting-policy        app-route-notifications  apply-groups
 event-damping            event-handling           event-trigger
 file                     filter                   log-events
 log-id                   route-preference         services-all-events
 snmp-trap-group          syslog                   throttle-rate
 
 back                     delete                   edit-config
 enable                   exec                     exit
 history                  logout                   oam
 ping                     pwc                      top
 traceroute               tree
 
 commit                   compare                  discard
 info                     update                   validate
[ex:configure log]
A:admin@node-2# Press Tab
 
 accounting-policy        app-route-notifications  event-damping
 event-handling           event-trigger            file
 filter                   log-events               log-id
 route-preference         services-all-events      snmp-trap-group
 syslog                   throttle-rate
 
 back                     delete                   edit-config
 exec                     exit                     history
 logout                   ping                     pwc
 top                      traceroute               tree
 
 commit                   compare                  discard
 info                     update                   validate
[ex:configure log]
A:admin@node-2# event-damping Press Tab
 
 <event-damping>
 false
 true
 
 accounting-policy        app-route-notifications  apply-groups
 event-handling           event-trigger            file
 filter                   log-events               log-id
 route-preference         services-all-events      snmp-trap-group
 syslog                   throttle-rate
 
 delete

The ? help displays similar information but does not always display global or configuration commands.

[ex:configure log]
A:admin@node-2# ?
 
 accounting-policy     + Enter the accounting-policy list instance
 app-route-            + Enter the app-route-notifications context
  notifications
 apply-groups          - Apply a configuration group at this level
 event-damping         - Allow event damping algorithm to suppress QoS or
                         filter change events
 event-handling        + Enter the event-handling context
 event-trigger         + Enter the event-trigger context
 file                  + Enter the file list instance
 filter                + Enter the filter list instance
 log-events            + Enter the log-events context
 log-id                + Enter the log-id list instance
 route-preference      + Enter the route-preference context
 services-all-events   + Enter the services-all-events context
 snmp-trap-group       + Enter the snmp-trap-group list instance
 syslog                + Enter the syslog list instance
 throttle-rate         + Enter the throttle-rate context
 
[ex:configure log]
A:admin@node-2# event-damping ?
 
 event-damping <boolean>
 <boolean>  - ([true]|false)
 Default    - true
 
    Allow event damping algorithm to suppress QoS or filter change events
 
 accounting-policy     + Enter the accounting-policy list instance
 app-route-            + Enter the app-route-notifications context
  notifications
 apply-groups          - Apply a configuration group at this level
 event-handling        + Enter the event-handling context
 event-trigger         + Enter the event-trigger context
 file                  + Enter the file list instance
 filter                + Enter the filter list instance
 log-events            + Enter the log-events context
 log-id                + Enter the log-id list instance
 route-preference      + Enter the route-preference context
 services-all-events   + Enter the services-all-events context
 snmp-trap-group       + Enter the snmp-trap-group list instance
 syslog                + Enter the syslog list instance
 throttle-rate         + Enter the throttle-rate context

3.9.1. Available Commands with Mutually Exclusive Commands

When a command that is part of a choice of commands is entered at the MD-CLI command prompt, the other mutually exclusive commands are no longer available to be entered on the same prompt line. Other commands that are not associated with the particular choice commands are still available.

In the following example, the cir and fir commands are mutually exclusive with the police command. If either the cir or fir command is entered, the police command is not available. The pir command is available regardless of which choice command is entered.

*[ex:configure qos sap-ingress "ing-1" queue 1 rate]
A:admin@node-2# ?
 
 pir                   - Administrative PIR
 
 Choice: rate-cir-fir-or-police
 cir                  :- Specifies the administrative CIR.
 fir                   - Specifies the administrative FIR.
 police               :- Specifies that the out of profile traffic feeding into
                         the physical queue instance should be dropped
 
*[ex:configure qos sap-ingress "ing-1" queue 1 rate]
A:admin@node-2# cir max Press Tab
 
 fir     pir
 
 delete

Similarly, if the police command is entered, the cir and fir commands are unavailable on the same command prompt line.

*[ex:configure qos sap-ingress "ing-1" queue 1 rate]
A:admin@node-2# police ?
 
 police - This element has no values
 
    Specifies that the out of profile traffic feeding into the physical queue
    instance should be dropped
 
 pir                   - Administrative PIR
 
*[ex:configure qos sap-ingress "ing-1" queue 1 rate]
A:admin@node-2# police Press Tab
 
 pir
 
 delete

3.10. Using Command Completion

The MD-CLI supports both command abbreviation and command completion. When typing a command, Tab, Spacebar, or Enter invokes auto-completion. If the text entered is enough to match a specific command, auto-completion completes the command. If the text entered is not sufficient to identify a specific command, pressing Tab or Spacebar displays options in alphabetical order matching the text entered.

The environment command-completion command controls what keystrokes can trigger command completion. Each keystroke is independently controlled with its own Boolean value.

(ex)[environment command-completion]
A:admin@node-2# info detail
    enter true
    space true
    tab true
Note:

If Spacebar completion has multiple matches and also matches an keyword, the space is considered a separator and auto-completion is not triggered.

  1. configure por+Spacebar displays auto-completion results
  2. configure port+Spacebar inserts a space and suppresses auto-completion results
  3. configure por+Tab displays auto-completion results
  4. configure port+Tab displays auto-completion results

3.10.1. Variable Parameter Completion

Variable parameter completion works only with the Tab key. All configured variables from the candidate and running configuration datastores are displayed. Line wrapping may occur for variables with long names. Parameters are displayed in alphabetical or numerical order. The variable parameter name is always displayed as the first line. In the following example, “interface-name” is the variable parameter name and “int-1” and “system” are configured names.

*(ex)[configure router "Base"]
A:admin@node-2# interface  Press Tab 
 
 <interface-name>
 "int-1"
 "system"
 
*(ex)[configure router "Base"]
A:admin@node-2# interface

3.10.1.1. Completion for Lists with a Default Keyword

Some list elements have a default keyword defined, such as the router command, where the default keyword is “Base”. When the command completion parameters (enter, space, and tab) are at their default settings (true), and the initial input matches an element in the list and a unique command keyword, the matching keyword is completed instead of the variable.

For example, the router command has a default keyword defined as “Base”. If router “bf” is created using the command configure router “bf” (with quotation marks”), and there is an existing bfd command context, the variable completion is as follows.

The following displays for router+Spacebar+Tab:

*[ex:configure]
A:admin@node-2# router  Press Tab
 
 <router-name>
 "Base"
 "bf"
 "management"
 
 aggregates             allow-icmp-redirect    allow-icmp6-redirect
 apply-groups           autonomous-system      bfd

The following displays for router bf+Tab:

*[ex:configure]
A:admin@node-2# router bf  Press Tab
 
 "bf"
 
 bfd

Entering router bf+Enter completes to router bfd and enters the router “Base” bfd context:

*[ex:configure]
A:admin@node-2# router bfd  Press Enter
 
*[ex:configure router "Base" bfd]
A:admin@node-2#

Similarly, router bf+Spacebar completes to router bfd and enters the router “Base” bfd context when Enter is pressed:

*[ex:configure]
A:admin@node-2# router bfd  Press Space  Press Enter
 
*[ex:configure router "Base" bfd]
A:admin@node-2#

To enter the context for router “bf”, use quotation marks to specify the variable:

[ex:configure]
A:admin@node-2# router "bf"
 
*[ex:configure router "bf"]
A:admin@node-2#

If the command completion for enter is set to false, then router bf+Enter allows the match to router “bf”. Similarly, when the command completion for space is false, router bf+Spacebar also matches to router “bf” instead of the bfd context

*(ex)[environment command-completion]
A:admin@node-2# info detail
    enter true
    space true
    tab true
 
*(ex)[environment command-completion]
A:admin@node-2# enter false
 
*(ex)[environment command-completion]
A:admin@node-2# space false
 
*(ex)[environment command-completion]
A:admin@node-2#
 
*(ex)[]
A:admin@node-2# configure
 
*(ex)[configure]
A:admin@node-2# router bf  Press Enter 
 
*(ex)[configure router "bf"]
A:admin@node-2# back
 
*(ex)[configure]
A:admin@node-2# router bf  Press Spacebar+Enter 
 
*(ex)[configure router "bf"]
A:admin@node-2#

3.10.1.2. Completion for Keyword-based Leaf-lists

For keyword-based leaf-lists, command completion displays all possible values, not only those that are configured. When deleting values in a leaf-list, only the values that are currently configured are displayed. In the following example, when defining the forwarding traffic classes, all keyword values are listed. When deleting the forwarding traffic classes, only the configured classes are displayed.

*[ex:configure policy-options policy-statement "ss" entry 3 from]
A:admin@node-2# family ?
 
 family <value>
 family [<value>...] - 1..20 system-ordered values separated by spaces enclosed
                        by brackets
 <value> - <keyword>
<keyword> - (ipv4|vpn-ipv4|ipv6|mcast-ipv4|vpn-ipv6|l2-vpn|mvpn-ipv4|mdt-
              safi|ms-pw|route-target|mcast-vpn-ipv4|mvpn-ipv6|evpn|mcast-
              ipv6|label-ipv4|label-ipv6|bgp-ls|mcast-vpn-ipv6)
 
    Match address families to this condition
 
*[ex:configure policy-options policy-statement "ss" entry 3 from]
A:admin@node-2# family [ipv4 mcast-ipv4 mcast-vpn-ipv4 label-ipv4]
 
*[ex:configure policy-options policy-statement "ss" entry 3 from]
A:admin@node-2# info
    family [ipv4 mcast-ipv4 mcast-vpn-ipv4 label-ipv4]
 
*[ex:configure policy-options policy-statement "ss" entry 3 from]
A:admin@node-2# delete family Press Tab
 
 <family>
 ipv4
 mcast-ipv4
 mcast-vpn-ipv4
 label-ipv4
 *

3.10.1.3. Completion for Boolean Elements

The explicit use of the keyword true for a Boolean element is optional. If neither true or false is entered, the keyword true is assumed.

(ex)[environment]
A:admin@node-2# more ?
 
 more <boolean>
 <boolean>  - ([true]|false)
 Default    - true
 
    Prompt to continue or stop when output text fills page

When Tab is used for command completion with Boolean elements, the values of false and true are displayed, along with the names of possible elements that can follow. In the following example of the environment more command, the commands command-completion, console, message-severity-level, and so on, can be defined following the more command.

(ex)[environment]
A:admin@node-2# more Press Tab
 
 <more>
 false
 true
 
 command-completion      console                 message-severity-level
 progress-indicator      prompt                  time-display
 time-format
 
 delete

3.11. Modifying the Idle Timeout Value for CLI Sessions

A single idle timeout applies to all CLI engines in a CLI session (classic and MD-CLI). The idle timeout can be modified to a value between 1 and 1440 minutes.

The following points apply.

  1. The idle timeout only affects new CLI sessions. Existing and current sessions retain the previous idle timeout.
  2. The idle timeout can be disabled by setting the value to none.
  3. The “Idle time” column in the show users display is reset after an action in either CLI engine.
    []
    A:admin@node-2# show users
    ===============================================================================
    User                             Type      Login time           Idle time
      Session ID   From
    ===============================================================================
                                     Console         --             6d 19:38:00 --
      6            --
    admin                            SSHv2     11OCT2018 14:35:19   0d 00:00:00 --
     #23           192.168.144.87
    admin                            SSHv2     11OCT2018 14:35:55   0d 00:07:46 --
      24           192.168.144.87
    -------------------------------------------------------------------------------
    Number of users: 2
    '#' indicates the current active session
    ===============================================================================

A warning message is displayed when a session reaches one-half the value of the idle timeout, and another message is displayed when the idle timeout expires.

3.11.1. Idle Timeout Interaction with the Classic CLI

The idle timeout configured in the classic CLI affects all new sessions as well as the current session. However, the current session is only affected if the classic CLI engine is active when the idle timeout expires. Configuration changes via the MD-CLI or any other interface, including SNMP, only affect new sessions that begin after the change.

3.12. Using Output Modifiers in the MD-CLI

Output modifiers provide support for post-processing of CLI output. Output modifiers are specified using a pipe (|) character. The following points apply when using output modifiers.

  1. Output modifiers can be appended to any CLI command in any command context.
  2. Output modifiers work across soft line breaks (visual lines) that are wrapped due to the terminal width; for example, using match or count. They do not work across hard line breaks (logical lines).
  3. Modifiers can be combined in any order. No hard limit exists for the number of combinations. Output is processed linearly and there is little impact on the system performance except to the operator session that entered the modifier combination.

3.12.1. Using | match Options

The following options are supported for use with the pipe (|) match command:

  1. ignore-case — specifies to ignore case in pattern match
  2. invert-match — specifies to invert the pattern match selection
  3. max-count — specifies the maximum number of displayed matches
  4. post-lines — specifies the number of lines to display following the matched line
  5. pre-lines — specifies the number of lines to display preceding the matched line

The following example matches on the pattern autonomous-system in the tree detail under the configure router “Base” context, and starts the display with seven lines preceding the pattern match.

(ex)[configure router "Base"]
A:admin@node-2# tree detail | match autonomous-system pre-lines 7
|   |   +-- indirect <unicast-ipv4-address | global-unicast-ipv6-address>
|   |   +-- local-preference <number>
|   |   +-- summary-only <boolean>
|   +-- apply-groups <reference>
+-- allow-icmp-redirect <boolean>
+-- allow-icmp6-redirect <boolean>
+-- apply-groups <reference>
+-- autonomous-system <number>
 
(ex)[configure router "Base"]
A:admin@node-2#

3.12.1.1. Using Regular Expressions with | match

Regular expressions (REs) used by the MD-CLI engine are delimited by apostrophes (‘); for example, ‘.*’. REs cannot be delimited by double quotation marks (“); for example, “.*”.

MD-CLI REs are based on a subset of The Open Group Base Specifications Issue 7 and IEEE Std 1003.1-2008, 2016 Edition REs, as defined in chapter 9. MD-CLI REs only support Extended Regular Expression (ERE) notation as defined in section 9.4. Basic Regular Expression (BRE) notation as defined in section 9.3 is not supported.

In ERE notation, a backslash (\) before a special character is treated as a literal character. Backslashes are not supported before ( ) or { }, as they are in BREs to indicate a bracket expression or marked expression.

Table 12 describes the special characters that are supported in EREs.

Table 12:  Special Characters in Extended Regular Expressions 

Special character

Description

.

Matches any single character

*

Matches the preceding expression zero or more times

?

Matches the preceding expression zero or one time

+

Matches the preceding expression one or more times

[ ]

Matches a single character within the brackets

[^]

Matches a single character not within the brackets

^

Matches the starting position

$

Matches the ending position

( )

Defines a marked subexpression

{m,n}

Matches the preceding expression at least m and not more than n times

{m}

Matches the preceding expression exactly m times

{m, }

Matches the preceding expression at least m times

{ ,n}

Matches the preceding expression not more than n times

|

Matches either expression preceding or following the |

\

Treats the following character as a match criterion

-

Separates the start and end of a range

The following examples show the use of a bracket expression as a matching list expression.

The first output does not use any match expressions and therefore shows the entire output.

*(gl)[]
A:admin@node-2# show port
 
===============================================================================
Ports on Slot 1
===============================================================================
Port          Admin Link Port    Cfg  Oper LAG/ Port Port Port   C/QS/S/XFP/
Id            State      State   MTU  MTU  Bndl Mode Encp Type   MDIMDX
-------------------------------------------------------------------------------
1/1/1         Down  No   Ghost   8704 8704    - netw null xcme
1/1/2         Up    No   Ghost   1514 1514    - accs null xcme
1/1/3         Up    No   Ghost   1514 1514    - accs null xcme
1/1/4         Up    No   Ghost   1514 1514    - accs null xcme
1/1/5         Up    No   Ghost   1514 1514    - accs null xcme
1/1/6         Down  No   Ghost   8704 8704    - netw null xcme
1/1/7         Down  No   Ghost   8704 8704    - netw null xcme
1/1/8         Down  No   Ghost   8704 8704    - netw null xcme
1/1/9         Down  No   Ghost   8704 8704    - netw null xcme
1/1/10        Down  No   Ghost   8704 8704    - netw null xcme
1/1/11        Down  No   Ghost   8704 8704    - netw null xcme
1/1/12        Down  No   Ghost   8704 8704    - netw null xcme
1/2/1         Up    No   Ghost   8704 8704    - netw null xcme
1/2/2         Up    No   Ghost   1514 1514    - accs null xcme
1/2/3         Up    No   Ghost   1514 1514    - accs null xcme
1/2/4         Down  No   Ghost   8704 8704    - netw null xcme
Press Q to quit, Enter to print next line or any other key to print next page.

In this matching list expression, a match is any single character in the bracket expression, which in this case is 1, 3, or 5.

*(gl)[]
A:admin@node-2# show port | match '1/1/[135]'
1/1/1         Down  No   Ghost   8704 8704    - netw null xcme
1/1/3         Up    No   Ghost   1514 1514    - accs null xcme
1/1/5         Up    No   Ghost   1514 1514    - accs null xcme
1/1/10        Down  No   Ghost   8704 8704    - netw null xcme
1/1/11        Down  No   Ghost   8704 8704    - netw null xcme
1/1/12        Down  No   Ghost   8704 8704    - netw null xcme

In this non-matching list expression, a match is any single character not in the bracket expression, that is, not 1, 2, or 4.

*(gl)[]
A:admin@node-2# show port | match '1/1/[^124]'
1/1/3         Up    No   Ghost   1514 1514    - accs null xcme
1/1/5         Up    No   Ghost   1514 1514    - accs null xcme
1/1/6         Down  No   Ghost   8704 8704    - netw null xcme
1/1/7         Down  No   Ghost   8704 8704    - netw null xcme
1/1/8         Down  No   Ghost   8704 8704    - netw null xcme
1/1/9         Down  No   Ghost   8704 8704    - netw null xcme

The range operator (-) can be used in a matching or non-matching list expression.

*(ro)[]
A:admin@node-2# show port | match '1/1/[3-7]'
1/1/3         Up    No   Ghost   1514 1514    - accs null xcme
1/1/4         Up    No   Ghost   1514 1514    - accs null xcme
1/1/5         Up    No   Ghost   1514 1514    - accs null xcme
1/1/6         Down  No   Ghost   8704 8704    - netw null xcme
1/1/7         Down  No   Ghost   8704 8704    - netw null xcme
*(ro)[]
A:admin@node-2# show port | match '1/1/[^3-7]'
1/1/1         Down  No   Ghost   8704 8704    - netw null xcme
1/1/2         Up    No   Ghost   1514 1514    - accs null xcme
1/1/8         Down  No   Ghost   8704 8704    - netw null xcme
1/1/9         Down  No   Ghost   8704 8704    - netw null xcme
1/1/10        Down  No   Ghost   8704 8704    - netw null xcme
1/1/11        Down  No   Ghost   8704 8704    - netw null xcme
1/1/12        Down  No   Ghost   8704 8704    - netw null xcme

The alternation operator (|) can be used with or without a bracket expression to match against two or more alternative expressions.

*(ro)[]
A:admin@node-2# show port | match '1/1/[2-5|7-9]'
1/1/2         Up    No   Ghost   1514 1514    - accs null xcme
1/1/3         Up    No   Ghost   1514 1514    - accs null xcme
1/1/4         Up    No   Ghost   1514 1514    - accs null xcme
1/1/5         Up    No   Ghost   1514 1514    - accs null xcme
1/1/7         Down  No   Ghost   8704 8704    - netw null xcme
1/1/8         Down  No   Ghost   8704 8704    - netw null xcme
1/1/9         Down  No   Ghost   8704 8704    - netw null xcme

Without a bracket expression, an exact match is attempted against two or more alternative expressions.

*[ex:configure card 1]
A:admin@node-2# info | match '10g|100g'
        mda-type imm4-10gb-xp-xfp
        mda-type cx2-100g-cfp

MD-CLI REs match on the output format of an element, as shown in the configuration. For example, if the value of an element is shown in hexadecimal in info output, a decimal RE will not match the value. In the following example, the Ethertype is entered in decimal format, but is displayed in hexadecimal. Matching on the decimal format does not find a match.

*[ex:configure filter mac-filter "fn" entry 1 match]
A:admin@node-2# etype ?
 
 etype <number>
 <number> - <0x600..0xffff>
 
    Ethernet type
 
*[ex:configure filter mac-filter "fn" entry 1 match]
A:admin@node-2# etype 65535
 
*[ex:configure filter mac-filter "fn" entry 1 match]
A:admin@node-2# info
    etype 0xffff
 
*[ex:configure filter mac-filter "fn" entry 1 match]
A:admin@node-2# top
 
*[ex:configure]
A:admin@node-2# info | match 65535
 
*[ex:configure]
A:admin@node-2# info | match 0xffff
                    etype 0xffff
 
*[ex:configure]
A:admin@node-2#

MD-CLI REs are not implicitly anchored. The ^ or $ anchoring special characters can be used, as in the following example.

*(ex)[configure router "Base" bgp]
A:admin@node-2# info
    group "external" {
    }
    group "internal" {
    }
    neighbor 192.168.10.1 {
        group "external"
        keepalive 30
        peer-as 100
    }
    neighbor 192.168.10.2 {
        group "external"
        peer-as 100
        family {
            ipv4 true
        }
    }

This example uses the ^ anchor character to match on “group” preceded by four spaces at the beginning of the line.

*(ex)[configure router "Base" bgp]
A:admin@node-2# info | match '^    group' pre-lines 1
    group "external" {
    }
    group "internal" {

This example uses the ^ anchor character to match on “group” preceded by eight spaces at the beginning of the line.

*(ex)[configure router "Base" bgp]
A:admin@node-2# info | match '^        group' pre-lines 1
    neighbor 192.168.10.1 {
        group "external"
    neighbor 192.168.10.2 {
        group "external"
*(ex)[configure router "Base" bgp]
A:admin@node-2#

In the following configuration example using the compare command, the | match option filters out those commands to be deleted (configuration statements beginning with the minus sign (-)) and those to be added (configuration statements beginning with the plus sign (+)).

*(gl)[configure log accounting-policy 5]
A:admin@node-2# /compare
+   admin-state enable
-   collection-interval 105
+   collection-interval 75
-   include-system-info true
+   include-system-info false
 
*(gl)[configure log accounting-policy 5]
A:admin@node-2# /compare | match '^-'
-   collection-interval 105
-   include-system-info true

The backslash (\) is used to match the literal “+” character that denotes additions to the configuration seen in the compare command.

*(gl)[configure log accounting-policy 5]
A:admin@node-2# /compare | match '^\+'
+   admin-state enable
+   collection-interval 75
+   include-system-info false

A character class expression is expressed as a character class name enclosed within bracket colon (“[:” and “:]”) delimiters. Table 13 defines the character class expressions.

Table 13:  Character Class Expressions  

Character Class

Characters matched (delimited by ‘single quotation marks’)

Description

[:alnum:]

‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789’

Alphanumeric characters

[:alpha:]

‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz’

Alphabetic characters

[:blank:]

‘ \t’

Space and Tab

[:cntrl:]

‘\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20 \21\22\23\24\25\26\27\30 \31\32\33\34\35\36\37\177’

Control characters

[:digit:]

‘0123456789’

Digits

[:graph:]

‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~’

Visible characters

[:lower:]

‘abcdefghijklmnopqrstuvwxyz’

Lowercase letters

[:print:]

‘ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ’

Visible characters and the Space character

[:punct:]

‘!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~’

Punctuation characters

[:space:]

‘\t\n\v\f\r ‘

Whitespace (blank) characters

[:upper:]

‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’

Uppercase letters

[:xdigit:]

‘0123456789ABCDEFabcdef’

Hexadecimal digits

Character class expressions must be enclosed within brackets. The expression ‘[[:digit:]]’ is treated as an RE containing the character class “digit”, while ‘[:digit:]’ is treated as an RE matching “:”, “d”, “i”, “g”, or “t”.

Collating symbols and equivalence classes are not supported in MD-CLI REs.

3.12.2. Using the | count Option

The | count option displays the line count of the output.

[ex:configure router "Base"]
A:admin@node-2# tree flat detail | match seamless-bfd
bfd seamless-bfd
bfd seamless-bfd peer <unicast-ipv4-address | global-unicast-ipv6-address>
bfd seamless-bfd peer <unicast-ipv4-address | global-unicast-ipv6-address> apply-groups <reference>
bfd seamless-bfd peer <unicast-ipv4-address | global-unicast-ipv6-address> discriminator <number>
 
[ex:configure router "Base"]
A:admin@node-2# tree flat detail | match seamless-bfd | count
Count: 4 lines
Note:

Error messages are not processed by output modifiers. They are always displayed and are not affected by the count or match modifiers.

3.12.3. Using the | no-more Option

The | no-more option displays the output with pagination disabled. This option is similar to the environment more false setting, where the entire output text is printed without page interruptions.

3.12.4. Using the File Redirect Option

The > option can be used to redirect output to a local or remote file. The > redirect must be specified at the end of a command and cannot be combined with other redirects.

*(ex)[configure router "Base"]
A:admin@node-2# info detail | match leak-export > ?
 
 [url] <string>
 <string> - <1..255 characters>
 
 The location where the output should be saved.
 

3.13. Navigating Contexts in the MD-CLI

3.13.1. Entering Contexts

Configuring a container navigates into the context. In the following example, the first container is router, and the next is aggregates. All containers are marked with a “+”.

[ex:configure]
A:admin@node-2# router
 
[ex:configure router "Base"]
A:admin@node-2# ?
 
 admin-state           - Administrative state of the router instance
 aggregates            + Enter the aggregates context
 allow-icmp-redirect   - Allow ICMP redirects on the management interface
 allow-icmp6-redirect  - Allow IPv6 ICMP redirects on the management interface
 apply-groups          - Apply a configuration group at this level
 autonomous-system     - AS number advertised to peers for this router
 bfd                   + Enter the bfd context
 bgp                   + Enter the bgp context
 bier                  + Enter the bier context
 class-forwarding      - Allow class-based forwarding over IGP shortcuts
...
(pr)[configure router "Base"]
A:admin@node-2# aggregates
 
(pr)[configure router "Base" aggregates]
A:admin@node-2#

Alternatively, the same context can be entered on one line:

(pr)[]
A:admin@node-2# configure router aggregates
 
(pr)[configure router "Base" aggregates]
A:admin@node-2#

Configuring a leaf element maintains the present working context if there is no explicit opening brace. Entering an explicit opening brace navigates into the specified context.

*[ex:configure card 1 mda 2]
A:admin@node-2# atm mode ?
 
 mode <keyword>
 <keyword> - (max8k-vc|max16k-vc)
 
    Mode of operation
 
*[ex:configure card 1 mda 2]
A:admin@node-2# atm mode max8k-vc
 
*[ex:configure card 1 mda 2]
A:admin@node-2# atm { mode max8k-vc
 
*[ex:configure card 1 mda 2 atm]
A:admin@node-2#

Configuring a container navigates into the context.

[ex:configure router "Base"]
A:admin@node-2# ?
 
 admin-state          - Administrative state of the router instance
 aggregates           + Enter the aggregates context
 allow-icmp-redirect  - Allow ICMP redirects on the management interface
 allow-icmp6-redirect - Allow IPv6 ICMP redirects on the management interface
 apply-groups         - Apply a configuration group at this level
 autonomous-system    - AS number advertised to peers for this router
 bfd                  + Enter the bfd context
 bgp                  + Enter the bgp context
 ...
 
[ex:configure router "Base"]
A:admin@node-2# bgp
 
[ex:configure router "Base" bgp]
A:admin@node-2# ?
 
 add-paths            + Enter the add-paths context
 admin-state          - Administrative state of the BGP instance
 advertise-external   + Enter the advertise-external context
 advertise-inactive   - Advertise an inactive BGP route to peers
...
 
[ex:configure router "Base" bgp]
A:admin@node-2# add-paths
 
[ex:configure router "Base" bgp add-paths]
A:admin@node-2#

Configuring an empty container or a list where the only children are keys does not navigate into the context. These elements are displayed with aggregated braces with a space ({ }) on the same line. It is possible to enter the element name with an opening brace; however, no options are available in this context.

For example, configuring the list element sdp-include with a key of “ref_group_name” does not change the existing context.

*(ex)[configure service pw-template "tt"]
A:admin@node-2# sdp-include ref_group_name
 
*(ex)[configure service pw-template "tt"]
A:admin@node-2# info
    sdp-include "ref_group_name" { }
 
*(ex)[configure service pw-template "tt"]
A:admin@node-2#

3.13.2. Exiting Contexts

The back and top commands are used to navigate contexts, but it is also possible to use closing braces (}) to navigate.

The behavior of an explicit closing brace depends on the contents of the current command line. If the command line contains an explicit opening brace, the closing brace exits to the parent context of the opening brace.

In the following example with an opening brace on the command line, the closing brace exits VPRN 1, and then enters the context of VPRN 2.

(ex)[]
A:admin@node-2# configure service vprn 1 { interface "intf1" description "vprn-if" } vprn 2
 
*(ex)[configure service vprn "2"]
A:admin@node-2#

In the following example without an opening brace on the command line, the first closing brace exits interface “int1”, and the second closing brace exits VPRN 1 and enters the VPRN 2 context.

*(ex)[configure service]
A:admin@node-2# vprn 1 interface "int1" description vprn-if } } vprn 2
 
*(ex)[configure service vprn "2"]
A:admin@node-2#

3.14. Executing Commands with a File

The exec command executes commands from a file as if the user typed or pasted the input into the MD-CLI without command completion. The syntax can be seen as follows:

[ex:configure]
A:admin@node-2# exec
 
 [url] <string>
 <string>  - <0..255 characters>
 
    Location of the file to be executed
 
[ex:configure]
A:admin@node-2# exec my-url-fn
 
 exec
 
 echo                  - Display the commands as they are being executed

The exec command:

  1. errors if it detects an interactive input
  2. terminates in the CLI engine in which it completes execution as follows:
    1. if there are no commands that switch CLI engines, the CLI engine is always the one in which exec started
    2. if there are commands that switch CLI engines, exec ends in the last CLI engine that was entered
    3. //exec returns to the engine in which it was started
  3. terminates execution and displays an error message if an error occurs, leaving the session in the same context as when the error occurred

The system executes the file as follows:

  1. disables pagination while the command is running
  2. disables command completion while the command is running
  3. suppresses the commands in the file from the command history

3.14.1. Using Commands that Switch Engines in an Executable File

When using commands that switch between CLI engines within an executable file, the following commands are recommended:

  1. use /!classic-cli to switch explicitly to the classic CLI engine and /!md-cli to switch explicitly to the MD-CLI engine, instead of // to toggle between engines
  2. use exit all to get to a known starting point: the operational root of the classic CLI or the MD-CLI engine
  3. include edit-config if the script needs to change the candidate configuration in the MD-CLI engine. Use quit-config after changes are committed in the script.
    Note:

    1. An executable with edit-config may fail if other users have locked the configuration.
    2. Issuing the quit-config command with changes in the candidate configuration while the session is in exclusive configuration mode fails the executable because of the “discard changes” prompt.

3.15. Displaying Information in the MD-CLI

3.15.1. Using the info Command

The info command shows the configuration for the present context. The command can only be executed while in a configuration mode. By default, all configured parameters in the candidate configuration datastore are displayed.

[ex:configure]
A:admin@node-2# info ?
 
 info [[from] <keyword>]
 
 [[from] <keyword>]
 <keyword>  - (candidate|running|baseline)
 
    Source datastore
 
 converted             - Include converted third party model configuration from
                         the running datastore
 detail                - Include default and unconfigured values
 inheritance           - Include configuration inherited from configuration
                         groups
 units                 - Include unit types for applicable elements
 
 Choice: format-choice
 flat                 :- Show the hierarchy on each line
 full-context         :- Show full hierarchy on each line
 json                 :- Show the output in indented JSON format

Table 14 describes the info command options.

Table 14:  Info Command Options  

Option

Description

[from] (candidate | running | baseline)

Specify the source datastore (default is from candidate).

This option is not supported for state elements.

converted

Include converted configuration values from third party models.

This option should only be used in the configure region when third party models are used. The output with this option is the same as info when used in other configuration regions.

This option is not supported for state elements.

detail

Include default and unconfigured values

inheritance

Include configuration inherited from configuration groups.

This option should only be used in the configure region. The output with this option is the same as info when used in other configuration regions.

This option is not supported for state elements.

units

Include unit types for applicable elements

flat

Show the hierarchy on each line starting from the present working context

full-context

Show the full hierarchy on each line

json

Show the output in indented JSON format

Note:

As indicated in the choice statement, the flat, full-context, and json options are mutually exclusive. Other unsupported combinations include:

  1. inheritance and converted
  2. inheritance and detail
  3. units and json

The order of the configuration output is as follows:

  1. keys are displayed on the same line as the command element
  2. apply-groups is displayed, if applicable
  3. admin-state is displayed, if applicable
  4. description is displayed, if applicable
  5. other top-level elements are displayed in alphabetical order

The following displays configured information for configure router bgp

*[ex:configure router "Base" bgp]
A:admin@node-2# info
    connect-retry 90
    local-preference 250
    add-paths {
        ipv4 {
            receive true
        }
    }

The following output displays the same information in JSON format:

*[ex:configure router "Base" bgp]
A:admin@node-2# info json
{
    "connect-retry": 90,
    "local-preference": 250,
    "nokia-conf:add-paths": {
        "ipv4": {
            "receive": true
        }
    }
}

The configuration output can display all elements that are configured, even if an element is set to the system default state or value.

The detail option displays all data for the context, including default configurations.

The double hash (##) indicates an unconfigured element or a dynamic default.

*[ex:configure router "Base" bgp]
A:admin@node-2# info detail
 ## apply-groups
    admin-state enable
 ## description
    connect-retry 90
    keepalive 30
    damping false
    local-preference 250
    loop-detect ignore-loop
    loop-detect-threshold 0
    selective-label-ipv4-install false
    min-route-advertisement 30
    aggregator-id-zero false
    preference 170
    block-prefix-sid false
 ## multihop
 ## med-out
 ## authentication-key
    client-reflect true
    vpn-apply-export false
    vpn-apply-import false
    asn-4-byte true

When using the info command with both detail and json options, the output does not include unconfigured elements. Unconfigured elements in the MD-CLI are denoted with ##, and there is no standard method of supplying comments within the JSON format.

*[ex:configure router "Base" bgp]
A:admin@node-2# info detail json
{
    "admin-state": "enable",
    "connect-retry": 90,
    "keepalive": 30,
    "damping": false,
    "local-preference": 250,
    "loop-detect": "ignore-loop",
    "loop-detect-threshold": 0,
    "selective-label-ipv4-install": false,
    "min-route-advertisement": 30,
    "aggregator-id-zero": false,
    "preference": 170,
    "block-prefix-sid": false,
    "client-reflect": true,
    "vpn-apply-export": false,
    "vpn-apply-import": false,
    "asn-4-byte": true,
 
   <snip>

The flat option displays the context of every element in the present working context on a single line. Braces ensure that the context stays in the present working context for copy and paste purposes.

*[ex:configure router "Base" bgp]
A:admin@node-2# info flat detail
 ## apply-groups
    admin-state enable
 ## description
    connect-retry 90
    keepalive 30
    damping false
    local-preference 250
...
 ## route-target-list
 ## outbound-route-filtering
 ## monitor
    rib-management { }
    rib-management { ipv4 }
    rib-management { ipv4 route-table-import }
 ## rib-management ipv4 route-table-import apply-groups
 ## rib-management ipv4 route-table-import policy-name
...
    rib-management { label-ipv4 }
    rib-management { label-ipv4 route-table-import }
 ## rib-management label-ipv4 route-table-import apply-groups
 ## rib-management label-ipv4 route-table-import policy-name
...
 ## segment-routing apply-groups
    segment-routing admin-state disable
 ## segment-routing prefix-sid-range
 ## group
 ## neighbor

The full-context option displays the full context of every element from the present working context on a single line.

*[ex:configure router "Base" bgp]
A:admin@node-2#  info full-context
    /configure router "Base" bgp connect-retry 90
    /configure router "Base" bgp local-preference 250
    /configure router "Base" bgp add-paths { }
    /configure router "Base" bgp add-paths ipv4 receive true
 
*[ex:configure router "Base" bgp]
A:admin@node-2# info full-context detail
 ## /configure router "Base" bgp apply-groups
    /configure router "Base" bgp admin-state enable
 ## /configure router "Base" bgp description
    /configure router "Base" bgp connect-retry 90
    /configure router "Base" bgp keepalive 30
    /configure router "Base" bgp damping false
    /configure router "Base" bgp local-preference 250
    /configure router "Base" bgp loop-detect ignore-loop
    /configure router "Base" bgp loop-detect-threshold 0
    /configure router "Base" bgp selective-label-ipv4-install false
    /configure router "Base" bgp min-route-advertisement 30
    /configure router "Base" bgp aggregator-id-zero false
    /configure router "Base" bgp preference 170
    /configure router "Base" bgp block-prefix-sid false
 ## /configure router "Base" bgp multihop
 ## /configure router "Base" bgp med-out
 ## /configure router "Base" bgp authentication-key
    /configure router "Base" bgp client-reflect true

3.15.1.1. Displaying Lists

The info command always displays all keys of the list on the same line. The first key of a list is unnamed in the MD-CLI, however, there are exceptions where the key is named and must be entered. (Refer to the online help for the correct syntax of the command, or the MD-CLI Command Reference Guide.) All other keys are named. For example, the collector list has two keys, ip-address and port. The name of the first key, ip-address, does not appear in the info display. The name of the second key and any subsequent keys are always displayed.

*(ex)[configure cflowd]
A:admin@node-2# info
    collector 10.10.20.30 port 7 {
    }
    collector 10.10.30.40 port 8 {
    }
 
*(ex)[configure cflowd]
A:admin@node-2#

3.15.2. Using the show Command

The classic CLI show commands can be used in the MD-CLI as well as in the classic CLI, in the following ways:

  1. use /show or show (while in the operational root []) in the MD-CLI engine
  2. use show in the classic CLI engine
  3. use // in the MD-CLI engine to switch to the classic CLI engine, then use show in the classic CLI engine
  4. use //show in the MD-CLI engine to execute /show in the classic CLI engine and switch back to the MD-CLI

3.15.2.1. Classic CLI Command Availability

Classic CLI commands that are accessible in the MD-CLI show outputs of the same information and provide the same functionality in the MD-CLI as they do in the classic CLI. No additional outputs or enhancements are included in the MD-CLI.

Note:

Follow the classic CLI context when using the show command. For example, route policy information is displayed using the show router policy command in both the MD-CLI and classic CLI engines, even though this information is configured in the configure policy-options context in the MD-CLI and in the configure router policy-options context in the classic CLI.

3.15.2.1.1. Classic CLI show commands not available in the MD-CLI

The following classic CLI show commands are currently blocked in the MD-CLI:

  1. show alias
  2. show bof
  3. show config
  4. show debug
  5. show system candidate
  6. show system rollback

3.15.2.2. Using the show Command in the MD-CLI Engine

The show command in the MD-CLI is applicable only in the operational root []. The /show command can be used from the root or any configuration context.

(ex)[]
A:admin@node-2# show port port-id 1/1/1 description
 
===============================================================================
Port Descriptions on Slot 1
===============================================================================
Port Id        Description
-------------------------------------------------------------------------------
1/1/1          10-Gig Ethernet
===============================================================================
 
(ex)[]
A:admin@node-2# configure router
 
(ex)[configure router "Base"]
A:admin@node-2# show port port-id 1/1/1 description
                ^^^^
MINOR: MGMT_CORE #2201: Unknown element - 'show'
 
(ex)[configure router "Base"]
A:admin@node-2# /show port port-id 1/1/1 description
===============================================================================
Port Descriptions on Slot 1
===============================================================================
Port Id        Description
-------------------------------------------------------------------------------
1/1/1          10-Gig Ethernet
===============================================================================

3.15.3. Using Output Modifiers

Output modifiers (match, count, and no-more) can also be used with the show command. See Using Output Modifiers in the MD-CLI.

3.16. MD-CLI Admin Tree

The admin commands are available only in the operational mode of the MD-CLI, or they can be executed with /admin from a configuration branch.

See the MD-CLI Command Reference Guide for information about the admin commands in the MD-CLI.

The following outputs show the admin show configuration command for the default configuration region (configure).

[]
A:admin@node-2# admin show
 
[admin show]
A:admin@node-2# configuration
 
...
 
configure {
    card 1 {
        card-type imm48-sfp+2-qsfp28
        mda 1 {
        }
    }
    card 2 {
        card-type imm36-100g-qsfp28
        mda 1 {
        }
    }
    log {
        accounting-policy 12 {
        }
        log-events {
            port event tmnxPortEtherLoopbackStart {
                severity major
            }
            port event tmnxPortEtherLoopbackStop {
                severity major
            }
        }
        filter 1001 {
            entry 10 {
                description "Collect only events of major severity or higher"
                action forward
                match {
                    severity {
                        gte major
                    }
                }
            }
        }
        log-id 99 {
            description "Default System Log"
            source {
                main true
            }
            destination {
                memory {
                    max-entries 500
                }
            }
        }
        log-id 100 {
            description "Default Serious Errors Log"
            filter 1001
            source {
                main true
            }
            destination {
                memory {
                    max-entries 500
                }
            }
        }
    }
    port 1/1/1 {
    }
    port 1/1/2 {
    }
    port 1/1/3 {
 
...
 
[admin show]
A:admin@node-2# configuration json
{
    "nokia-conf:configure": {
        "card": [
            {
                "slot-number": 1,
                "card-type": "imm48-sfp+2-qsfp28",
                "mda": [
                    {
                        "mda-slot": 1
                    }
                ]
            },
            {
                "slot-number": 2,
                "card-type": "imm36-100g-qsfp28",
                "mda": [
                    {
                        "mda-slot": 1
                    }
                ]
            }
        ],
        "log": {
            "accounting-policy": [
                {
                    "policy-id": 12
                }
            ],
            "log-events": {
                "port": [
                    {
                        "event": "tmnxPortEtherLoopbackStart",
                        "severity": "major"
                    },
                    {
                        "event": "tmnxPortEtherLoopbackStop",
                        "severity": "major"
                    }
                ]
            },
            "filter": [
                {
                    "filter-id": 1001,
                    "entry": [
                        {
                            "entry-id": 10,
                            "description": "Collect only events of major severity or higher",
                            "action": "forward",
                            "match": {
                                "severity": {
                                    "gte": "major"
                                }
                            }
                        }
                    ]
                }
            ],
            "log-id": [
                {
                    "id": 99,
                    "description": "Default System Log",
                    "source": {
                        "main": true
                    },
                    "destination": {
                        "memory": {
                            "max-entries": 500
                        }
                    }
                },
                {
                    "id": 100,
                    "description": "Default Serious Errors Log",
                    "filter": 1001,
                    "source": {
                        "main": true
                    },
                    "destination": {
                        "memory": {
                            "max-entries": 500
                        }
                    }
                }
            ]
        },
        "port": [
            {
                "port-id": "1/1/1"
            },
            {
                "port-id": "1/1/2"
            },
            {
                "port-id": "1/1/3"
            },
 
   ...