Most people who study networking learn automation from slides, then miss the questions that show a real API response or a playbook recap. Domain 6 of the CCNA 200-301 covers Automation and Programmability: controller-based networking, SDN, REST APIs, JSON, Ansible, Terraform and AI in network operations. This practice test draws 30 automation questions per attempt from a 65-question bank, and every answer comes with an explanation.
We wrote the whole bank for this domain, because the series has no per-topic quizzes here yet. Sixteen questions are built from real output: REST calls against a public API, JSON files fed to jq and Python, and an Ansible playbook plus a Terraform configuration we ran and then broke on purpose. That lab ran in November 2026 on an Ubuntu 24.04 VM (ansible-core 2.16, Terraform 1.17), and the screenshots below are its terminal.
Start the automation practice test
Work through all 30 questions before you open a single explanation, so your score reflects what you actually know. Then read every explanation, including the ones you got right. The REST and JSON items in particular reward a lucky guess, and a guess you cannot explain will not hold up the next time the same idea shows up with different output. Each retake pulls a new mix from the 65 questions.
Two or three draws at 85 percent or better mean this domain is in good shape. If you land below that, don’t reread the theory first. Go to the worked questions further down, because most misses here come from reading output carelessly (a quoted number, a trailing comma, a 401 taken for a 403), not from missing concepts.
Know what Domain 6 asks for
Cisco lists seven topics under Automation and Programmability in the CCNA 200-301 v1.1 exam topics, and none of them says “configure”. The verbs are explain, compare, describe and recognize, so you are expected to read and reason about automation, not to write production playbooks. That is good news, but it also means the questions lean on precise vocabulary:
| Topic | What Cisco asks for | Questions in the bank |
|---|---|---|
| 6.1 How automation affects network management | Explain | 7 |
| 6.2 Traditional versus controller-based networking | Compare | 7 |
| 6.3 SDN architecture: overlay, underlay, fabric, planes, northbound and southbound APIs | Describe | 10 |
| 6.4 Generative and predictive AI, machine learning | Explain | 6 |
| 6.5 REST APIs: authentication, CRUD, HTTP verbs, data encoding | Describe | 13 |
| 6.6 Ansible and Terraform | Recognize | 11 |
| 6.7 JSON-encoded data | Recognize | 11 |
REST gets the most questions because it packs four ideas into one topic, and every one of them can be shown as real output. The AI topic is new in v1.1 and stays conceptual: tell predictive from generative, know where machine learning fits, and know why you’d review what a model writes before it touches a router. Domain 6 carries 10 percent of the score, the same weight as IP Services, and the full CCNA topic breakdown shows how it sits next to the other five.
Read the lab and docs split
Each question is tagged by how we checked its answer. A lab question was settled by running the command and reading what came back. A docs question was checked against Cisco design guides, the HTTP and JSON standards, or the Ansible and Terraform documentation. The split tells you where to practice with a terminal and where flashcards are enough:
| Area | Questions | Checked in the lab | Checked against docs |
|---|---|---|---|
| REST APIs | 13 | 3 | 10 |
| JSON and YAML | 11 | 8 | 3 |
| Ansible and Terraform | 11 | 5 | 6 |
| SDN, underlay, overlay and APIs | 10 | 0 | 10 |
| Automation impact | 7 | 0 | 7 |
| Traditional versus controller, planes | 7 | 0 | 7 |
| AI and machine learning | 6 | 0 | 6 |
| Total | 65 | 16 | 49 |
JSON is the area where a terminal pays off most. Eight of its eleven questions show a document and ask you to read it, and the quickest way to get good at that is to break a few files yourself and watch the parser complain. SDN and AI have no lab items because they are vocabulary: underlay versus overlay, northbound versus southbound, predictive versus generative. Those you learn by explaining them out loud until the pairs stop blurring.
Work through the questions people miss
Six areas below collect most of the wrong answers in this bank. Each comes with the output that settles it, so you can check the answer yourself instead of memorizing ours. Any Linux box with curl, jq, Ansible and Terraform reproduces all of it, and none of it needs a router.
Read a REST response by type
Controllers such as Catalyst Center and Meraki answer northbound REST calls with JSON, and the bank asks you to name the type of a value at a glance. We used the public GitHub API as a stand-in because it needs no account for reads. This GET pulls one repository and trims the reply to a handful of fields with jq:

Every JSON value type turns up in that one reply. Strings sit in double quotes, the boolean false has none, and 71455 is a number. The topics come back as an array in square brackets, owner holds a nested object, and the mirror URL is null because the repository has no mirror. If a question shows "enabled": "true", the quotes make it a string, not a boolean. Read the quotes before you read the value.
Tell 401 from 403 and 404
Status codes come in families, and the 4xx family is where questions get picky. We asked for an existing repository, an endpoint that needs a login, a repository that isn’t there, and a POST without credentials:

A 200 came back for the repository, along with content-type: application/json, which is the header that tells a client how to parse the body. Both the /user endpoint and the unauthenticated POST returned 401, because the server could not tell who was asking. A 403 would mean it knew who you were and still refused, which is the pair most people swap. The missing repository returned 404.
Look at the 401 body again: "status": "401" sits in quotes, so it is a string, and that exact body is one of the JSON questions in the bank. Real APIs also use token authentication, and on Catalyst Center you POST Basic credentials to /dna/system/api/v1/auth/token once, then send the token in an X-Auth-Token header on every later call (Cisco’s authentication doc).
Spot invalid JSON before a parser does
Three mistakes account for nearly every broken JSON file we have seen: single quotes, a trailing comma, and a missing quote around a key. We wrote a clean interface record, queried it, then fed two broken copies to Python’s json.tool and to jq:

