NETCONF
This feature is only supported on the 7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T.
This chapter describes the use of the Network Configuration Protocol (NETCONF) by the SR OS router to perform router management operations.
NETCONF overview
NETCONF is a standardized IETF configuration management and XML encoded protocol that can be used as an alternative to CLI or SNFMP to manage the SR OS routers. NETCONF is defined in RFC 6241, NETCONF Configuration Protocol (NETCONF). It is secure and connection-oriented, and can run over the SSHv2 transport protocol, in accordance with RFC 6242, Using the NETCONF Configuration Protocol over Secure Shell (SSH).
NETCONF uses Remote Procedure Call (RPC) messaging to facilitate communication between a NETCONF client and the NETCONF server that is running on the SR OS node. The RPC message and configuration data are encoded in an XML document. These XML documents are exchanged between the NETCONF client and a NETCONF server in a series of request and response type of messaging interactions. The SR OS NETCONF interface supports both configuration support and retrieval of operational information.
The following figure shows a NETCONF RPC messaging request.
As defined in RFC 6241, NETCONF can be conceptually partitioned into four layers; these are shown in the following figure.
NETCONF in SR OS
The SR OS router can use NETCONF to perform the following router management operations:
change the router configuration using the <edit-config> operation
read the router configuration using the <get-config> operation (equivalent to the info command in CLI)
read operational status, data, and associated configuration information using the <get> operation (equivalent to the show commands in CLI)
NETCONF is not used to generate notifications on an SR OS router; for example, log events, syslog, or SNMP notifications (traps).
The equivalent of some admin commands are available through the SR OS NETCONF interface:
admin save can be done using the <copy-config> operation.
admin rollback commands are supported using a CLI content layer <cli-action> RPC.
The bof, debug, tools, and other general CLI operational commands (for example, telnet or ping) are not supported through NETCONF on an SR OS router.
The SR OS NETCONF server supports both the base 1.1 and base 1.0 capabilities.
SR OS NETCONF supports both a CLI content layer and an XML-based content layer.
YANG data models
The SR OS NETCONF XML content layer configuration schema is described in a set of Alcatel-Lucent proprietary YANG modules. The configuration modules are advertised in the SR OS NETCONF server hello.
The configuration YANG data model closely aligns to the SR OS CLI configuration tree structure and commands.
A set of YANG modules are published and distributed as part of an SR OS image in the cflash/support directory (along with files like dictionary-freeradius.txt and stats.dtd).
The following areas of CLI do not have equivalent YANG data models:
bof
admin, tools, debug, or show branches
Transport and sessions
SSH transport for NETCONF is supported on TCP port 830 with IPv4 or IPv6 in the ‟Base” routing instance.
NETCONF SSH sessions (similar to CLI, Secure Copy (SCP), and SSH File Transfer Protocol (sFTP) sessions) are subject to any configurable and non-configurable session limits; for example, inbound-max-sessions. The SSH server and NETCONF protocol must be enabled in the router configuration to use NETCONF.
Unlike CLI sessions, NETCONF sessions are not subject to automatic session timeout. Operators can manually disconnect sessions using the admin>disconnect netconf command or the admin>disconnect command (terminates all SSH sessions).
NETCONF user accounts must exist on the SR OS to enable a client establishing a NETCONF session to log into the router. A new access type netconf is provided. The user must be configured with both console and netconf access.
Only authentication through the local user database is supported for NETCONF users (no RADIUS or TACACS+ authentication). Access to various CLI configuration and show commands (authorization) through NETCONF is controlled through the assigned user profile that is used to authenticate the underlying SSH session.
If a NETCONF request attempts to execute a CLI command that is outside the scope of its access profile, the system sends an error response.
The following example shows a user request where the show command usage is outside the scope of the user’s access profile.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<oper-data-format-cli-block>
<cli-show>system security</cli-show>
</oper-data-format-cli-block>
</filter>
</get>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>cli-show</err-element>
</error-info>
<error-message>
command failed - 'show system security'
MINOR: CLI Command not allowed for this user.
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
NETCONF operations
The following base protocol operations are supported:
<get>
<get-config>
<edit-config>
<copy-config>
<delete-config>
<validate>
<close-session>
<kill-session>
The <lock> and <unlock> base protocol operations are not supported.
The <error-option> operation is not supported. SR OS implements the stop-on-error behavior by default. The continue-on-error and rollback-on-error behaviors are not supported.
<get>
CLI content layer <get> operation is supported. XML content layer <get> operation is not supported.
A <get> request is analyzed for syntax errors before it is executed. If a syntax error is found, a single global <rpc-error> for the entire request is sent in the reply.
Responses are provided for each item in the request until the first item with an error is found. A <response> tag containing the error information, followed by an <rpc-error> tag (and sub-tags) is attached to the erroneous item. The reply is returned, and no subsequent items are not executed.
For a non-syntax error, the <rpc-error> for an individual item is placed after the </response> information and not included in the <response> tag.
The following example shows a <get> request with a non-syntax error in the second item.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<oper-data-format-cli-block>
<cli-show>router interface "system"</cli-show>
<cli-show>router mpls lsp</cli-show>
<cli-show>system security ssh</cli-show>
</oper-data-format-cli-block>
</filter>
</get>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<oper-data-format-cli-block>
<item>
<cli-show>router interface "system"</cli-show>
<response>
===============================================================================
Interface Table (Router: Base)
===============================================================================
Interface-Name Adm Opr(v4/v6) Mode Port/SapId
IP-Address PfxState
-------------------------------------------------------------------------------
system Up Up/Down Network system
144.23.63.5/32 n/a
-------------------------------------------------------------------------------
Interfaces : 1
===============================================================================
</response>
</item>
<item>
<cli-show>router mpls lsp</cli-show>
<response>
MINOR: CLI MPLS is not configured.
</response>
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>cli-show</err-element>
</error-info>
<error-message>
command failed - 'show router mpls lsp'
</error-message>
</rpc-error>
</item>
</oper-data-format-cli-block>
</data>
</rpc-reply>
]]>]]>
<get-config>
The <get-config> operation returns non-default configuration by default (that is, the ‟trim” mode, as defined in RFC 6243).
<edit-config>
The following values for the <test-option> parameter under <edit-config> are supported:
test-then-set
set
test-only
<copy-config> and <delete-config>
The <copy-config> and <delete-config> base protocol operations are supported for specific combinations of source and target datastores.
The <copy-config> operation is supported for the following combinations of sources and targets:
<source>=<url> and <target>=<startup> (as long as both are not remote URLs)
<source>=<startup> and <target>=<url> (as long as both are not remote URLs)
<source>=<running> and <target>=<url>
equivalent of admin save file-url
an index file is also saved if persist on is configured in the BOF
<source>=<running> and <target>=<startup>
equivalent of admin save
an index file is also saved if persist on is configured in the BOF
The <running> datastore cannot be a <target> for a <copy-config> operation.
Remote URL-to-remote URL copies are not supported. For example, if the primary-image is a remote URL, a <startup> to copy will fail with an error.
The <copy-config> operation uses the CLI content layer format. The format of the source and target is block CLI.
The <delete-config> operation is supported for the following targets:
<url>
<startup>
The <delete-config> operation is not allowed on the <running> datastore.
<validate>
The following support is available for the validate:1.1 capability:
The validate:1.1 and 1.0 capabilities are advertised in the NETCONF server <hello> as the following:
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
The <validate> request is supported for an XML content layer request, but not for a CLI content layer request. Detection of a <config-format-cli-block> or <oper-data-format-cli-block> tag in a <validate> request will result in an "operation not supported" error response.
A <validate> operation is supported for a selection of config (<source><config>), or for the <running> datastore, which only returns 'OK'. The <validate> operation is not supported for URL sources or the <startup> datastore.
Datastores and URLs
The SR OS supports the following datastores:
<running>
<startup>
<url>
<url> is not a datastore in itself.
The <candidate> datastore is not supported.
All configuration changes (<edit-config>) done to the <running> datastore through NETCONF take immediate operational effect.
The <startup> datastore and <url> tags can only be used with <copy-config> and <delete-config> and are not supported with any other operations (including <edit-config>, <get-config>, <get>, <validate>, and others).
The :startup capability is advertised in the SR OS NETCONF server <hello> as follows:
<capability>urn:ietf:params:netconf:capability:startup:1.0</capability>
The <url> tags support the same options as CLI <file-url>: local URLs (CF) and remote URLs (ftp and tftp).
The :url capability is advertised in the SR OS NETCONF server <hello> as follows:
<capability>urn:ietf:params:netconf:capability:url:1.0?scheme=ftp,tftp,file</
capability>
The following examples show the format of each URL scheme:
The examples use ‟///” for the file URL.
The file://localhost/... format is not supported.
<target><url>ftp://name:passwd@a.b.c.d/usr/myfiles/myfile.cfg</url></target>
<target><url>tftp://name:passwd@a.b.c.d/usr/myfiles/myfile.cfg</url></target>
<target><url>file:///cf3:/myfiles/myfile.cfg</url></target>
<target><url>cf3:/myfiles/myfile.cfg</url></target>
The <startup> datastore is identified by using the bof primary-config, secondary-config, and tertiary-config paths configured by the operator. The <startup> datastore is an alias for a special URL used for system startup with some extra resiliency (primary, secondary, and tertiary).
The BOF is not considered to be part of any configuration datastore.
Debug configurations (such as debug mirrors, or configurations saved using the admin debug-save command) are not considered to be part of any configuration datastore.
Configuration changes made through NETCONF are subject to CLI rollback operations (revert, save, and so on) and are included in the configuration when an admin save operation is performed in the CLI.
General NETCONF behavior
Use Ctrl-C in a NETCONF session to immediately terminate the session.
The SR OS NETCONF implementation does not support XML namespaces (xmlns). Any XML namespace or prefix declarations in the RPC tag are accepted and returned in the <rpc-reply> tag, but are ignored and unused. Any XML namespace or prefix declarations in the rest of the request are ignored and unused. The SR OS NETCONF server puts the correct NETCONF namespace declaration (‟urn:ietf:params:xml:ns:netconf:base:1.0”) in all replies. See the following sections for more information:
The chunked framing mechanism is supported in addition to the EOM mechanism. As described in RFC
6242, Section 4.1 - Framing Protocol, ... If the :base:1.1 capability is advertised by both
peers, the chunked framing mechanism (see Section 4.2) is used for the remainder of the
NETCONF session. Otherwise, the old end-of-message-based mechanism (see Section 4.3) is
used.
See Example: chunked frame mechanism for more
information.
Default data handling (for example, info vs info detail) is supported in accordance with the mechanisms detailed in RFC 6243. The SR OS NETCONF server supports the ‟trim” method and advertises it in the <hello> as follows:
<capability>urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=trim</
capability>
Pseudo-transactional capabilities are supported. A user can save a rollback checkpoint (for example, before performing an <edit-config> or a series of <edit-config>) and, if required, later perform a rollback revert. See the following sections for more information:
Example: multiple use of standard NETCONF namespace
The following example shows the standard NETCONF namespace ‟urn:ietf:params:xml:ns:netconf:base:1.0” used more than once in the <rpc> element.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source> <running/> </source>
<filter>
<configure>
<router>
<interface>
<interface-name>"system"</interface-name>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
In the following reply, the namespace is accepted and no error message is returned.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-
id="101" xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:
xml:ns:netconf:base:1.0">
<data>
<configure xmlns="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<router>
<router-name>Base</router-name>
<interface>
<interface-name>system</interface-name>
<address>
<ip-address-mask>144.23.63.5/32</ip-address-mask>
</address>
<shutdown>false</shutdown>
</interface>
</router>
</configure>
</data>
</rpc-reply>
]]>]]>
Example: non-standard namespace defined in <rpc> tag
The following example shows a non-standard NETCONF base namespace defined in the <rpc> tag.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:alu="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<get-config>
<source> <running/> </source>
<filter>
<configure xmlns="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<router>
<interface>
<interface-name>"system"</interface-name>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
In the following reply, the non-standard namespace used in the <rpc> tag is ignored.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-
id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:alu="urn:alcatel-
lucent.com:sros:ns:yang:conf-r13">
<data>
<configure xmlns="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<router>
<router-name>Base</router-name>
<interface>
<interface-name>system</interface-name>
<address>
<ip-address-mask>144.23.63.5/32</ip-address-mask>
</address>
<shutdown>false</shutdown>
</interface>
</router>
</configure>
</data>
</rpc-reply>
]]>]]>
Example: non-standard namespace not defined in <rpc> tag
The following example shows a non-standard NETCONF namespace used in one of the tags, but not defined in the <rpc> tag.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source> <running/> </source>
<filter>
<configure>
<router>
<interface xmlns:alu="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<interface-name>"system"</interface-name>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
In the following reply, the non-standard namespace used in the tag is ignored.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-
id="101" xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:
xml:ns:netconf:base:1.0">
<data>
<configure xmlns="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<router>
<router-name>Base</router-name>
<interface>
<interface-name>system</interface-name>
<address>
<ip-address-mask>144.23.63.5/32</ip-address-mask>
</address>
<shutdown>false</shutdown>
</interface>
</router>
</configure>
</data>
</rpc-reply>
]]>]]>
Example: non-standard namespace or prefix not defined in <rpc> tag
The following example shows a non-standard NETCONF namespace or prefix used in one of the tags but not defined in the <rpc> tag.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source> <running/> </source>
<filter>
<configure>
<router>
<interface xmlns:alu="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<alu:interface-name>"system"</alu:interface-name>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
In the following reply, the non-standard namespace/prefix used in tag is ignored.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-
id="101" xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:
xml:ns:netconf:base:1.0">
<data>
<configure xmlns="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<router>
<router-name>Base</router-name>
<interface>
<interface-name>system</interface-name>
<address>
<ip-address-mask>144.23.63.5/32</ip-address-mask>
</address>
<shutdown>false</shutdown>
</interface>
</router>
</configure>
</data>
</rpc-reply>
]]>]]>
Example: chunked frame mechanism
The following example shows a chunked message.
#302
<?xml version="1.0" encoding="UTF-8"?><rpc message-
id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get-
config><source><running/></
source><filter><config><configure><router><interface><interface-name>system</
interface-name></interface></router></configure></config></filter></get-config></
rpc>
##
The following example shows the reply.
#38
<?xml version="1.0" encoding="UTF-8"?>
#85
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
#62
<source><running/></source>
<filter>
<configure>
##79
<system>
<netconf>
</netconf>
</system>
##55
</configure>
</filter>
</get-config>
</rpc>
##
Example: two rollback items with responses
The following example shows two rollback items with responses.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<cli-action>
<admin>rollback compare active-cfg to 1</admin>
<admin>rollback compare</admin>
</cli-action>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<cli-action>
<item>
<admin>rollback compare active-cfg to 1</admin>
<response>
0.150 s
0.450 s
----------------------------------------------
configure
router
- mpls
- shutdown
- interface "system"
- no shutdown
- exit
- lsp "test"
- shutdown
- exit
- exit
- rsvp
- shutdown
- interface "system"
- no shutdown
- exit
- exit
exit
exit
----------------------------------------------
Finished in 0.720 s
</response>
</item>
<item>
<admin>rollback compare</admin>
<response>
0.160 s
0.070 s
----------------------------------------------
configure
router
- mpls
- shutdown
- interface "system"
- no shutdown
- exit
- lsp "test"
- shutdown
- exit
- exit
- rsvp
- shutdown
- interface "system"
- no shutdown
- exit
- exit
exit
service
- vpls "99" customer 1 create
- shutdown
- stp
- shutdown
- exit
- exit
exit
exit
----------------------------------------------
Finished in 0.350 s
</response>
</item>
</cli-action>
</data>
</rpc-reply>
]]>]]>
Example: syntax error in the rollback request
The following example shows a syntax error in the request, which results in a global <rpc-error> reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="103"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<cli-action>
<admin>rollback compare active-cfg to 1</admin>
<admin>rollback compare flee-fly</admin>
</cli-action>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="103" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>admin</err-element>
</error-info>
<error-message>
command failed - '/admin rollback compare flee-fly'
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
Example: error in processing the request
The following example shows an error processing the request.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="103"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<cli-action>
<admin>rollback compare active-cfg to 1</admin>
<admin>rollback compare 1 to flee-fly</admin>
</cli-action>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="103" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<cli-action>
<item>
<admin>rollback compare active-cfg to 1</admin>
<response>
0.160 s
0.180 s
----------------------------------------------
configure
router
- mpls
- shutdown
- interface "system"
- no shutdown
- exit
- exit
- rsvp
- shutdown
- interface "system"
- no shutdown
- exit
- exit
exit
exit
----------------------------------------------
Finished in 0.460 s
</response>
</item>
<item>
<admin>rollback compare 1 to flee-fly</admin>
<response>
</response>
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>admin</err-element>
</error-info>
<error-message>
command failed - '/admin rollback compare 1 to flee-fly'
MINOR: CLI No such file ('flee-fly').
</error-message>
</rpc-error>
</item>
</cli-action>
</data>
</rpc-reply>
]]>]]>
Example: error in second item of the request
The following example shows an error in the second item of the request, resulting in no third item in the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="104" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<cli-action>
<admin>rollback compare active-cfg to 1</admin>
<admin>rollback compare 1 to xyz</admin>
<admin>rollback compare active-cfg to 1</admin>
</cli-action>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="104" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<cli-action>
<item>
<admin>rollback compare active-cfg to 1</admin>
<response>
0.170 s
1.350 s
----------------------------------------------
configure
router
- mpls
- shutdown
- interface "system"
- no shutdown
- exit
- exit
- rsvp
- shutdown
- interface "system"
- no shutdown
- exit
- exit
exit
exit
----------------------------------------------
Finished in 1.640 s
</response>
</item>
<item>
<admin>rollback compare 1 to xyz</admin>
<response>
</response>
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>admin</err-element>
</error-info>
<error-message>
command failed - '/admin rollback compare 1 to xyz'
MINOR: CLI No such file ('xyz').
</error-message>
</rpc-error>
</item>
</cli-action>
</data>
</rpc-reply>
]]>]]>
System provisioned configuration objects
There is a set of configurable objects that are provisioned (added to the <running>
datastore) automatically by SR OS; for
example, log-id 99
.
Some of these SPC objects can be deleted or removed by a user (deletable system provisioned configuration (SPC) objects):
In CLI, the SPC objects are removed by specifying the keyword no, which is then visible in an info command or in a saved configuration (admin save); for example,
no log-id 99
.The deletable SPC objects can be removed or recreated using NETCONF <edit-config> requests, but they are not visible in a <get-config> response if they are:
set to their default values, including all child leaves and objects
removed or deleted
The deletable SPC objects are visible in a <get-config> response if a child leaf or object is changed from the default value; for example, changing log-99 to time-format local.
The list of deletable SPC objects is as follows:
Config system security profile default Config system security profile default entry 10-100 Config system security profile administrative Config system security profile administrative entry 10-112 Config system security user "admin" Config system security user console member "default" Config system security snmp access group xyz (a set of access groups) Config system security ssh client-cipher-list protocol-version 1 cipher 200-210 Config system security ssh client-cipher-list protocol-version 2 cipher 190-235 Config system security ssh server-cipher-list protocol-version 1 cipher 200-205 Config system security ssh server-cipher-list protocol-version 2 cipher 190-235 Config log filter 1001 Config log filter 1001 entry 10 Config log log-id 99 & 100
Some SPC objects cannot be deleted (non-deletable SPC objects):
Although they cannot be deleted, some of these non-deletable objects contain modifiable leaves.
The non-deletable SPC objects are not visible in a <get-config> response when the SPC objects are set to their default values, including all child leaves and objects.
The non-deletable SPC objects are visible in a <get-config> response if a child leaf or object is changed from the default value; for example, setting the card-type.
The list of non-deletable SPC objects is as follows:
Config system security user-template {tacplus_default|radius_default} Config system security snmp view iso … Config system security snmp view li-view … Config system security snmp view mgmt-view … Config system security snmp view vprn-view … Config system security snmp view no-security-view …Config log event-control … Config filter log 101 Config qos … various default policies can’t be deleted Config qos queue-group-templates … these can’t be deleted Config card <x> Config router network-domains network-domain ‟default” Config oam-pm bin-group 1 Config call-trace trace-profile ‟default”
Some non-deletable SPC objects are visible in a <get-config> request, even if they are set to default values:
Config system security cpu-protection policy 254 and 255
Config router interface ‟system"
Config service customer 1
Establishing a NETCONF session
The following example shows a client on a Linux PC initiating a connection to an SR OS NETCONF server. In accordance with RFC 6242, the SSH session must be invoked using an SSH subsystem.
ssh -s my_username@a.b.c.d -p 830 netconf
The following example shows an exchange of hello messages that include advertisement of capabilities.
The following is a message from the SR OS server.
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:writable-running:1.0</
capability>
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
<capability>urn:ietf:params:netconf:capability:startup:1.0</capability>
<capability>urn:ietf:params:netconf:capability:url:1.0?scheme=ftp,tftp,file<
/capability>
<capability>urn:ietf:params:netconf:capability:with-defaults:1.0?basic-
mode=trim</capability>
<capability>urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-
netconf&revision=2015-02-27&features=writable-
running,validate,startup,url&deviations=alu-netconf-deviations-r13</capability>
<capability>urn:alcatel-lucent.com:sros:ns:yang:netconf-deviations-
r13?module=alu-netconf-deviations-r13&revision=2015-02-27</capability>
<capability>urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-
r13?module=alu-cli-content-layer-r13&revision=2015-02-27</capability>
<capability>urn:alcatel-lucent.com:sros:ns:yang:conf-r13?module=conf-
r13&revision=2015-02-27</capability>
<capability>urn:alcatel-lucent.com:sros:ns:yang:conf-aaa-r13?module=conf-
aaa-r13&revision=2015-02-27</capability>
...
...
...
...
<capability>urn:alcatel-lucent.com:sros:ns:yang:conf-vsm-r13?module=conf-
vsm-r13&revision=2015-02-27</capability>
</capabilities>
<session-id>54</session-id>
</hello>
]]>]]>
The following is a reply from a NETCONF client.
<?xml version="1.0" encoding="UTF-8"?>
<hello>
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
</capabilities>
</hello>
]]>]]>
XML content layer
XML is the default content layer format for the SR OS NETCONF server. When the XML format is used at the NETCONF content layer, configuration changes and configuration information retrieved are expressed as XML tags.
The XML formatted configuration information must be correctly ordered and has the same dependencies and behavior as the equivalent CLI commands.
<edit-config> with XML content layer
An <edit-config> operation is supported with the <running> datastore only. The following <edit-config> operation attribute values are supported:
merge
remove
delete
A ‟delete” operation for a leaf or a presence container will not return an error if the item is already deleted.
An error is returned if attempting to delete a list node that does not exist.
A ‟delete” operation for a container without presence will return an error
create
A ‟create” operation for a leaf or a presence container will not return an error if the item is being set to the same value.
An error is returned if attempting to create a list node that already exists.
A ‟create” operation for a container without presence will result in an "OK" response (no error) but will be silently ignored.
The ‟replace” operation is not supported as an attribute value for the <edit-config> operation.
Both ‟delete” and ‟remove” operations have the following behavior:
Delete or remove operations are not supported for boolean leaves. For example, any of the following samples will return an error:
<shutdown operation="delete"/>
<shutdown operation="delete">false</shutdown>
<interface operation="delete">
<interface-name>abc</interface-name>
<shutdown>true</shutdown>
</interface>
For this last case <shutdown operation="merge">true</shutdown> can be used instead to make the request valid:
A <delete> or <remove> operation is the equivalent of the no command in CLI. This no command is applied whether the default for the command is enabled, disabled (no), or a specific value. The delete operation is not aware of the default value of the object/leaf being deleted.
A <delete> or <remove> operation for a leaf, where the request also specifies a value for the leaf, will result in an error.
The <edit-config> <default-operation> parameter is supported merge and none values. The ‟replace” value is not supported. An operation of "none" on a leaf node (inherited or direct) causes that leaf statement to be ignored. No error will be returned if the leaf does not exist in the data model.
For merge and create operations, the operations and tags specified in an <edit-config> request are order-aware and order-dependent, and the sequence of operations must follow the required sequence of the equivalent CLI commands. The <edit-config> is processed and executed in a top-down order. The same leaf can be enabled, disabled, or enabled and then disabled, and the final result is whatever was last specified for that leaf in the <edit-config> request.
For <delete> and <remove> operations, the SR OS NETCONF server will recursively unwind any children of the node being deleted or removed first before removing the node itself. The deepest child branch of the request is examined first and any leaves are processed, after which the server works backwards out of the deepest branches back up to the object where the delete operation was specified. If children branches of an object must be removed before deleting the object in CLI, the equivalent delete request in a NETCONF <edit-config> must contain all those children if they exist, such as if the children are configured in the config datastore).
In the following example, SR OS shuts down the test interface, deletes the interface, shuts down the VPLS, and removes it.
<config>
<configure>
<service>
<vpls operation="delete">
<service-id>11</service-id>
<interface>
<ip-int-name>test</ip-int-name>
<shutdown operation="merge">true</shutdown>
</interface>
<shutdown operation="merge">true</shutdown>
</vpls>
</service>
</configure>
</config>
The 'operation="merge"' is required in the shutdown nodes; otherwise, the inherited operation is <delete>, which is not supported on boolean leaves.
In the preceding example, if other children of "vpls 11" exist in the config besides the interface test specified in the delete request, and it is required to delete those children in CLI before "vpls 11" is removed, the deletion request fails. All configured children must be specified in the delete request.
<get-config> with XML content layer
A <get-config> operation is supported with the <running> datastore only.
Subtree filtering for basic subtree selection is supported for XML content layer <get-config> requests. Post-filtering of the selected subtrees is not supported.
The subtree filtering behavior is as follows:
Attribute match expressions, as defined in section 6.2.2 of RFC 6241, are not supported.
Only containers are supported as selection nodes, as defined in section 6.2.4 of RFC 6241. Empty leaf nodes or list name nodes are not supported as selection nodes:
Nodes that represent lists must also include content match nodes for all keys of the list; for example, <configure><router><interface><interface-name>abc</interface-name>.
A selection node that is a list, without also specifying the key, is not supported; for example, <configure><router><interface/> is not supported. An alternative is to request the parent containment node that contains the desired list node; for example, <configure><router> instead of <configure><router><interface/>.
Content match nodes, as defined in section 6.2.5 of RFC 6241, are only supported for key leaves; for example, <configure><router><interface> <interface-name>abc</interface-name>:
Content match nodes that are leaves but are not also keys will result in an error (not silently ignored).
A <get-config> request that specify a non-existent list node or presence container will result in a reply that contains no data for those list nodes or containers. An <rpc-error> is not sent in this case.
See the following sections for examples of <get-config> request and response messages:
Example: request that returns an error
The following example shows a request that returns an error.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<configure>
<router>
<interface>
<interface-name>abc</interface-name>
<delayed-enable>30</delayed-enable>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>get-config</err-element>
</error-info>
<error-message>
command failed - 'configure router interface "abc" delayed-enable'
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
Example: content match node on a list key
Multiple key leaves for the same key cannot be requested inside the same instance of the list name node; for example, <interface-name>abc</interface-name> <interface-name>def</interface-name>
. Each key value must be inside its own instance of the list name node; for example, <interface> <interface-name>abc</interface-name> </interface> <interface> <interface-name>def</interface-name> </interface>
.
The following example shows a valid <get-config> request for a content match node on a list key.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<configure>
<router>
<interface>
<interface-name>abc</interface-name>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
Example: selection node that is a container
The following example shows a valid <get-config> request selection node that is a container.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<configure>
<router/>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
The reply will contain the configuration for all child nodes of config>router.
Example: list name node as an invalid selection node
The following example shows an invalid <get-config> request for a list name node that is an invalid selection node.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<configure>
<router>
<interface>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>get-config</err-element>
</error-info>
<error-message>
command failed - 'configure router interface'
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
Example: empty leaf node as invalid selection node
The following example shows an invalid <get-config> request for an empty leaf node that is an invalid selection node.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<configure>
<system>
<security>
<ftp-server>
</ftp-server>
</security>
</system>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>protocol</error-type>
<error-tag>bad-element</error-tag>
<error-severity>error</error-severity>
<error-info>
<bad-element>ftp-server</bad-element>
</error-info>
<error-message>
Element is not valid in the specified context.
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
Example: key repeated in the same instance of the list node
The following example shows an invalid <get-config> request for a key that is repeated in the same instance of the list node.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<configure>
<router>
<interface>
<interface-name>abc</interface-name>
<interface-name>def</interface-name>
</interface>
</router>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>get-config</err-element>
</error-info>
<error-message>
command failed - 'configure router interface "abc" "def"'
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
Example: retrieving the full configuration
The full configuration (equivalent to the CLI command admin display-config) can be retrieved using a <get-config> request:
-
when the <filter> tag is not present
<get-config>
<source>
<running/>
</source>
</get-config>
-
when only the <configure> tag is present inside a <filter> tag
<get-config>
<source>
<running/>
</source>
<filter>
<configure/>
</filter>
</get-config>
XML content layer examples
The following examples can be used after a NETCONF session has been established including the exchange of the <hello> messages.
Example: checking NETCONF status
The following example shows a <get-config> request and response to check whether NETCONF is shut down on the router.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source> <running/> </source>
<filter>
<configure>
<system>
<netconf>
</netconf>
</system>
</configure>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data>
<configure xmlns="urn:alcatel-lucent.com:sros:ns:yang:conf-r13">
<system>
<netconf>
<shutdown>false</shutdown>
</netconf>
</system>
</configure>
</data>
</rpc-reply>
]]>]]>
Example: creating a basic VPRN service
The following example shows a <edit-config> request and response to create a basic VPRN service.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<configure>
<service>
<vprn operation="create">
<service-id>200</service-id>
<customer>1</customer>
</vprn>
</service>
</configure>
</config>
</edit-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>
]]>]]>
Example: creating a VPRN service with a SAP
The following example shows a <edit-config> request and response to create a basic VPRN service with a SAP; the system creates the service/interface, but fails to create the SAP because the specified port encapsulation is invalid.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target>
<running/>
</target>
<config>
<configure>
<service>
<vprn operation="create">
<interface>
<ip-int-name>"test"</ip-int-name>
<sap>
<sap-id>"2/1/1"</sap-id>
</sap>
</interface>
<service-id>201</service-id>
<customer>1</customer>
</vprn>
</service>
</configure>
</config>
</edit-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
<error-info>
<err-element>edit-config</err-element>
</error-info>
<error-message>
command failed -
'configure service vprn "201" customer 1 interface "test" sap "2/1/1"'
MINOR: CLI SAP-id has an invalid port number or encapsulation value.
</error-message>
</rpc-error>
</rpc-reply>
]]>]]>
CLI content layer
When the CLI format is used at the NETCONF content layer, configuration changes and information retrieved are expressed as untagged (non-XML) CLI commands; for example, CLI script.
The script must be correctly ordered and has the same dependencies and behavior as CLI. The location of CR/LF (ENTER) within the CLI for an <edit-config> request is significant and affects the processing of the CLI commands, such as which CLI branch is considered the ‟working context”. In the following two examples the ‟working context” after the commands issued are different.
1
exit all [<-ENTER]
configure system time zone EST [<-ENTER]
2
exit all [<-ENTER]
configure [<-ENTER]
system [<-ENTER]
time [<-ENTER]
zone EST [<-ENTER]
After example 1, the CLI working context is the root, and immediately sending ‟dst-zone CEST” would return an error. After example 2, the CLI working context is config>system>time and sending ‟dst-zone CEST” would work as expected.
Configuration changes made using NETCONF trigger the same ‟change” log events (for example, tmnxConfigCreate) as a normal CLI user doing the same changes.
The <with-defaults> tag, as defined in RFC 6243, is not supported in a CLI content layer request.
The operator can get a full configuration, including defaults for a CLI content layer, using an empty <cli-info-detail>. The full configuration (equivalent to the CLI command admin display-config [detail]) can be obtained using a <get-config> request in a CLI content layer format with an empty <cli-info> or <cli-info-detail> tag inside a <config-format-cli-block>. The <report-all> tag is not supported.
The following post-processing commands are ignored: "| match" (pipe match), "| count" (pipe
count) and ">" (redirect to file). CLI ranges are not supported for any command; for
example, show card [1..5]
.
See CLI content layer examples for more information.
CLI content layer examples
The following examples can be used after a NETCONF session has been established including the exchange of the <hello> messages.
Example: configuration change
The following example shows a configuration change request and response.
The exit all command is not required at the beginning of the CLI block; it is automatically assumed by the SR OS NETCONF server.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="104" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config>
<target><running/></target>
<config>
<config-format-cli-block>
configure system
time zone EST
location over-here
exit all
</config-format-cli-block>
</config>
</edit-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="104"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>
]]>]]>
Example: retrieving configuration information
The following example shows a <get-config> request and response to retrieve configuration information.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<config-format-cli-block>
<cli-info>router</cli-info>
<cli-info-detail>system login-control</cli-info-detail>
</config-format-cli-block>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<config-format-cli-block>
<item>
<cli-info>router</cli-info>
<response>
----------------------------------------------
#--------------------------------------------------
echo "IP Configuration"
#--------------------------------------------------
interface "system"
no shutdown
exit
----------------------------------------------
</response>
</item>
<item>
<cli-info-detail>system login-control</cli-info-detail>
<response>
----------------------------------------------
ftp
inbound-max-sessions 3
exit
ssh
no disable-graceful-shutdown
inbound-max-sessions 5
outbound-max-sessions 5
no ttl-security
exit
telnet
no enable-graceful-shutdown
inbound-max-sessions 5
outbound-max-sessions 5
no ttl-security
exit
idle-timeout 30
no pre-login-message
no motd
login-banner
no exponential-backoff
----------------------------------------------
</response>
</item>
</config-format-cli-block>
</data>
</rpc-reply>
]]>]]>
Example: retrieving full configuration information
The following example shows a <get-config> request and response to retrieve full configuration information.
The <cli-info-detail/> request can be used to get the fill configuration, including default settings.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
<source>
<running/>
</source>
<filter>
<config-format-cli-block>
<cli-info/>
</config-format-cli-block>
</filter>
</get-config>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<config-format-cli-block>
<item>
<cli-info></cli-info>
<response>
# TiMOS-C-0.0.I4301 cpm/x86_64 ALCATEL SR 7750 Copyright (c) 2000-2015 Alcatel-
Lucent.
# All rights reserved. All use subject to applicable license agreements.
# Built on Sun Jan 4 19:11:11 PST 2015 by builder in /rel0.0/I4301/panos/main
# Generated WED JAN 07 01:07:43 2015 UTC
exit all
configure
#--------------------------------------------------
echo "System Configuration"
#--------------------------------------------------
system
chassis-mode d
dns
exit
load-balancing
lsr-load-balancing lbl-ip
system-ip-load-balancing
exit
netconf
no shutdown
exit
snmp
shutdown
engineID "deadbeefdeadbeef"
exit
time
ntp
authentication-key 1 key "OAwgNUlbzgI" hash2 type des
no shutdown
exit
sntp
shutdown
exit
zone EST
exit
thresholds
rmon
exit
exit
#--------------------------------------------------
echo "Cron Configuration"
#--------------------------------------------------
cron
...
...
...
exit
exit
#--------------------------------------------------
echo "System Security Configuration"
#--------------------------------------------------
...
...
...
#--------------------------------------------------
echo "System Time NTP Configuration"
#--------------------------------------------------
system
time
ntp
exit
exit
exit
exit all
# Finished WED JAN 07 01:07:43 2015 UTC
----------------------------------------------
----------------------------------------------
</response>
</item>
</config-format-cli-block>
</data>
</rpc-reply>
]]>]]>
Example: <get> request
The following example shows a <get> request.
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<oper-data-format-cli-block>
<cli-show>system security ssh</cli-show>
</oper-data-format-cli-block>
</filter>
</get>
</rpc>
]]>]]>
The following example shows the reply.
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<data xmlns="urn:alcatel-lucent.com:sros:ns:yang:cli-content-layer-r13">
<oper-data-format-cli-block>
<item>
<cli-show>system security ssh</cli-show>
<response>
===============================================================================
SSH Server
===============================================================================
Administrative State : Enabled
Operational State : Up
Preserve Key : Enabled
SSH Protocol Version 1 : Disabled
SSH Protocol Version 2 : Enabled
DSA Host Key Fingerprint : ca:ce:37:90:49:7d:cc:68:22:b3:06:2c:11:cd:3c:8e
RSA Host Key Fingerprint : 49:7c:21:97:42:35:83:61:06:95:cd:a8:78:4c:1e:76
-------------------------------------------------------------------------------
Connection Username
Version Cipher ServerName Status
-------------------------------------------------------------------------------
135.121.143.254 admin
2 aes128-cbc netconf connected
-------------------------------------------------------------------------------
Number of SSH sessions : 1
===============================================================================
</response>
</item>
</oper-data-format-cli-block>
</data>
</rpc-reply>
]]>]]>
NETCONF command reference
Command hierarchies
Configuration commands
Netconf system commands
Netconf security commands
config
- system
- security
- profile profile-id
- netconf
- base-op-authorization
- [no] kill-session
Show commands
Command descriptions
Configuration commands
This section provides NETCONF configuration command descriptions.
NETCONF system commands
shutdown
Syntax
[no] shutdown
Context
config>system>netconf
Platforms
7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T
Description
This command disables the NETCONF server. The shutdown command is blocked if there are any active NETCONF sessions. Use the admin disconnect command to disconnect all NETCONF sessions before shutting down the NETCONF service.
NETCONF security commands
netconf
Syntax
netconf
Context
config>system>security>profile
Platforms
7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T
Description
Commands in this context authorize various NETCONF capabilities for the user.
base-op-authorization
Syntax
base-op-authorization
Context
config>system>security>profile>netconf
Platforms
7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T
Description
Commands in this context configure where permission to use various NETCONF operations is controlled.
kill-session
Syntax
[no] kill-session
Context
config>system>security>profile>netconf>base-op-authorization
Platforms
7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T
Description
This command authorizes a user associated with the profile to send a <kill-session> NETCONF operation. The <kill-session> operation allows a NETCONF client to kill another NETCONF session, but not the session in which the operation is requested.
The no form of this command disables the configuration.
Default
no kill-session
Show commands
netconf
Syntax
netconf
Context
show>system
Platforms
7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T
Description
This command displays active NETCONF SSH sessions.
Output
The following output is an example of NETCONF SSH session information, and Output fields: NETCONF describes the output fields.
Sample output7210SAS>show>system# netconf
===============================================================================
NETCONF Server
===============================================================================
Administrative State : Disabled
Operational State : Down
===============================================================================
7210SAS>show>system#
Label | Description |
---|---|
Administrative State |
Enabled — Indicates that NETCONF is enabled Disabled — Indicates that NETCONF is disabled |
Operational State |
Up — Indicates that NETCONF is operational Down — Indicates that NETCONF is not operational |
Connection |
Displays the IP address of the connected routers (remote client) |
counters
Syntax
counters
Context
show>system>netconf
Platforms
7210 SAS-Mxp, 7210 SAS-R6, 7210 SAS-R12, 7210 SAS-Sx/S 1/10GE, and 7210 SAS-T
Description
This command displays NETCONF counters.
Output
The following output is an example of NETCONF counter information, and Output fields: NETCONF counters describes the output fields.
Sample output7210SAS>show>system# netconf counters
==============================================================================
NETCONF counters:
==============================================================================
Rx Messages
------------------------------------------------------------------------------
in gets : 0
in get-configs : 0
in edit-configs : 0
in copy-configs : 0
in delete-configs : 0
in validates : 0
in close-sessions : 0
in kill-sessions : 0
------------------------------------------------------------------------------
Rx Total : 0
==============================================================================
Tx Messages
------------------------------------------------------------------------------
out rpc-errors : 0
------------------------------------------------------------------------------
Tx Total : 0
==============================================================================
7210SAS>show>system#
Label | Description |
---|---|
RX Messages |
Displays the types and numbers of received messages |
RX Total |
Displays the total of all received messages |
TX Messages |
Displays the types and numbers of sent messages |
TX Total |
Displays the total of all sent messages |
failed edit-configs |
Displays the number of failed <edit-config> requests due to a lock (including implicit ones) being taken by other NETCONF sessions |
failed locks |
Displays the number of failed <lock> requests due to a lock (including implicit ones) being taken by other NETCONF sessions |