Networking

CCNA Domain 6 Practice Test: Automation Questions with Answers

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.

Original content from computingforgeeks.com - post 189872

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.

Loading quiz...

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:

TopicWhat Cisco asks forQuestions in the bank
6.1 How automation affects network managementExplain7
6.2 Traditional versus controller-based networkingCompare7
6.3 SDN architecture: overlay, underlay, fabric, planes, northbound and southbound APIsDescribe10
6.4 Generative and predictive AI, machine learningExplain6
6.5 REST APIs: authentication, CRUD, HTTP verbs, data encodingDescribe13
6.6 Ansible and TerraformRecognize11
6.7 JSON-encoded dataRecognize11

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:

AreaQuestionsChecked in the labChecked against docs
REST APIs13310
JSON and YAML1183
Ansible and Terraform1156
SDN, underlay, overlay and APIs10010
Automation impact707
Traditional versus controller, planes707
AI and machine learning606
Total651649

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:

curl GET request to a REST API returning a JSON object with string, boolean, number, array, nested object and null values

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:

curl output showing REST API HTTP status codes 200, 401 Unauthorized and 404 Not Found with an application/json content type

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:

jq reading an interface JSON file and Python json.tool rejecting single quotes and a trailing comma

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.

Ansible playbook run twice: first recap changed=2, second recap changed=0 showing idempotency

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.

ansible-playbook --check --diff showing a banner change as changed=1 while the file on disk keeps the old text

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:

terraform init and terraform plan output planning one local_file resource holding two VLAN lines

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.

terraform plan reporting no changes, then planning to recreate the file after a manual edit introduced drift

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:

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:

Keep reading

Free CCNA 200-301 Practice Questions with Answers Networking Free CCNA 200-301 Practice Questions with Answers Configure Samba File Share on Debian 13 / 12 Debian Configure Samba File Share on Debian 13 / 12 WireGuard VPN Setup: Ubuntu 26.04/24.04, Debian 13, Rocky 10 Debian WireGuard VPN Setup: Ubuntu 26.04/24.04, Debian 13, Rocky 10 Best Networking Books: TCP/IP, Routing and Troubleshooting Books Best Networking Books: TCP/IP, Routing and Troubleshooting Omada Fusion Pro Behind a Router: Port Forwarding for LAN Access Networking Omada Fusion Pro Behind a Router: Port Forwarding for LAN Access Install Squid Proxy on Ubuntu 26.04 LTS Networking Install Squid Proxy on Ubuntu 26.04 LTS

Leave a Comment

Press ESC to close