NetIntent
🎯 What it is:
NetIntent is a Python engine that builds a model of a Cisco network from its configurations and answers reachability questions against it: does a flow get through, and if not, where and why is it stopped. It verifies declared intents and, crucially, simulates a proposed change on a copy of the model so a change that would break connectivity is caught before it is ever pushed to a device. Built and demonstrated on a GNS3 lab.
❓ The problem:
Before pushing a configuration change to a live network, there is no easy way for a small team to know whether it will break something. An ACL edited a little too broadly, a link taken down for maintenance that turns out to be the only path, a static route that shadows another — each is a one-line change that can take a service offline, and each is usually only discovered after it is pushed.
⚙️ What it does:
• Parses each device's config into a model — interfaces and their subnets, ACLs (named and numbered, standard and extended, matched bit for bit against Cisco wildcard masks), static routes and a simplified OSPF
• Builds each device's routing table (connected, static and OSPF shortest path) and traces a packet hop by hop, applying every ACL inbound and outbound exactly where a router would
• Verifies intents — flows that must be reachable or blocked — and reports each with the path it takes
• Simulates a proposed change on a copy of the model and reports the impact: which intents it would break, and the exact ACL or missing route responsible
• Appends every verification and simulation to an audit log
🧰 Tech stack:
• Device access — Netmiko (SSH); console for the GNS3 lab
• Address maths — the standard-library ipaddress module (exact, no dependencies)
• Config parsing — a small, purpose-built IOS parser
• Model — connected / static / simplified-OSPF routing plus ACLs
• Lab build — GNS3 v2 REST API
Technical Stack
GNS3 lab topology (live canvas)

The actual GNS3 canvas — a USERS LAN on R1, an R1-R2-R3 OSPF core, and a SERVERS LAN on R3. Green links mean every device is running and converged. This is the emulated network NetIntent models and validates against.
Intent verification

Every declared intent is checked against the model with the path each flow takes: users reach servers, servers reach users, users are blocked from the R2 management loopback, and users reach the R3 services loopback — all passing.
Ad-hoc reachability query

Reachability can be asked directly. A blocked flow names the ACL, interface and direction that stop it — here 10.1.10.0/24 to 2.2.2.2 is BLOCKED by ACL FROM-USERS (in) on R2 FastEthernet0/0.
Unsafe change caught before it ships

The heart of the tool: a proposed ACL meant to tighten the servers subnet is written too broadly and would break the users-reach-servers intent. NetIntent reports it UNSAFE and names the responsible ACL — before it touches any device.
Safe change cleared

For contrast, a genuinely safe change is simulated and cleared — no declared intent regresses, so it is safe to push.
Reachability matrix

A matrix summarising which LAN subnets and loopbacks can reach which, computed from the model — a whole-network view of connectivity at a glance.
Prediction confirmed on the live network

The model is checked against reality: NetIntent predicts that shutting the core link breaks reachability, the change is applied to the live lab, a real ping fails exactly as predicted, and it recovers when the change is rolled back.
Test suite passing

The suite covers wildcard and ACL matching, config parsing, routing-table construction and longest-prefix lookup, the hop-by-hop trace (reachable, ACL-blocked in and out, no-route and loop), intent verification and change simulation — all against fixtures, so no device is needed.