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

(andrew) #1
<capability>urn:ietf:params:netconf:base:1.0</capability>

</capabilities>
</hello>]]>]]>

There is no reply from the device to the client’s initial
hello message, which is expected behavior; however, an
active NETCONF connection to the device is now
established. In order to retrieve the running
configuration of the device, the following XML message
is sent next:


Click here to view code image


<?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>
</get-config>
</rpc>]]>]]>

This example shows a NETCONF RPC message with an
ID of 101 defined by the base IETF NETCONF 1.0
namespace. The message ID is used to keep track of the
response received from the device. The operation within
the message is get-config, with the target data source of
the configuration that is stored in the running data
store. The response contains the running configuration
of the device enclosed in an XML element
and is displayed in Example 12-11.


Example 12-11 Snippet of the NETCONF get-config
Operation for the Running Configuration


Click here to view code image

Free download pdf