CCNAAUTO
Free CCNAAUTO practice questions
10 questions from our CCNAAUTO practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.
Question 1 of 10, Software Development and Design
A script calls requests.get() against a controller that is sometimes unreachable. The engineer wants the script to log a clear message and continue with the next controller instead of crashing. Which construct should wrap the call?
- Aa lambda that returns None when the controller is down
- Bif/else comparing response.text with an empty string
- Cwhile True with a break after the first request is sent
- Dtry/except catching requests.exceptions.RequestException Correct answer
Answer and explanation: Connection failures raise exceptions such as ConnectionError and Timeout, which inherit from RequestException; catching them in try/except lets the script log and continue. An if/else on response.text never runs because no response object is returned when the connection fails. An infinite loop does not handle the exception, and a lambda does not catch errors.
Question 2 of 10, Software Development and Design
A team is building a monitoring tool in which many dashboard widgets must update automatically whenever a device status object changes, without the status object knowing the widgets' concrete classes. Which design pattern fits BEST?
- AFactory method
- BObserver Correct answer
- CSingleton
- DModel-View-Controller
Answer and explanation: The Observer pattern lets a subject notify registered observers of state changes while remaining decoupled from them. Singleton guarantees one instance of a class. MVC separates data, presentation and input handling for a whole application rather than providing subscribe/notify between objects, and Factory method encapsulates object creation.
Question 3 of 10, Understanding and Using APIs
A ticketing system must be notified the moment a Meraki access point goes offline, without running a script that queries the dashboard every minute. Which integration approach meets this requirement?
- ASchedule a cron job that calls the device status endpoint every 60 seconds for changes
- BExport the organization's device inventory to CSV each night and compare the files
- COpen an SSH session to each access point and parse the output of a status command
- DRegister an HTTPS receiver URL as a webhook so the dashboard posts alert events to it Correct answer
Answer and explanation: A webhook pushes an HTTP POST to the registered receiver whenever the alert fires, so no polling is needed. A cron job every 60 seconds is exactly the polling the requirement rules out. Nightly CSV comparisons are far too slow for immediate notification, and Meraki access points are cloud-managed, so per-device SSH parsing is not a supported way to get alerts.
Question 4 of 10, Understanding and Using APIs
A Python script receives a JSON response listing devices as objects with keys hostname and reachability. Which code builds a list of the hostnames of unreachable devices?
- A[d["hostname"] for d in data if d["reachability"] == "Unreachable"] Correct answer
- B[d.hostname for d in data if d.reachability is "Unreachable"]
- Cdata["hostname"].filter(reachability="Unreachable")
- D{d["reachability"]: d["hostname"] for d in data if d}
Answer and explanation: A list comprehension iterating over the list of dicts, indexing keys and comparing with ==, returns the required hostnames. Dicts are not accessed with attribute syntax, and 'is' tests identity rather than equality. A list has no 'hostname' key or filter method, and the dict comprehension maps reachability to hostnames instead of filtering.
Question 5 of 10, Cisco Platforms and Development
A Cisco Intersight script authenticates with an API key ID and a secret key file. How does Intersight use these credentials?
- AThe client posts the key ID to a token endpoint and receives an X-Auth-Token header back
- BThe client sends the secret key file contents as a Basic password in every request header
- CThe client exchanges the key for an APIC-cookie session that expires after ten minutes
- DThe client signs each request with the private key, and Intersight verifies it Correct answer
Answer and explanation: Intersight API keys use HTTP message signing: the client signs request elements with the private key and includes the key ID, so the secret never travels over the network. Sending the key as a Basic password would expose it, APIC-cookie belongs to ACI, and X-Auth-Token from a token endpoint describes Catalyst Center.
Question 6 of 10, Cisco Platforms and Development
A script uses the Cisco ACI REST API. After logging in to the APIC, subsequent requests must remain authenticated. How does the APIC maintain the session?
- AThe client signs every request with a private key that was uploaded to the APIC user
- BThe APIC returns an API key in the response body that is sent in the X-API-Key header
- CThe client must include the username and password as Basic authentication on every call
- DThe aaaLogin response returns a token that the client sends back as the APIC-cookie cookie Correct answer
Answer and explanation: Posting credentials to /api/aaaLogin.json returns a token that is also set as the APIC-cookie, and later requests present that cookie until it expires or is refreshed. Re-sending Basic credentials on every call is not the documented APIC pattern. APIC does not issue an X-API-Key header value, and while certificate-based signature authentication exists, it is not how the standard login session is maintained.
Question 7 of 10, Application Deployment and Security
A web portal that displays device names entered by users is found to execute JavaScript that an attacker stored in a device description. Which vulnerability is this, and what mitigates it?
- ACross-site request forgery, mitigated by adding a synchronizer token to each form
- BSQL injection, mitigated by running the database under a least-privilege account
- CStored cross-site scripting, mitigated by encoding output and validating input Correct answer
- DMan-in-the-middle interception, mitigated by enabling HSTS on the web server
Answer and explanation: Script stored in data and executed in other users' browsers is stored XSS; contextual output encoding and input validation stop it. SQL injection targets the database query, CSRF forces a victim's browser to submit unwanted requests, and man-in-the-middle attacks intercept traffic; their mitigations do not prevent stored scripts from rendering.
Question 8 of 10, Infrastructure and Automation
An engineer wants to read the running configuration of interface GigabitEthernet1 on an IOS XE device through RESTCONF. Which request is correct?
- AGET https://device/restconf/operations/ietf-interfaces:interface=GigabitEthernet1
- BGET https://device/netconf/data/ietf-interfaces:interfaces/interface/GigabitEthernet1
- CPOST https://device/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1
- DGET https://device/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1 Correct answer
Answer and explanation: RESTCONF reads data with GET under the /restconf/data root, and list entries are addressed with interface=<key>. POST creates resources rather than reading them. There is no /netconf/data path on the RESTCONF server, and the /restconf/operations root is for invoking RPCs, not for reading configuration.
Question 9 of 10, Infrastructure and Automation. Choose 2.
A network automation team keeps desired device state in Git, and a controller automatically reconciles devices whenever the repository changes. Which TWO benefits does this approach provide? (Choose two.)
- ADrift from the declared state can be detected and corrected automatically Correct answer
- BConfiguration changes are peer-reviewed through pull requests before they reach devices Correct answer
- CEngineers no longer need access controls on the Git repository holding the configs
- DRollback becomes impossible, which prevents engineers from reversing approved changes
- EDevices stop requiring any software upgrades once their configuration is in Git
Answer and explanation: Treating Git as the source of truth enables pull-request review and audit, and continuous reconciliation detects and repairs drift. Repository access control becomes more important, not less, software upgrades are still needed, and Git actually makes rollback easier by reverting to an earlier commit.
Question 10 of 10, Network Fundamentals
A developer connects to the corporate full-tunnel VPN and suddenly cannot reach a lab RESTCONF device on the local home network at 192.168.0.20, while other corporate resources work. What is the MOST likely explanation?
- AThe VPN changed the laptop's MAC address, so the home switch now drops all frames from the laptop
- BThe VPN client sends all traffic, including local subnets, through the tunnel to the corporate network Correct answer
- CThe RESTCONF service on the lab device automatically disables itself whenever the client uses a VPN
- DThe VPN tunnel encrypts packets using UDP, which RESTCONF cannot use because it requires port 22
Answer and explanation: Full-tunnel VPNs route all traffic, often including local LAN ranges, into the tunnel, so packets for the home device never reach the local network. Devices do not disable RESTCONF based on client VPN use. VPN clients do not change the physical MAC, and RESTCONF runs over HTTPS, not port 22.