Chapter 6: Automation and Programmability
6.1 Why Automation Matters
For decades, network engineers configured devices one at a time: SSH into a switch, paste commands, verify, repeat on the next box. That "box-by-box" CLI approach works for ten devices and collapses at ten thousand. A single typo pasted into 200 switches can cause an outage that takes hours to trace. Automation replaces that repetitive work with software — controllers, templates, and scripts — that configures devices quickly, identically, and verifiably. It is an official CCNA domain because the industry has moved there: engineers are now expected to understand controllers, APIs, and data formats, not just the command line.
Automation means using software — controllers, scripts, and configuration tools — to deploy, manage, and monitor networks instead of typing CLI commands device by device. The goal is speed, consistency, and fewer human errors.

6.2 Traditional Networking vs Controller-Based Networking
6.2.1 The Three Planes of Operation
Every network device does three kinds of work, grouped into "planes":
| Plane | Job | Examples |
|---|---|---|
| Control plane | Makes decisions: learns the topology, builds the tables the device uses to decide where traffic goes | Routing protocols (OSPF, EIGRP, BGP), Spanning Tree, ARP table building |
| Data plane (forwarding plane) | Follows the decisions: moves packets as fast as possible according to the tables | Forwarding frames/packets out the correct interface using the MAC table or routing table (FIB) |
| Management plane | Lets humans monitor and configure the device | SSH, Telnet, SNMP, syslog, NTP |
A helpful memory trick: the control plane thinks, the data plane does, and the management plane watches and configures.
Cisco loves asking which plane a given function belongs to. Routing protocol messages and STP BPDUs are control plane. Actual packet forwarding is data plane. SSH, SNMP, and syslog are management plane. If a question mentions "which plane builds the routing table," the answer is the control plane.
6.2.2 What Changes with a Controller
In traditional networking, each device runs its own control plane: every router runs OSPF independently and computes its own routing table. Intelligence is distributed — resilient, but every device must be configured individually.
In controller-based networking, the control plane moves into a centralized software controller. Devices keep their data planes (still forwarding in hardware at full speed) but take direction from the controller: configure once, apply everywhere.
| Aspect | Traditional networking | Controller-based networking |
|---|---|---|
| Where the control plane lives | On each device (distributed) | Centralized in a controller |
| Configuration style | CLI, device by device (SSH/Telnet) | Templates and policies pushed from the controller |
| View of the network | Each device sees only its neighbors | Controller sees the entire topology at once |
| Speed of network-wide change | Slow (touch every box) | Fast (change once, apply everywhere) |
| Consistency | Depends on the engineer's typing | Guaranteed by templates |
Traditional networking distributes intelligence across every device and is managed box-by-box. Controller-based networking centralizes the control plane in a software controller, so the whole network can be managed as one system.
An engineer performs each of the following actions. Identify whether each one belongs to the control plane, data plane, or management plane: 1. OSPF routers exchange hello packets and elect a DR. 2. A switch forwards an Ethernet frame out GigabitEthernet0/2 based on its MAC address table. 3. An administrator opens an SSH session to change a hostname. 4. A router looks up 192.168.10.0/24 in its routing table and sends the packet out Serial0/0/0.
Show solution
1. Control plane — OSPF hellos and DR election are routing-protocol operations that build the network's understanding of topology. 2. Data plane — forwarding a frame using an already-built table is pure packet movement. 3. Management plane — SSH is how humans configure and monitor the device. 4. Data plane — consulting the routing table (FIB) to forward a packet is forwarding work, even though the routing table itself was built by the control plane. This distinction is a classic exam trap: building the table is control plane; using it to forward is data plane.
6.3 SDN Architecture
Software-Defined Networking (SDN) is the architecture behind controller-based networking: the control plane is separated from the data plane and centralized. It has three layers:
- Application layer — business apps and network services (e.g., a security app that quarantines infected hosts).
- Controller layer — the SDN controller, the "brain" with a complete view of the network.
- Infrastructure layer — switches and routers that forward traffic as directed.
The layers talk through APIs (Application Programming Interfaces): southbound APIs run between controller and devices (how the controller programs forwarding — e.g., OpenFlow, NETCONF), and northbound APIs run between the controller and applications above it (typically REST APIs, covered in Section 6.5).
Two more terms appear constantly in SDN discussions: the underlay is the physical network (routers, switches, cables), while overlays are virtual networks built on top of it (commonly VXLAN tunnels), letting multiple isolated logical networks share one physical fabric.
SDN separates the control plane (centralized in a controller) from the data plane (left on the devices). Southbound APIs connect controller to devices; northbound APIs connect applications to the controller. The underlay is the physical network; overlays are virtual networks riding on top of it.
6.4 Cisco DNA Center
Cisco DNA Center is Cisco's enterprise SDN controller for campus and branch networks. (Cisco has rebranded it as Catalyst Center — either name refers to the same product.) Instead of configuring hundreds of devices by hand, you define intent in DNA Center and it handles the details. Its three headline capabilities:
- Automation / provisioning — plug-and-play onboarding (a fresh switch pulls its config automatically), configuration templates pushed to many devices at once, and fleet-wide software image management (SWIM).
- Assurance — continuous monitoring with analytics that detect issues (often before users notice), device and client health scores, and guided remediation.
- Policy — access policies defined once and enforced consistently across wired and wireless.
When a question asks what DNA Center does, reach for these three words: automation (provisioning/templates), assurance (monitoring, health, analytics), and centralized policy. If an answer choice describes configuring switches one-by-one over SSH, that is the opposite of DNA Center's purpose.

6.5 REST APIs
Applications — including DNA Center's northbound interface — expose functions through REST APIs. REST (Representational State Transfer) is a design style for APIs built on the same HTTP machinery as the web. If you understand how a browser fetches a page, you understand most of REST.
6.5.1 HTTP Methods
A REST API client tells the server what to do with an HTTP method:
| Method | Purpose | Everyday analogy |
|---|---|---|
| GET | Read / retrieve data (never changes anything) | Reading a web page |
| POST | Create something new / submit data | Filling in and submitting a form |
| PUT | Replace / update an existing resource | Saving over an existing file |
| DELETE | Remove a resource | Deleting a file |
6.5.2 URIs and Responses
Resources are addressed with URIs — structured paths like /dna/intent/api/v1/network-device (API version, then the resource collection). Appending an identifier addresses one specific device.
The server answers with an HTTP status code plus data, usually JSON. Know these cold: 200 (OK), 201 (Created — POST worked), 400 (Bad Request), 401 (Unauthorized — authentication failed), 404 (Not Found).
6.5.3 Authentication Basics
APIs do not accept anonymous commands that reconfigure networks. Common approaches: basic authentication (username/password, only over HTTPS), token-based authentication (log in once, present the token on later requests), and API keys (long-lived secrets identifying the calling application).
REST APIs use HTTP methods (GET to read, POST to create, PUT to update, DELETE to remove), address resources with URIs, and return status codes plus data — most often JSON. API calls must be authenticated, typically with tokens or keys, and should always run over HTTPS.
A network automation script talks to a controller's REST API. Choose the correct HTTP method for each task: 1. Retrieve the list of all switches. 2. Add a new VLAN to the configuration. 3. Change the description of an existing interface. 4. Remove a decommissioned access point from inventory.
Show solution
1. GET — reading data without changing anything is always GET. 2. POST — creating a new resource (the VLAN) is POST. 3. PUT — updating/replacing an existing resource (the interface description) is PUT. 4. DELETE — removing a resource is DELETE. Remember the pattern examiners test: GET = read, POST = create, PUT = update, DELETE = delete.
6.6 Data Formats: JSON, XML, and YAML
APIs need a standard way to encode data. Three formats appear on the CCNA:
| Format | Looks like | Used by | CCNA focus |
|---|---|---|---|
| JSON | Curly braces and brackets: {"key": "value"} | REST APIs, DNA Center responses | High — you must read and interpret JSON |
| XML | Tags: <key>value</key> | NETCONF | Recognize it; know NETCONF uses XML |
| YAML | Indented plain text: key: value | Ansible playbooks | Recognize it; know Ansible uses YAML |
6.6.1 Reading JSON
JSON (JavaScript Object Notation) is built from two structures you must recognize instantly:
- Objects — unordered collections of key-value pairs, wrapped in curly braces
{}. Keys are always strings in double quotes. - Arrays — ordered lists of values, wrapped in square brackets
[]. Array positions start at 0.
Values can be strings ("up"), numbers (1500), booleans (true/false), null, nested objects, or arrays.
{
"hostname": "Dist-SW-01",
"mgmt_ip": "10.10.10.5",
"interfaces_up": 24,
"is_reachable": true,
"vlans": [10, 20, 30],
"location": {
"building": "HQ",
"floor": 2
}
}
Reading it: hostname is the string "Dist-SW-01"; interfaces_up is the number 24 (no quotes = number); is_reachable is the boolean true; vlans is an array of three numbers where vlans[0] is 10 (counting starts at zero); and location is a nested object with its own pairs (building "HQ", floor 2).
JSON questions test careful reading, not memorization. Watch for: quoted vs unquoted values (string vs number), zero-based array indexing, and nested objects. A very common trap is asking for the second item in an array — that is index [1], not [2].
6.6.2 Data Models and YANG
Controllers and devices agree on the shape of configuration data using data models. The modeling language used with NETCONF and RESTCONF is YANG. You do not need to write YANG for the CCNA — just know that YANG defines data models, NETCONF transports them as XML, and RESTCONF transports them over REST (usually as JSON).
JSON is the data format of REST APIs: objects are key-value pairs in {}, arrays are ordered lists in [] starting at index 0. XML is the format of NETCONF; YAML is the format of Ansible playbooks. YANG is the modeling language behind NETCONF/RESTCONF data models.
Read the JSON below, then answer the questions.
`json
{
"device": "Access-SW-02",
"uptime_days": 112,
"stack_members": ["SW-02A", "SW-02B", "SW-02C"],
"ports": {
"total": 48,
"in_use": 31
},
"last_config_change": null
}
`
1. What is the value of the device key?
2. What is the third stack member?
3. How many ports are free (not in use)?
4. What does the null value for last_config_change mean?
Show solution
1. "Access-SW-02" — a string value.
2. "SW-02C" — the array is ["SW-02A", "SW-02B", "SW-02C"]; the third item is at index 2 (zero-based counting: 0, 1, 2).
3. 17 — total (48) minus in_use (31) equals 17 free ports.
4. It means the key exists but currently has no value — the device is reporting that there is no recorded last configuration change (not zero, not an empty string — genuinely empty/unknown).
6.7 Configuration Management Tools
Beyond controllers, dedicated configuration management tools automate device configuration from a central server. The CCNA expects you to compare the big three:
| Tool | Agent on managed device? | Push or pull? | Language | Known for |
|---|---|---|---|---|
| Ansible | No (agentless) — connects over SSH | Push — server pushes configs out | YAML playbooks | Simplicity; nothing to install on devices |
| Puppet | Yes — agent installed on each node | Pull — agents check in with the master | Puppet DSL (Ruby-based) | Large-scale, mature enterprise deployments |
| Chef | Yes — chef-client on each node | Pull — clients fetch from the server | Ruby recipes/cookbooks | Flexibility; "infrastructure as code" pioneer |
Two distinctions do all the work on exam questions:
- Agent vs agentless: Ansible needs nothing installed on the managed device (it just uses SSH, which network gear already has). Puppet and Chef require their agent software on every managed node.
- Push vs pull: In the push model (Ansible), the central server initiates and sends configuration outward. In the pull model (Puppet, Chef), each device's agent periodically contacts the server and fetches its own configuration.
The single most-tested fact in this section: Ansible is agentless and push-based; Puppet and Chef are agent-based and pull-based. If a question asks which tool needs no software installed on the managed devices, the answer is Ansible.
Match each requirement to the best tool (Ansible, Puppet, or Chef): 1. "We cannot install any new software on our switches, but they all support SSH." 2. "We want each server to check in every 30 minutes and pull its desired configuration." 3. "Our team writes Ruby and wants maximum flexibility in defining configurations as code."
Show solution
1. Ansible — agentless operation over SSH is Ansible's defining trait; no agent installation needed. 2. Puppet or Chef — both use the pull model where agents check in periodically. (Puppet is the textbook answer most often expected here.) 3. Chef — Chef configurations ("recipes" and "cookbooks") are written in Ruby, and it is known for infrastructure-as-code flexibility.
6.8 Worked Example: Interpreting JSON from a Controller
Putting it together: here is a realistic (simplified) response from a DNA Center-style API asking for the campus device inventory — GET /dna/intent/api/v1/network-device:
{
"response": [
{
"hostname": "Core-SW-01",
"managementIpAddress": "10.1.0.2",
"reachabilityStatus": "Reachable",
"softwareVersion": "17.9.4",
"role": "CORE",
"serialNumber": "FOC2210A1B2"
},
{
"hostname": "Access-SW-01",
"managementIpAddress": "10.1.1.11",
"reachabilityStatus": "Reachable",
"softwareVersion": "17.9.4",
"role": "ACCESS",
"serialNumber": "FOC2210C3D4"
},
{
"hostname": "Access-SW-02",
"managementIpAddress": "10.1.1.12",
"reachabilityStatus": "Unreachable",
"softwareVersion": "17.6.5",
"role": "ACCESS",
"serialNumber": "FOC2210E5F6"
}
],
"version": "1.0"
}
How to read it like the exam wants:
- The top-level object has two keys:
response(an array of device objects) andversion. responseholds 3 objects — a 3-device inventory.response[0]is Core-SW-01,response[1]is Access-SW-01,response[2]is Access-SW-02.- Reachability: two devices are
"Reachable"; Access-SW-02 (response[2]) is"Unreachable"— it needs attention (powered off, disconnected, or a credentials problem). - Software versions: two devices run 17.9.4; Access-SW-02 runs the older 17.6.5 — a software-compliance issue DNA Center's SWIM could fix once the device is reachable.
- Extracting a value: the management IP of Access-SW-01 is
response[1].managementIpAddress="10.1.1.11"— second object in the array,managementIpAddresskey.
Reading controller output is a core automation skill: identify the top-level structure, count the array elements, check status fields, compare versions, and trace the path (array index + key names) to any single value you need.
An enterprise must push a new standardized access-switch configuration to 40 switches. - Manual method: an engineer spends 30 minutes per switch (SSH in, paste config, verify, document). - Automated method: building and testing the DNA Center template takes 4 hours once; pushing it to each switch takes 3 minutes per switch.
How much engineer time does automation save?
Step 1 — Manual total: 40 switches × 30 minutes = 1,200 minutes = 20 hours. Step 2 — Automated total: template work 4 hours = 240 minutes; pushes 40 × 3 minutes = 120 minutes. Total = 240 + 120 = 360 minutes = 6 hours. Step 3 — Time saved: 1,200 − 360 = 840 minutes = 14 hours.
Final answer: automation saves 14 hours of engineer time — and every switch gets a byte-identical configuration, eliminating the typos that cause most manual outages. (Notice the pattern the exam likes: automation has an upfront cost but wins as device count grows.)
End-of-Chapter Test
{"vlans": [10, 20, 30]}, what is the value of vlans[1]? A. 10 B. 20 C. 30 D. null
Answers
Answer key
Want the full Cisco CCNA 200-301 package?
This guide is free to read. Get the downloadable PDF guidebook plus the full 900-question CCNA practice exam with 3 months of online access.
Get Cisco CCNA 200-301 Full Access — $10