Nokia 7450, 7750, 7950 User Manual

MD-CLI USER GUIDE RELEASE 20.7.R1
7450 ETHERNET SERVICE SWITCH 7750 SERVICE ROUTER 7950 EXTENSIBLE ROUTING SYSTEM VIRTUALIZED SERVICE ROUTER
MD-CLI USER GUIDE RELEASE 20.7.R1
3HE 15820 AAAD TQZZA 01
Issue: 01
July 2020
Nokia — Proprietary and confidential. Use pursuant to applicable agreements.
MD-CLI USER GUIDE
RELEASE 20.7.R1
Nokia is a registered trademark of Nokia Corporation. Other products and company names mentioned herein may be trademarks or tradenames of their respective owners.
The information presented is subject to change without notice. No responsibility is assumed for inaccuracies contained herein.
© 2020 Nokia.
Contains proprietary/trade secret information which is the property of Nokia and must not be made available to, or copied or used by anyone outside Nokia without its written authorization. Not to be used or disclosed except in accordance with applicable agreements.
2
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

Table of Contents

1 MD-CLI Overview ............................................................................7
1.1 Using the MD-CLI ........................................................................................7
2 Controlling the Management Interface Configuration
Mode ................................................................................................9
2.1 Enabling the MD-CLI ...................................................................................9
2.2 Switching Between the Classic CLI and MD-CLI Engines.........................11
2.2.1 Executing Classic CLI Commands from the MD-CLI Engine ....................12
2.2.2 MD-CLI and Classic CLI Engine Interactions ............................................13
2.2.3 Switching Explicitly to the Classic CLI Engine...........................................15
2.2.4 Switching Explicitly to the MD-CLI Engine.................................................15
3 Navigating in the MD-CLI .............................................................17
3.1 The MD-CLI Tree Structure .......................................................................17
3.2 The MD-CLI Command Prompt.................................................................20
3.3 Environment Commands ...........................................................................23
3.3.1 Customizing Per-Session Environment Settings .......................................24
3.3.2 Customizing the Session Prompt ..............................................................24
3.3.2.1 Customizing the Uncommitted Changes Indicator ....................................24
3.3.2.2 Customizing the Line Preceding the Command Prompt............................25
3.3.2.3 Customizing the Context Information in the Command Prompt ................25
3.3.2.4 Customizing the Date and Time Output ....................................................26
3.3.3 Customizing the Progress Indicator...........................................................27
3.3.4 Customizing the Pagination Setting...........................................................27
3.3.5 Customizing the Console Settings.............................................................28
3.3.6 Customizing the Message Level Security Settings....................................28
3.3.7 Preventing Changes to Environment Settings...........................................29
3.4 Using Online Help .....................................................................................30
3.4.1 Indicators in the Online Help .....................................................................32
3.4.1.1 Descriptions and Format Guidelines for Leafs and Leaf-lists ....................33
3.4.1.2 Immutable Elements..................................................................................34
3.4.1.3 Mutually Exclusive Choice Elements.........................................................36
3.4.1.4 Optional Indicators in the Online Help .......................................................36
3.5 Operational Root and Global Commands..................................................38
3.5.1 Using the oam Commands ........................................................................39
3.5.1.1 OAM EFM Commands ..............................................................................40
3.5.1.2 OAM ETH-CFM Commands......................................................................40
3.5.1.3 OAM OAM-PM Commands .......................................................................42
3.5.2 Using the ping Command ..........................................................................43
3.5.3 Using the ssh Command ...........................................................................45
3.5.4 Using the telnet Command ........................................................................46
3.5.5 Using the traceroute Command.................................................................47
3.6 Navigating the MD-CLI Hierarchy Levels ..................................................49
3.7 Using the tree Command...........................................................................52
3.7.1 Using the flat Option ..................................................................................54
Issue: 01 3HE 15820 AAAD TQZZA 01 3
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.7.2 Using the detail Option ..............................................................................54
3.8 Using Control Characters and Editing Keystrokes on the
Command Line ..........................................................................................56
3.9 Displaying Available Commands using Tab ..............................................58
3.9.1 Available Commands with Mutually Exclusive Commands .......................60
3.10 Using Command Completion.....................................................................61
3.10.1 Variable Parameter Completion ................................................................61
3.10.1.1 Completion for Lists with a Default Keyword .............................................62
3.10.1.2 Completion for Keyword-based Leaf-lists..................................................63
3.10.1.3 Completion for Boolean Elements .............................................................64
3.11 Modifying the Idle Timeout Value for CLI Sessions...................................66
3.11.1 Idle Timeout Interaction with the Classic CLI ............................................66
3.12 Using Output Modifiers in the MD-CLI.......................................................67
3.12.1 Using | match Options ...............................................................................67
3.12.1.1 Using Regular Expressions with | match ...................................................68
3.12.2 Using the | count Option ............................................................................73
3.12.3 Using the | no-more Option .......................................................................74
3.12.4 Using the File Redirect Option...................................................................74
3.13 Navigating Contexts in the MD-CLI ...........................................................75
3.13.1 Entering Contexts ......................................................................................75
3.13.2 Exiting Contexts.........................................................................................78
3.14 Executing Commands from a File .............................................................79
3.14.1 Using Commands that Switch Engines in an Executable File...................79
3.15 Displaying Information in the MD-CLI........................................................81
3.15.1 Using the info Command ...........................................................................81
3.15.1.1 Displaying Lists..........................................................................................88
3.15.2 Using show Commands.............................................................................89
3.15.2.1 Classic CLI Command Availability.............................................................89
3.16 MD-CLI Admin Tree...................................................................................91
4 Configuring in the MD-CLI ...........................................................95
4.1 Configuration Workflow .............................................................................95
4.1.1 MD-CLI Session Modes.............................................................................95
4.1.2 Transactional Configuration Method..........................................................96
4.1.3 Implicit and Explicit Configuration Workflows ............................................96
4.1.3.1 Using the Implicit Configuration Workflow .................................................98
4.1.3.2 Using the Explicit Configuration Workflow...............................................100
4.1.3.3 Transitioning from an Implicit to an Explicit Configuration
Workflow..................................................................................................101
4.2 Candidate Configuration Modes ..............................................................102
4.2.1 Multiple Simultaneous Candidate Configurations....................................103
4.2.2 Private Configuration Mode .....................................................................109
4.2.3 Exclusive Configuration Mode .................................................................111
4.2.4 Global Configuration Mode......................................................................114
4.2.5 Read-Only Configuration Mode ...............................................................116
4.2.6 Transitioning Between Candidate Configuration Modes .........................117
4.2.7 Exclusive Private Configuration Session .................................................120
4.2.8 Restricting Configuration Mode Sessions................................................121
4.3 Modifying the Configuration.....................................................................124
4
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
4.4 Adding Configuration Elements ...............................................................125
4.4.1 Default Values for Key Leafs ...................................................................125
4.4.2 Entering Integer Values ...........................................................................126
4.4.3 Configuring Lists......................................................................................128
4.4.3.1 System-Ordered Lists..............................................................................130
4.4.3.2 User-Ordered Lists ..................................................................................131
4.4.3.3 Special Handling for Lists with all Key Leafs ...........................................133
4.4.4 Configuring Leaf-Lists..............................................................................134
4.4.4.1 System-Ordered Leaf-Lists......................................................................134
4.4.4.2 User-Ordered Leaf-Lists ..........................................................................135
4.4.5 Configuring Leafs with Units....................................................................137
4.4.6 Flexible Input for MAC and IPv6 Addresses............................................143
4.4.7 Input Translation......................................................................................144
4.5 Deleting Configuration Elements .............................................................145
4.5.1 Deleting Leafs..........................................................................................145
4.5.2 Deleting Containers .................................................................................146
4.5.3 Deleting List Entries and Lists .................................................................148
4.5.3.1 Deleting Leaf-List Entries and Leaf-Lists.................................................151
4.6 Copying Configuration Elements .............................................................153
4.7 Committing a Configuration .....................................................................159
4.7.1 Viewing the Uncommitted Configuration Changes ..................................159
4.7.1.1 Using the compare Outputs to Copy and Paste ......................................163
4.7.2 Discarding Configuration Changes..........................................................164
4.7.3 Validating the Candidate Configuration ...................................................166
4.7.4 Updating the Candidate Configuration ....................................................167
4.7.4.1 Example Update Scenario With Merge Conflicts.....................................169
4.7.4.2 Example Update Scenario Without Merge Conflicts................................172
4.7.5 Committing the Candidate Configuration.................................................173
4.7.5.1 Using the commit confirmed Command ..................................................174
4.8 Saving Changes ......................................................................................178
4.9 Rolling Back a Configuration from a Checkpoint File ..............................179
4.10 Loading a Configuration File....................................................................183
4.10.1 Using info Outputs in Load Files..............................................................183
4.11 Using Configuration Groups ....................................................................188
4.11.1 Creating Configuration Groups................................................................189
4.11.1.1 Exact Match.............................................................................................190
4.11.1.2 Regular Expression Match ......................................................................190
4.11.1.3 Conflicting Match Criteria Within a Configuration Group .........................191
4.11.2 Applying Configuration Groups................................................................193
4.11.3 Inheritance Rules.....................................................................................195
4.11.4 Displaying the Expanded Configuration ..................................................200
4.11.5 Authentication, Authorization, and Accounting (AAA) in
Configuration Groups ..............................................................................201
4.11.6 Configuration Group Example .................................................................203
4.11.7 Caveats ...................................................................................................206
4.12 Viewing the Status of the Local Datastores.............................................207
4.12.1 Unlocking a Locked Datastore.................................................................208
Issue: 01 3HE 15820 AAAD TQZZA 01 5
MD-CLI USER GUIDE
RELEASE 20.7.R1
5 Displaying State Information in the MD-CLI.............................209
5.1 Navigating the State Tree........................................................................209
6 Troubleshooting .........................................................................215
6.1 Debug commands ...................................................................................215
6.2 Logging Debug Events in the MD-CLI .....................................................216
7 Advanced Tips and Features.....................................................219
7.1 Discarding Changes in Specific Contexts................................................219
8 Creating MD-CLI Configuration from the Classic CLI .............221
9 Standards and Protocol Support ..............................................227
6
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

1 MD-CLI Overview

MD-CLI Overview
This guide provides information about the Model-Driven Command Line Interface (MD-CLI).
This guide is organized into functional sections and provides concepts and descriptions of the MD-CLI environment, the configuration workflow, and the syntax and command usage within the MD-CLI. It also describes how the MD-CLI interacts with the classic CLI to perform non-configuration operations.
For a list of unsupported features by platform and chassis, refer to the SR OS 20.x.Rx Software Release Notes, part number 3HE 16194 000x TQZZA.
Command outputs shown in this guide are examples only; actual outputs may differ depending on supported functionality and user configuration.
Note: This guide generically covers Release 20.x.Rx content and may contain some content that will be released in later maintenance loads. Refer to the SR OS 20.x.Rx Software Release Notes, part number 3HE 16194 000x TQZZA, for information about features supported in each load of the Release 20.x.Rx software.

1.1 Using the MD-CLI

All references to the term ‘CLI’ in the SR OS user documentation are generally referring to the classic CLI. The classic CLI is the CLI that has been supported in SR OS from the initial introduction of SR OS.
The MD-CLI is a management interface that can be used to manage Nokia SR OS routers. Some of the benefits of the MD-CLI include:
• follows the model-driven networking strategy, based on common YANG models for a structured configuration and state. Consistency is maintained between the MD-CLI, NETCONF, and the gRPC model-driven interfaces.
• uses the transactional configuration method which uses a candidate configuration to hold the current configuration changes before they are applied to the running configuration, and avoids configuration ordering requirements
• provides multiuser candidate configuration modes (global, exclusive, private, and read-only) that control access to the configuration, allowing a user exclusive access to the configuration such that no other configuration changes can be made
Issue: 01 3HE 15820 AAAD TQZZA 01 7
MD-CLI Overview
MD-CLI USER GUIDE
RELEASE 20.7.R1
• allows the use of configuration groups with flexible templates that simplify the configuration process by applying the template instead of repeating the same configuration
• provides MD-CLI commands to simplify integration with automation, such as displaying configuration and state in a structured format (JSON or XML) and displaying contexts in an XPath format
For more information about NETCONF and gRPC, refer to the 7450 ESS, 7750 SR, 7950 XRS, and VSR System Management Guide.
Table 1 describes command syntax symbols used in this guide.
Table 1 Command Syntax Symbols
Symbol Description
| A vertical bar represents an OR, indicating that only one of the parameters in
the brackets or parentheses can be selected.
( ) Parentheses indicate that one of the parameters must be selected.
[ ] Brackets indicate optional parameters.
Bold Commands in bold indicate commands and keywords.
Italic Commands in italics indicate that you must enter text based on the parameter.
In the following examples, location and graceful-shutdown are command names.
For the location command, keyword must be one of the keywords cf1, cf2, or cf3. For the graceful-shutdown command, boolean must be one of the keywords true
or false, although explicitly using the keyword true is optional.
location keyword keyword - (cf1 | cf2 | cf3)
graceful-shutdown boolean boolean - ([true] | false)
8
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
2 Controlling the Management Interface
Controlling the Management Interface Configuration
Mode
Configuration Mode
SR OS routers can be in different management interface configuration modes, which affects the management interfaces that can be used to configure the router. The following interfaces are available for configuration on SR OS:
• classic (default) — configuration via the classic CLI and SNMP, no model-driven interfaces are supported
• mixed — configuration via the classic CLI and model-driven interfaces: the MD­CLI, NETCONF, and gRPC/gNMI, read-only access via SNMP
• model-driven — configuration via model-driven interfaces: the MD-CLI, NETCONF, and gRPC/gNMI, read-only access via the classic CLI and SNMP
Refer to the 7450 ESS, 7750 SR, 7950 XRS, and VSR System Management Guide
for more information on management interface configuration mode features and the interactions between classic and model-driven modes.

2.1 Enabling the MD-CLI