On its own, the clean file answers three questions. .ipv4[0].ip returned 10.0.1.1 because arrays count from zero, .enabled | type confirmed a boolean, and .description came back as a real null. The file also has five top-level keys, since the ip and netmask pairs live one level down inside the array.
Errors from the broken copies teach more. Python rejected the single-quoted keys at line 2, column 3, the first quote it hit. For the trailing comma, Python 3.12 printed the same “Expecting property name” message but pointed at line 4, the closing brace (Python 3.13 and later say “Illegal trailing comma” instead). A comma promises another member, and the brace broke that promise. jq said it more plainly: “Expected another key-value pair”. When a parser blames a line, check the line above it first.
Prove a playbook is idempotent
Idempotency is the Ansible word people define correctly and then miss in a recap. Our playbook sets a login banner and an NTP line against a local inventory, which keeps the lab small while the behavior stays the same as on a network device. This is the exact file we ran:
---
- name: Baseline config
hosts: lab
gather_facts: false
tasks:
- name: Login banner
ansible.builtin.copy:
content: "Authorized access only\n"
dest: /tmp/motd-banner.txt
- name: NTP server line
ansible.builtin.lineinfile:
path: /tmp/router.cfg
line: "ntp server 10.0.1.10"
create: true
We ran it twice in a row with nothing touched in between. Watch the changed count in each recap.

On the first run the recap reported changed=2 because both files had to be written. The second reported ok=2 and changed=0, with failed and unreachable still at zero, so nothing went wrong and nothing was skipped. Each module compared what was there with what the playbook asked for, found a match, and left it alone. That is why rerunning a playbook across 400 routers is safe, and it’s the answer to the recap question in the bank.
Preview a change with check mode
Before pushing a new banner to every device, you’d want to see what would change without changing it. We edited the banner text in a copy of the playbook and ran it with --check --diff, then read the file on disk.

Check mode reported changed=1 and the diff shows the old and new banner, yet cat still prints the old text. Check mode reports what a real run would do and stops there. A question that offers “applies the change, then shows the diff” is the trap, and so is “checks only the YAML syntax”, which is what --syntax-check does.
Watch Terraform plan, apply and drift
Terraform questions turn on two ideas: you declare the end state, and a state file remembers what Terraform built. To show both without a cloud account we used the local provider, which manages plain files. This configuration declares one file holding two VLAN lines:
terraform {
required_providers {
local = {
source = "hashicorp/local"
version = "~> 2.5"
}
}
}
resource "local_file" "vlan_db" {
filename = "${path.module}/vlans.txt"
content = "vlan 10 name USERS\nvlan 20 name VOICE\n"
}
Running terraform init prepared the working directory and fetched the provider, and terraform plan then compared the configuration with reality and found nothing built yet:

A plus sign marks a create, and the summary line “Plan: 1 to add, 0 to change, 0 to destroy” is what you’d check before approving anything. Applying it created the file and recorded it in state:
terraform apply -auto-approve
terraform state list
Here is the tail of the apply, followed by the state listing with its single resource:
local_file.vlan_db: Creating...
local_file.vlan_db: Creation complete after 0s [id=d95bd102aa381aab50ae48b70a10eeb7bfc798a6]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
local_file.vlan_db
Then we planned again with nothing changed, appended a rogue VLAN to the file by hand, and planned a third time.

With nothing changed, the first plan printed “No changes. Your infrastructure matches the configuration.”, which is the declarative model in one line. The drift result surprised us. We expected an in-place update, but the plan proposed a fresh create. During the refresh the local provider saw that the file content no longer matched, dropped the resource from state, and planned to write the declared two VLANs from scratch. Either way, the takeaway for the bank holds. Terraform puts the resource back the way the configuration declares it, and it never rewrites your configuration to match the manual edit.
Keep the planes and APIs straight
SDN questions do not need a lab, but they do need the pairs fixed in your head. Cisco’s SD-Access design guide defines the underlay as the physical switches and routers, and the overlay as virtual networks built on top of them. In that design, these are the pieces the questions name:
- Underlay routing: IS-IS, built by LAN Automation
- Overlay control plane: LISP
- Overlay data plane: VXLAN
- Policy plane: Cisco TrustSec
For APIs, direction is everything. A script talking to the controller uses a northbound API, usually REST with JSON. The controller talking to devices uses southbound interfaces such as NETCONF (XML over SSH on TCP 830), RESTCONF, OpenFlow or plain CLI over SSH. If a question describes something above the controller, it’s northbound, whatever protocol it names.
Study the areas the test exposed
Domain 6 does not have its own topic guides in this series yet, so point your misses at these existing posts instead:
- Ansible automation from inventory to roles
- Ansible compared with Chef, Puppet and Salt
- Install Terraform on Linux
- OpenTofu, the open source Terraform fork
- Campus, spine-leaf and WAN architectures
Read the Ansible comparison first if agentless versus agent-based questions trip you up, because it explains what each tool installs on the managed node. For REST and JSON, the fastest practice is the one shown above: pick any public API, request it with curl, and say the type of every value before jq tells you. Keep the CCNA command cheat sheet nearby for the device side of the domains that do ask for configuration.
Finish the six-domain set
This was the last of the six domain tests, so the full set is now in one place on the CCNA practice questions hub. If automation was your weakest score, retake this one until two draws in a row clear 85 percent, then rotate through the others: Network Fundamentals, Network Access, IP Connectivity, IP Services and Security Fundamentals. IP Connectivity carries the most weight at 25 percent, so it deserves the most retakes.
For pacing the rest of your preparation, the CCNA 200-301 study roadmap lays out the order we’d follow, the free CCNA labs give you routers to practice on, and the CCNA book list covers the full-length references. We’re also putting together a CCNA prep pack with questions that do not appear anywhere on the site: