CCNP ENCOR lab 31 of 36

NETCONF and YANG on IOS XE

Read a YANG model, enable NETCONF on an IOS XE router, then use Python's ncclient from the NOC workstation to discover capabilities, read configuration and operational data with filters, and create an interface with edit-config.

Run this lab

It needs Lite: its 2 nodes are set to 3 vCPU and 5,120 MB in total. That fits the free demo too.

In your workspace: Shared, then CCNP ENCOR 350-401 guided labs, then 31 - NETCONF and YANG on IOS XE

Try it free for 30 minutesRun it on Lite from £3 a day

The free demo needs no card and no email. Every lab plan includes every guided lab.

Level
Intermediate
Time
About 70 minutes
Nodes need
3 vCPU, 5,120 MB
Smallest plan
Lite

The scenario

Fernhill Freight's network team wants to stop configuring routers by hand. Their first target is the IOS XE router in the NOC (CSR1), managed from the NOC workstation (NMS) with NETCONF and Python's ncclient library, which is already installed. You'll learn to read the YANG models that define what you can configure, then read and change the router through NETCONF.

DeviceInterfaceAddress
CSR1 (IOS XE 17.3)Gi110.10.50.1/24
NMS (Ubuntu desktop)eth010.10.50.100/24

NETCONF account for CSR1: admin / Fh-Netconf-2026 (privilege 15). On NMS, open Applications → System Tools → MATE Terminal; the helper scripts are in /opt/lab:

ScriptDoes
nc_hello.pyopens a session and lists the interesting capabilities
nc_get.py hostname / interfaces / operget-config or get with a subtree filter
nc_edit.py FILE.xmledit-config of the XML in FILE to the running datastore
ietf-interfaces.treethe YANG tree of the interfaces model

Topology: CSR1 Gi1 — NMS eth0.

What you’ll practise

  • Explain YANG modules, containers, lists, keys and leaves, and the difference between config and state data
  • Enable NETCONF over SSH on IOS XE with the AAA settings it needs
  • Discover server capabilities from the NETCONF hello
  • Retrieve configuration and operational data with subtree filters
  • Build an XML payload from a YANG tree and apply it with edit-config

The tasks

  1. Read a YANG model
  2. Enable NETCONF on CSR1
  3. Look at the hello
  4. Read data with filters
  5. Create an interface with edit-config
  6. Compare the approaches

The Lab Tasks pane has the scenario, these tasks, the checks to run, hints and the full solution.

Topology and devices

The network as it opens in EVE-NG, drawn from the lab’s own canvas, and the image each node runs.

Topology of NETCONF and YANG on IOS XE2 nodes, 1 link. Every link is listed as text below the diagram.CSR1NMSGi1eth0
2 nodes, with the interface names each link uses.
Nodes in NETCONF and YANG on IOS XE, with the image each runs and the vCPU and RAM it’s set to
NodeDeviceImage in Add NodeSet to
CSR1Cisco CSR 1000vcsr1000vng-universalk9.17.03.08a-serial2 vCPU, 4,096 MB
NMSEVE-NG GUI server (Docker)eve-gui-server:latest1 vCPU, 1,024 MB

How to open this lab

  1. Sign in to your workspace at lab.cloudlabbox.com.

  2. In File Manager, open Shared, then the folder CCNP ENCOR 350-401 guided labs.

  3. Open 31 - NETCONF and YANG on IOS XE and start its nodes, then open Lab Tasks for the scenario and the steps.

The lab is read-only. You can start the nodes and configure the devices, but changes to the topology can’t be saved. To change it, rebuild it in your own folder.

More CCNP ENCOR labs

All CCNP ENCOR labs

Related labs in other courses

CloudLabBox is independent of Cisco. The lab follows exam topics and isn’t vendor training material; vendor names identify the exams and the images in the workspace.