The CLI engine refers to the CLI environment that is being used in a user session (for example, console, Telnet, or SSH) to configure and operate the router.
To enable the MD-CLI engine from the classic CLI, perform the following steps:
1. Set the configuration mode to model-driven and leave cli-engine unconfigured.
A:node-2>config>system>management-interface# configuration-mode model-driven
2. Log out and start a new CLI session to access the MD-CLI engine.
A:node-2>config>system>management-interface# logout
When a new user session begins, the MD-CLI engine is available and the MD-CLI prompt is displayed.
[] A:admin@node-2#
When the configuration mode is changed to model-driven, the following applies:
• the configuration mode becomes immediately active
• access to configuration in the classic CLI is read-only (no modification)
Issue: 01 3HE 15820 AAAD TQZZA 01 9
Controlling the Management Interface Configuration Mode
• access to show configuration in the classic CLI is still available
MD-CLI USER GUIDE
RELEASE 20.7.R1
10
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
2.2 Switching Between the Classic CLI and MD-
Controlling the Management Interface Configuration
Mode
CLI Engines
A single CLI command is available in both the classic CLI and MD-CLI engines to switch between the two engines in a user session. When authorized (cli-engine list contains both classic-cli and md-cli), the CLI engine switch command (“//”, the double forward slash) can be executed from any CLI context in both engines to switch to the other CLI engine.
A:node-2# // INFO: CLI #2052: Switching to the MD-CLI engine
[] A:admin@node-2# // INFO: CLI #2051: Switching to the classic CLI engine A:node-2#
The context in which the CLI engine switch command is executed is saved when toggling between CLI engines and returns to the same context when toggling back.
[] A:admin@node-2# edit-config read-only INFO: CLI #2066: Entering read-only configuration mode
(ro)[] A:admin@node-2# configure router
(ro)[configure router "Base"] A:admin@node-2# // INFO: CLI #2051: Switching to the classic CLI engine A:node-2# configure system management-interface A:node-2>config>system>management-interface# // INFO: CLI #2052: Switching to the MD-CLI engine
(ro)[configure router "Base"] A:admin@node-2# // INFO: CLI #2051: Switching to the classic CLI engine A:node-2>config>system>management-interface#
If switching engines is not authorized (when cli-engine is only [classic-cli] or [md­cli]), the command is rejected.
A:node-2# // MINOR: CLI #2053 Switching CLI engine is not authorized A:node-2#
Issue: 01 3HE 15820 AAAD TQZZA 01 11
Controlling the Management Interface Configuration Mode

2.2.1 Executing Classic CLI Commands from the MD-CLI Engine

When switching engines is authorized, all classic CLI engine commands can be executed from the MD-CLI engine. Entering a classic CLI engine command preceded by the “//” command executes the command in the classic CLI engine and returns immediately to the MD-CLI engine. The MD-CLI context is preserved before the switch to the classic CLI engine, and the context is restored when the session returns to the MD-CLI engine. In the following example, the classic CLI command is executed from the configure system context in the MD-CLI. When the session returns to the MD-CLI engine, it is returned to the same context.
(ex)[configure system] A:admin@node-2# //file dir INFO: CLI #2051: Switching to the classic CLI engine A:admin@node-2# /file dir
Volume in drive cf3 on slot A is .
MD-CLI USER GUIDE
RELEASE 20.7.R1
Volume in drive cf3 on slot A is formatted as FAT32
Directory of cf3:\
10/24/2019 01:04p <DIR> .ssh/ 01/01/1980 12:00a 170 NVRAM.DAT 01/01/1980 12:00a 610 bof.cfg 10/24/2019 01:04p 317 nvsys.info 10/24/2019 01:04p 1 restcntr.txt
INFO: CLI #2052: Switching to the MD-CLI engine
(ex)[configure system] A:admin@node-2#
4 File(s) 1098 bytes. 1 Dir(s) 2048 bytes free.
It is acceptable to include a space between “//” and the CLI command. For example, //file dir and // file dir are equivalent commands.
User interactions, such as pagination, confirmation, or control characters (for example, CTRL-c to stop an ongoing command execution), are supported during CLI command execution. The CLI engine is switched back to the MD-CLI engine just before the CLI command prompt would normally appear.
Executing MD-CLI commands from the classic CLI engine works in the same way as described for executing classic CLI commands from the MD-CLI engine.
12
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

2.2.2 MD-CLI and Classic CLI Engine Interactions

Controlling the Management Interface Configuration
Mode
The following describes MD-CLI engine interactions with the classic CLI when using the “//” command:
• uncommitted changes in the MD-CLI are kept when switching to the classic CLI
• “//” appears in the history of the CLI engine where it is executed
[] A:admin@node-2# // INFO: CLI #2051: Switching to the classic CLI engine A:node-2# history
1 history A:node-2# // INFO: CLI #2052: Switching to the MD-CLI engine [] A:admin@node-2# history
1// [] A:admin@node-2#
•“//command” appears in the history of both CLI engines
[] A:admin@node-2# //file dir INFO: CLI #2051: Switching to the classic CLI engine A:node-2# /file dir
Volume in drive cf3 on slot A is .
Volume in drive cf3 on slot A is formatted as FAT32
Directory of cf3:\
06/26/2019 07:58p <DIR> .ssh/ 01/01/1980 12:00a 170 NVRAM.DAT 01/01/1980 12:00a 610 bof.cfg 06/26/2019 07:58p 311 nvsys.info 06/26/2019 07:58p 1 restcntr.txt
4 File(s) 1092 bytes. 1 Dir(s) 2048 bytes free.
INFO: CLI #2052: Switching to the MD-CLI engine
[] A:admin@node-2# history
[] A:admin@node-2# // INFO: CLI #2052: Switching to the classic CLI engine A:admin@node-2# history
A:admin@node-2#
1 //file dir
1 /file dir
2 history
Issue: 01 3HE 15820 AAAD TQZZA 01 13
Controlling the Management Interface Configuration Mode
• command completion, ? help, and redirection are not supported for the command following the “//”
• all control characters added on the same line when entering a “//” command have an effect on the CLI engine where they are entered
[] A:admin@node-2# //file dir Press CTRL-w # stay in the MD-CLI engine
[] A:admin@node-2# //file dir Press CTRL-c # stay in the MD-CLI engine
[] A:admin@node-2#
CTRL-z is the equivalent of Enter and exit all. When used on a command line with “//”, CTRL-z is the equivalent of just pressing Enter. Because the originating CLI engine is no longer available, exit all can no longer be executed.
[] A:admin@node-2# //file dir Press CTRL-z INFO: CLI #2051: Switching to the classic CLI engine A:node-2# /file dir
MD-CLI USER GUIDE
RELEASE 20.7.R1
# delete word
# stop current command
Volume in drive cf3 on slot A is .
Volume in drive cf3 on slot A is formatted as FAT32
Directory of cf3:\
06/26/2019 07:58p <DIR> .ssh/ 01/01/1980 12:00a 170 NVRAM.DAT 01/01/1980 12:00a 610 bof.cfg 06/26/2019 07:58p 311 nvsys.info 06/26/2019 07:58p 1 restcntr.txt
4 File(s) 1092 bytes. 1 Dir(s) 2048 bytes free.
INFO: CLI #2052: Switching to the MD-CLI engine
[] A:admin@node-2# history
A command history is maintained per CLI engine. CLI commands executed in the MD-CLI do not appear in the classic CLI history. CLI commands executed in the classic CLI do not appear in the MD-CLI history.
14
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

2.2.3 Switching Explicitly to the Classic CLI Engine

Controlling the Management Interface Configuration
Mode
The /!classic-cli command is available in both the classic CLI and MD-CLI engines to explicitly switch to the classic CLI engine in a session, as long as classic-cli is an authorized CLI engine. If switching to the classic CLI engine is not authorized, the command is rejected. Issuing the /!classic-cli command in the classic CLI engine has no effect.
The /!classic-cli switch command can be executed from any CLI context in both engines and the context is preserved for both engines. When the command is executed, the session enters the last saved working context of the classic CLI engine.
A:node-2>config>system>management-interface# // INFO: CLI #2052: Switching to the MD-CLI engine
(ex)[configure router "Base" bgp] A:admin@node-2# /!classic-cli INFO: CLI #2051: Switching to the classic CLI engine A:node-2>config>system>management-interface#

2.2.4 Switching Explicitly to the MD-CLI Engine

The /!md-cli command is available in both the classic CLI and MD-CLI engines to explicitly switch to the MD-CLI engine in a session, as long as md-cli is an authorized CLI engine. If switching to the MD-CLI engine is not authorized, the command is rejected. Issuing the /!md-cli command in the MD-CLI engine has no effect.
The /!md-cli switch command can be executed from any CLI context in both engines and the context is preserved for both engines. When the command is executed, the session enters the last saved working context of the MD-CLI engine.
(ex)[configure router "Base" bgp] A:admin@node-2# /!classic-cli INFO: CLI #2051: Switching to the classic CLI engine A:node-2>config>system>management-interface# /!md-cli INFO: CLI #2052: Switching to the MD-CLI engine
(ex)[configure router "Base" bgp] A:admin@node-2#
The /!md-cli and /!classic-cli commands can be useful when executing commands from a file, allowing the file to be executed in either CLI engine and ensuring the commands are run in the intended CLI engine.
Issue: 01 3HE 15820 AAAD TQZZA 01 15
Controlling the Management Interface Configuration Mode
MD-CLI USER GUIDE
RELEASE 20.7.R1
16
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3 Navigating in the MD-CLI

3.1 The MD-CLI Tree Structure

Navigating in the MD-CLI
The MD-CLI tree contains the following elements from the Nokia YANG models:
• 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 }
• 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 }
• 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 }
}
}
• key — a unique identifier for a list entry (for example, “group-1” and “group-2”)
router "Base" {
bgp {
Issue: 01 3HE 15820 AAAD TQZZA 01 17
Navigating in the MD-CLI
}
tcp-keepalive {
} gnmi {
}
MD-CLI USER GUIDE
RELEASE 20.7.R1
group "group-1"{
connect-retry 600
keepalive 33 } group "group-2"{
description "Text description for group-2"
local-preference 8 }
}
• 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.
admin-state disable idle-time 600 interval 15 retries 4
admin-state enable auto-config-save false
• 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"]
• 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:
• keyword — an element with a name defined by SR OS; for example, enumerated values, leaf names, and container names)
• variable parameter — an element with a name defined by the user; for example, descriptions, names, integer or string leaf values)
• 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.
• 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.
18
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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@node-2# 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>
---snip---
Issue: 01 3HE 15820 AAAD TQZZA 01 19
Navigating in the MD-CLI

3.2 The MD-CLI Command Prompt

The MD-CLI command prompt displays on two lines. The first line contains the following information:
MD-CLI USER GUIDE
RELEASE 20.7.R1
baseline status indicator This indicator displays an exclamation mark (!) to indicate an out-of-date
baseline when in a configuration mode.
uncommitted changes indicator This indicator displays an asterisk (*) to indicate uncommitted configuration
changes when in a configuration mode.
configuration mode reference When in a configuration mode, a configuration mode reference is displayed:
- in round brackets for an explicit configuration workflow
- prepended to the context, separated by a colon for an implicit configuration
workflow
The configuration mode reference can be one of the following:
- ex — exclusive mode
- gl — global mode
- pr — private mode
- ro — read-only mode
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]
20
Examples:
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
[ro:configure]
*[ex:configure]
The second line contains the following information:
CPM The active CPM slot can be A or B on 7450 ESS and 7750 SR routers, and
A,B,C, or D on 7950 XRS routers.
user The user is the name of the current user for this session.
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.
• prompt in operational mode
[] A:admin@node-2#
• prompt in the operational root, with exclusive configuration mode
(ex)[] A:admin@node-2#
• prompt in operational mode show router bgp
[show router "Base" bgp] A:admin@node-2#
• prompt in exclusive configuration mode configure router bgp
(ex)[configure router "Base" bgp] A:admin@node-2#
• prompt in exclusive configuration mode configure router bgp with uncommitted changes
*(ex)[configure router "Base" bgp] A:admin@node-2#
Issue: 01 3HE 15820 AAAD TQZZA 01 21
Navigating in the MD-CLI
!*[pr:configure router "Base" bgp] A:admin@node-2#
MD-CLI USER GUIDE
RELEASE 20.7.R1
• 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
22
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.3 Environment Commands

Navigating in the MD-CLI
The environment configuration for the MD-CLI is available in both the c lassic 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 - Prompt to continue or stop when output text fills page progress-indicator + Enter the progress-indicator context prompt + Enter the prompt context time-display - Time zone displayed before the prompt time-format - Time format to display date and time
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
prompt + Configure content of displayed prompt time-display - Specify whether timestamp should be displayed in UTC or
time-format - Time format to display date and time
execution
local time
Changes made to the environment configuration apply only to new sessions and do not affect current sessions.
Refer to the 7450 ESS, 7750 SR, 7950 XRS, and VSR MD-CLI Command Reference Guide for information about the environment commands in the MD-CLI.
Issue: 01 3HE 15820 AAAD TQZZA 01 23
Navigating 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.
MD-CLI USER GUIDE
RELEASE 20.7.R1

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
24
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
3.3.2.2 Customizing the Line Preceding the Command Prompt
Navigating in the MD-CLI
*[environment prompt] A:admin@node-2#
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#
Issue: 01 3HE 15820 AAAD TQZZA 01 25
Navigating in the MD-CLI
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).
MD-CLI USER GUIDE
RELEASE 20.7.R1
[environment] A:admin@node-2# time-display ?
time-display <keyword> <keyword> - (local|utc) Default - local
Time zone displayed before the 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
Time format to display date and time
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:
26
[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"
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.3.3 Customizing the Progress Indicator

Navigating in the MD-CLI
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
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 management
=============================================================================== Server Global =============================================================================== Telnet: Administrative State : Enabled
Issue: 01 3HE 15820 AAAD TQZZA 01 27
Navigating in the MD-CLI
Operational State : Up Telnet6: Administrative State : Disabled Operational State : Down FTP: Administrative State : Disabled Operational State : Down SSH: Administrative State : Enabled Operational State : Up NETCONF: Administrative State : Disabled Operational State : Down GRPC: Administrative State : Disabled Operational State : Down
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.
MD-CLI USER GUIDE
RELEASE 20.7.R1
[] A:admin@node-2# show system security management | 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.
28
[environment message-severity-level] A:admin@node-2# cli ?
cli <keyword> <keyword> - (warning|info)
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.3.7 Preventing Changes to Environment Settings

Navigating in the MD-CLI
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
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#
Issue: 01 3HE 15820 AAAD TQZZA 01 29
Navigating in the MD-CLI

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# ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
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 ssh - Execute ssh command telnet - Telnet to IP address or DNS name 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
30
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
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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 ssh - Execute ssh command telnet - Telnet to IP address or DNS name 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
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---
router name must be unique among all virtual routers in the system.
Issue: 01 3HE 15820 AAAD TQZZA 01 31
Navigating in the MD-CLI
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 ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
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
32
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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>
Issue: 01 3HE 15820 AAAD TQZZA 01 33
Navigating in the MD-CLI
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 ?
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 ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
Text description
autonomous-system <number> <number> - <1..4294967295>
AS number advertised to peers for this router
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.
34
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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 recreates 'configure eth-cfm domain "dom-name"' automatically 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>
Issue: 01 3HE 15820 AAAD TQZZA 01 35
Navigating in the MD-CLI
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.
*[ex:configure qos sap-ingress "ing-1" queue 1 rate] A:admin@node-2# ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
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 key wor d 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
36
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Angle brackets (<>) indicate a variable name and the vertical bar (|) 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 recreates 'configure lag 8 port 1/1/1' automatically for the new value to take effect.
Issue: 01 3HE 15820 AAAD TQZZA 01 37
Navigating in the MD-CLI

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
MD-CLI USER GUIDE
RELEASE 20.7.R1
Command Description
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
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 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
38
logout Exit the CLI session
oam Enter the oam context. See Using the oam Commands.
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Table 4 Global Commands (Continued)
Command Description
ping Ping 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 Exit the candidate configuration mode
ssh Execute the ssh command. See Using the ssh Command.
telnet Telnet to an IP address or DNS name. See Using the telnet Command.
top Move to the top level of the context
traceroute Trace route to a destination. 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 the candidate configuration
compare Compare changes between datastores
discard Discard changes in the candidate datastore
info Show the configuration for the present context
load Load contents from a local or remote file
rollback Rollback to a previous configuration
update Update the candidate baseline
validate Validate changes in the candidate datastore

3.5.1 Using the oam Commands

The following oam commands are available in the MD-CLI.
Issue: 01 3HE 15820 AAAD TQZZA 01 39
Navigating in the MD-CLI
3.5.1.1 OAM EFM Commands
The following commands issue Ethernet in the First Mile (EFM) OAM loopback tests on the specified port.
Table 6 describes the parameters of the available OAM EFM commands.
Table 6 OAM EFM Parameters
MD-CLI USER GUIDE
RELEASE 20.7.R1
— 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}
EFM Parameter Description
local-loopback {start | stop} port-
id {ethernet-satellite-client-port |
connector-port | port | pxc-sub-port}
remote-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
Start or stop the remote loopback test on the specified port
3.5.1.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]
40
The following command issues a loopback test.
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
— 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 7 describes the parameters of the available OAM ETH-CFM commands.
Table 7 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
Issue: 01 3HE 15820 AAAD TQZZA 01 41
Navigating in the MD-CLI
Table 7 OAM ETH-CFM Parameters (Continued)
MD-CLI USER GUIDE
RELEASE 20.7.R1
ETH-CFM Parameter Description
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.1.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 8 describes the parameters of the available OAM-PM commands.
Table 8 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
42
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Table 8 OAM OAM-PM Parameters (Continued)
OAM-PM Parameter Description
test-type {dm | dmm | lmm | slm | twamp-light }
Test type
dm - MPLS Delay Measurement test
dmm - Ethernet Delay Measurement Message test
lmm - Ethernet Loss Measurement Message test
slm - Ethernet Synthetic Loss Measurement test
twamp-light - Two-Way Active Measurement Protocol (TWAMP) Light test

3.5.2 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 9 describes the parameters of the ping command.
Issue: 01 3HE 15820 AAAD TQZZA 01 43
Navigating in the MD-CLI
Table 9 ping Parameters
MD-CLI USER GUIDE
RELEASE 20.7.R1
ping Parameter Description
[destination-address] {ip-address | string}
bypass-routing Bypass the routing table when sending the ping
count number Number of ping requests to send to the remote
do-not-fragment Do not fragment the request frame, which is
fc keyword Forwarding class options for the transmitted ICMP
IP address or DNS name of the remote host to ping, where the IP address can be one of:
ipv4-address-with-zone
ipv4-address
ipv6-address-linklocal-with-zone
ipv6-address
ipv6-address-with-zone
request to a host on a directly-attached network; return an error if the host is not on a directly­attached network
host
particularly useful in combination with the size parameter for maximum MTU determination (does not apply to ICMPv6)
Echo Request packet:
be
l2
af
l1
h2
ef
h1
nc
44
interface string Interface name interval {number | decimal-number} Time between consecutive ping requests next-hop-address {ipv4-address |
ipv6-address}
output-format keyword Keyword options are:
3HE 15820 AAAD TQZZA 01 Issue: 01
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
summary
detail - show extra information in error cases
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Table 9 ping Parameters (Continued)
ping Parameter Description
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 or VPRN service name 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.3 Using the ssh Command

Use the ssh command in the MD-CLI to establish a secure shell (SSH) connection to a host. The syntax is as follows:
— ssh [destination-address] {ip-address | string} [login-name string] [router-instance string]
[version number] [key-re-exchange mbytes {number | infinite}] [key-re-exchange minutes {number | infinite}]
Example command output:
[] A:admin@node-2# ssh 192.168.236.94
admin@192.168.236.94's password: *****
[] A:admin@node-3# logout Connection to 192.168.236.94 closed.
Issue: 01 3HE 15820 AAAD TQZZA 01 45
Navigating in the MD-CLI
[] A:admin@node-2#
Table 10 describes the parameters of the ssh command.
Table 10 ssh Parameters
MD-CLI USER GUIDE
RELEASE 20.7.R1
ssh Parameter Description
[destination-address] {ip-address | string}
login-name string Login user name router-instance string Router or VPRN service name version keyword SSH protocol version to be supported by the SSH
key-re-exchange mbytes {number |
infinite}
key-re-exchange minutes {number
| infinite}
IP address or DNS name of the remote host to ping, where the IP address can be one of:
ipv4-address-with-zone
ipv4-address
ipv6-address-linklocal-with-zone
ipv6-address
ipv6-address-with-zone
server
1 - SSH version 1
2 - SSH version 2
1-2 - SSH versions 1 and 2
Number of megabytes on an SSH session, after which the SSH client initiates the key re-exchange
Time interval after which the SSH client initiates the key re-exchange
46

3.5.4 Using the telnet Command

Use the telnet command in the MD-CLI to establish an insecure connection to a host via the Telnet protocol. The syntax is as follows:
—telnet [destination-address] {ip-address | string} [port number] [router-instance string]
Example command output:
[] A:admin@node-2# telnet 192.168.236.94
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Trying 192.168.236.94 ... Login: admin Password: *****
[] A:admin@node-3# logout Connection closed by foreign host.
[] A:admin@node-2#
Table 11 describes the parameters of the telnet command.
Table 11 telnet Parameters
telnet 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:
ipv4-address-with-zone
ipv4-address
ipv6-address-linklocal-with-zone
ipv6-address
ipv6-address-with-zone
port number Remote host TCP port number router-instance string Router or VPRN service name

3.5.5 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 12 describes the parameters of the traceroute command.
Issue: 01 3HE 15820 AAAD TQZZA 01 47
Navigating in the MD-CLI
Table 12 traceroute Parameters
MD-CLI USER GUIDE
RELEASE 20.7.R1
traceroute Parameter Description
[destination-address] {ip-address | string}
detail Display the MPLS label stack information (if
numeric Avoid looking up DNS names when displaying
router-instance string Router or VPRN service name source-address {ipv4-address |
ipv6-address}
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
Destination IP address or DNS name, where the IP address can be one of:
ipv4-address
ipv6-address
available)
results
Source address of the probe packets; return an error If the IP address is not one of the device’s interfaces
48
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.6 Navigating the MD-CLI Hierarchy Levels

Navigating in the MD-CLI
The following commands can be used to navigate the MD-CLI hierarchy (context) levels:
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
- 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
- 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
Issue: 01 3HE 15820 AAAD TQZZA 01 49
Navigating in the MD-CLI
*(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
*(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
MD-CLI USER GUIDE
RELEASE 20.7.R1
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)[] A:admin@node-2#
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#
exit
50
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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 (/) or Ctrl-z 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#
Issue: 01 3HE 15820 AAAD TQZZA 01 51
Navigating in the MD-CLI

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
MD-CLI USER GUIDE
RELEASE 20.7.R1
+-- accounting | +-- record-type +-- admin-control | +-- tacplus-map-to-priv-lvl +-- admin-state +-- apply-groups +-- authorization | +-- use-priv-lvl +-- interactive-authentication
52
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
+-- priv-lvl-map | +-- apply-groups | +-- priv-lvl | +-- apply-groups | +-- user-profile-name +-- server | +-- address | +-- apply-groups | +-- port | +-- secret +-- server-timeout +-- use-default-template
(ex)[] 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 | | +-- configure | | +-- li | | +-- nat | | +-- deterministic-script | +-- set | | +-- time | +-- show | | +-- configuration | | +-- configure | | +-- detail | | +-- flat | | +-- full-context | | +-- intended | | +-- json | | +-- li | | +-- running | | +-- units | | +-- xml | +-- support-mode | +-- system | +-- license | | +-- activate | | | +-- now | | +-- validate
Issue: 01 3HE 15820 AAAD TQZZA 01 53
Navigating in the MD-CLI
| +-- 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
MD-CLI USER GUIDE
RELEASE 20.7.R1
54
---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
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
+-- 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@node-2# 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---
Issue: 01 3HE 15820 AAAD TQZZA 01 55
Navigating in the MD-CLI
3.8 Using Control Characters and Editing
Table 13 lists the control characters and keystrokes available to execute and edit
commands.
Table 13 Control Characters and Keystrokes
MD-CLI USER GUIDE
RELEASE 20.7.R1
Keystrokes on the Command Line
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)
CTRL-z Return to operational root. If using CTRL-z after a command, return to
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
CTRL-a (or Home)
CTRL-e (or End)
CTRL-p (or Up arrow)
Go back one level
the operational root after executing the command (equivalent to pressing Enter after the command and exit all after the command has executed).
the cursor
Move to the beginning of the line
Move to the end of the line
Display prior command from history
56
CTRL-n (or Down arrow)
CTRL-b (or Left arrow)
Display next command from history
Move the cursor one space to the left
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Table 13 Control Characters and Keystrokes (Continued)
Command Description
CTRL-f (or Right arrow)
ESC+b Move back one word, or to the beginning of the current word if the cu r sor
CTRL-l Clear the screen
Move the cursor one space to the right
is not at the start of the word
Issue: 01 3HE 15820 AAAD TQZZA 01 57
Navigating in the MD-CLI

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:
[ex:configure log] A:admin@node-2# Press Tab
MD-CLI USER GUIDE
RELEASE 20.7.R1
• values or units (mutually exclusive)
•keywords
• global commands
• configuration commands
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 ssh telnet 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 only displays global or configuration commands at the operational root or at the root of a command context. For example, the global and configuration commands are displayed at the environment root context.
[environment] A:admin@node-2# ?
58
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
command-completion + Enter the command-completion context console + Enter the console context message-severity- + Enter the message-severity-level context
level more - Prompt to continue or stop when output text fills page progress-indicator + Enter the progress-indicator context prompt + Enter the prompt context time-display - Time zone displayed before the prompt time-format - Time format to display date and time
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 ssh - Execute ssh command telnet - Telnet to IP address or DNS name 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: info - Show the configuration for the present context
The global and configuration commands are not displayed in the environment prompt context, for example, although these commands are still available in the
context:
[environment prompt] A:admin@node-2# ?
context - Show the current command context in the prompt newline - Add a new line before every prompt line timestamp - Show the timestamp before the first prompt line uncommitted-changes- - Show an asterisk (*) when uncommitted changes exist
indicator
[environment prompt] A:admin@node-2# info detail
context true newline true timestamp false uncommitted-changes-indicator true
Issue: 01 3HE 15820 AAAD TQZZA 01 59
Navigating in the MD-CLI
3.9.1 Available Commands with Mutually Exclusive
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# ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
Commands
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
60
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.10 Using Command Completion

Navigating in the MD-CLI
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.
configure por+Spacebar displays auto-completion results
configure port+Spacebar inserts a space and suppresses auto-completion results
configure por+Tab displays auto-completion results
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
Issue: 01 3HE 15820 AAAD TQZZA 01 61
Navigating in the MD-CLI
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
MD-CLI USER GUIDE
RELEASE 20.7.R1
<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
62
*[ex:configure router "Base" bfd] A:admin@node-2#
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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, 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 ?
Issue: 01 3HE 15820 AAAD TQZZA 01 63
Navigating in the MD-CLI
*[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
*[ex:configure policy-options policy-statement "ss" entry 3 from] A:admin@node-2# delete family Press Tab
MD-CLI USER GUIDE
RELEASE 20.7.R1
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|flow-ipv4|route-target|mcast-vpn-ipv4|mvpn-ipv6| flow-ipv6|evpn|mcast-ipv6|label-ipv4|label-ipv6|bgp-ls|mcast­vpn-ipv6|sr-policy-ipv4|sr-policy-ipv6)
Match address families to this condition
Note: 'configure policy-options policy-statement "ss"' and all other elements in this context support single-model management only.
family [ipv4 mcast-ipv4 mcast-vpn-ipv4 label-ipv4]
<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.
64
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
(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
Issue: 01 3HE 15820 AAAD TQZZA 01 65
Navigating in the MD-CLI
3.11 Modifying the Idle Timeout Value for CLI
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.
[] A:admin@node-2# show users =============================================================================== User Type Login time Idle time
===============================================================================
admin SSHv2 11OCT2018 14:35:19 0d 00:00:00 --
admin SSHv2 11OCT2018 14:35:55 0d 00:07:46 --
------------------------------------------------------------------------------­Number of users: 2 '#' indicates the current active session ===============================================================================
MD-CLI USER GUIDE
RELEASE 20.7.R1
Sessions
• The idle timeout only affects new CLI sessions. Existing and current sessions retain the previous idle timeout.
• The idle timeout can be disabled by setting the value to none.
• The “Idle time” column in the show users display is reset after an action in either CLI engine.
Session ID From
Console -- 6d 19:38:00 --
6--
#23 192.168.144.87
24 192.168.144.87
66
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 and the user is logged out.

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.
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.12 Using Output Modifiers in the MD-CLI

Navigating in the MD-CLI
Output modifiers provide support for post-processing of CLI output. Output modifiers are specified using a vertical bar (|) character. The following points apply when using output modifiers.
• Output modifiers can be appended to any CLI command in any command context.
• 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).
• 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:
ignore-case — specifies to ignore case in pattern match
invert-match — specifies to invert the pattern match selection
max-count — specifies the maximum number of displayed matches
post-lines — specifies the number of lines to display following the matched line
pre-lines — specifies the number of lines to display preceding the matched line
The default pattern matchng is a string match. If the desired pattern to match includes a space, the pattern must be delimited by double quotation marks (“).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"]
Issue: 01 3HE 15820 AAAD TQZZA 01 67
Navigating in the MD-CLI
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, “.*” because this indicates a string match.
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.
MD-CLI USER GUIDE
RELEASE 20.7.R1
Table 14 describes the special characters that are supported in EREs.
Table 14 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
68
{m, } Matches the preceding expression at least m times { ,n} Matches the preceding expression not more than n times
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Table 14 Special Characters in Extended Regular Expressions
Special character Description
| 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
Issue: 01 3HE 15820 AAAD TQZZA 01 69
Navigating in the MD-CLI
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
MD-CLI USER GUIDE
RELEASE 20.7.R1
*(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
70
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
MD-CLI REs match on the output format of an element, as is shown in the configuration. For example, if the value of an element is shown in hexadecimal in info output, a decimal RE does not match the value.
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]
Issue: 01 3HE 15820 AAAD TQZZA 01 71
Navigating in the MD-CLI
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 15 defines the character class expressions.
MD-CLI USER GUIDE
RELEASE 20.7.R1
Table 15 Character Class Expressions
Character
Characters Matched
Class
[:alnum:] ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz 0123456789’
[:alpha:] ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz’
[: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’
[:digit:] ‘0123456789’ Digits
[:graph:] ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz 0123456789 !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~’
[:lower:] ‘abcdefghijklmnopqrstuvwxyz’ Lowercase letters
1
Description
Alphanumeric characters
Alphabetic characters
Control characters
Visible characters
72
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
Table 15 Character Class Expressions (Continued)
Character
Characters Matched
1
Description
Class
[:print:] ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
Visible characters and the
Space character 0123456789!\"#$%&'()*+,-./ :;<=>?@[\\]^_`{|}~ ’
[:punct:] ‘!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~’ Punctuation characters
[:space:] ‘\t\n\v\f\r ‘ Whitespace (blank)
characters
[:upper:] ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’ Uppercase letters
[:xdigit:] ‘0123456789ABCDEFabcdef’ Hexadecimal digits
Note:
1. Characters matching the character class are delimited by single quotation marks (‘).
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.
Issue: 01 3HE 15820 AAAD TQZZA 01 73
Navigating in the MD-CLI

3.12.3 Using the | no-more Option

The | no-more option displays the output with pagination disabled for the command. This option is similar to the environment more false setting that applies to all commands, 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 > ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
[url] <string> <string> - <1..199 characters>
Location to save the output
74
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.13 Navigating Contexts in the MD-CLI

3.13.1 Entering Contexts

Navigating in the MD-CLI
Configuring a container navigates into the context. In the following example, the first container is log, and the next is log-events. All containers are marked with a “+”.
(ex)[configure] A:admin@node-2# log
(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# log-events
(ex)[configure log log-events] A:admin@node-2#
Alternatively, the same context can be entered on one line:
(ex)[] A:admin@node-2# configure log log-events
(ex)[configure log log-events] A:admin@node-2#
Container lists are also marked with a “+” and the context is entered by specifying the key for the list.
[ex:configure log] A:admin@node-2# ?
Issue: 01 3HE 15820 AAAD TQZZA 01 75
Navigating in the MD-CLI
[ex:configure log] A:admin@node-2# log-id ?
MD-CLI USER GUIDE
RELEASE 20.7.R1
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
[id] <number> <number> - <1..101>
Event stream log ID
[ex:configure log] A:admin@node-2# log-id 99
[ex:configure log log-id 99] 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#
76
Configuring a container navigates into the context.
[ex:configure router "Base"]
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
A:admin@node-2# ?
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
---snip---
[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
---snip---
[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#
Issue: 01 3HE 15820 AAAD TQZZA 01 77
Navigating in the MD-CLI

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.
MD-CLI USER GUIDE
RELEASE 20.7.R1
*(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#
78
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.14 Executing Commands from a File

Navigating in the MD-CLI
The exec command executes commands from a file as if the user typed or pasted the input into the MD-CLI. 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:
• errors if it detects an interactive input
• terminates in the CLI engine in which it completes execution as follows:
- if there are no commands that switch CLI engines, the CLI engine is always the one in which exec started
- if there are commands that switch CLI engines, exec ends in the last CLI engine that was entered
- //exec returns to the engine in which it was started
• 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:
• disables pagination while the command is running
• disables command completion while the command is running
• 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:
Issue: 01 3HE 15820 AAAD TQZZA 01 79
Navigating in the MD-CLI
Note:
MD-CLI USER GUIDE
RELEASE 20.7.R1
•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
•use exit all to get to a known starting point: the operational root of the classic CLI or the MD-CLI engine
• 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.
• An executable with edit-config may fail if other users have locked the configuration.
• 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.
80
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.15 Displaying Information in the MD-CLI

3.15.1 Using the info Command

Navigating in the MD-CLI
The info command shows configuration or state information from the present context. The command can only be executed in a configuration mode for a configuration region or for the state branch. By default, all configured parameters in the candidate configuration datastore are displayed for a configuration region. For a state region, all elements that have a value are displayed. The syntax for the info command is as follows:
— info [[from] keyword] [converted] [detail] [full-context] [inheritance] [model] [units] [flat |
json | xml]
[ex:configure] A:admin@node-2# info ?
info [[from] <keyword>]
[[from] <keyword>]
<keyword> - (candidate|running|baseline|intended)
Source datastore
converted - Include converted third party model configuration from
the running datastore detail - Include default and unconfigured values full-context - Changes output format to display entire hierarchy on
each line inheritance - Include configuration inherited from configuration
model - Model for which to limit converted output to values units - Include unit types for applicable elements
Choice: output-format flat :- Show the context from the pwc on each line json :- Show the output in indented JSON format xml :- Show the output in indented XML format
groups
Table 16 describes the info command options.
Table 16 Info Command Options
Option Description
[from] (candidate | running | baseline | intended)
Specify the source datastore (default is from candidate if no other options are specified).
This option is not supported for state elements.
Issue: 01 3HE 15820 AAAD TQZZA 01 81
Navigating in the MD-CLI
Table 16 Info Command Options (Continued)
MD-CLI USER GUIDE
RELEASE 20.7.R1
Option Description
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
full-context Show the full context on each line
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.
model Model which limits the converted output.
This option is only supported with the converted option.
units Include unit types for applicable elements
flat Show the context on each line starting from the present
working context
json Show the output in indented JSON format
xml Show the output in indented XML format
Figure 1 shows the info command options that can be used to display information
from configuration groups or third party models.
82
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE
sw2060.1
Display third party configuration converted to Nokia configuration
Display the configuration with configuration groups inheritance
Display third party configuration converted to Nokia configuration with configuration groups inheritance
Display the expanded configuration applied by the router
Info Option Datastore
Nokia Configuration
Configuration Groups
Third Party Model Configuration
converted
inheritance
converted inheritance
intended
Running
Any
Running
Intended
Native format
Native format
Nokia and converted third party configuration with origin comments
groups and unexpanded apply­groups statements
groups and expanded apply­groups statements with origin
comments
groups and expanded apply­groups statements with origin
comments
Expanded configuration without groups or apply-groups statements, or origin comments
Usage
Nokia and converted third party configuration with origin comments
Navigating in the MD-CLI
RELEASE 20.7.R1
Figure 1 Displaying Configuration from Configuration Groups and Third Party Models
Issue: 01 3HE 15820 AAAD TQZZA 01 83
Note: The output of info flat and info full-context display braces relative to the context from which the command is executed so that the session remains in the context if the output is pasted.
Execute the command from the configuration root to stay at the root context without navigating.
Note: As indicated in the choice statement, the flat, json, and xml options are mutually exclusive options. Other unsupported combinations include:
•[from] candidate and converted
•[from] intended and converted
•[from] intended and detail
•[from] intended and inheritance
full-context and flat
model and detail
model and inheritance
units and json
units and xml
The order of the configuration output is as follows:
• keys are displayed on the same line as the command element
Navigating in the MD-CLI
The following displays configured information for configure router bgp
*[ex:configure router "Base" bgp] A:admin@node-2# info
The following output displays the same information in JSON format:
[ex:configure router "Base" bgp] A:admin@node-2# info json {
}
MD-CLI USER GUIDE
RELEASE 20.7.R1
apply-groups is displayed, if applicable
admin-state is displayed, if applicable
description is displayed, if applicable
• other top-level elements are displayed in alphabetical order
connect-retry 90 local-preference 250 add-paths {
ipv4 {
receive true
}
}
"nokia-conf:connect-retry": 90, "nokia-conf:local-preference": 250, "nokia-conf:add-paths": {
"ipv4": {
"receive": true
}
}
84
The following output displays the same information in XML format:
[ex:configure router "Base" bgp] A:admin@node-2# info xml <connect-retry xmlns="urn:nokia.com:sros:ns:yang:sr:conf">90</connect-retry> <local-preference xmlns="urn:nokia.com:sros:ns:yang:sr:conf">250</local-preference> <add-paths xmlns="urn:nokia.com:sros:ns:yang:sr:conf">
<ipv4>
<receive>true</receive>
</ipv4>
</add-paths>
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
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
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 xml options, the double hash (##) elements (indicating unconfigured elements or dynamic defaults) are enclosed within XML comments.
*[ex:configure router "Base" bgp] A:admin@node-2# info detail xml <!-- ## apply-groups --> <!-- ## apply-groups-exclude --> <admin-state xmlns="urn:nokia.com:sros:ns:yang:sr:conf">enable</admin-state> <!-- ## description --> <connect-retry xmlns="urn:nokia.com:sros:ns:yang:sr:conf">90</connect-retry> <keepalive xmlns="urn:nokia.com:sros:ns:yang:sr:conf">30</keepalive> <damping xmlns="urn:nokia.com:sros:ns:yang:sr:conf">false</damping> <local-preference xmlns="urn:nokia.com:sros:ns:yang:sr:conf">250</local-preference>
---snip---
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 displaying comments within the JSON format.
[ex:configure router "Base" bgp] A:admin@node-2# info detail json {
"nokia-conf:admin-state": "enable",
"nokia-conf:connect-retry": 90,
"nokia-conf:keepalive": 30,
"nokia-conf:damping": false,
"nokia-conf:local-preference": 250,
"nokia-conf:loop-detect": "ignore-loop",
"nokia-conf:loop-detect-threshold": 0,
"nokia-conf:selective-label-ipv4-install": false,
"nokia-conf:min-route-advertisement": 30,
"nokia-conf:aggregator-id-zero": false,
"nokia-conf:preference": 170,
"nokia-conf:block-prefix-sid": false,
Issue: 01 3HE 15820 AAAD TQZZA 01 85
Navigating in the MD-CLI
---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
MD-CLI USER GUIDE
RELEASE 20.7.R1
"nokia-conf:client-reflect": true,
"nokia-conf:vpn-apply-export": false,
"nokia-conf:vpn-apply-import": false,
"nokia-conf:asn-4-byte": true,
"nokia-conf:path-mtu-discovery": false,
"nokia-conf:enforce-first-as": false,
"nokia-conf:initial-send-delay-zero": false,
"nokia-conf:inter-as-vpn": false,
"nokia-conf:purge-timer": 10,
"nokia-conf:route-table-install": true,
## apply-groups
admin-state enable ## description
connect-retry 90
keepalive 30
damping false
local-preference 250
---snip---
## 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
---snip---
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
---snip---
segment-routing { } ## segment-routing apply-groups
segment-routing { admin-state disable } ## segment-routing prefix-sid-range
---snip---
The full-context option displays the full context of every element from the present working context on a single line.
86
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
[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 }
/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
---snip---
/configure router "Base" bgp add-paths { }
/configure router "Base" bgp add-paths { ipv4 } ## /configure router "Base" bgp add-paths ipv4 send
/configure router "Base" bgp add-paths { ipv4 receive true }
/configure router "Base" bgp add-paths { ipv6 }
---snip---
When the full-context option is used in conjunction with the json or xml option, the output is modified to display the configuration back to the YANG model aware root of the configuration tree.
[ex:configure router "Base" bgp] A:admin@node-2# info full-context json {
"nokia-conf:configure": {
"router": [
{
"router-name": "Base", "bgp": {
"connect-retry": 90, "local-preference": 250, "add-paths": {
"ipv4": {
"receive": true
}
Issue: 01 3HE 15820 AAAD TQZZA 01 87
Navigating in the MD-CLI
}
[ex:configure router "Base" bgp] A:admin@node-2# info full-context xml <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf">
</configure>
MD-CLI USER GUIDE
RELEASE 20.7.R1
}
}
}
]
}
<router>
<router-name>Base</router-name> <bgp>
<connect-retry>90</connect-retry> <local-preference>250</local-preference> <add-paths>
<ipv4>
<receive>true</receive>
</ipv4>
</add-paths>
</bgp>
</router>
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 7450 ESS, 7750 SR, 7950 XRS, and VSR 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#
88
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.15.2 Using show Commands

Navigating in the MD-CLI
The CLI show commands can be used in the MD-CLI as well as in the classic CLI, in the following ways:
•use /show or show (while in the operational root []) in the MD-CLI engine
•use show in the classic CLI engine
(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 ===============================================================================
^^^^
Output modifiers (match, count, and no-more) can also be used with the show command. See Using Output Modifiers in 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.
Issue: 01 3HE 15820 AAAD TQZZA 01 89
Navigating 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.
The following classic CLI show commands are not available in the MD-CLI:
MD-CLI USER GUIDE
RELEASE 20.7.R1
• show alias
• show bof
• show config
• show debug
• show system candidate
• show system rollback
90
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

3.16 MD-CLI Admin Tree

Navigating in the MD-CLI
The admin commands are available only in the operational mode of the MD-CLI, or they can be executed with /admin from a command context.
Refer to the 7450 ESS, 7750 SR, 7950 XRS, and VSR 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 configuration configure {
card 1 {
admin-state enable card-type iom4-e mda1{
admin-state enable
mda-type me10-10gb-sfp+ } mda2{
admin-state enable
mda-type me10-10gb-sfp+ } fp1{ }
} log {
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 {
Issue: 01 3HE 15820 AAAD TQZZA 01 91
Navigating in the MD-CLI
---snip---
[] A:admin@cses-V98# admin show configuration full-context
configure { log filter 1001 entry 10 description "Collect only events of major seve rity or higher" }
MD-CLI USER GUIDE
RELEASE 20.7.R1
main true } destination {
memory {
max-entries 500
} }
} } port 1/1/1 {
admin-state enable
/configure { } /configure { card 1 } /configure { card 1 card-type iom4-e } /configure { card 1 mda 1 } /configure { card 1 mda 1 admin-state enable } /configure { card 1 mda 1 mda-type me10-10gb-sfp+ } /configure { card 1 mda 2 } /configure { card 1 mda 2 admin-state enable } /configure { card 1 mda 2 mda-type me10-10gb-sfp+ } /configure { card 1 fp 1 } /configure { log } /configure { log filter 1001 } /configure { log filter 1001 entry 10 } /
/configure { log filter 1001 entry 10 action forward } /configure { log filter 1001 entry 10 match } /configure { log filter 1001 entry 10 match severity } /configure { log filter 1001 entry 10 match severity gte major } /configure { log log-id 99 } /configure { log log-id 99 description "Default System Log" } /configure { log log-id 99 source } /configure { log log-id 99 source main true } /configure { log log-id 99 destination } /configure { log log-id 99 destination memory } /configure { log log-id 99 destination memory max-entries 500 } /configure { log log-id 100 } /configure { log log-id 100 description "Default Serious Errors Log" } /configure { log log-id 100 filter 1001 } /configure { log log-id 100 source } /configure { log log-id 100 source main true } /configure { log log-id 100 destination } /configure { log log-id 100 destination memory } /configure { log log-id 100 destination memory max-entries 500 } /configure { port 1/1/1 }
92
---snip---
[] A:admin@node-2# admin show configuration json {
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Navigating in the MD-CLI
"nokia-conf:configure": {
"card": [
{
"slot-number": 1, "admin-state": "enable", "card-type": "iom4-e", "mda": [
{
"mda-slot": 1, "admin-state": "enable",
"mda-type": "me10-10gb-sfp+" }, {
"mda-slot": 2,
"admin-state": "enable",
"mda-type": "me10-10gb-sfp+" }
], "fp": [
{
"fp-number": 1 }
]
} ], "log": {
"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,
Issue: 01 3HE 15820 AAAD TQZZA 01 93
Navigating in the MD-CLI
---snip---
[] A:admin@node-2# admin show configuration xml <?xml version="1.0" encoding="UTF-8"?> <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf">
description>
MD-CLI USER GUIDE
RELEASE 20.7.R1
"description": "Default Serious Errors Log", "filter": 1001, "source": {
"main": true }, "destination": {
"memory": {
"max-entries": 500
} }
}
] }, "port": [
{
"port-id": "1/1/1", "admin-state": "enable"
}
<card>
<slot-number>1</slot-number> <card-type>imm48-sfp+2-qsfp28</card-type> <mda>
<mda-slot>1</mda-slot> </mda>
</card> <card>
<slot-number>2</slot-number> <card-type>imm36-100g-qsfp28</card-type> <mda>
<mda-slot>1</mda-slot> </mda>
</card> <log>
<filter>
<filter-id>1001</filter-id>
<entry>
<entry-id>10</entry-id> <description>"Collect only events of major severity or higher"</
94
---snip---
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1

4 Configuring in the MD-CLI

4.1 Configuration Workflow

4.1.1 MD-CLI Session Modes

Configuring in the MD-CLI
There are two modes in the MD-CLI:
• operational — a user can run all commands to monitor or troubleshoot the router, but the router configuration cannot be changed
• configuration — a user can run all commands to monitor or troubleshoot the router. In private, exclusive, or global configuration mode, the router configuration can be changed. In read-only configuration mode, the user can only view the router configuration.
The first line of the user prompt indicates the active configuration mode. For example:
•[pr:configure] — indicates a user in private configuration mode (implicit configuration workflow)
•(ex) [configure] — indicates a user in exclusive configuration mode (explicit configuration workflow)
At login, an MD-CLI session always starts in operational mode. To configure the router, the user must enter a configuration mode using the explicit or implicit configuration workflow.
The configuration workflow (implicit or explicit) determines if the user is restricted to the configure branch or if the user can navigate freely while in configuration mode. Configuration workflows are detailed in Implicit and Explicit Configuration Workflows.
The configuration mode (private, exclusive, global, or read-only) determines the interaction with other simultaneous configuration sessions. Candidate configuration modes are detailed in Candidate Configuration Modes.
Issue: 01 3HE 15820 AAAD TQZZA 01 95
Configuring in the MD-CLI
sw0480
candidate
configuration
make changes commit
running
configuration

4.1.2 Transactional Configuration Method

The MD-CLI transactional configuration method is a two-step process in which configuration changes are made in a candidate configuration. When the configuration is committed, the changes are copied to the running configuration and become active.
Figure 2 shows the flow of configuration changes from the candidate configuration to
the running configuration.
Figure 2 Flow of Configuration Changes
MD-CLI USER GUIDE
RELEASE 20.7.R1
Other non-router configuration operations, such as changing the MD-CLI session environment are active immediately.
The MD-CLI configuration method differs from the classic CLI in the following ways:
• In the classic CLI, changes to the router configuration are immediately activated in the running configuration. A strict configuration order must be maintained or the configuration fails.
• In the MD-CLI, the transactional configuration method allows multiple configuration changes to be made in any order in the candidate configuration. The system applies the correct ordering when the configuration is activated with the commit command.

4.1.3 Implicit and Explicit Configuration Workflows

The MD-CLI supports two configuration workflows:
• Implicit configuration workflow
- Navigation is restricted to the configure branch and its descendants.
- Operational commands require an absolute path and error when
incomplete.
96
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Configuring in the MD-CLI
- configure {private | exclusive | global | read-only} enters configuration mode and navigates in the configure branch. There is no default configuration mode.
- exit all leaves configuration mode and navigates to the operational root.
• Explicit configuration workflow
- Navigation is unrestricted while in configuration mode.
- Operational commands while in the configure branch require an absolute
path and navigate when incomplete.
- edit-config {private | exclusive | global | read-only} enters configuration mode without navigating. There is no default configuration mode.
- quit-config leaves configuration mode without navigating. The quit-config command is not available in the configure branch.
Table 17 compares the implicit and explicit configuration workflows.
Table 17 Implicit and Explicit Configuration Mode Features
Implicit Configuration Workflow
Use User focused on
configuration tasks in the configure branch
Flexibility Run operational commands
or configuration commands from the configure branch
configure
edit-config
exit all or CTRL-z or / Leaves configuration mode
quit-config Leaves configuration mode
Commands that result in an action or display output
Commands that navigate out of the configure branch
Enters configuration mode and navigates to the configure branch
and navigates to the operational root
Execute the command Execute the command
Not allowed Navigate
Explicit Configuration Workflow
Power user mode with unrestricted navigation capabilities
Run operational commands or configuration commands anywhere
1
Navigates to the configure branch (after edit-config command)
Enters configuration mode
Navigates to the operational root
1
Issue: 01 3HE 15820 AAAD TQZZA 01 97
Configuring in the MD-CLI
Table 17 Implicit and Explicit Configuration Mode Features (Continued)
MD-CLI USER GUIDE
RELEASE 20.7.R1
info and configuration
Implicit Configuration Workflow
Allowed Allowed
Explicit Configuration Workflow
commands in the configure branch
info and configuration
Not allowed Allowed
commands out of the
configure branch
Notes:
1. Requires specifying the configuration mode (private | exclusive | global | read­only)
4.1.3.1 Using the Implicit Configuration Workflow
In the implicit configuration workflow, navigation while in configuration mode is restricted to the configure branch and its descendants.
The configure {private | exclusive | global | read-only} command places the user session in the specified configuration mode and navigates to the top of the configuration tree (/configure). The first line of the session prompt indicates the configuration mode prepended to the context and separated with a colon.
98
[] A:admin@node-2# configure exclusive INFO: CLI #2060: Entering exclusive configuration mode INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
[ex:configure] A:admin@node-2#
When the MD-CLI session is in operational mode, the configure command only accepts a configuration mode parameter and cannot be followed by a path to navigate nor by a configuration element to edit the router configuration.
[] A:admin@node-2# configure exclusive router
^^^^^^
MINOR: CLI #2069: Operation not allowed - currently in operational mode
[] A:admin@node-2#
3HE 15820 AAAD TQZZA 01 Issue: 01
MD-CLI USER GUIDE RELEASE 20.7.R1
Configuring in the MD-CLI
The following navigation commands leave configuration mode if they cause navigation outside the configuration branch.
back, or back with a number greater than the present working context depth
exit, or exit all
• CTRL-z
/
}
[ex:configure router "Base"] A:admin@node-2# exit all INFO: CLI #2064: Exiting exclusive configuration mode
[] A:admin@node-2#
Commands that do not navigate outside the configure branch or that result in an action or display output are allowed.
[ex:configure] A:admin@node-2# /show uptime System Up Time : 3 days, 00:27:49.35 (hr:min:sec)
[ex:configure] A:admin@node-2#
[ex:configure] A:admin@node-2# /environment more false
[ex:configure] A:admin@node-2#
Commands that navigate out of a configure branch are not allowed.
[ex:configure] A:admin@node-2# /show router MINOR: CLI #2069: Operation not allowed -
cannot navigate out of configuration region
[ex:configure] A:admin@node-2#
[ex:configure] A:admin@node-2# /tools dump MINOR: CLI #2069: Operation not allowed -
cannot navigate out of configuration region
[ex:configure] A:admin@node-2#
Issue: 01 3HE 15820 AAAD TQZZA 01 99
Configuring in the MD-CLI
4.1.3.2 Using the Explicit Configuration Workflow
In the explicit configuration workflow, navigation while in configuration mode is unrestricted. Operational and configuration commands can be executed from any context.
The edit-config {private | exclusive | global | read-only} command places the user session in the specified configuration mode. The present working context is not changed. The first line of the session prompt indicates the configuration mode between round brackets.
[show router] A:admin@node-2# edit-config exclusive INFO: CLI #2060: Entering exclusive configuration mode INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
(ex)[show router] A:admin@node-2#
When the MD-CLI session is in configuration mode, the configure command can be followed by a path to navigate or by a configuration element to edit the router configuration.
MD-CLI USER GUIDE
RELEASE 20.7.R1
(ex)[] A:admin@node-2# show router
(ex)[show router] A:admin@node-2# /configure system time zone standard name utc
*(ex)[show router] A:admin@node-2# /configure router
*(ex)[configure router "Base"] A:admin@node-2#
Commands that result in an action or display output can be executed in the configure branch. Navigation outside the configure branch is allowed and does not exit the configuration mode.
(ex)[configure router "Base"] A:admin@node-2# /show uptime System Up Time : 8 days, 23:16:45.01 (hr:min:sec)
(ex)[configure router "Base"] A:admin@node-2# /tools
(ex)[tools] A:admin@node-2#
Configuration commands, such as info and commit, can be executed outside the configure branch.
100
3HE 15820 AAAD TQZZA 01 Issue: 01
Loading...