DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

configuration (rw, which means read/write) and state
(ro, which means read-only) data can be observed right
away. All the leafs and groupings in the model and their
types are also displayed. pyang is extremely versatile and
useful as it validates the correctness of YANG models
and also converts them into several formats, including
yin, dsdl, tree, jstree, uml, and jsonxsl.


Let’s now explore the NETCONF interface that is
provided by the Cisco IOS XE operating system. Cisco
IOS XE is a network operating system for enterprise
switching, routing, wired, and wireless access. The
following examples use Cisco IOS XE 16.6.3 running on a
Cisco CSR1000V device with NETCONF enabled.
Enabling NETCONF on the Cisco CSR1000V running
Cisco IOS XE version 16.6.3 is extremely simple: Just
issue the netconf-yang command in the configuration
mode of the device. By default, the NETCONF server on
the device runs on TCP port 830 and uses the SSH
process for transport. A NETCONF session can be
established by using an SSH client and specifying port
830 when connecting to the device. When establishing a
NETCONF session with a device, a complete list of all the
capabilities and YANG modules supported by the device
is exchanged with the client. An example of this exchange
can be observed in Example 12-10.


Example 12-10 Capabilities Exchanged When
Establishing a NETCONF Session


Click here to view code image


<?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>
Free download pdf