Network automation: why automate, the toolchain and model-driven APIs
In short: Automation replaces slow, error-prone manual changes with repeatable code. Tools read the intended state from a source of truth and apply it to devices over SSH or model-driven APIs such as NETCONF and RESTCONF, using structured data in YAML and JSON. Start with read-only tasks and build up.
Why automate the network
Configuring devices one at a time by hand is slow, and humans make typing mistakes: many outages start with a manual change. Automation lets you make the same change on 500 devices in minutes, exactly the same way every time. It also frees engineers from repetitive tasks such as backups, audits and VLAN changes, so they can work on design and problems.
- Speed: changes and new sites in minutes, not days.
- Consistency: every device follows the same standard.
- Fewer errors: tested templates instead of copy-and-paste.
- Compliance: automatic checks that configs match policy.
- Documentation: the code itself records what was done.
The automation stack
How tools talk to devices
| Interface | How it works | Notes |
|---|---|---|
| SSH and CLI | Scripts log in and type commands, then read text output | Works everywhere; output must be parsed |
| NETCONF | XML messages over SSH (port 830) | Structured data, transactions and rollback |
| RESTCONF | HTTPS with JSON or XML | Web-style API using the same data models |
| gNMI | gRPC-based | Efficient configuration and streaming telemetry |
| Vendor and controller REST APIs | HTTPS with JSON | Used by SD-WAN, cloud and Wi-Fi controllers |
Model-driven interfaces use YANG data models, which describe a device's configuration and state as structured data instead of free text.
Data formats you'll meet
# YAML: easy for people to read and write
hostname: BR1-SW1
vlans:
- id: 10
name: STAFF
- id: 20
name: GUEST
# JSON: the same data, common in APIs
# {"hostname": "BR1-SW1", "vlans": [{"id": 10, "name": "STAFF"}, {"id": 20, "name": "GUEST"}]}
Key ideas: source of truth and idempotency
- Source of truth: one trusted place (a database, IPAM tool or Git repository) that holds what the network should look like. Automation reads it; people change the source, not the devices.
- Idempotency: running the same automation twice gives the same result and changes nothing the second time. Safe to re-run.
- Start small: read-only tasks first (backups, inventory, audits), then simple changes, then full deployments.
Real-world example: a VLAN change across 120 switches
A fictional hospital needed to add a new VLAN for wireless infusion pumps to 120 access switches across four buildings. Done by hand, two engineers estimated three nights of work, with a real risk of typing mistakes on a clinical network. Instead they listed the switches and their uplink ports in their source of truth and wrote a short automation job using RESTCONF where the switches supported it and SSH for the older models. The job ran first in check mode to show exactly what would change, then on ten switches in one ward, then on the rest. It finished in under an hour, and a final read-only check confirmed that every switch carried the new VLAN on the correct trunks.
Practice
What does idempotent mean in automation?
Which port does NETCONF use over SSH?
Suggest a safe first automation project.
Key takeaways
- Manual changes are slow and cause many outages; automation is fast and consistent.
- Tools read intent from a source of truth and push it to devices.
- Interfaces: SSH/CLI, NETCONF, RESTCONF, gNMI and REST APIs.
- YANG models describe configuration; YAML and JSON carry the data.
- Start with read-only tasks, then move to changes.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.