Model-Driven Network Operations: NetBox Intent, gNMI on SR Linux, Digital-Twin Change Gates and Guarded Remediation

Run a routed network the model-driven way: NetBox holds the intent, a Python tool renders Nokia SR Linux configuration as YANG data and applies it with gNMI after proving every change on a Containerlab digital twin, gNMIc streams telemetry into tested Prometheus alerts, and a controller reconciles drift and drains unstable links within guardrails.

Network Engineer. Advanced.

What you will build and explain

  • Model a routed network in NetBox (custom fields, config contexts, cables, IPAM) so every configuration value has one home, seed it idempotently and give tools least-privilege tokens.
  • Validate intent with rules that name the NetBox object to fix, render SR Linux native-YANG JSON deterministically, check it against the schema and pin it with golden files.
  • Prove every change on a digital twin built in Containerlab from the same intent, gated by the plan's hash, and apply it with gNMI one transaction per router, with post-checks and rollback.
  • Stream router state with gNMIc into Prometheus, join it with the intent in alert rules tested by promtool, and route alerts with Alertmanager to a person and to automation.
  • Detect configuration drift from the routers' own commit events, attribute it to a user, and reconcile it, with a maintenance escape hatch.
  • Automate one remediation (draining an unstable link by IS-IS metric) inside explicit guardrails, and explain where automation must stop and a person decide.

Before you begin

  • IPv4 addressing including /31 links and /32 loopbacks; what an IGP and BGP do and why iBGP needs route reflectors; Linux shell use; reading short Bash and Python programs; Docker and Git basics.
  • A Linux host on x86_64 with 8 vCPUs, 32 GB of memory and 40 GB of free disk, Docker 27+ with Compose, Bash and OpenSSL. NetBox, YANG, gNMI, SR Linux, Containerlab, Nornir, gNMIc, Prometheus, Alertmanager and Grafana are taught.

Who this is for

For network engineers who configure routers by hand today and want to run a network from a source of truth: NetBox as the intent, configuration rendered as YANG data and applied with gNMI, every change proved on a digital twin, streaming telemetry with tested alerts, and automation that reconciles drift and drains unstable links within guardrails.

Curriculum

Learning topics (15)
  1. From an intent in NetBox to a verified router, and back when something changes

    This page explains how the parts of the lab fit together: what each component does, which way information flows, who may do what, and why the design is this way rather than another. The lessons go deeper into each part; this is the map they hang on.

  2. Prepare the lab host, and five ideas the lessons build on

    This lesson checks that the machine you will run the lab on is ready, and refreshes five ideas the later lessons use without stopping: network namespaces and veth pairs, Docker bridge networks, certificate authorities, HTTP APIs with bearer tokens, and SSH port forwarding. If you use all five at work, skim the explanations and run the checks.

  3. From typed commands to an operating model

    Fenmoor's network engineers know their routing. What failed them last year was not IS-IS or BGP but the way changes reached routers: a spreadsheet nobody trusted, CLI snippets pasted router by router, no test before production, five-minute polling that never saw a flapping link, and emergency fixes that lived only on the router until the next change erased them. This lesson describes the operating model the project builds to replace that, and the few ideas it rests on. Each l

  4. NetBox as the source of truth

    A source of truth earns the name only if two things hold: every value the network depends on has exactly one home there, and the tools that build the network read it from there and nowhere else. This lesson models Fenmoor's network in NetBox, shows how netops reads it back as one consistent intent, and sets up the least-privilege access the tools use.

  5. YANG and SR Linux's configuration model

    When you type set / interface ethernet-1/1 admin-state enable on SR Linux, the CLI is not the configuration; it is one way to edit a tree of data whose shape is defined by YANG models. gNMI edits the same tree directly, as data. This lesson teaches enough YANG to read that tree, shows how a YANG path turns into the JSON netops sends, and explains SR Linux's transactions, which are what make a whole router's change atomic.

  6. gNMI: Get, Set and Subscribe

    gNMI (gRPC Network Management Interface) is how every tool in this project talks to the routers: netops reads and writes configuration with it, gNMIc streams state with it, and the controller watches commits with it. This lesson explains its four operations, the security around them on SR Linux, and how netops uses each one.

  7. The routing design, as SR Linux configuration

    Fenmoor's design is conventional on purpose: an IS-IS underlay that knows every link and loopback, BFD so a dead link is noticed in under a second, and iBGP with two route reflectors carrying the LAN prefixes behind each distribution router. You know what these protocols do; this lesson shows the choices inside each one, how every value is derived from NetBox, and what the rendered SR Linux configuration says.

  8. From intent to configuration: validation, rendering and plans

    Between NetBox and the routers sits a short pipeline: build typed intent, validate it, render each router's configuration, and package the result as a plan with a name that can only belong to that content. This lesson builds it and shows the tests that keep it honest: one per validation rule, golden files for rendering, and hashes for plans.

  9. The digital twin: Containerlab and the verification suite

    Validation answers "is this intent well formed?". It cannot answer "will the network still carry payments after this change?". The twin answers that by doing it: it builds a second copy of the network from the same intent, applies the plan, asks the routers what is true, pings across it, and is destroyed. This lesson covers Containerlab, the generated topology, the twin's lifecycle and the checks that decide whether a plan may reach production.

  10. Applying a plan: the gate, the order, post-checks and rollback

    A plan that passed on the twin still has to meet production, where a link can fail mid-change and routers carry real traffic. netops apply is built around one guarantee: when it finishes, every router either runs the new plan with its checks passed, or runs exactly what it ran before. This lesson walks through how, and through Nornir, the framework that runs the checks on all routers at once.

  11. Streaming telemetry with gNMIc and Prometheus

    Last spring a link flapped every few seconds for 40 minutes and Fenmoor's five-minute SNMP averages never showed it. This lesson builds the pipeline that would have: gNMIc subscribes to every router over gNMI, turns the stream into Prometheus series, and Prometheus stores them and evaluates rules on them. It also explains a design choice that looks backwards at first: protocol state is sampled every five seconds rather than streamed on change.

  12. Alerts that know the intent, their tests, routing and dashboards

    An alert is a claim that something is wrong and someone (or something) should act. This lesson writes Fenmoor's alert rules so that each claim is precise, tests every rule with promtool before it ever runs, routes alerts to the remediation controller and to the on-call pager, and provisions Grafana's dashboards from files.

  13. Drift: detecting, attributing and reconciling hand edits

    At 2 a.m. an engineer logs in to dist-west and raises an IS-IS metric to stop traffic using a link that drops packets. It works. Nobody writes it down, and a month later a planned change silently sets the metric back to 10 and the problem returns. That is drift: a router running something other than what the automation last applied. This lesson builds detection that reacts to the router's own commit within seconds, attribution to the user who made it, and reconciliation back

  14. Closed-loop remediation, and where it must stop

    A link that loses a third of its packets is worse than a dead one. A dead link is detected in under a second and routed around; a lossy link keeps coming back, so traffic keeps returning to it, and a share of card payments fails every few seconds until someone notices. The standard response is to drain the link: make it the path of last resort so traffic moves to the other uplink, while the link stays up for diagnosis. This lesson automates that one response, and spends most

  15. Security, operations, and what production adds

    The earlier lessons each secured their own piece. This one looks at the whole: who holds which credential, what is exposed to whom, how the software is pinned, how the lab is run day to day and removed, and what a production version of this design would change.

