All Cisco exams
Free 300-435 practice test: 30 questions with answers
30 original questions for Automating and Programming Cisco Enterprise Solutions (ENAUTO) v2.0, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 112 questions
- Real exam
- 90 min
All 30 300-435 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Controller-Based Network Automation (6 questions)
Question 1
A Python script authenticates to a controller REST API with a username and password, receives a token, and sends that token with each later request. The first calls succeed, but after a while every call returns HTTP 401. Which cause is most likely?
- AThe token has expired, so the script must request a new token before it continues
- BThe northbound API port has closed, so the controller stopped listening for new requests
- CThe script must switch to SNMP, because REST tokens are only valid for read operations
- DThe controller now blocks all GET requests from scripts, so only POST calls are accepted
Show answer and explanationHide answer
Correct answer: AController tokens are time-limited, so an expired token returns 401 and the script must request a new one. Blocked GET requests, a closed port or switching to SNMP do not explain a pattern where early calls succeed and later calls fail with 401.
Question 2
A Jinja2 template must generate one VLAN block for each item in a list of VLAN dictionaries passed from a Python script. Which construct should the template use to repeat the block?
- AA set statement, which assigns a value to a variable for use later in the template
- BAn if block, which renders its enclosed text only when a given condition evaluates to true
- CA for loop block, which iterates over each item in the list and renders the enclosed text
- DA default filter, which substitutes a fallback value when the variable is undefined
Show answer and explanationHide answer
Correct answer: CThe for loop repeats a block once per list item, which is what one VLAN block per entry needs. An if block renders conditionally, set assigns a variable, and default is a filter that supplies a fallback rather than repeating output.
Question 3
A Jinja2 template renders a port description from a variable named desc. Some devices have no value for it, and the output should show the text no-description instead of an error. Which filter provides this behavior?
- AThe upper filter, which changes the text of the variable to uppercase letters
- BThe trim filter, which removes leading and trailing whitespace from the text value
- CThe default filter, which returns a supplied fallback when the variable is undefined
- DThe int filter, which converts the value to an integer for numeric use in the template
Show answer and explanationHide answer
Correct answer: CThe default filter returns the supplied string when a variable is undefined, so the template prints no-description. upper, trim and int change or convert a value that exists, and they do not supply a fallback for an undefined variable.
Question 4
A team wants to manage a controller with Ansible. They need vendor modules, plugins and roles packaged together so they can be installed as one unit. Which Ansible concept provides this packaging?
- AA collection, which packages modules, plugins and roles for a vendor or domain
- BAn inventory file, which lists the hosts and groups that a playbook targets
- CA handler, which runs a task only after another task reports that it changed something
- DA vault, which encrypts sensitive variables such as passwords stored in project files
Show answer and explanationHide answer
Correct answer: AA collection bundles modules, plugins and roles and is the standard way vendor content for controllers is distributed. Inventory lists targets, handlers run after notifications, and vault encrypts secrets, so none of them packages vendor content.
Question 5
A security team wants one access policy for every employee in the contractors group, no matter which switch port or IP subnet the person connects from. Which TrustSec mechanism carries the group identity so the policy can follow the user?
- AVLAN IDs, which place each device in a broadcast domain selected by its switch port
- BScalable Group Tags, which label endpoints by group so that policy is applied to the tag
- CStandard access control lists that match on source IP subnet and destination port numbers
- DPort security limits, which cap the number of MAC addresses that an interface may learn
Show answer and explanationHide answer
Correct answer: BScalable Group Tags in Cisco TrustSec label endpoints by group, so policy follows the identity regardless of IP address or port. VLANs and IP-based access lists tie policy to location or addressing, and port security limits MAC addresses rather than identifying groups.
Question 6
A script compares the running configuration of every switch with an approved golden template each night and reports devices whose configuration has drifted. Which automation activity does this describe?
- ADay-0 provisioning, which takes a brand new device from factory defaults to a working state
- BModel-driven telemetry, which streams operational data from devices to a collector
- CSoftware image management, which stages and activates new operating system releases
- DConfiguration compliance checking, which detects drift from an approved intended state
Show answer and explanationHide answer
Correct answer: DComparing running configuration with an approved template to find drift is configuration compliance checking. Day-0 provisioning, telemetry and image management are different activities that cover device onboarding, monitoring and the software lifecycle.
Device-Level Network Automation (6 questions)
Question 7
A Python script must push a list of configuration lines to 20 IOS XE routers over SSH with Netmiko. It must enter configuration mode, send each line and leave configuration mode without custom prompt handling. Which Netmiko method fits?
- Asend_config_set, which enters configuration mode, sends each line and then exits configuration mode
- Bwrite_channel, which sends raw characters to the session and leaves prompt handling to the script
- Cfind_prompt, which returns the current device prompt string so the script can compare it
- Dsend_command, which runs one exec-mode command on the device and returns its output text
Show answer and explanationHide answer
Correct answer: Asend_config_set handles entering configuration mode, sending each line and exiting, so the script needs no custom prompt handling. send_command is for exec-mode commands, write_channel sends raw characters, and find_prompt only returns the prompt.
Question 8
An engineer uses ncclient to change the running configuration of a router. Before sending the edit, the engineer wants to stop other NETCONF sessions from changing the same datastore. Which NETCONF operation addresses this?
- AThe get-config operation, which reads configuration from a datastore and does not change anything
- BThe lock operation, which holds an exclusive lock on the datastore until the session releases it
- CThe commit operation, which applies a candidate configuration to the running configuration
- DThe discard-changes operation, which removes uncommitted edits from the candidate configuration
Show answer and explanationHide answer
Correct answer: BThe NETCONF lock operation, defined in RFC 6241, gives one session exclusive write access to a datastore so other sessions cannot change it. get-config only reads, commit applies a candidate configuration, and discard-changes removes uncommitted candidate edits.
Question 9
A RESTCONF client must send a JSON body that holds YANG-modeled data. Which Content-Type value does RFC 8040 define for this kind of payload?
- Atext/html, the media type that browsers use to display web pages
- Bapplication/yang-data+xml, the media type for XML-encoded YANG-modeled data
- Ctext/plain, which carries the body as unstructured text with no defined encoding rules
- Dapplication/yang-data+json, the media type for JSON-encoded YANG-modeled data
Show answer and explanationHide answer
Correct answer: DRFC 8040 defines application/yang-data+json for JSON-encoded YANG data and application/yang-data+xml for XML. The other media types describe web pages or unstructured text and do not identify YANG-modeled content.
Question 10
An automation team runs the same Ansible playbook every night against a fleet of access switches. They expect a run to change nothing on a switch that already matches the desired state. Which property of well-written Ansible modules provides this behavior?
- AAd hoc execution, which runs one module once against selected hosts from the command line
- BAgentless operation, because managed devices need no installed software to be reached over SSH
- CIdempotence, so that repeated runs converge on the desired state without extra changes
- DParallel forks, which let several hosts be configured at the same time during each play
Show answer and explanationHide answer
Correct answer: CIdempotence means a module checks current state and changes only what differs, so repeated runs are safe. Agentless operation, ad hoc commands and forks describe how Ansible connects or runs, not whether a repeated run changes anything.
Question 11
A new branch switch arrives with no configuration. Staff only connect power and the uplink, and the switch must fetch its initial configuration on first boot without a console session. Which approach meets this need?
- APasting the full configuration into the console port by hand after the first power-on
- BZero-touch provisioning, where the device fetches its initial configuration from a provisioning service
- CA nightly TFTP backup of the running configuration to a central server
- DEnabling SNMP write access on the uplink so that the central server can push settings
Show answer and explanationHide answer
Correct answer: BZero-touch provisioning lets a device with factory defaults obtain its initial configuration on first boot, which matches the need. Manual console pasting requires staff with console access, a nightly backup runs only after configuration exists, and SNMP write access does not supply a starting configuration.
Question 12
A script sends a RESTCONF PUT to create an interface on an IOS XE device. The URL and JSON body were copied from documentation, but the server returns HTTP 401 Unauthorized. What is the most likely cause?
- AThe request does not carry valid credentials, so the RESTCONF server refuses to process it
- BThe JSON body uses a leaf name that does not exist in the YANG model for the interface
- CThe device does not accept the PUT verb, so the script must switch to a different method
- DThe JSON body is malformed, so the server rejects it before it checks who sent the request
Show answer and explanationHide answer
Correct answer: AHTTP 401 means the server could not authenticate the request, so missing or incorrect credentials are the likely cause. An unknown leaf or malformed body usually returns 400 Bad Request, and an unsupported verb usually returns 405 Method Not Allowed.
Operations (6 questions)
Question 13
An automation pipeline changes an access switch, then calls a platform API to read the operational state of the same interfaces. The pipeline fails the change if any interface is not up as expected. What is this step?
- APost-change validation through a platform API, which confirms the device matches its intent
- BWebhook registration, which tells an external system whenever a configuration change is made to a device
- CDay-0 provisioning, which loads the first configuration onto a device that has none
- DModel-driven telemetry dial-in, which pulls interface counters from the device on demand
Show answer and explanationHide answer
Correct answer: APost-change validation calls the platform API after a change to confirm that operational state matches what was intended, and it can stop the pipeline when it does not. Day-0 provisioning, webhook registration and telemetry dial-in each serve a different purpose in the lifecycle.
Question 14
A telemetry collector sits behind a firewall and cannot open connections to the IOS XE routers. The routers must start the connection and push their streamed data to the collector. Which model-driven telemetry mode fits?
- ADial-out, in which the router initiates the connection and sends telemetry to the receiver
- BDial-in, in which the collector connects to the router over a session and creates the subscription
- CSNMP polling, in which the collector requests each MIB object from the device at fixed times
- DSyslog forwarding, in which the router sends log messages to a remote logging host
Show answer and explanationHide answer
Correct answer: ADial-out telemetry has the router initiate the session and push data, which suits a collector that cannot reach the device. Dial-in reverses the connection direction, SNMP polling is request-response, and syslog carries log messages rather than model-driven telemetry.
Question 15
A team wants an IOS XE telemetry subscription to send an update only when a monitored value changes, instead of at every sample interval. Which subscription type should it use?
- APeriodic subscription, which sends the full set of values at each configured sample interval
- BTrap-style alarm, which waits for the device to raise a threshold event before sending
- COn-change subscription, which sends a notification only when the monitored YANG data changes
- DPolling subscription, which the collector runs by requesting the data from the device each cycle
Show answer and explanationHide answer
Correct answer: COn-change subscriptions send updates only when a monitored value changes, which reduces traffic. Periodic subscriptions send at a sample interval, a trap-style alarm is not a model-driven telemetry subscription type, and polling is request-driven rather than a subscription.
Question 16
A monitoring platform must alert an operations server as soon as a device health event occurs. The operations server should not have to query the platform every few minutes. Which mechanism fits?
- AA cron job on the operations server that exports a CSV of device health every hour
- BA webhook, which the platform calls with an HTTP POST to a configured receiver when the event fires
- CAn SNMP GET loop that the operations server runs against each device every minute
- DA manual email digest that an engineer reviews at the start of each business day
Show answer and explanationHide answer
Correct answer: BA webhook pushes an HTTP POST to a receiver when the event happens, so the operations server does not need to poll. An hourly CSV export, an SNMP polling loop and a manual email digest all depend on the operations server or an engineer pulling information on a schedule.
Question 17
A controller team plans to upgrade a set of switches to a new software release. They want to see which devices run which versions and stage the upgrade from one place instead of logging in to each switch. Which controller capability provides this?
- ANetwork topology simulation, which builds a lab copy of the network to test traffic paths
- BCentralized software image management, which tracks versions per device and plans staged upgrades
- CWebhook registration, which notifies an external system when a device reboots or fails
- DAccess control policy, which decides which administrators may log in to each switch
Show answer and explanationHide answer
Correct answer: BCentralized software image management tracks the image on each device and lets operators plan and stage upgrades from one place. Simulation, webhooks and access policy address different needs and do not provide a version inventory with upgrade staging.
Question 18
A team wants to test a routing change across a copy of the production topology before any live device is touched. Which approach fits best?
- ABuild a simulated copy of the topology in a lab or digital twin and run the change there first
- BApply the change to one production access switch on Friday night and watch the results
- CExport the production configuration to a spreadsheet and check it by hand for syntax errors
- DAsk each device owner to confirm the change in an email before it is applied in production
Show answer and explanationHide answer
Correct answer: AA simulated copy of the topology, such as a digital twin or modeling lab, lets the team observe the change without affecting users. Testing on a production switch, checking a spreadsheet or relying on emailed approval does not test the routing behavior in a safe copy.
AI in Automation (6 questions)
Question 19
An AI agent reads change tickets and can run approved CLI commands on routers. A ticket contains hidden text that tells the agent to disable an access list, and the agent follows it. Which security risk does this describe?
- ACertificate validation failure, where the agent cannot verify the router's TLS identity
- BBrute-force login, where the agent repeatedly guesses passwords for router accounts
- CDenial of service, where the agent floods the controller with more requests than it can handle
- DPrompt injection, where untrusted text in the input overrides the agent's intended instructions
Show answer and explanationHide answer
Correct answer: DPrompt injection happens when untrusted content such as a ticket tells the model to act against its instructions, which is what happened here. Certificate failures, brute-force logins and denial of service are different attacks that do not rely on hidden instructions in the agent's input.
Question 20
A developer uses an AI assistant to write a Python script that calls a device API and changes VLAN settings. Before the script runs against production, which practice is best?
- ATrust the output because the assistant explained each line, and skip review to save time
- BRun the script on production directly, since the assistant has already checked that the code compiles
- CPaste the production administrator password into the prompt so the assistant can verify the logins
- DReview the generated code, check each API call against vendor documentation, and test in a lab
Show answer and explanationHide answer
Correct answer: DAI-generated code can contain invented API calls or flawed logic, so it needs review, checks against vendor documentation and lab testing. Running it directly, sharing credentials with the assistant or skipping review all increase risk without verifying correctness.
Question 21
A controller-based assurance platform applies machine learning to telemetry from many devices. What is a typical role of the AI component in day-to-day network operations?
- AStoring device passwords in a shared model so that every tool can reuse the same credentials
- BReplacing device configuration, since the model holds every setting and needs no device state
- CTurning off role-based access control so that the model can reach every device directly
- DDetecting anomalies in telemetry and suggesting likely causes for operators to investigate
Show answer and explanationHide answer
Correct answer: DAssurance platforms use AI to learn normal behavior, flag anomalies and suggest probable causes, and operators still validate the findings. Storing shared credentials, replacing device configuration and disabling access control are unsafe and are not functions of AI assurance.
Question 22
Which three practices reduce security risk when AI tools are part of a network automation workflow? (Choose three.)
- AGive the AI agent read-only credentials by default and add write access only for approved tasks
- BRequire human approval before any configuration generated by a model is pushed to devices
- CLog every tool call and command that the agent issues so that actions can be audited later
- DStore the AI provider API key in the source code repository so the whole team can share it
- EAllow the agent to run any CLI command on devices so that it can troubleshoot without delay
Show answer and explanationHide answer
Correct answer: A, B, CLeast privilege, human approval and audit logging limit what a mistaken or compromised agent can do. Storing keys in a repository exposes secrets, and unrestricted command access removes the controls that keep automated actions safe.
Question 23
An AI assistant writes a script that calls a library function name which does not exist in the installed library version. What is the correct response?
- AKeep the function name, since the assistant's confidence means the library must support it
- BVerify the function name in the library documentation and correct the call before any run
- CRemove the error handling so the script moves past the failing call and reaches the device faster
- DInstall the newest package version with no testing, which will always add any function the assistant named
Show answer and explanationHide answer
Correct answer: BAI assistants can invent plausible API names, so the call must be checked against the library's documentation and tested before it touches devices. Trusting confidence, deleting error handling or upgrading blindly does not verify the call.
Question 24
A controller's AI feature recommends a remediation for a flagged issue. Which practice is appropriate before the change is applied to production devices?
- AAccept the change only if the recommendation comes with a signed statement from the model vendor
- BApply every recommendation automatically, since the model has already analyzed the telemetry
- CIgnore the recommendation whenever it names a device, because devices should be fixed manually
- DReview the recommendation and its evidence, then approve it through the normal change process
Show answer and explanationHide answer
Correct answer: DAI recommendations should be reviewed against the evidence and approved through change control before they reach production. Applying everything automatically, ignoring recommendations outright or relying on vendor statements removes the human check the process needs.
Network Automation Foundation (6 questions)
Question 25
A network engineer needs interface state from a router that exposes a feature no standard model covers yet. Which kind of YANG model should the engineer use for that feature?
- AIETF standard models, which are defined by the IETF and aimed at vendor-neutral use
- BOpenConfig models, which are developed by network operators and aimed at multi-vendor use
- CGeneric SNMP MIB objects, which are compiled into the device image and polled by managers
- DNative vendor models, which are written for one platform and cover its full feature set
Show answer and explanationHide answer
Correct answer: DNative models are written by one vendor for its own platform, so they expose platform-specific features that standard models may not yet cover. IETF and OpenConfig models are vendor-neutral and cover common features, and SNMP MIBs are not YANG models.
Question 26
A team needs a protocol that carries YANG-modeled configuration as XML inside an SSH session on TCP port 830, with a lock operation before editing. Which protocol should the team use?
- ARESTCONF, which runs over HTTPS, addresses YANG resources with URLs and uses HTTP methods such as GET and PATCH
- BNETCONF, which runs over SSH and uses remote procedure calls such as lock and edit-config on datastores
- CSNMP, which reads and writes MIB objects through community strings and get or set requests
- DgNMI, which runs over gRPC and uses subscribe, get and set requests against YANG paths
Show answer and explanationHide answer
Correct answer: BNETCONF runs over SSH, by default on port 830, and provides datastore operations such as lock and edit-config. RESTCONF uses HTTPS and HTTP methods, SNMP uses MIBs, and gNMI uses gRPC, so none of them matches the SSH, XML and lock requirements.
Question 27
Which two statements about RESTCONF are correct? (Choose two.)
- AIt maps YANG-modeled data to resources that are accessed with HTTP methods such as GET, POST, PUT, PATCH and DELETE
- BIt keeps a persistent SSH session open and uses a candidate datastore with lock and commit operations
- CIt can encode data payloads in JSON or XML, as defined in RFC 8040
- DIt is defined in RFC 6241 and listens on TCP port 830 by default for all of its requests
Show answer and explanationHide answer
Correct answer: A, CRESTCONF, defined in RFC 8040, maps YANG data to HTTP resources and supports JSON and XML encodings. The SSH session, candidate datastore and port 830 details belong to NETCONF, which is defined in RFC 6241.
Question 28
An operator reads a YANG tree diagram printed according to RFC 8340. One leaf is marked rw and another is marked ro. What does this tell the operator?
- Arw marks read-write notifications, and ro marks read-only remote procedure calls
- Brw marks configuration data that can be set, and ro marks state data that can only be read
- Crw marks data that is read-only in the running datastore, and ro marks data that is writable
- Drw marks optional leaves, and ro marks leaves whose values must be returned in every reply
Show answer and explanationHide answer
Correct answer: BIn RFC 8340 tree diagrams, rw means config true, so the node is configuration that can be written, and ro means config false, so it is state that can only be read. Swapping these meanings, or using rw and ro for notifications and RPCs, misreads the diagram.
Question 29
A developer needs a starting XML skeleton for an edit-config payload based on a vendor YANG module, and does not want to type element names by hand. Which tool is designed to generate this kind of output from a YANG module?
- ANetmiko, which opens SSH sessions and sends CLI commands to network devices
- BAnsible Vault, which encrypts variable files that hold credentials for playbooks
- CEmbedded Event Manager, which runs on-box applets when a syslog message or CLI event matches
- Dpyang, which parses YANG modules and can emit sample XML skeletons from them
Show answer and explanationHide answer
Correct answer: Dpyang is a YANG compiler and validator that can output tree diagrams and sample XML skeletons, which helps build payloads. Netmiko sends CLI over SSH, Ansible Vault encrypts secrets, and EEM runs on-box actions, so none of them generates payload skeletons from models.
Question 30
In the JSON encoding of YANG-modeled data used by RESTCONF, which member names must carry a module-name prefix?
- AOnly the members that are list keys, so that the server can identify each list entry
- BEvery member, because JSON encoding requires each name to be fully qualified at all levels
- CThe top-level member and any member whose defining module differs from its parent
- DNo member names; the prefix appears only in the Content-Type header of the request
Show answer and explanationHide answer
Correct answer: CRFC 7951 requires the top-level member and any member from a different module than its parent to be prefixed with the module name, while other members stay unqualified. Qualifying every member is not required, and list keys and headers do not determine the prefix rule.