Skip to content

martimy/model-driven-configuration-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Model-Driven Network Configuration Tutorial

Docs License: MIT Containerlab

Modern networks are managed through APIs, not CLI sessions. The protocols, NETCONF and gNMI, are well-documented. The gap is everything in between: understanding YANG data models well enough to construct valid configuration payloads, navigating multi-vendor inconsistencies, and knowing why the same OpenConfig path behaves differently on Nokia SR Linux and Arista cEOS.

This tutorial closes that gap. It is a hands-on, lab-based guide to configuring real network devices using YANG models — not scripts, not automation frameworks, just you, the models, and the devices.

📖 Read the full tutorial

What You Will Learn

  • How YANG modules are structured and how to read them with pyang
  • How NETCONF and gNMI work at the protocol level, and how they differ
  • How to discover what models a device supports and fetch them directly from the device
  • How to construct XML and JSON configuration payloads from scratch
  • Why multi-vendor environments are harder than the standards suggest, and how to handle it
  • Configuring interfaces, IP addressing, network instances, and OSPF across a mixed Nokia/Arista topology

Why This Tutorial Is Different

Most network automation tutorials skip straight to Python libraries and abstraction frameworks. This one deliberately does not. Understanding the model layer, before any automation tool is involved, is what separates engineers who can debug broken automation from those who cannot.

The lab uses real vendor images (Nokia SR Linux and Arista cEOS) running in Containerlab on your laptop. Every task exposes a real challenge: revision mismatches between vendors, modules that advertise support but cannot be used for configuration, augmentation-only modules that break naive tooling assumptions. These are not edge cases — they are everyday realities in multi-vendor deployments.

This tutorial does not replace vendor documentation or the broader network automation community's work. It synthesizes them into a single, sequenced learning path. The Further Reading section points to the primary sources this tutorial draws from and resources worth exploring once you have completed the lab.

Prerequisites

  • Networking fundamentals: IP addressing, routing protocols
  • Linux command line basics
  • Basic knowledge of YANG
  • No NETCONF/gNMI experience required

Quick Start

git clone https://github.com/martimy/model-driven-configuration-tutorial.git
cd model-driven-configuration-tutorial

You will need Docker and Containerlab installed, as well as the Arista cEOS and Nokia SR Linux container images. See the Setup guide for details.

Repository Structure

├── docs/        # Tutorial content (source for GitHub Pages)
├── topology/    # Containerlab topology file and device configs
└── scripts/     # Python scripts for NETCONF and gNMI interaction

Further Reading

This tutorial builds on the work of many contributors to the network automation community. The following are some recommended sources:

License

MIT License, see LICENSE for details.