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
- 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.
| Device | Interface | Address |
|---|---|---|
| CSR1 (IOS XE 17.3) | Gi1 | 10.10.50.1/24 |
| NMS (Ubuntu desktop) | eth0 | 10.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:
| Script | Does |
|---|---|
nc_hello.py | opens a session and lists the interesting capabilities |
nc_get.py hostname / interfaces / oper | get-config or get with a subtree filter |
nc_edit.py FILE.xml | edit-config of the XML in FILE to the running datastore |
ietf-interfaces.tree | the 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
- Read a YANG model
- Enable NETCONF on CSR1
- Look at the hello
- Read data with filters
- Create an interface with edit-config
- 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.
Every link, as text
- CSR1
Gi1to NMSeth0
| Node | Device | Image in Add Node | Set to |
|---|---|---|---|
| CSR1 | Cisco CSR 1000v | csr1000vng-universalk9.17.03.08a-serial | 2 vCPU, 4,096 MB |
| NMS | EVE-NG GUI server (Docker) | eve-gui-server:latest | 1 vCPU, 1,024 MB |
How to open this lab
Sign in to your workspace at
lab.cloudlabbox.com.In File Manager, open Shared, then the folder
CCNP ENCOR 350-401 guided labs.Open
31 - NETCONF and YANG on IOS XEand 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
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.