Displaying configuration and state information
Using the info command
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.
Usage | Info option | Datastore | Nokia configuration | Configuration groups | Third-party model configuration |
---|---|---|---|---|---|
Display third-party configuration converted to Nokia configuration | converted | Running | Nokia and converted third-party configuration with origin comments | groups and unexpanded apply-groups statements | — |
Display the configuration with configuration groups inheritance | inheritance | Any | ✓ | groups and expanded apply-groups statements with origin comments | Native format |
Display third-party configuration converted to Nokia configuration with configuration groups inheritance | converted inheritance | Running | Nokia and converted third-party configuration with origin comments | groups and expanded apply-groups statements with origin comments | — |
Display the expanded configuration applied by the router | intended | Intended | ✓ | Expanded configuration without groups or apply-groups statements or origin comments | Native format |
Execute the command from the configuration root to stay at the root context without navigating.
-
[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.
-
apply-groups is displayed, if applicable.
-
apply-groups-exclude is displayed, if applicable.
-
admin-state is displayed, if applicable.
-
description is displayed, if applicable.
-
Other top-level elements are displayed in alphabetical order.
Displaying configured information
The following displays configured information for configure router bgp.
*[ex:/configure router "Base" bgp]
A:admin@node-2# info
connect-retry 90
local-preference 250
add-paths {
ipv4 {
receive true
}
}
The following output displays the same information in JSON IETF format.
[ex:/configure router "Base" bgp]
A:admin@node-2# info json
{
"nokia-conf:connect-retry": 90,
"nokia-conf:local-preference": 250,
"nokia-conf:add-paths": {
"ipv4": {
"receive": true
}
}
}
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" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">90</connect-retry>
<local-preference xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">250</local-preference>
<add-paths xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">
<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.
Displaying all configured elements
*[ex:/configure router "Base" bgp]
A:admin@node-2# info detail
## apply-groups
admin-state enable
## description
connect-retry 90
keepalive 30
damping false
local-preference 250
loop-detect ignore-loop
loop-detect-threshold 0
selective-label-ipv4-install false
min-route-advertisement 30
aggregator-id-zero false
preference 170
block-prefix-sid false
## multihop
## med-out
## authentication-key
client-reflect true
vpn-apply-export false
vpn-apply-import false
asn-4-byte true
When using the info command with both the detail and xml options, the double hash (##) elements (indicating unconfigured elements or dynamic defaults) are enclosed within XML comments.
Using the detail and xml options
*[ex:/configure router "Base" bgp]
A:admin@node-2# info detail xml
<!-- ## apply-groups -->
<!-- ## apply-groups-exclude -->
<admin-state xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">enable</admin-state>
<!-- ## description -->
<connect-retry xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">90</connect-retry>
<keepalive xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">30</keepalive>
<damping xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">false</damping>
<local-preference xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">250</local-preference>
...
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.
Using the detail and json options
[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,
"nokia-conf:client-reflect": true,
"nokia-conf:vpn-apply-export": false,
"nokia-conf:vpn-apply-import": false,
"nokia-conf:asn-4-byte": true,
"nokia-conf:path-mtu-discovery": false,
"nokia-conf:enforce-first-as": false,
"nokia-conf:initial-send-delay-zero": false,
"nokia-conf:inter-as-vpn": false,
"nokia-conf:purge-timer": 10,
"nokia-conf:route-table-install": true,
...
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.
Using the flat option
*[ex:/configure router "Base" bgp]
A:admin@node-2# info flat
connect-retry 90
local-preference 250
add-paths ipv4 receive true
The full-context option displays the full context of every element from the present working context on a single line.
Using the full-context option
*[ex:/configure router "Base" bgp]
A:admin@cses-V93# info full-context
/configure router "Base" bgp connect-retry 90
/configure router "Base" bgp local-preference 250
/configure router "Base" bgp add-paths ipv4 receive true
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.
Using the full-context option with the json or xml option
[ex:/configure router "Base" bgp]
A:admin@node-2# info full-context json
{
"nokia-conf:configure": {
"router": [
{
"router-name": "Base",
"bgp": {
"connect-retry": 90,
"local-preference": 250,
"add-paths": {
"ipv4": {
"receive": true
}
}
}
}
]
}
}
[ex:/configure router "Base" bgp]
A:admin@node-2# info full-context xml
<configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">
<router>
<router-name>Base</router-name>
<bgp>
<connect-retry>90</connect-retry>
<local-preference>250</local-preference>
<add-paths>
<ipv4>
<receive>true</receive>
</ipv4>
</add-paths>
</bgp>
</router>
</configure>
The depth option displays configuration from the present working context limited to the specified depth. Use this option to suppress output that is lower in the hierarchy. For example, if the present working context is configure, the depths of the commands are:
- configure router = 1
- configure router description = 2
- configure router interface description = 3
Using the depth option
[ex:/configure router "Base"]
A:admin@node-2# info depth 1
autonomous-system 65816
router-id 172.16.255.0
}
interface "system" {
}
bgp {
}
isis 0 {
}
Displaying lists
The info command requires the user to enter a list key name. Users can enter the wildcard asterisk (*) character, a range, or a regular expression instead of a list key name to display a subset of keys with one command. For more information, see Using expressions in commands.
Displaying lists with a list key name
[ex:/configure]
A:admin@node-2# info sfm 1
sfm-type sfm-s
[ex:/configure]
A:admin@node-2# info sfm 2
mda-type sfm-s
Displaying lists with the wildcard * character
[ex:/configure]
A:admin@node-2# info sfm *
sfm 1 {
sfm-type sfm-s
}
sfm 2 {
sfm-type sfm-s
}
sfm 3 {
sfm-type sfm-s
}
sfm 4 {
sfm-type sfm-s
}
Displaying lists with a range
[ex:/configure]
A:admin@node-2# info sfm [3..4]
sfm 3 {
sfm-type sfm-s
}
sfm 4 {
sfm-type sfm-s
}
[ex:/configure]
A:admin@node-2# info sfm [1,3]
sfm 1 {
sfm-type sfm-s
}
sfm 3 {
sfm-type sfm-s
}
[ex:/configure]
A:admin@node-2# info port 1/1/[1..3]
port 1/1/1 {
admin-state enable
}
port 1/1/2 {
admin-state enable
}
port 1/1/3 {
admin-state enable
}
Displaying lists with a regular expression
[ex:/configure router "Base"]
A:admin@node-23# info interface 'sys'
interface "system" {
ipv4 {
primary {
address 172.16.255.0
prefix-length 32
}
}
}
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. (See the online help for the correct command syntax , 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 {
}
Using operational commands
The clear, monitor, show, and tools commands in the MD-CLI display the same information and provide the same functionality as they do in the classic CLI. No additional outputs or enhancements are included in the MD-CLI. See the 7450 ESS, 7750 SR, 7950 XRS, and VSR Clear, Monitor, Show, and Tools CLI Command Reference Guide for more information about the SR OS CLI commands that are used to manage the SR OS in either CLI engine.
The information in the output of the show commands can also be found in the state and configure branches of the MD-CLI (as well as via model-driven interfaces such as NETCONF and gRPC). The show commands, however, are different from the YANG state output.
The YANG state is fully modeled and structured data that can be easily manipulated by tools and applications (including pySROS and NETCONF clients). The report-style output of the show commands contains useful combinations of configuration and state, but the information is not modeled or structured. The pySROS and MD-CLI command alias features can be used together to create custom show commands using the modeled data. See Command aliases for more information.
The following classic CLI show commands are not available in the MD-CLI and have equivalent commands:
-
show alias
Use the MD-CLI info detail environment command-alias command.
-
show bof
Use the MD-CLI admin show configuration bof command or the info command in the bof configuration region.
-
show debug
Use the MD-CLI admin show configuration debug command or the info command in the debug configuration region.
-
show system candidate
Use the MD-CLI info command in a configuration mode.
-
show system rollback
Use the MD-CLI show system management-interface commit-history command.
Displaying state information
The same navigation commands used in a configuration region are available in the MD-CLI state tree. Online ? help and command completion functionality are also available. The state tree information can be displayed using the info command.
Output displays information from the state tree
The following output displays information from the state tree using the info command, with the time format defined in RFC 1123.
[/environment]
A:admin@node-2# time-format rfc-1123
[/environment]
A:admin@node-2# state system
[/state system]
A:admin@node-2# info
oper-name "node-2"
base-mac-address aa:bb:cc:00:00:00
platform "7750 SR-12"
chassis-topology standalone
crypto-module-version "SRCM 3.0"
temperature-status ok
fp-generation-fp2 false
fp-generation-fp3 true
fp-generation-fp4 false
fp-generation-fp5 false
system-profile none
active-cpm-slot "A"
up-time 10351550
current-time "Tue, 01 Sep 2020 17:40:49 UTC"
boot-good-exec-status not-run
boot-bad-exec-status not-run
alarms {
}
grpc {
oper-state down
supported-services {
gnmi-version "0.7.0"
gnoi-cert-mgmt-version "0.1.0"
gnoi-system-version "0.1.0"
---snip---
Using the units option of the info command
The units option of the info command displays the output with unit types for applicable elements.
[/state system]
A:admin@node-2# info units
oper-name "node-2"
base-mac-address aa:bb:ff:00:00:00
platform "7750 SR-12"
chassis-topology standalone
crypto-module-version "SRCM 3.0"
temperature-status ok
fp-generation-fp2 false
fp-generation-fp3 true
fp-generation-fp4 false
fp-generation-fp5 false
system-profile none
active-cpm-slot "A"
up-time 151557100 milliseconds
current-time "2020-07-17 17:33:43 UTC"
boot-good-exec-status not-run
boot-bad-exec-status not-run
alarms {
}
grpc {
oper-state down
supported-services {
gnmi-version "0.7.0"
gnoi-cert-mgmt-version "0.1.0"
gnoi-system-version "1.0.0"
md-cli-version "0.1.0"
rib-api-version "1.1.0"
}
}
management-interface {
configuration-oper-mode model-driven
last-mode-switch "2020-07-15 23:27:47 UTC"
last-mode-switch-duration 12 milliseconds
---snip---
Using the json option of the info command
The json option of the info command displays the output in indented JSON IETF format.
[/state system]
A:admin@node-2# info json
{
"nokia-state:oper-name": "node-2",
"nokia-state:base-mac-address": "aa:bb:ff:00:00:00",
"nokia-state:platform": "7750 SR-12",
"nokia-state:chassis-topology": "standalone",
"nokia-state:crypto-module-version": "SRCM 3.0",
"nokia-state:temperature-status": "ok",
"nokia-state:fp-generation-fp2": false,
"nokia-state:fp-generation-fp3": true,
"nokia-state:fp-generation-fp4": false,
"nokia-state:fp-generation-fp5": false,
"nokia-state:system-profile": "none",
"nokia-state:active-cpm-slot": "A",
"nokia-state:up-time": "151894370",
"nokia-state:current-time": "2020-07-17 17:39:20 UTC",
"nokia-state:boot-good-exec-status": "not-run",
"nokia-state:boot-bad-exec-status": "not-run",
"nokia-state:alarms": {
},
"nokia-state:grpc": {
"oper-state": "down",
"supported-services": {
"gnmi-version": "0.7.0",
"gnoi-cert-mgmt-version": "0.1.0",
"gnoi-system-version": "1.0.0",
"md-cli-version": "0.1.0",
"rib-api-version": "1.1.0"
}
},
"nokia-state:management-interface": {
"configuration-oper-mode": "model-driven",
"last-mode-switch": "2020-07-15 23:27:47 UTC",
"last-mode-switch-duration": 12,
---snip---
Output using the time format defined in RFC 3339 (default output format)
[/]
A:admin@node-2# environment time-format rfc-3339
[/]
A:admin@node-2# state system
[/state system]
A:admin@node-2# info
oper-name "node-2"
base-mac-address aa:bb:cc:00:00:00
platform "7750 SR-12"
chassis-topology standalone
crypto-module-version "SRCM 3.0"
temperature-status ok
fp-generation-fp2 false
fp-generation-fp3 true
fp-generation-fp4 false
fp-generation-fp5 false
system-profile none
active-cpm-slot "A"
up-time 10383490
current-time 2020-04-15T17:41:21.7+00:00
boot-good-exec-status not-run
boot-bad-exec-status not-run
alarms {
}
grpc {
oper-state down
supported-services {
gnmi-version "0.7.0"
gnoi-cert-mgmt-version "0.1.0"
gnoi-system-version "0.1.0"
---snip---
Output using the time format defined in ISO 8601
[/]
A:admin@node-2# environment time-format iso-8601
[/]
A:admin@node-2# state system
[/state system]
A:admin@node-2# info
oper-name "node-2"
base-mac-address aa:bb:cc:00:00:00
platform "7750 SR-12"
chassis-topology standalone
crypto-module-version "SRCM 3.0"
temperature-status ok
fp-generation-fp2 false
fp-generation-fp3 true
fp-generation-fp4 false
fp-generation-fp5 false
system-profile none
active-cpm-slot "A"
up-time 88776290
current-time "2020-04-16 15:27:54 UTC"
boot-good-exec-status not-run
boot-bad-exec-status not-run
alarms {
}
grpc {
oper-state down
supported-services {
gnmi-version "0.7.0"
gnoi-cert-mgmt-version "0.1.0"
gnoi-system-version "0.1.0"
md-cli-version "0.1.0"
rib-api-version "1.1.0"
}
}
---snip---
Displaying configuration with admin commands
The admin show commands display the same configuration as the info command but are not subject to command authorization and do not require configuration mode access.
See 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 examples show the admin show configuration output of the running configuration in the default configuration region (configure). Other configuration regions can also be specified, including bof, debug, and li.
[/]
A:admin@node-2# admin show configuration
# TiMOS-B-22.2.R1 both/x86_64 Nokia 7750 SR Copyright (c) 2000-2022 Nokia.
# All rights reserved. All use subject to applicable license agreements.
# Built on Sat Feb 26 15:31:00 PST 2022 by builder in /builds/c/222B/R1/panos/main/sros
# Configuration format version 22.2 revision 0
# Generated 2022-03-07T17:08:41.4+00:00 by admin from Console
configure {
card 1 {
card-type iom4-e
mda 1 {
mda-type me10-10gb-sfp+
}
mda 2 {
mda-type me10-10gb-sfp+
}
fp 1 {
}
}
log {
filter "1001" {
entry 10 {
description "Collect only events of major severity or higher"
action forward
match {
severity {
gte major
}
}
}
}
log-id "99" {
description "Default System Log"
source {
main true
}
destination {
memory {
max-entries 500
}
}
}
log-id "100" {
description "Default Serious Errors Log"
filter "1001"
source {
main true
}
destination {
memory {
max-entries 500
}
}
}
}
...
[/]
A:admin@node-2# admin show configuration full-context
# TiMOS-B-23.10.R1 both/x86_64 Nokia 7750 SR Copyright (c) 2000-2023 Nokia.
# All rights reserved. All use subject to applicable license agreements.
# Built on Wed Aug 9 01:11:04 UTC 2023 by builder in /builds/2310B/R1/panos/main/sros
# Configuration format version 23.10 revision 0
# Generated 2023-08-09T16:38:38.0-05:00 by admin from Console
/configure card 1 card-type iom4-e
/configure card 1 mda 1 mda-type me10-10gb-sfp+
/configure card 1 mda 2 mda-type me10-10gb-sfp+
/configure log filter "1001" named-entry "10" description "Collect only events of major severity or higher"
/configure log filter "1001" named-entry "10" action forward
/configure log filter "1001" named-entry "10" match severity gte major
/configure log filter "1001" named-entry "asdf" action forward
/configure log log-id "99" description "Default System Log"
/configure log log-id "99" source main true
/configure log log-id "99" destination memory max-entries 500
/configure log log-id "100" description "Default Serious Errors Log"
/configure log log-id "100" filter "1001"
/configure log log-id "100" source main true
/configure log log-id "100" destination memory max-entries 500
...
[/]
A:admin@node-2# admin show configuration json
{
"nokia-conf:configure": {
"card": [
{
"slot-number": 1,
"card-type": "iom4-e",
"mda": [
{
"mda-slot": 1,
"mda-type": "me10-10gb-sfp+"
},
{
"mda-slot": 2,
"mda-type": "me10-10gb-sfp+"
}
],
],
"log": {
"filter": [
{
"filter-id": "1001",
"entry": [
{
"entry-id": 10,
"description": "Collect only events of major severity or higher",
"action": "forward",
"match": {
"severity": {
"gte": "major"
}
}
}
]
}
],
"log-id": [
{
"id": "99",
"description": "Default System Log",
"source": {
"main": true
},
"destination": {
"memory": {
"max-entries": 500
}
}
},
{
"id": "100",
"description": "Default Serious Errors Log",
"filter": 1001,
"source": {
"main": true
},
"destination": {
"memory": {
"max-entries": 500
}
}
}
]
},
...
[/]
A:admin@node-2# admin show configuration xml
<?xml version="1.0" encoding="UTF-8"?>
<configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">
<card>
<slot-number>1</slot-number>
<card-type>imm48-sfp+2-qsfp28</card-type>
<mda>
<mda-slot>1</mda-slot>
</mda>
</card>
<card>
<slot-number>2</slot-number>
<card-type>imm36-100g-qsfp28</card-type>
<mda>
<mda-slot>1</mda-slot>
</mda>
</card>
<log>
<filter>
<filter-id>1001</filter-id>
<entry>
<entry-id>10</entry-id>
<description>"Collect only events of major severity or higher"
</description>
...