Practical build steps (7)
  1. Prepare the lab host

    Starting point: a copy of the project source and a Linux machine you control. Finishing point: the host has the resources and tools the lab needs, and the static checks pass on it.

  2. Initialise the lab and start the platform and the network

    Starting point: a host that passed the previous step. Finishing point: NetBox holds Fenmoor's intent, six SR Linux routers and four hosts run in Containerlab with their bootstrap configuration, and gNMIc, Prometheus, Alertmanager, Grafana, the controller and the pager are running.

  3. Build the network from NetBox

    Starting point: the platform and the routers are running, the routers with their bootstrap configuration only. Finishing point: every router runs its rendered configuration, the network verifies (adjacencies, sessions, routes and pings from every store to the payment service), and telemetry fills the dashboards.

  4. Make a change of your own

    Starting point: the network built and verified. Finishing point: you changed an IS-IS metric in NetBox, proved the change on a twin, applied it, and saw it in the routers, the journal and Grafana.

  5. Drills: mistakes the change path catches

    Starting point: the network built and verified. Finishing point: you have watched validation refuse an invalid intent, the twin refuse a harmful change that every rule allowed, and an apply roll back when a link failed during the change, and the network is healthy again.

  6. Drills: drift and remediation

    Starting point: the network built and verified, the controller running. Finishing point: you have watched the controller undo a hand edit and record who made it, drain a flapping link automatically, refuse a second drain within 30 minutes and page a person, and you have undrained the first link yourself.

  7. Remove the lab

    Starting point: any state of the lab, including a failed step. Finishing point: no container, network, volume or generated file of the lab remains on the host, and, if you used a cloud virtual machine, it is deleted.

Access

Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.

Cloud costs and boundaries

Runs entirely on a Linux host you provide; the project itself has no cloud resources. If that host is a cloud virtual machine (an 8-vCPU, 32 GB x86 instance), its provider bills it by the hour from creation until you delete it. Cleanup removes everything the lab created on the host; deleting a cloud instance is your last step.

Licence and completion

Vectametric Project Source Licence (2026-09-27): personal learning, modification/deployment and attributed portfolio/interview demonstrations are permitted. Lawfully obtained copies remain usable after online access expires. Do not redistribute original source or the Source Pack; commercial/client production use requires separate permission. Third-party terms remain separate. See included LICENSE.txt and the Project Source Licence section of the site Terms.

Questions about projects

Do I need a cloud account?

You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.

Can I read the code with Learning Access?

Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.

Are cloud charges included?

No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.

Does the project include troubleshooting and interview preparation?

The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.

How long can I use the project?

The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy