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
Loading...
+ 226 hidden pages