Lab – raw NETCONF
Objectives
Part 1: Verify that NETCONF is Running on the IOS XE
Background / Scenario
In this lab, you will learn how to verify that the NETCONF service is running on the device by directly
connecting to its port using an SSH client. You will be sending raw NETCONF Remote Procedure Calls
encoded in XML structures.
Required Resources
• Access to a router with the IOS XE operating system version 16.6 or higher
• Putty
Part 1: Verify that NETCONF is Running on the IOS XE
Step 1: Use Putty as an SSH client to connect to the NETCONF service.
a. Start Putty.
b. Using Putty, connect to host “[Link]” (Adjust the IP address to match the router’s current
address.) and port “830”.
c. Login as “cisco” with the password “cisco123!” that was configured in IOS XE VM.
d. After a successful login to the NETCONF server, you should see a server “hello” message with an XML
formatted list of supported YANG models (capabilities).
e. The end of the message is identified with “]]>]]>”.
f. To start a NETCONF session, the client needs to send its own hello message in a response:
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
</capabilities>
</hello>
]]>]]>
g. After the client hello message has been sent, the NETCONF session is ready to process RPC messages.
For example, the following XML formatted RPC message will return the ietf-interfaces model data. Please
note that the returned XML data are designed to be consumed by an application. By default, this data
might be difficult to for humans to read.
<rpc message-id="103" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/>
© 2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 2 [Link]
Lab – raw NETCONF
</filter>
</get>
</rpc>
]]>]]>
h. To close the NETCONF session, the client needs to send the following message:
<rpc message-id="9999999" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<close-session />
</rpc>
]]>]]>
© 2017 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 2 [Link]