Configuringinmdcli
Configuringinmdcli
RELEASE 20.7.R1
The first line of the user prompt indicates the active configuration mode. For
example:
Figure 2 shows the flow of configuration changes from the candidate configuration to
the running configuration.
sw0480
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.
Notes:
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.
[]
A:admin@node-2# configure exclusive
INFO: CLI #2060: Entering exclusive configuration mode
INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
[ex:configure]
A:admin@node-2#
When the MD-CLI session is in operational mode, the configure command only
accepts a configuration mode parameter and cannot be followed by a path to
navigate nor by a configuration element to edit the router configuration.
[]
A:admin@node-2# configure exclusive router
^^^^^^
MINOR: CLI #2069: Operation not allowed - currently in operational mode
[]
A:admin@node-2#
• back, or back with a number greater than the present working context depth
• exit, or exit all
• CTRL-z
•/
•}
[ex:configure router "Base"]
A:admin@node-2# exit all
INFO: CLI #2064: Exiting exclusive configuration mode
[]
A:admin@node-2#
Commands that do not navigate outside the configure branch or that result in an
action or display output are allowed.
[ex:configure]
A:admin@node-2# /show uptime
System Up Time : 3 days, 00:27:49.35 (hr:min:sec)
[ex:configure]
A:admin@node-2#
[ex:configure]
A:admin@node-2# /environment more false
[ex:configure]
A:admin@node-2#
[ex:configure]
A:admin@node-2# /show router
MINOR: CLI #2069: Operation not allowed -
cannot navigate out of configuration region
[ex:configure]
A:admin@node-2#
[ex:configure]
A:admin@node-2# /tools dump
MINOR: CLI #2069: Operation not allowed -
cannot navigate out of configuration region
[ex:configure]
A:admin@node-2#
The edit-config {private | exclusive | global | read-only} command places the user
session in the specified configuration mode. The present working context is not
changed. The first line of the session prompt indicates the configuration mode
between round brackets.
[show router]
A:admin@node-2# edit-config exclusive
INFO: CLI #2060: Entering exclusive configuration mode
INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
(ex)[show router]
A:admin@node-2#
When the MD-CLI session is in configuration mode, the configure command can be
followed by a path to navigate or by a configuration element to edit the router
configuration.
(ex)[]
A:admin@node-2# show router
(ex)[show router]
A:admin@node-2# /configure system time zone standard name utc
*(ex)[show router]
A:admin@node-2# /configure router
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)[tools]
A:admin@node-2#
Configuration commands, such as info and commit, can be executed outside the
configure branch.
(ex)[tools]
A:admin@node-2# info
configure {
log {
{
---snip---
(ex)[tools]
A:admin@node-2# commit
(ex)[tools]
A:admin@node-2#
The quit-config command exits configuration mode and places the session in
operational mode. The quit-config command must be executed from the operational
root. The present working context does not change.
(ex)[tools]
A:admin@node-2# exit all
(ex)[]
A:admin@node-2# quit-config
INFO: CLI #2064: Exiting exclusive configuration mode
[]
A:admin@node-2# configure exclusive
INFO: CLI #2060: Entering exclusive configuration mode
INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
[ex:configure]
A:admin@node-2# /show
MINOR: CLI #2069: Operation not allowed -
cannot navigate out of configuration region
[ex:configure]
A:admin@node-2# edit-config exclusive
(ex)[configure]
A:admin@node-2# /show
(ex)[show]
A:admin@node-2#
Single vs Multiple users can Only one user can Multiple users can Multiple users can
multiple simultaneously configure the global simultaneously have simultaneous
users configure their own candidate configure the shared read-only access to
private candidate global candidate the global candidate
Privacy User can see own User can see own User can see Users can see
changes. changes. changes from other changes from global
Changes are not Changes are visible global configuration or exclusive
visible for read-only for read-only sessions. configuration
sessions. sessions. Changes are visible sessions
for read-only
sessions.
Commits Own changes are Own changes are Changes made by all Users cannot commit
committed committed. global configuration
Commits from other sessions are
configuration changes committed
are blocked.
Note: Private configuration mode should not be used in the MD-CLI when the router is also
configured using NETCONF or gRPC for the following reasons:
sw0637
The running configuration is the active configuration of the router and is stored in the
running datastore. There is only one running configuration in the router and
therefore, only one running datastore. The running datastore is always instantiated.
Multiple candidate configurations can exist simultaneously in the router with one of
the following:
The global baseline datastore and global candidate datastore are always
instantiated.
• up to eight private candidate configurations. A private candidate configuration is
accessed by a single session in private configuration mode. The private baseline
datastore and private candidate datastore are instantiated when the user enters
the private configuration mode and the datastores are deleted from the router
when the user exits the private configuration mode.
• one single private exclusive candidate configuration for system use only. Only
one exclusive session can be active in the router at a time: either a user-started
exclusive configuration session accessing the global candidate configuration, or
a system-started private exclusive configuration session accessing a private
candidate configuration. For more information, see Exclusive Private
Configuration Session.
After a successful commit, the changes are copied to the running datastore, the
baseline datastore contains a new copy of the running datastore, and the candidate
datastore is empty.
• multiple private configuration sessions each access their own private candidate
configuration
• one or multiple private configuration sessions each access their own private
candidate configuration and one or multiple global configuration sessions all
accessing the global candidate configuration
• one or multiple private configuration sessions each access their own private
candidate configuration and one exclusive configuration session accessing the
global candidate configuration
• one or multiple private configuration sessions each access their own private
candidate configuration and one private exclusive configuration session
accessing a private candidate configuration
Each configuration session adds changes in the candidate datastore relative to the
baseline associated with the candidate configuration. The baseline datastore
contains a snapshot copy of the running datastore at a given time. Therefore,
multiple, simultaneous configuration sessions that are active in the router and that
access different candidate configurations have their own unique view of the
candidate configuration and cannot see other users’ changes, as shown in Figure 4.
running configuration
Figure 5 shows how the baseline datastore of user-2’s candidate configuration is out-
of-date after user-1 committed its changes. An exclamation mark (!) is shown in the
prompt to indicate an out-of-date baseline status.
Because the baseline is out-of-date, user-2 must update its candidate configuration
before committing. An update copies a new snapshot from the running datastore to
the baseline datastore and merges the changes from the candidate datastore, as
shown in Figure 6.
sw0640
With more than one user working on the same part of the configuration, conflicts can
occur when committed changes of one user’s configuration session are merged into
another user’s candidate configuration. A merge conflict occurs when a configuration
element is added, deleted, or modified in the candidate configuration and the same
configuration element is also added, deleted, or modified in the running configuration
after the baseline snapshot was taken. With the update command, the router
resolves each merge conflict and installs the result in the candidate configuration, as
shown in Figure 7.
In configuration mode, the administrator can use the following tools to check and
resolve potential merge conflicts:
• compare baseline running - list the changes that were made in the running
datastore since a snapshot copy was stored in the baseline datastore
• compare baseline candidate or compare - list the candidate configuration
changes
• update check - perform a dry run update. The router reports all merge conflicts
as if an update was performed. The candidate configuration, that is, the baseline
candidate datastore, is not changed with this command.
When entering private configuration mode, the following messages are displayed:
[]
A:admin@node-2# configure private
INFO: CLI #2070: Entering private configuration mode
INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
Note: To display the current active configuration sessions in the router, use the command
show system management-interface configuration-sessions.
When leaving private configuration mode, the following messages are displayed.
*[pr:configure]
A:admin@node-2# exit all
INFO: CLI #2071: Uncommitted changes are present in the candidate configuration.
Exiting private configuration mode will discard those changes.
Note: Private configuration mode should not be used in the MD-CLI when the router is also
configured using NETCONF or gRPC for the following reasons:
When entering exclusive configuration mode, the following messages are displayed:
Note:
When leaving exclusive configuration mode, the following messages are displayed.
*[ex:configure]
A:admin@node-2# exit all
INFO: CLI #2063: Uncommitted changes are present in the candidate configuration. E
xiting exclusive configuration mode will discard those changes.
When entering global configuration mode, the following messages are displayed:
[]
A:admin@node-2# configure global
INFO: CLI #2054: Entering global configuration mode
INFO: CLI #2055: Uncommitted changes are present in the candidate configuration
INFO: CLI #2075: Other global configuration sessions are active
Note:
• CLI #2055 and CLI #2075 are shown only when applicable.
• To display the current active configuration sessions in the router, use the command
show system management-interface configuration-sessions.
When leaving global configuration mode, the following messages are displayed.
*[gl:configure]
A:admin@node-2# exit all
INFO: CLI #2056: Exiting global configuration mode
INFO: CLI #2057: Uncommitted changes are kept in the candidate configuration
[]
A:admin@node-2# configure read-only
INFO: CLI #2066: Entering read-only configuration mode
*[ro:configure]
A:admin@node-2# exit all
INFO: CLI #2067: Exiting read-only configuration mode
Configuration and To
Operational Mode
Global Exclusive Read-Only Private Operational
Transition
Mode
Private X X X X1 Allowed,
uncommitted
changes are
discarded
[]
A:admin@node-2# edit-config exclusive
INFO: CLI #2060: Entering exclusive configuration mode
INFO: CLI #2061: Uncommitted changes are discarded on configuration mode exit
(ex)[]
A:admin@node-2# configure router interface my-int
[]
A:admin@node-2# edit-config global
INFO: CLI #2054: Entering global configuration mode
INFO: CLI #2075: Other global configuration sessions are active
(gl)[]
A:admin@node-2# configure router interface new-int
Note: Exclusive private is not a configuration mode. An MD-CLI session cannot enter an
exclusive private configuration mode.
• The management interface configuration mode is set to mixed, with one of the
following actions:
- an SNMP set operation
- any (immediate) configuration performed in the classic CLI engine
- a gNMI configuration operation
• The management interface configuration mode is set to model-driven, with the
following action:
- a gNMI configuration operation
In this example, the user pr-user has profile admin-private. Entries 3 and 4 in the local
profile effectively deny users in the admin-private profile from entering the exclusive
configuration mode in the MD-CLI.
[]
A:pr-user@node-2# configure exclusive
MINOR: MGMT_CORE #2020: Permission denied - unauthorized use of 'configure'
[]
A:pr-user@node-2# configure ?
configure
Configuration modes:
global - Enter global (shared) mode for candidate configuration.
private - Enter private mode for candidate configuration.
read-only - Enter read-only mode for candidate configuration.
[]
A:pr-user@node-2# edit-config exclusive
MINOR: MGMT_CORE #2020: Permission denied - unauthorized use of 'edit-config'
[]
A:pr-user@node-2# edit-config ?
edit-config
Configuration modes:
global - Enter global (shared) mode for candidate configuration.
private - Enter private mode for candidate configuration.
read-only - Enter read-only mode for candidate configuration.
The following additional entries to the profile deny users from entering the global
configuration mode in the MD-CLI.
---snip---
entry 5 {
## apply-groups
## description
action deny
match "configure global"
}
entry 6 {
## apply-groups
## description
action deny
match "edit-config global"
}
[]
A:pr-user@node-2# configure ?
configure
Configuration modes:
private - Enter private mode for candidate configuration.
read-only - Enter read-only mode for candidate configuration.
[]
A:pr-user@node-2# edit-config ?
edit-config
Configuration modes:
private - Enter private mode for candidate configuration.
read-only - Enter read-only mode for candidate configuration.
[]
A:pr-user@node-2# configure global
MINOR: MGMT_CORE #2020: Permission denied - unauthorized use of 'configure'
[]
A:pr-user@node-2# edit-config global
MINOR: MGMT_CORE #2020: Permission denied - unauthorized use of 'edit-config'
Note: When entering commands in the MD-CLI, whether from a load file or explicitly in the
CLI prompt, all input after a hash (#) is treated as a comment and is ignored.
The current configuration of a parameter is available via the info detail command,
even if it is the default value or if the parameter is in an unconfigured state (indicated
by ##). The display of default values allows an administrator to view the
configuration, particularly in a multi-vendor network with different default settings. An
operator may choose to explicitly configure a setting that persists rather than using
the default, in case the default changes.
Refer to the 7450 ESS, 7750 SR, 7950 XRS, and VSR MD-CLI Command
Reference Guide for configuration commands and their appropriate syntax.
Key leafs may have an optional default value that can be used as shorthand notation
where a certain default is assumed. For example, configure router bgp with no
instance value expands to configure router “Base” bgp. Default values are
implemented as follows:
(ex)[]
A:admin@node-2# configure router isis
(ex)[]
A:admin@node-2# configure router ospf
• decimal
Enter an integer (whole number) without spaces; for example, 123456.
• binary
Enter 0b followed by the binary value without spaces; for example,
0b1111000100100000. Negative values are not accepted.
• hexadecimal
Enter 0x followed by the hexadecimal value in lowercase or uppercase without
spaces; for example, 0x1E240 or 0x1e240. Negative values are not accepted.
Integer values are displayed in decimal format, unless a different output format is
specified internally by the system.
*(ex)[configure router "Base" bgp]
A:admin@node-2# connect-retry 0b100100101001
In this example, the etype parameter is a hexadecimal output value. A decimal value
can be entered, but the value is displayed in hexadecimal format.
etype <number>
<number> - <0x600..0xffff>
Ethernet type
Note: Unions of integer and enumerated values do not support binary or hexadecimal input.
In the following example of a command with a union of data types, the pir command
can have an integer value or it can be defined with the max enumerated value. If a
numerical value is entered for pir, it must be entered as a decimal number.
Administrative PIR
*[ex:configure cflowd]
A:admin@node-2# collector ?
*[ex:configure cflowd]
A:admin@node-2# collector 10.20.30.40 ?
port <number>
<number> - <1..65535>
UDP port number on the remote Cflowd collector host to receive the exported
Cflowd data
The IP address and port number can be entered in one of the following ways:
*(ex)[configure cflowd]
A:admin@node-2# collector ip-address 10.10.20.30 port 7
*(ex)[configure cflowd]
A:admin@node-2# collector 10.10.20.30 port 7
There are some exceptions where the first key of a list is named. In these cases, the
key name must be entered. In the following example, the key name index must be
entered.
service-name <reference>
<reference> - <1..64 characters> - configure service ies <service-name>
interface-name <reference>
<reference> - <1..32 - configure service ies <./service-name>
characters> interface <interface-name>
Auto-completion does not select or complete the name of the first key if it is optional.
In the following example, the key name for ma-admin-name is optional as indicated
by the square brackets, and is not auto-completed when Tab is entered.
[ma-admin-name] <string>
<string> - <1..64 characters>
<ma-admin-name>
If the name of the first key is optional and is not entered as part of the command, the
key name can be used as the actual value of the key if it is enclosed in quotation
marks.
eth-cfm
domain "dmtest"
association "ma-admin-name"
If the optional key name is entered, it can be specified as the actual value of the key
with or without the quotation marks.
For system-ordered lists, list entries are automatically reordered. In the following
example, the list is reordered based on the alphabetical order of the string name
identifying the list instance.
[ex:configure]
A:admin@node-2# eth-cfm ?
eth-cfm
[ex:configure]
A:admin@node-2# eth-cfm
[ex:configure eth-cfm]
A:admin@node-2# domain ?
[md-admin-name] <string>
<string> - <1..64 characters>
[ex:configure eth-cfm]
A:admin@node-2# domain zero } domain two } domain four } domain five }
*[ex:configure eth-cfm]
A:admin@node-2# info
domain "five" {
}
domain "four" {
}
domain "two" {
}
domain "zero" {
}
For user-ordered lists, new entries are appended to the end of the list.
To reorder a user-ordered list, the list can be deleted and recreated using the desired
order. Alternatively, the tilde (~) character can be used to replace a list, effectively
deleting and recreating the list in one step.
It is possible to insert entries into an existing user-ordered list by using the insert
command.
In the following configuration example, the list begins with two entries, named-entry
“one” and named-entry “ten”.
A:admin@node-2# back
Global commands:
after - Insert a named-entry in the user-ordered list after
another specified named-entry
before - Insert a named-entry in the user-ordered list before
another specified named-entry
beginning - Insert a named-entry at the beginning of the user-
ordered list
end - Insert a named-entry at the end of the user-ordered list
}
named-entry "one" {
}
named-entry "four" {
}
named-entry "six" {
}
named-entry "ten" {
}
named-entry "twenty" {
}
The default behavior of the insert command is to return immediately to the present
working context. To drop into the newly-inserted entry, add the { keystroke, as shown
in the following example.
For lists in which the leafs are all keys (“key-only lists”), the creation of a single entry
returns the user to the same context; that is, the MD-CLI session does not enter the
context of the list member. This allows the user to enter multiple list items without the
need to exit after each item. For example, station is a list with a single leaf that is the
key. After each station entry, the session maintains the same context and other
station entries can be added without applying the back or exit command.
A:admin@node-2# ?
Single or multiple leaf-list entries can be added in a single command line with the use
of brackets ([]).
For leaf-lists ordered by the system, the leaf-list entries are automatically reordered,
as shown in the following example.
client-meg-level <value>
client-meg-level [<value>...] - 1..7 system-ordered values separated by spaces
enclosed by brackets
<value> - <number>
<number> - <1..7>
Client MEG level for AIS message generation
family <value>
family [<value>...] - 1..20 system-ordered values separated by spaces enclosed
by brackets
<value> - <keyword>
<keyword> - (ipv4|vpn-ipv4|ipv6|mcast-ipv4|vpn-ipv6|l2-vpn|mvpn-ipv4|mdt-
safi|ms-pw|flow-ipv4|route-target|mcast-vpn-ipv4|mvpn-ipv6|
flow-ipv6|evpn|mcast-ipv6|label-ipv4|label-ipv6|bgp-ls|mcast-
vpn-ipv6|sr-policy-ipv4|sr-policy-ipv6)
For user-ordered leaf-lists, new entries are appended to the end of the leaf-list.
To reorder a user-ordered leaf-list, the leaf-list can be deleted and recreated using
the desired order. Alternatively, the tilde (~) character can be used to replace a leaf-
list, effectively deleting and recreating the leaf-list in one step.
(ex)[]
A:admin@node-2# configure router isis 5
Static units that have no conversion factor must always be entered in the base unit
value; for example, a unit of packets per second, or bit errors.
• as a value without a unit — the value is interpreted as the defined base unit.
Decimal, binary, and hexadecimal numbers are supported. For example,
transmit-interval has a base unit of deciseconds. Entering transmit-interval
10, without specifying a unit, configures the interval to 10 deciseconds.
[ex:configure port 1/1/1 ethernet efm-oam]
A:admin@node-2# transmit-interval ?
transmit-interval <number>
<number> - <1..600> - deciseconds
Default - 10
The units for the leaf can be displayed using the units option of the info
command:
• as unique value-unit tuples — the units are separated by a space in any order,
and the same unit cannot be used more than once. The value is interpreted as
the specified unit and can only be entered as a decimal number. For example,
there are many acceptable formats to enter 55 deciseconds for transmit-
interval, including the following:
*[ex:configure port 1/1/1 ethernet efm-oam]
A:admin@node-2# info
transmit-interval 55
The configured value is displayed as a positive integer in the defined base unit.
Because the unit for transmit-interval is defined as deciseconds, the value
displayed in the info command is in deciseconds, regardless of the format in
which it was entered.
*[ex:configure port 1/1/1 ethernet efm-oam]
A:admin@node-2# info
transmit-interval 55
The input value is calculated based on the input of all input tuples and validated after
Enter is pressed. For example, entering 900 (deciseconds) for transmit-interval
results in an error display, as 990 deciseconds is not in the element range.
Entering a value followed by Space and Tab displays valid units for the value, as in
the following example. For a value of 900 for transmit-interval, the system displays
valid unit possibilities, listed in alphabetical order.
If a unit is already present in the input, it is suppressed for any further input.
milliseconds deciseconds
The unit names can be singular or plural, depending on the numerical value entered.
For a numerical value of 1, the unit names displayed are their singular form.
...
The units for the leaf can be displayed using the units option of the info command:
Table 19, Table 20, and Table 21 list units that have a conversion factor that allows
a leaf with a specific base unit to be defined in a dynamic unit. The valid unit
keywords for each unit name are also provided.
Table 19 shows the valid inputs for memory sizes based on the dynamic unit.
bytes • bytes
• byte
kilobytes • kilobytes
• kilobytes
• kbytes
• kbyte
gigabytes • gigabytes
• gigabyte
• gbytes
• gbyte
terabytes • terabytes
• terabyte
• tbytes
• tbyte
Table 20 shows the valid inputs for rates of speed based on the dynamic unit.
Table 21 shows the valid inputs for time durations based on the dynamic unit.
picoseconds • picoseconds
• picosecond
• psecs
• psec
nanoseconds • nanoseconds
• nanosecond
• nsecs
• nsec
microseconds • microseconds
• microsecond
• usecs
• usec
milliseconds • milliseconds
• millisecond
• msecs
• msec
centiseconds • centiseconds
• centisecond
• csecs
• csec
deciseconds • deciseconds
• decisecond
• dsecs
• dsec
seconds • seconds
• second
• secs
• sec
minutes • minutes
• minute
• mins
• min
days • days
• day
weeks • weeks
• week
• wks
• wk
Table 22 shows the valid inputs for dates based on the time format.
This example shows the hexadecimal digits in an IPv6 address entered in both
uppercase and lowercase. IPv6 addresses are displayed in lowercase hexadecimal
digits using zero compression, according to RFC 5952, A Recommendation for IPv6
Address Text Representation.
For MAC addresses, the dash (-) separator can also be used in place of the colon (:).
Flexible input is also available for MAC addresses using dot (.) notation:
The input translation allows copy and paste functionality from word processing
applications that use UTF-8 curly quotation marks, hyphens, or dashes.
Note: The minus sign (-) can be used instead of the delete command.
The delete command can be used to delete any configuration element, such as:
• leafs
• containers
• lists
• leaf-lists
If an element has sub-elements (for example, a container with more containers and
leafs), all of the sub-elements are also deleted as part of the parent deletion.
Note: If the configuration element to be removed does not exist, no warning messages are
displayed.
This example removes the instance from context configure service vprn:
*[ex:configure service]
A:admin@node-2# info
vprn "vprn1" {
description "VPRN instance 01"
dns {
ipv6-source-address 2001:db8:aaa3::8a2e:3710:7335
}
bgp {
min-route-advertisement 50
}
interface "int1" {
ipv6 {
dhcp6 {
relay {
server ["2001:db8::" "2001:db9::" "2001:dba::" "2001:dc1::"]
}
}
}
}
}
*[ex:configure service]
A:admin@node-2# delete vprn "vprn1"
[ex:configure service]
A:admin@node-2# info detail | match vprn
## vprn
This example shows the deletion of the instance from context configure:
*[ex:configure service]
A:admin@node-2# info
vprn "vprn1" {
description "VPRN instance 01"
dns {
ipv6-source-address 2001:db8:aaa3::8a2e:3710:7335
}
bgp {
min-route-advertisement 50
}
interface "int1" {
ipv6 {
dhcp6 {
relay {
server ["2001:db8::" "2001:db9::" "2001:dba::" "2001:dc1::"]
}
}
}
}
}
*[ex:configure service]
A:admin@node-2# back
*[ex:configure]
A:admin@node-2# delete service vprn "vprn1"
[ex:configure]
A:admin@node-2# service
[ex:configure service]
A:admin@node-2# info detail | match vprn
## vprn
In the following example, the timers element is a container, which contains sub-
elements that are also containers; the lsa-generate and spf-wait elements. The
placement of the delete command determines whether the timers element (and all
of its sub-elements) are deleted, or one of the sub-elements.
To delete the lsa-generate element and its parameters, the delete command is
specified before the lsa-generate element. The info command shows that the spf-
wait parameters are still configured.
If the delete command is placed before the timers element, all elements within the
timers element are also deleted.
*(ex)[configure service]
A:admin@node-2# info | match pw-template
pw-template "pw-1" {
pw-template "pw-3" {
pw-template "pw-5" {
pw-template "pw-8" {
*(ex)[configure service]
A:admin@node-2# delete pw-template “pw-3”
*(ex)[configure service]
A:admin@node-2# info | match pw-template
pw-template "pw-1" {
pw-template "pw-5" {
pw-template "pw-8" {
*(ex)[configure service]
A:admin@node-2#
*(ex)[configure service]
A:admin@node-2# info | match pw-template
pw-template "pw-1" {
pw-template "pw-5" {
pw-template "pw-8" {
*(ex)[configure service]
A:admin@node-2# delete pw-template *
*(ex)[configure service]
A:admin@node-2# info | match pw-template
*(ex)[configure service]
A:admin@node-2#
If the list is a multi-key list, a combination of specific members and wildcards (*) can
be used. In the following example, mep is a multikey list, where the keys are md-
admin-name, ma-admin-name, and mep-id.
The following delete operation deletes all lists with mep-id of 5, regardless of the
md-admin-name or ma-admin-name.
The following delete operation removes all lists where ma-admin-name is “ref3” and
mep-id is 5.
The following delete operation removes all lists where md-admin-name is “ref1”.
To remove a leaf-list entry, the delete operation is specified before the leaf-list name
and the entry to be removed.
Multiple leaf-list entries can be deleted in a single command with the use of brackets.
The entries do not need to be in any specific order.
Deleting all members of a leaf-list sets the list to the unconfigured state (as indicated
in the info detail display by the “##”).
The following example shows the output from the info command, displaying the
following configuration for the profile of the user “guest1”.
The output can be copied and pasted to configure an identical profile for another
user; for example, “guest2”. The working context must be at the same hierarchy
level, as the info command output is context-sensitive.
(ex)[]
A:admin@node-2# configure system security aaa local-profiles profile guest2
Copy the info command output and paste each line into the command line:
The info command displays the configuration changes for profile “guest2”, which are
identical to the configuration for profile “guest1”.
action deny
match "show li"
}
entry 40 {
action deny
match "tools"
}
Similarly, the info flat command output can be copied and pasted for the user profile
for “guest3”; for example:
The output from the info full-context command contains the full configuration path
for the configuration statements. This output can be used to reconfigure the same
user profile on another router, or to rebuild the user profile if it was deleted or
discarded. The following example begins with a “guest1” user profile, which is
subsequently deleted and re-added using the output from the info full-context
command.
The “guest1” user profile is deleted, and the info full-context command after the
delete shows no matches for profile “guest1”:
In the next step, the original full-context output for “guest1” is copied and pasted.
Since the output contains the full configuration path, the statements can be pasted
from any configuration context.
*(ex)[configure]
A:admin@node-2# /configure system security aaa local-
profiles profile "guest1" default-action permit-all
(ex)[configure]
A:admin@node-2# /configure system security aaa local-
profiles profile "guest1" entry 10 { }
The displayed output from the compare command can also be used to copy and
paste statements in the MD-CLI. See Viewing the Uncommitted Configuration
Changes for information about using the compare command.
— compare [[from] string] [[to] string] [lines number] [summary] [flat | full-context]
[ex:configure]
A:admin@node-2# compare ?
[[from] <string>]
<string> - (baseline|candidate|rollback <number>|running|startup|url
<string>)
Default - baseline
[[to] <string>]
<string> - (baseline|candidate|rollback <number>|running|startup|url
<string>)
Default - candidate
Option Description
flat Show the context starting from the present working context
lines number Show the specified number of lines before and after the
changed element
The following characters are used at the beginning of the output lines, to indicate the
status of the element in the configuration:
Note: The +/-/~ output from the compare command can be copied and pasted, or loaded
from a file. See Using the compare Outputs to Copy and Paste for an example.
Because the compare command uses the default from running, the command
compare to candidate is equivalent to compare from running to candidate.
Executing compare to running, without specifying the from option is equivalent to
compare from running to running, which shows no differences.
*(ex)[configure]
A:admin@node-2# compare to running
*(ex)[configure]
A:admin@node-2# compare to candidate
log {
+ accounting-policy 5 {
+ description "For SIO statistics"
+ collection-interval 69
+ include-system-info true
+ record service-ingress-octets
+ }
+ accounting-policy 8 {
+ }
}
*(ex)[configure]
A:admin@node-2# compare from running to candidate
log {
+ accounting-policy 5 {
+ description "For SIO statistics"
+ collection-interval 69
+ include-system-info true
+ record service-ingress-octets
+ }
+ accounting-policy 8 {
+ }
}
The following displays the output using the flat and full-context options.
*(ex)[configure]
A:admin@node-2# compare flat
+ log { accounting-policy 5 }
*(ex)[configure]
A:admin@node-2# compare full-context
+ /configure log { accounting-policy 5 }
+ /configure log accounting-policy 5 description "For SIO statistics"
+ /configure log accounting-policy 5 collection-interval 69
+ /configure log accounting-policy 5 include-system-info true
+ /configure log accounting-policy 5 record service-ingress-octets
+ /configure log { accounting-policy 8 }
*(ex)[configure]
A:admin@node-2#
The following example shows the difference between the compare and compare
summary commands. The compare command shows the deletion and addition of
configuration changes, each on its own line, and the compare summary command
shows the configuration change summarized on one line with a ~ character.
*(ex)[]
A:admin@node-2# compare
router "Base" {
interface "system" {
ipv4 {
primary {
- address 1.1.1.1
+ address 10.243.5.96
}
}
}
}
*(ex)[]
A:admin@node-2# compare summary
router "Base" {
interface "system" {
ipv4 {
primary {
~ address 10.243.5.96
}
}
}
}
*(ex)[]
A:admin@node-2#
In the following example, the compare command shows the timers that have been
modified. After the commit command has been issued to add these to the running
configuration, the lsa-generate container is deleted. The following displays the
output for the compare command.
In the next step, the lsa-generate parameters are deleted, using a copy and paste
of the first three configuration statements:
(ex)[configure]
A:admin@node-2# - /configure router "Base" ospf 0 timers lsa-generate max-lsa-
wait 500000
*(ex)[configure]
A:admin@node-2# - /configure router "Base" ospf 0 timers lsa-generate lsa-initial-
wait 100000
*(ex)[configure]
The compare summary command shows that the deleted lsa-generate parameters
are compressed to its highest container, shown with an ellipsis in braces ({}).
*(ex)[configure]
A:admin@node-2# compare summary
router "Base" {
ospf 0 {
timers {
- lsa-generate { ... }
}
}
}
If the timers container is deleted, which holds both the lsa-generate and spf-wait
containers, the compare summary command now shows the timers container as
the highest deleted container:
The following example shows the error that occurs when the discard operation is
attempted from read-only configuration mode. The command is successful when the
session is in global configuration mode, but only from the top of the configuration
branch.
*(ro)[configure]
A:admin@node-2# compare
log {
+ accounting-policy 5 {
+ description "For SIO statistics"
+ collection-interval 69
+ include-system-info true
+ record service-ingress-octets
+ }
+ accounting-policy 8 {
+ }
}
*(ro)[configure]
A:admin@node-2# discard
MINOR: CLI #2069: Operation not allowed - currently in read-only mode
*(ro)[configure]
A:admin@node-2# exit
*(ro)[]
A:admin@node-2# quit-config
INFO: CLI #2067: Exiting read-only configuration mode
[]
A:admin@node-2# edit-config global
INFO: CLI #2054: Entering global configuration mode
INFO: CLI #2055: Uncommitted changes are present in the candidate configuration
*(ex)[]
A:admin@node-2# compare
log {
+ accounting-policy 5 {
+ description "For SIO statistics"
+ collection-interval 69
+ include-system-info true
+ record service-ingress-octets
+ }
+ accounting-policy 8 {
+ }
}
*(ex)[]
A:admin@node-2# configure log
*(ex)[configure log]
A:admin@node-2# discard
MINOR: MGMT_CORE #2203: Invalid element - 'discard' not allowed in 'log'
*(ex)[configure log]
A:admin@node-2# discard /configure
(ex)[configure log]
A:admin@node-2# compare
(ex)[configure log]
A:admin@node-2#
Uncommitted changes from a global configuration session are kept in the candidate
configuration when leaving configuration mode. Uncommitted changes from an
exclusive or private configuration session are discarded when leaving configuration
mode and a confirmation message is displayed:
*(ex)[]
A:admin@node-2# quit-config
INFO: CLI #2063: Uncommitted changes are present in the candidate configuration.
Exiting exclusive configuration mode will discard those changes.
It is possible to discard the changes made by a session that obtained an explicit lock
by disconnecting the remote session. Uncommitted changes from an exclusive
configuration mode session are discarded when the session disconnects. See
Viewing the Status of the Local Datastores for information about disconnecting a
session.
*(ro)[]
A:admin@node-2# compare
log {
+ accounting-policy 7 {
+ description "seven"
+ collection-interval 77
+ }
}
*(ro)[]
A:admin@node-2# validate
*(ro)[]
*(ex)[]
A:admin@node-2# compare
+ eth-cfm {
+ domain "mdn" {
+ association "man" {
+ ccm-interval 10ms
+ }
+ }
+ }
*(ex)[]
A:admin@node-2# validate
MINOR: MGMT_CORE #236: configure eth-cfm domain "mdn" level -
Missing mandatory fields
MINOR: ETH_CFM #12: configure eth-cfm domain "mdn" format -
Inconsistent Value error - One of dns, mac, name or format must be provided
*(ex)[]
A:admin@node-2#
The commit command also runs validation on the configuration. Therefore, it is not
necessary to execute the validate command as a separate step when committing
the candidate configuration.
For the global candidate configuration, accessed by MD-CLI sessions in global and
exclusive configuration mode, a tracking mechanism exists.
• The baseline datastore tracks the running datastore, that is, changes in the
running datastore are automatically copied in the baseline datastore:
- after a router reboot
- after a successful commit
- after a discard with an up-to-date global baseline
• Tracking stops and a snapshot of the running datastore is copied in the global
baseline datastore when the global candidate is touched (for example, a
configuration element is added, deleted, or modified). A new snapshot of the
running datastore is copied in the global baseline datastore when a manual
update is performed.
With two simultaneous active configuration sessions that access different candidate
configurations, a commit from one configuration session changes the running
configuration and causes the candidate configuration of the other session to be out
of date and must be updated.
An update can be performed manually with the update command. The update must
be executed at the configuration root (/configure). Merge conflicts are reported and
resolved according to the conflict resolution rules. The update command does not
provide output when no conflicts are detected.
The first line lists the candidate configuration change that caused the merge conflict,
in this case, adding an interface IPv4 address.
The second line describes the merge conflict and starts with a double hash (##)
followed by the description:
prefix-length 24
}
}
}
The following is the list of changes entered in the private candidate configuration of
user-1:
A dry-run update detects the merge conflicts without executing the update. Each
configuration element that is changed in both the candidate configuration and the
running configuration after the last baseline snapshot was taken results in a conflict
and is reported.
!*[pr:configure]
A:user-1@node-2# update check
+ /configure router "Base" { interface "backbone-1" }
## interface "backbone-1" { } - already exists - change removed
After verifying that the merge conflict resolution is acceptable, the update can be
executed. The reporting is the same as for a dry-run update.
!*[pr:configure]
A:user-1@node-2# update
+ /configure router "Base" { interface "backbone-1" }
## interface "backbone-1" { } - already exists - change removed
The candidate configuration is now updated: the baseline datastore equals the
running datastore and the candidate datastore contains the updated list of changes
as described in the update report.
The following shows the list of changes entered in the private candidate configuration
of user-1:
!*[pr:configure]
A:user-1@node-2# compare baseline candidate full-context summary
+ /configure router "Base" { }
+ /configure router "Base" { interface "backbone-2" }
+ /configure router "Base" { interface "backbone-2" ipv4 primary }
+ /configure router "Base" interface "backbone-2" ipv4 primary address 10.2.2.2
+ /configure router "Base" interface "backbone-2" ipv4 primary prefix-length 24
A dry-run update detects merge conflicts without executing the update. There are no
conflicts detected in this case.
!*[pr:configure]
A:user-1@node-2# update check
!*[pr:configure]
A:user-1@node-2#
A commit operation starts an automatic update. Without merge conflicts, the commit
succeeds.
!*[pr:configure]
A:user-1@node-2# commit
[pr:configure]
A:user-1@node-2#
[pr:configure]
A:user-1@node-2# compare baseline candidate
[pr:configure]
A:user-1@node-2# compare baseline running
— commit
— confirmed
— [timeout] minutes
— accept
— cancel
— persist-id string
Note: The confirmed option of the commit command is only available for the configure
configuration region.
When a commit operation is initiated while the baseline is out-of-date, the router first
attempts to update the candidate configuration. When a merge conflict is detected,
the commit operation is canceled to allow the administrator to resolve the merge
conflicts manually.
!*[pr:configure]
A:admin@node-2# commit
MINOR: MGMT_CORE #2703: Commit canceled - conflicts detected, use update
!*[pr:configure]
A:admin@node-2#
The update is executed and the commit operation proceeds when no merge conflict
is detected. See Updating the Candidate Configuration for the update process.
With a successful validation, the changes are copied to the running configuration,
which becomes the current, operational router configuration. The candidate
configuration is reset to its initial state; an empty candidate datastore and an up-to-
date baseline.
If the commit operation fails, an automatic rollback occurs, which returns the running
state to the state before the commit was applied. An automatic rollback does not use
a rollback checkpoint file, so is not dependent on persistency to be enabled. Instead,
a list of changes is kept in memory until the automatic rollback is completed. The
uncommitted changes remain in the candidate configuration.
While the commit confirmed timer is running, the remaining time before an
automatic rollback is shown before each prompt of all active MD-CLI sessions.
If the initial commit fails, the commit confirmed operation is canceled and no timer
is started.
The timeout option for the commit confirmed operation can override the default
value of 10 minutes. While a commit confirmed timer is running, a subsequent
commit confirmed or commit confirmed operation with a timeout option restarts
the timer.
Once the commit confirmed operation is underway, the timer starts. A commit
confirmed cancel command terminates an ongoing confirmed commit and
immediately performs an automatic rollback to the previous state before the initial
commit confirmed command was issued.
If the commit confirmed accept command is not issued within the specified timeout
period after a successful commit, all changes are automatically discarded from the
running configuration. If the configuration session from which the commit confirmed
was initiated is still active, the candidate configuration maintains all uncommitted
configuration changes.
Leaving the configuration mode or logging out from the MD-CLI session cancels the
ongoing commit confirmed and starts an automatic rollback. The user must
acknowledge the request to exit configuration mode or logout.
*(ex)[]
A:admin@node-2# commit confirmed
INFO: CLI #2090: Commit confirmed - automatic rollback in 10 minutes
(ex)[]
A:admin@test-node# exit all
A:admin@test-node# logout
INFO: CLI #2095: Commit confirmed in progress -
logout will cancel the commit confirmed and start configuration rollback
Note: In private configuration mode, commit confirmed with a persistent identifier cannot
be used. Instead, use the non-persistent commit confirmed command.
*(ex)[configure]
A:admin@node-2# commit confirmed persist-id my-commit
*(ex)[configure]
A:admin@node-2#
The MD-CLI has an implicit persistency option linked to the commit command: the
auto-config-save command in configure system management-interface cli md-
cli. When candidate configuration changes are successfully committed, the
configuration is automatically saved if auto-config-save is set to true.
---snip---
md-cli {
auto-config-save true
environment {
more true
time-display local
command-completion {
enter true
space true
tab true
}
When auto-config-save is set to false, the admin save command must be issued
to make the configuration persistent.
---snip---
md-cli {
auto-config-save true
environment {
more true
time-display local
command-completion {
enter true
space true
tab true
}
The rollback command loads a previously saved MD-CLI configuration file to the
candidate configuration. Loading the file does not automatically initiate a commit
command, which means that the file can be examined before committing. This
rollback command is the equivalent of a load full-replace of the configuration file,
but is identified with a checkpoint identifier. If no identifier is specified, the latest
saved configuration file identified with index identifier 0 is used as the default.
[ex:configure]
A:admin@node-2# rollback ?
rollback
Configuration files loaded with the rollback checkpoint command are identified with
a number that corresponds to the configuration file and location specified as primary-
config in the active Boot Option File (BOF). For example, the configuration file
executed for a rollback 3 command corresponds to the file named config.cfg.3. The
checkpoint identifier 0 corresponds to the last saved configuration file and does not
have a suffix. This is also the default when no checkpoint identifier is specified with
the rollback command. By default, five configuration files are saved. The
configuration-backups command can be used to save a different number of
configuration files.
The startup option of the rollback command loads the contents of the current admin
save file set with the primary configuration and not the version of the startup file that
was booted.
configuration-backups <number>
<number> - <1..200>
Default - 5
The //show bof command executed from the MD-CLI shows the name of the file as
config.cfg.
(ro)[]
A:admin@node-2# //show bof
INFO: CLI #2051: Switching to the classic CLI engine
A:node-2# /show bof
===============================================================================
BOF (Memory)
===============================================================================
primary-image ---snip---
primary-config ---snip---/config.cfg
license-file ---snip---/license
In the MD-CLI, the rollback command references the same filename with an
appended suffix of the checkpoint identifier, in this case, identifier 3:
(ex)[configure]
A:admin@node-2# rollback 3
Executed 386 lines in 0.4 seconds from file ---snip---/config.cfg.3
The following figures show the relationship between the candidate and running
configurations, the commit command, the setting of the auto-config-save
parameter, and the rollback checkpoint files.
uncommitted
changes rollback checkpoint
candidate running A
configuration configuration
datastore datastore
rollback checkpoint
D
candidate commit running
configuration complete configuration
datastore datastore
sw0482
In Figure 10, the auto-config-save parameter is set to false. The admin save
command creates a rollback checkpoint of the running configuration before the
commit. However, a rollback checkpoint is not created after the successful commit.
uncommitted
changes rollback checkpoint
candidate running A
configuration configuration
datastore datastore
auto-config-save false
rollback checkpoint B
candidate running admin save
configuration configuration
datastore datastore
activation
complete
rollback checkpoint C
candidate commit running
configuration configuration
datastore datastore
rollback checkpoint
D
candidate commit running
configuration complete configuration
datastore datastore
sw0483
In Figure 11, the commit fails and no rollback checkpoint is created, regardless of the
setting of the auto-config-save parameter.
uncommitted
changes rollback checkpoint
candidate running A
configuration configuration
datastore datastore
auto-config-save false
rollback checkpoint C
automatic
candidate commit running rollback
configuration configuration
datastore datastore
rollback checkpoint
D
candidate commit running
configuration complete configuration
datastore datastore
sw0484
The full-replace option replaces the current candidate configuration with the
specified file.
The merge option merges the contents of the specified file into the candidate
configuration. If there are conflicts, the configuration statements in the specified file
override the existing configuration statements.
The file to be loaded is not a CLI script to be executed and cannot include:
See Executing Commands from a File to perform such actions from a file.
If the loaded file encounters errors, parsing terminates at the first error. Statements
before the error are loaded into the candidate configuration. Configuration
statements in the loaded file are also subject to AAA command authorization. An
authorization check failure also terminates the execution of further statements in the
file.
Note: If the router fails to boot due to an invalid configuration syntax, it is recommended to
correct the syntax and reboot the router, which also reloads persistent indices. This
procedure is preferred over using load full-replace to restore the configuration without a
reboot.
The following shows the output from the info full-context command. This output can
be copied and pasted into a file; for example, cf3:\testbgp.cfg.
Directory of cf3:\
From the MD-CLI, the //file type command displays the contents of the file:
===============================================================================
The load merge command can be used to merge the contents of the file into the
candidate configuration. The following example shows no current candidate
configuration changes for BGP before the command is executed. The compare
command shows the candidate configuration changes after the file is merged.
[ex:configure]
A:admin@node-2# load merge cf3:testbgp.cfg
Loaded 5 lines in 0.0 seconds from file cf3:\testbgp.cfg
*[ex:configure]
A:admin@node-2# compare
router "Base" {
bgp {
+ group "external" {
+ }
+ neighbor "192.168.89.8" {
+ group "external"
+ prefix-limit ipv4 {
+ maximum 200
+ log-only true
+ threshold 80
+ }
+ }
}
}
The output from the info flat command can also be copied into a file.
===============================================================================
An additional context line is added, through a manual edit, to specify the context /
configure router “Base” bgp, as shown in the file display:
===============================================================================
The file is merged and the compare command shows the resulting candidate
configuration changes.
[ex:configure]
A:admin@node-2# load merge cf3:testbgp.cfg
Loaded 6 lines in 0.0 seconds from file cf3:\testbgp.cfg
*[ex:configure]
A:admin@node-2# compare
router "Base" {
bgp {
+ group "external" {
+ }
+ neighbor "192.168.89.8" {
+ group "external"
+ prefix-limit ipv4 {
+ maximum 200
+ log-only true
+ threshold 80
+ }
+ }
}
}
The following shows the output from the info command. To use the output in a load
file, the context must be added through a manual edit, similar to the edit of file
testbgp.cfg in the preceding example, or use the output from the info full-context
command.
group "external" {
}
neighbor "192.168.89.8" {
group "external"
prefix-limit ipv4 {
maximum 200
log-only true
threshold 80
}
}
The contents of the load file with the info output include the following:
configure { apply-groups
router "Base" {
isis 0 {
apply-groups ["isis-1"]
interface "int-pe1-pe2" {
}
snip
Configuration groups are supported for all configuration branches and its
descendants, which includes the configuration groups definition and applying the
groups with the apply-groups command.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-backbone" {
router "Base" {
isis "0" {
interface "int-pe1-pe2" {
hello-authentication-key "KrbVPnF6Dg13PM/biw6ErHmrkAHk" hash
hello-authentication-type message-digest
hello-authentication true
interface-type point-to-point
}
}
}
}
}
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-backbone" {
router "Base" {
# configuration elements
}
}
group "isis-access” {
router "Base" {
# configuration elements
}
}
group "qos-backbone” {
card "1" {
# configuration elements
}
port "1/1/1" {
# configuration elements
}
qos {
# configuration elements
}
router "Base" {
# configuration elements
}
}
}
With an exact match, configuration elements can only be inherited by the list entry
that matches the specified key value. When no list entry is matched, a new list entry
is created with the specified key value.
In the following example, interface “int-pe1-pe2” is an exact match. When the group
is applied and IS-IS interface “int-pe1-pe2” exists in IS-IS instance 0, the interface-
type leaf is inherited. If the IS-IS interface does not exist, it is created with the
interface-type set to point-to-point.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-backbone" {
router "Base" {
isis "0" {
interface "int-pe1-pe2" {
interface-type point-to-point
}
}
}
}
}
With a regular expression match, configuration elements can be inherited by all list
entries for which the key value matches the regular expression. A list entry cannot
be created with a regular expression match.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-backbone" {
router "Base" {
isis "0" {
interface "<.*>" {
interface-type point-to-point
}
}
}
}
}
For example:
Note: A regular expression match on an encrypted leaf is restricted to a match all: “<.*>”.
Any other string enclosed in angle brackets (“<string>”) is accepted as an exact match for
the encrypted leaf and displayed as a hashed value in the configuration.
With a regular expression match, a match criteria conflict can occur if two regular
expressions match or if a regular expression and an exact match both match on the
same list entry. Conflicting matches within a configuration group are not supported
and result in a validation error.
In the following configuration example, both interface “<int-.*>” and interface “int-
pe1-pe2” match isis 0 interface “int-pe1-pe2”. At validation, this results in a
configuration group inheritance failure because of conflicting match criteria:
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-backbone" {
router "Base" {
isis "0" {
interface "<int-.*>" {
interface-type point-to-point
level-capability 2
}
interface "int-pe1-pe2" {
level 2 {
hello-interval 1
}
}
}
}
}
}
---snip---
router "Base" {
---snip---
isis 0 {
apply-groups ["isis-backbone"]
---snip---
interface "int-pe1-pe2" {
---snip---
}
}
}
(ex)[configure]
A:admin@node-2# validate
MINOR: MGMT_CORE #2901: configure router "Base" isis 0 interface "int-pe1-pe2" -
Configuration group inheritance failed -
conflicting match criteria within group "isis-backbone"
*(ex)[configure]
A:admin@node-2# info
groups {
group "isis-backbone-common" {
router "Base" {
isis "0" {
interface "<int-.*>" {
interface-type point-to-point
level-capability 2
}
}
}
}
group "isis-backbone-custom" {
router "Base" {
isis "0" {
interface "int-pe1-pe2" {
level 2 {
hello-interval 1
}
}
}
}
}
}
---snip---
router "Base" {
---snip---
isis 0 {
apply-groups ["isis-backbone-custom" "isis-backbone-common"]
---snip---
interface "int-pe1-pe2" {
---snip---
}
}
}
Configuration elements from the corresponding branches where the group is applied
are inherited. In the following example, the configuration group “isis-3” has
configuration elements in both the router isis interface and router isis level
branch. Because the configuration group is applied at the router isis interface
branch, only these configuration elements are inherited.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-3" {
router "Base" {
isis "0" {
interface "<int-.*>" {
interface-type point-to-point
level "2" {
metric 30
}
}
level "2" {
wide-metrics-only true
}
}
}
}
}
---snip---
router "Base" {
isis 0 {
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
apply-groups ["isis-3"]
}
}
}
The resulting expanded configuration can be shown with the info inheritance
command:
(ex)[configure]
A:admin@node-2# info inheritance
router "Base" {
isis 0 {
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
apply-groups ["isis-3"]
## 'interface-type' inherited from group "isis-3"
interface-type point-to-point
level 2 {
## 'metric' inherited from group "isis-3"
metric 30
}
}
}
}
The following notes apply to configuration groups and the apply-groups statements:
In the following example, the configuration group “isis-1” contains the configuration
element level-capability 1, which is not inherited because a corresponding local
configuration element exists.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-1" {
router "Base" {
isis "0" {
level-capability 1
interface "<int-.*>" {
interface-type point-to-point
level "2" {
metric 10
}
}
}
}
}
}
---snip---
router "Base" {
isis 0 {
apply-groups ["isis-1"]
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
}
}
}
(ex)[configure]
A:admin@node-2# info inheritance
router "Base" {
isis 0 {
apply-groups ["isis-1"]
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
## 'interface-type' inherited from group "isis-1"
interface-type point-to-point
level 2 {
## 'metric' inherited from group "isis-1"
metric 10
}
}
}
}
• configuration elements in the first listed group have the highest precedence
• configuration elements in the last listed group have the lowest precedence
In the following example, both configuration groups “isis-1” and “isis-2” set an
interface level 2 metric. Because configuration group “isis-2” is listed first in the
apply-groups, its configuration elements have precedence. The interface-type
configuration element is inherited from group “isis-1” because a corresponding
configuration element is not present in group “isis-2” nor is it locally configured.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-1" {
router "Base" {
isis "0" {
level-capability 1
interface "<int-.*>" {
interface-type point-to-point
level "2" {
metric 10
}
}
}
}
}
group "isis-2" {
router "Base" {
isis "0" {
interface "<int-.*>" {
level "2" {
metric 20
}
}
}
}
}
}
---snip---
router "Base" {
isis 0 {
apply-groups ["isis-2" "isis-1"]
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
}
}
}
(ex)[configure]
A:admin@node-2# info inheritance
router "Base" {
isis 0 {
apply-groups ["isis-2" "isis-1"]
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
## 'interface-type' inherited from group "isis-1"
interface-type point-to-point
level 2 {
## 'metric' inherited from group "isis-2"
metric 20
}
}
}
}
In the following example, all configuration groups set an interface level 2 metric.
Because configuration group “isis-3” is applied at the lowest level, its configuration
elements have precedence. The interface-type configuration element is also
inherited from group “isis-3” for the same reason. As explained earlier, the level-
capability configuration element from group “isis-1” has lower precedence than the
local configured value. The wide-metric-only configuration element from group
“isis-3” is not inherited because the group is applied at the interface branch and only
configuration elements at that level or lower can be inherited.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-1" {
router "Base" {
isis "0" {
level-capability 1
interface "<int-.*>" {
interface-type point-to-point
level "2" {
metric 10
}
}
}
}
}
group "isis-2" {
router "Base" {
isis "0" {
interface "<int-.*>" {
level "2" {
metric 20
}
}
}
}
}
group "isis-3" {
router "Base" {
isis "0" {
interface "<int-.*>" {
interface-type point-to-point
level "2" {
metric 30
}
}
level "2" {
wide-metrics-only true
}
}
}
}
}
---snip---
router "Base" {
isis 0 {
(ex)[configure]
A:admin@node-2# info inheritance
router "Base" {
isis 0 {
apply-groups ["isis-2" "isis-1"]
admin-state enable
level-capability 2
area-address [49.0001.0001]
interface "int-pe1-pe2" {
apply-groups ["isis-3"]
## 'interface-type' inherited from group "isis-3"
interface-type point-to-point
level 2 {
## 'metric' inherited from group "isis-3"
metric 30
}
}
}
}
Inheritance rules for leaf-lists are the same as for a single leaf, whether the list is a
system-ordered leaf list (for example, configure router interface interface-name if-
attribute admin-group value) or a user-ordered leaf list (for example, configure
router bgp export policy value). The entire leaf-list is inherited, and it is not possible
to add values to an existing leaf-list through configuration group inheritance.
All statements that are inherited from a configuration group are tagged with a system
comment.
Use the regular expression pattern match info inheritance | match '^[ ]*##' invert-
match to suppress the system comments in the output of info inheritance.
Note: Conflicting matches are detected at validation. The info inheritance command may
display an inherited configuration element in the candidate that is part of a conflicting match
criteria.
The expanded running configuration can also be displayed with the info intended
command. This command displays the intended configuration datastore as specified
in RFC 8342, Network Management Datastore Architecture (NMDA) as follows:
(ex)[configure qos]
A:admin2@node-2# sap-ingress high-bw
MINOR: MGMT_CORE #2020: Permission denied - unauthorized use of 'sap-ingress'
This is enforced via the following entry in the local user profile:
---snip---
entry 200 {
action deny
match "configure qos sap-ingress"
}
The same entry prohibits configuration group inheritance for user admin2.
[ex:configure groups]
A:admin2@node-2# info
group "grp-1" {
qos {
sap-ingress "high-bw" {
queue 1 {
rate {
pir 200000
}
}
fc "be" {
queue 1
}
}
}
}
[ex:configure]
A:admin2@node-2# /configure qos apply-groups "grp-1"
MINOR: MGMT_CORE #2020: configure qos sap-ingress "high-bw" - Permission denied
User admin2 can still view, create, or change sap-ingress QoS policies inside a
configuration group if the changes do not result in configuration group inheritance of
the sap-ingress QoS policy.
User admin2 cannot see the result of configuration group inheritance of a sap-
ingress QoS policy because the info command is subject to the AAA rules defined
in the user profile.
[ex:configure groups]
A:admin2@node-2# info
group "grp-1" {
qos {
sap-ingress "high-bw" {
queue 1 {
rate {
pir 200000
}
}
fc "be" {
queue 1
}
}
}
}
[ex:configure groups]
A:admin2@node-2# /configure qos
[ex:configure qos]
A:admin2@node-2# info inheritance
apply-groups ["grp-1"]
md-auto-id {
qos-policy-id-range {
start 65000
end 65535
}
}
An administrative user with full privileges can see the inherited configuration, which
includes the sap-ingress QoS policy created by user admin2.
[ro:configure qos]
A:admin@node-2# info inheritance
apply-groups ["grp-1"]
md-auto-id {
qos-policy-id-range {
start 65000
end 65535
}
}
## 'sap-ingress "high-bw"' inherited from group "grp-1"
sap-ingress "high-bw" {
## 'queue 1' inherited from group "grp-1"
queue 1 {
## 'rate' inherited from group "grp-1"
rate {
---snip---
entry 200 {
action deny
match "configure qos sap-ingress"
}
entry 201 {
action deny
match "configure groups group qos sap-ingress"
This configuration removes the privileges for user admin2 to view, create, or change
sap-ingress QoS policies inside a configuration group.
[ex:configure groups]
A:admin2@node-2# info
group "grp-1" {
qos {
}
}
[ex:configure groups]
A:admin2@node-2# group "grp-1" qos sap-ingress "high-bw"
MINOR: MGMT_CORE #2020: Permission denied - unauthorized use of 'sap-ingress'
In this example, all backbone IS-IS interface configuration parameters are part of the
“isis-bb-interface” configuration group. A regular expression match “<int-.*>” is used
to match on all backbone IS-IS interface names that start with “int-“. The system
loopback interface does not match the regular expression, so cannot inherit the
configuration elements from the group.
(ex)[configure]
A:admin@node-2# info
groups {
group "isis-bb-interface" {
router "Base" {
isis "0" {
interface "<int-.*>" {
hello-authentication-key "KrbVPnF6Dg13PM/biw6ErHmrkAHk" hash
hello-authentication-type message-digest
hello-padding adaptive
hello-authentication true
interface-type point-to-point
}
}
}
}
}
---snip---
router "Base" {
isis 0 {
apply-groups ["isis-bb-interface"]
admin-state enable
ipv4-routing true
ipv6-routing native
level-capability 2
area-address [49.0001.0001]
multi-topology {
ipv6-unicast true
}
interface "int-pe1-pe2" {
}
interface "int-pe1-pe3" {
}
interface "system" {
passive true
}
level 2 {
wide-metrics-only true
}
}
}
interface "int-pe1-pe2" {
hello-authentication-key "KrbVPnF6Dg13PM/biw6ErHmrkAHk" hash
hello-authentication-type message-digest
hello-padding adaptive
hello-authentication true
interface-type point-to-point
}
interface "int-pe1-pe3" {
hello-authentication-key "KrbVPnF6Dg13PM/biw6ErHmrkAHk" hash
hello-authentication-type message-digest
hello-padding adaptive
hello-authentication true
interface-type point-to-point
}
interface "system" {
passive true
}
level 2 {
wide-metrics-only true
}
4.11.7 Caveats
The following caveats apply to configuration groups.
For more information about NETCONF and gNMI, refer to the 7450 ESS, 7750 SR,
7950 XRS, and VSR System Management Guide.
• NETCONF or gRPC sessions. Refer to the 7450 ESS, 7750 SR, 7950 XRS, and
VSR System Management Guide for more information.
• a private exclusive configuration session. See Exclusive Private Configuration
Session for more information.
To view the lock status of the datastores, the following show command is available:
The detail option displays information about any model-driven interface session that
impacts the datastore locks. MD-CLI read-only sessions, for example, do not impact
the datastore locks.
(ro)[]
A:admin@node-2# show system management-interface datastore-locks detail
===============================================================================
Session ID Region Datastore Lock State
Username Session Mode Idle Time
Session Type From
-------------------------------------------------------------------------------
69 configure Candidate, Running Locked
admin Exclusive 0d 00:01:48
MD-CLI 192.168.144.87
-------------------------------------------------------------------------------
Number of sessions: 1
'#' indicates the current active session
===============================================================================
(ro)[]
A:admin@node-2# show system management-interface configuration-sessions
===============================================================================
Session ID Region Datastore Lock State
Username Session Mode Idle Time
Session Type From
-------------------------------------------------------------------------------
#65 configure Candidate Unlocked
admin Private 0d 00:00:00
MD-CLI 192.168.144.87
66 configure Candidate Unlocked
admin Private 0d 00:05:41
MD-CLI 192.168.144.87
67 configure Candidate Unlocked
admin Private 0d 00:05:08
MD-CLI 192.168.144.87
68 configure Candidate Unlocked
admin Read-Only 0d 00:02:25
MD-CLI 192.168.144.87
69 configure Candidate, Running Locked
admin Exclusive 0d 00:01:54
MD-CLI 192.168.144.87
-------------------------------------------------------------------------------
Number of sessions: 5
'#' indicates the current active session
===============================================================================
For example, to disconnect the MD-CLI session indicated in the preceding show
command output, issue the admin command as follows:
[]
A:admin@node-2# admin disconnect session-id 10