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.
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.
6.2Logging Debug Events in the MD-CLI .....................................................216
7Advanced Tips and Features.....................................................219
7.1Discarding Changes in Specific Contexts................................................219
8Creating MD-CLI Configuration from the Classic CLI .............221
9Standards and Protocol Support ..............................................227
6
3HE 15820 AAAD TQZZA 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
1MD-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.1Using 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: 013HE 15820 AAAD TQZZA 017
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 1Command Syntax Symbols
SymbolDescription
| 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.
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 MDCLI, 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.1Enabling 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.
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: 013HE 15820 AAAD TQZZA 019
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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
2.2Switching 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.
(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 [mdcli]), the command is rejected.
A:node-2# //
MINOR: CLI #2053 Switching CLI engine is not authorized
A:node-2#
Issue: 013HE 15820 AAAD TQZZA 0111
Controlling the Management Interface Configuration
Mode
2.2.1Executing 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
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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
2.2.2MD-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
[]
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: 013HE 15820 AAAD TQZZA 0113
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 dirPress CTRL-w# stay in the MD-CLI engine
[]
A:admin@node-2# //file dirPress 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 dirPress 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
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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
2.2.3Switching 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.4Switching 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: 013HE 15820 AAAD TQZZA 0115
Controlling the Management Interface Configuration
Mode
MD-CLI USER GUIDE
RELEASE 20.7.R1
16
3HE 15820 AAAD TQZZA 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3Navigating in the MD-CLI
3.1The 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: 013HE 15820 AAAD TQZZA 0117
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.
• 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”, “policyb”, 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 01Issue: 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).
• 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-ofdate
22
3HE 15820 AAAD TQZZA 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.3Environment 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:
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: 013HE 15820 AAAD TQZZA 0123
Navigating in the MD-CLI
3.3.1Customizing 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.2Customizing the Session Prompt
3.3.2.1Customizing 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.
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.
admin-state- Administrative state of the progress indicator
delay- Delay before progress indicator is displayed
type- Progress indicator output style
3.3.4Customizing 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: 013HE 15820 AAAD TQZZA 0127
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.5Customizing 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.6Customizing the Message Level Security Settings
The INFO: CLI messages are displayed by default. The environment messagesecurity-level command suppresses the INFO messages by changing the setting to
warning.
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 {
(ex)[configure system management-interface cli md-cli environment]
A:tstuser@node-2#
Issue: 013HE 15820 AAAD TQZZA 0129
Navigating in the MD-CLI
3.4Using 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 01Issue: 01
Loading...
+ 226 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.