Free tech learning for everyone, from basics to pro

Network AutomationNetworking SecurityIntermediate

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

The network automation stackSource of truthinventory, IPs, intended configAutomation toolsPython, Ansible, CI/CD pipelineInterfacesSSH/CLI, NETCONF, RESTCONF, gNMI, RESTNetwork devicesrouters, switches, firewalls, cloud
Figure 1. Automation reads the intended state from a source of truth and pushes it to devices through their interfaces.

How tools talk to devices

InterfaceHow it worksNotes
SSH and CLIScripts log in and type commands, then read text outputWorks everywhere; output must be parsed
NETCONFXML messages over SSH (port 830)Structured data, transactions and rollback
RESTCONFHTTPS with JSON or XMLWeb-style API using the same data models
gNMIgRPC-basedEfficient configuration and streaming telemetry
Vendor and controller REST APIsHTTPS with JSONUsed 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?
Running the same task again gives the same result and makes no further changes.
Which port does NETCONF use over SSH?
TCP 830.
Suggest a safe first automation project.
Automatic configuration backups or an inventory report, because they only read from devices.

Frequently asked questions

What is network configuration automation?

Using scripts and tools such as Python, Ansible or a controller to push, back up and check device configurations automatically, instead of typing commands on each device by hand.

What is network security automation?

Using automation to apply and check security settings and respond to threats faster, for example pushing ACL or firewall changes from approved templates, checking every device against a hardening baseline, or blocking a malicious IP across all firewalls in one step.

What are examples of automation in network security?

Nightly configuration backups and drift checks, automated compliance reports, patch and firmware status reports, SOAR playbooks that isolate an infected device, and automatic updates of block lists from threat intelligence.

Where should you start with network automation?

Start with read-only tasks such as backups, inventory and compliance checks. They cannot break anything and they build the skills and source of truth needed for safe automated changes later.

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.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
FM TecHub Team
Role
Editorial team
Reviewer credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

The team writes practical, plain-English guides on networking, security and cloud.

More about the team →

Original content written by the FM TecHub Team. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown