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
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: 013HE 15820 AAAD TQZZA 0131
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.
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.1Indicators in the Online Help
Table 2 describes the meaning of the indicators displayed in the online help.
Table 2Root Commands
SymbolDescription
+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 01Issue: 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
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.1Descriptions and Format Guidelines for Leafs and Leaflists
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 ?
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
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.2Immutable 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 01Issue: 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:
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
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 ?
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.
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.4Optional 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 01Issue: 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 ?
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.2OAM ETH-CFM Commands
The following command issues an Ethernet Connectivity Fault Management (ETHCFM) 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.
Table 7 describes the parameters of the available OAM ETH-CFM commands.
Table 7OAM ETH-CFM Parameters
ETH-CFM ParameterDescription
mac-address | numberUnicast 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.
multicastBuild 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 numberLocal MEP ID
md-admin-name referenceReferenced domain name
ma-admin-name referenceReferenced association name
data-length numberSize of the padding to be added to the frame
interval numberTime between probes within the test run
Issue: 013HE 15820 AAAD TQZZA 0141
Navigating in the MD-CLI
Table 7OAM ETH-CFM Parameters (Continued)
MD-CLI USER GUIDE
RELEASE 20.7.R1
ETH-CFM ParameterDescription
lbm-padding numberSize 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 numberPriority of the frame, which can be manipulated by
QoS policies
send-count numberNumber of messages to send
size numberSize 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 numberTime 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 numberTime to Live for a returned linktrace
3.5.1.3OAM OAM-PM Commands
The following command issues an on-demand OAM Performance Monitoring (OAMPM) test.
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: 013HE 15820 AAAD TQZZA 0147
Navigating in the MD-CLI
Table 12traceroute Parameters
MD-CLI USER GUIDE
RELEASE 20.7.R1
traceroute ParameterDescription
[destination-address] {ip-address |
string}
detailDisplay the MPLS label stack information (if
numericAvoid looking up DNS names when displaying
router-instance stringRouter or VPRN service name
source-address {ipv4-address |
ipv6-address}
tos numberToS bits in the IP header of the probe packets
ttl numberTTL value included in the traceroute request
wait numberTime 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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.6Navigating 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
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# 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)[configure card 1 mda 2 network]
A:admin@node-2# top
*(ex)[configure]
A:admin@node-2#
• exit
50
3HE 15820 AAAD TQZZA 01Issue: 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
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.
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 01Issue: 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
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.
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 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.
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.
3.10.1.1Completion 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.
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 ?
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.
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
===============================================================================
UserTypeLogin timeIdle time
------------------------------------------------------------------------------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 IDFrom
Console--6d 19:38:00 --
6--
#23192.168.144.87
24192.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.1Idle 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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.12Using 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.1Using | 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.
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 14Special Characters in Extended Regular Expressions
Special characterDescription
.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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
Navigating in the MD-CLI
Table 14Special Characters in Extended Regular Expressions
Special characterDescription
|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
===============================================================================
PortAdmin Link PortCfg Oper LAG/ Port Port PortC/QS/S/XFP/
IdStateStateMTU MTU Bndl Mode Encp TypeMDIMDX
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 01Issue: 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
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 (+)).
A character class expression is expressed as a character class name enclosed
within bracket colon (“[:” and “:]”) delimiters.Table 15 defines the character class
expressions.
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.2Using 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 | 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: 013HE 15820 AAAD TQZZA 0173
Navigating in the MD-CLI
3.12.3Using 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.4Using 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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.13Navigating Contexts in the MD-CLI
3.13.1Entering 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: 013HE 15820 AAAD TQZZA 0175
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.
Configuring a container navigates into the context.
[ex:configure router "Base"]
3HE 15820 AAAD TQZZA 01Issue: 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
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
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: 013HE 15820 AAAD TQZZA 0177
Navigating in the MD-CLI
3.13.2Exiting 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.
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.
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.1Using 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: 013HE 15820 AAAD TQZZA 0179
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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.15Displaying Information in the MD-CLI
3.15.1Using 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:
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
Specify the source datastore (default is from candidate if
no other options are specified).
This option is not supported for state elements.
Issue: 013HE 15820 AAAD TQZZA 0181
Navigating in the MD-CLI
Table 16Info Command Options (Continued)
MD-CLI USER GUIDE
RELEASE 20.7.R1
OptionDescription
convertedInclude 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.
detailInclude default and unconfigured values
full-contextShow the full context on each line
inheritanceInclude 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.
modelModel which limits the converted output.
This option is only supported with the converted option.
unitsInclude unit types for applicable elements
flatShow the context on each line starting from the present
working context
jsonShow the output in indented JSON format
xmlShow 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 01Issue: 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 OptionDatastore
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 applygroups statements
groups and expanded applygroups statements with origin
comments
groups and expanded applygroups 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 1Displaying Configuration from Configuration Groups and Third Party Models
Issue: 013HE 15820 AAAD TQZZA 0183
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
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
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.
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: 013HE 15820 AAAD TQZZA 0185
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
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
{
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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.15.2Using 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 IdDescription
(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 IdDescription
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.1Classic 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: 013HE 15820 AAAD TQZZA 0189
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 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
3.16MD-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 {
<entry-id>10</entry-id>
<description>"Collect only events of major severity or higher"</
94
---snip---
3HE 15820 AAAD TQZZA 01Issue: 01
MD-CLI USER GUIDE
RELEASE 20.7.R1
4Configuring in the MD-CLI
4.1Configuration Workflow
4.1.1MD-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: 013HE 15820 AAAD TQZZA 0195
Configuring in the MD-CLI
sw0480
candidate
configuration
make changescommit
running
configuration
4.1.2Transactional 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 2Flow 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.3Implicit 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 01Issue: 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 17Implicit and Explicit Configuration Mode Features
Implicit Configuration
Workflow
UseUser focused on
configuration tasks in the
configure branch
FlexibilityRun 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 commandExecute the command
Not allowedNavigate
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: 013HE 15820 AAAD TQZZA 0197
Configuring in the MD-CLI
Table 17Implicit and Explicit Configuration Mode Features (Continued)
MD-CLI USER GUIDE
RELEASE 20.7.R1
info and configuration
Implicit Configuration
Workflow
AllowedAllowed
Explicit Configuration
Workflow
commands in the configure
branch
info and configuration
Not allowedAllowed
commands out of the
configure branch
Notes:
1. Requires specifying the configuration mode (private | exclusive | global | readonly)
4.1.3.1Using 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.
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 01Issue: 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
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.
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
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)