Network Device Programmability (20%)
ENAUTO · 60 questions
- An engineer runs an Ansible playbook against two IOS XE routers: task one adds three NTP servers with cisco.ios.iosconfig, task two sets an interface description with parents, and both tasks notify a handler that saves the config. After a clean first run, what change status and handler activity should an immediate second run report?
- A campus engineer automates nightly show version collection and VLAN updates on 40 IOS XE switches using Python. The script must log in reliably, run both read and write tasks, and close cleanly. Which Netmiko approach establishes the session and sends show and config commands?
- A colleague is automating a router with ncclient and wants one NETCONF script that reads the hostname and a loopback interface, then rewrites that loopback IPv4 address. The maintenance window expects the change to take effect immediately, so the write must apply to the live configuration. Which ncclient call sequence covers the connection, read and write steps?
- A Python script using the requests library applies interface settings to an IOS XE router over RESTCONF. One run answers 409 Conflict with a JSON body, while a typo in the payload answers 400. How should the script interpret a 409 response and the error body that arrives with it?
- A branch reports brief throughput drops every afternoon, but five-minute SNMP polls stay under every threshold and the interface counters look clean. The engineer can add streaming telemetry from the IOS XE router to a collector. Which streaming telemetry approach gives the best evidence for identifying the cause?
- An operations team wants interface oper-status transitions pushed to a collector the moment they happen, while interface counters arrive on a fixed schedule to the same collector. The engineer must describe the subscription precisely enough that the device knows which nodes to stream, when to stream them, and where to send the data. Which subscription parameters should the engineer set for this delivery?
- An ISP script gathers show interface counters from 60 mixed IOS XE routers, but slow links truncate output and a reload prompt stalls the run. The job needs complete output and safe prompt handling. Which Netmiko technique handles prompts, delays and parsing output?
- A network automation team must apply a block of CLI configuration lines to fifty IOS XE switches from an Ansible controller. SSH is the only enabled management protocol on the estate, and a second run must leave an already configured switch untouched. Which Ansible connection type and module combination should the playbook use?
- Your monitoring team wants interface and CPU sensor data pushed from 40 IOS XE switches into a time-series database. The subscription must be stored in the device configuration so the stream starts automatically after an upgrade reload, even while the collector is offline. Which telemetry subscription type keeps the sensor stream running after that reload?
- An engineer uses ncclient's manager.connect() against an IOS XE router to set the description 'uplink-to-campus' on GigabitEthernet1/0/1. The change must take effect on the live configuration in a single call, and ncclient must generate the RPC wrapper and message identifier so replies can be matched. Which XML structure should be passed to the editconfig() call?
- Forty factory-fresh Catalyst 9200 switches must be brought up at a remote branch office. The provider's DHCP server only leases addresses, outbound internet access is available, no technician will be on site, and the switches arrive with only factory-default settings for access. Which Day 0 provisioning method matches these branch conditions?
- A team subscribes to interface state for 2,000 access ports over NETCONF YANG-Push. Most ports never change for days, the management network is congested, and operators must see a state flip within seconds. Which telemetry publication model fits this subscription?
- You are enabling model-driven telemetry on an IOS XE access switch. The collector at 10.10.5.20 must receive interface state samples every 30 seconds over gNMI with mutual TLS, as fixed-interval samples rather than change-triggered ones. Which subscription parameters should the telemetry subscription use?
- A team supporting 40 branch routers keeps getting user reports of brief latency spikes, but by the time an engineer logs into each device and runs the usual commands the problem has passed. They also want the polling load on the links to stay light. Which telemetry approach should they adopt to catch these issues while they are happening?
- A Python script using ncclient fetches the interface subtree from a fleet of routers and prints each interface name. One device rejects the subtree and raises an error, while another returns a valid reply containing no interface nodes. Which handling reads the reply and reports that device failure correctly?
- A junior engineer is scripting a refresh of 40 Catalyst 9300 switches and needs one Python program that prints show version output and then applies an interface description change on each device. Which Netmiko approach handles both the display and the configuration safely?
- An engineer hands you a playbook with gatherfacts: no that runs cisco.ios.iosconfig with parents: ['interface Loopback0'] and lines: ['description managed by Ansible'] against a lab router. QA plans to run it twice from the ioslab inventory group. Which statement describes the second run?
- An enterprise automation engineer must back up running configs nightly from 60 IOS XE switches and push a standard NTP change using Python over NETCONF on port 830 with trusted host keys. The script must separate read and write operations cleanly. Which ncclient usage meets the NETCONF requirements?
- A retailer is installing 150 factory-default access switches in stores without on-site staff. Each store has only a DHCP server and an HTTP server on the local subnet, and the branch segments cannot reach any controller during installation. Which Day 0 provisioning method meets these branch constraints?
- A network team must stream interface counters from 150 IOS XE switches to a gRPC collector every 30 seconds. Each sample must come from the switches' YANG models, be pushed by the switch itself, and resume on its own after a reload. Which telemetry subscription design meets all three requirements?
- A developer automates nightly checks on 60 IOS XE switches with Netmiko. Some devices take close to a minute to answer, and the change report needs hostname, model and software release as separate fields for every switch it checks. Which Netmiko call pattern meets those timing and parsing needs?
- A Python script using the requests library must set the hostname on an IOS XE router with RESTCONF enabled. The YANG node lives at Cisco-IOS-XE-native:native/hostname, the write has to create the value when it is missing and replace it when it is present, and the team standard requires RFC 8040 yang-data media types on both the request and the response. Which RESTCONF request writes the hostname correctly?
- A campus engineer must add a new loopback description on IOS XE via NETCONF edit-config without replacing sibling config. The device enforces strict schema validation and rejects payloads with wrong namespaces. Which XML payload structure performs the targeted edit-config on IOS XE?
- A network team streams model-driven telemetry from IOS XE switches into one collector. Dashboards need evenly spaced samples of interface counters, engineers need the moment an interface or neighbor changes state, and both feeds must arrive as YANG Push updates rather than polled data. Which subscription plan should the team configure for the two feeds?
- A junior engineer automates an IOS XE router with ncclient. The router advertises the candidate datastore. The script must open a single NETCONF session on the standard NETCONF port, read the running configuration for one subtree, and then apply a new loopback description before disconnecting. Which ncclient call sequence should the script use?
- A network engineer's Netmiko script must capture 'show ip interface brief' from an IOS XE switch and then set descriptions on two interfaces, leaving the change in running config only because the save window is later tonight. Which Netmiko call pattern in one session meets both requirements?
- A pipeline uses ncclient to lock the candidate datastore and stage an interface change on 60 IOS XE routers. Two routers return an <rpc-error> with error-tag lock-denied because another job holds the lock, one router's SSH session drops before the reply arrives, and the rest return <ok/> for the edit-config request. For each device, the pipeline must report the change as staged, delayed or unreachable without stopping the run. Which reply-reading and error-handling pattern should it use?
- A data-centre team sees brief, intermittent drops on a leaf uplink; each episode lasts several seconds but clears before anyone can run a show command. They need the fault caught within seconds, low overhead on the switch, and an automatic page to the on-call engineer. Which telemetry approach should they deploy to detect and troubleshoot this issue?
- A Python script uses the requests library to push interface settings over RESTCONF to several IOS XE devices, and some replies arrive as 204 No Content while others return 400 with a YANG error body. The audit log must judge every edit correctly. Which status-code and error-body interpretation rule should the script follow?
- Interface description changes must be reported as they happen, while CPU and memory state has to arrive every 30 seconds at the gNMI collector. Which subscription parameters should the automation configure for model-driven telemetry?
- A Python script using ncclient pushes a new hostname and an interface description to an IOS XE router. The session authenticates and opens normally, but every editconfig call fails with a parser error about unexpected elements, so nothing changes on the router. Which payload structure lets the ncclient edit-config call succeed on this router?
- A campus team must enable a loopback description on IOS XE via RESTCONF using Python requests. Security mandates HTTPS with JSON payload, correct resource path, and proper CRUD verb without breaking existing interfaces. The first try returned 405 and 415 errors. Which RESTCONF URL, headers and methods using requests pattern should the script implement to update the interface?
- A rollout team is installing 80 new Catalyst 9200 switches in a warehouse where nobody will have console access for the first boot. The switches arrive with the correct image but no configuration, the corporate DHCP server cannot be changed this quarter and does not advertise provisioning options, DNS can be configured for PnP discovery, and Catalyst Center manages the site. Which Day 0 provisioning method fits this warehouse rollout?
- A Netmiko job clears counters on a fleet of IOS XE switches. When it sends clear counters, the device answers Clear counters on all interfaces? [confirm], so sendcommand() waits for a prompt that never arrives and times out without answering. Which Netmiko flow answers the prompt and still returns output the script can parse?
- The NOC wants interface state changes to reach the analytics platform within a second of happening, while CPU utilisation should arrive every five minutes whether or not it moved. The sensors use streaming telemetry from IOS XE. Which comparison of periodic cadence and on-change publication is accurate?
- Your Ansible playbook must push interface descriptions and a syslog server to 40 IOS XE switches over SSH, apply only what is missing, and save the running configuration when it finishes. Re-running the playbook should change nothing on devices that already match. Which connection type and module pairing should the playbook use?
- Intermittent voice jitter keeps reaching the trouble queue: drops on the voice interface last only seconds, and five-minute SNMP polling misses every spike. The voice gateway supports model-driven streaming telemetry. Which telemetry subscription gives the fastest reliable detection of the drops?
- Reviewing a playbook for twelve IOS XE access switches, an engineer must apply interface GigabitEthernet1/0/12, switchport mode access and switchport access vlan 30, changing only that interface block. Which Ansible task structure configures the switches correctly?
- A team is automating interface audits on 30 IOS XE routers with ncclient. The script runs <get-config> with a subtree filter and must record, per device, whether the router returned the interface data or reported an RPC failure such as an unsupported filter. Which reply-reading and error-handling pattern should the script use?
- An engineer is rolling out one change to 40 IOS XE access switches: add an NTP server plus a login banner, then confirm the running config contains both lines. The script must send the change as configuration and read the result back at the normal prompt. Which Netmiko call sequence performs the change and the verification?
- An engineer is scripting against an IOS XE router over NETCONF using ncclient. The script must read the current interface configuration, change an interface description, and leave that change applied after the session ends and after a reload. The router has the optional candidate datastore enabled, and in this lab a successful commit is also saved to startup. Which ncclient calls accomplish the read and the durable write?
- A Python script using the requests library sends a RESTCONF PATCH to update an interface description on an IOS XE router and receives HTTP 400 with a JSON body. The endpoint path and YANG leaf names look right at first glance. Which RFC 8040 error fields identify the standardized failure category and the affected node?
- Your team runs a nightly inventory script against 60 IOS XE switches with Netmiko. On the largest chassis, show interfaces status takes about 40 seconds to finish, and a matching TextFSM template is already installed. The report needs one dictionary per port with port, status and vlan fields, while the script keeps driving devices through its existing Netmiko connection. Which combination of Netmiko command call and output parsing meets those needs?
- The automation team must push a VLAN and an interface description to 40 IOS XE switches that are reachable over SSH, with NETCONF and RESTCONF listeners turned off. The devices need enable-mode credentials, and the change must be previewed with a diff before anything is applied. Which Ansible connection and module pairing should the playbook use to push this VLAN change?
- On a Cisco IOS XE device, a RESTCONF hostname leaf may already exist, so the write should replace its value rather than append to it. The device exchanges YANG-encoded JSON on both the request and response. Which HTTP method, target path and header media types should the write use?
- Your NETCONF script connects to an IOS XE router with ncclient over port 830, then calls m.editconfig(target="running", config=payload) to rename the device to edge1, and the attempt fails with an error before the hostname changes. Which XML payload should the script pass to editconfig for the hostname change?
- A customer is deploying 60 access switches across branches. The design has only a DHCP scope and a local config server, and each switch must pull its first configuration by itself at boot, with all traffic staying inside the customer network. Which Day 0 bootstrap method fits every stated requirement?
- A team is standardizing model-driven telemetry across 300 IOS XE routers. The subscription must ship inside the config template pushed to every device, must keep streaming after a reload, and must push a sample every 60 seconds on a fixed schedule driven by the router. Which telemetry subscription design meets all three requirements?
- A team scripts NETCONF reads across 200 IOS XE routers, must leave every device's state untouched, and needs only the running configuration for the interfaces subtree kept small enough to log. The library already opens SSH to port 830 and returns an ncclient Manager. Which ncclient call retrieves exactly that subtree from the running datastore?
- An engineer is automating an NTP change across 40 IOS XE switches with Netmiko. The connection opens and the prompt is detected, but sendcommand('ntp server 10.10.10.1') returns an IOS error and the running config never gains the NTP line. Which Netmiko method should the script use to apply this change?
- A Python script uses ncclient to fetch the running configuration and print every interface description on an IOS XE router. The router may answer with a normal data payload or an rpc-error inside the reply, and the automation job must log a clear NETCONF error instead of crashing. Which reply handling approach should the script use?
- A monitoring team wants interface up and down transitions streamed to their collector as they happen, rather than a full interface table every minute. They will configure one model-driven telemetry subscription on an IOS XE router, and the collector has already opened the gRPC receiver it will use. Which subscription parameter set matches the need for change-only interface state updates?
- A teammate hands you an Ansible playbook for branch IOS XE routers with three tasks: one applies an NTP server list that is already on the router using iosconfig in its default comparison mode, one applies syslog servers the router already has but sets match to none, and one runs ioscommand to show the clock. On a second run against that unchanged router, which task does Ansible report as changed?
- A Python script using the requests library sends a RESTCONF PATCH to set an interface description and receives HTTP 400 with a YANG error body whose error-path names a leaf absent from the device's YANG model. The engineer must decide what to fix before sending anything again. Which interpretation of that RESTCONF response should the script act on?
- A Netmiko script runs a maintenance command on a switch that stops mid-run to ask Enter your choice [y/n]: before printing any data, so sendcommand() keeps waiting for a prompt that never comes back. Which Netmiko call pattern answers that mid-command prompt and still captures the results?
- An automation engineer is writing a Python script with ncclient that sets a MOTD banner on an IOS XE router over NETCONF. The session opens and getconfig returns data, but the editconfig call is rejected and the engineer is unsure which element must hold the configuration it sends. Which XML structure must the payload use to deliver the banner change to the target datastore?
- You are setting an interface description on an IOS XE router using Python requests and RESTCONF over HTTPS. The YANG path is ietf-interfaces:interfaces/interface=Loopback10, and the JSON payload must reach the exact resource, create it when it is missing, and use the RESTCONF JSON media type in both headers. Which requests call delivers the payload to the RESTCONF resource as required?
- A NOC enables model-driven telemetry on IOS XE and needs link-down events delivered within a few seconds while no recurring telemetry updates are sent during hours of stable operation on the subscribed interfaces. Which telemetry publication model fits both requirements, and what triggers each message?
- A platform team must configure forty IOS XE switches from a Linux automation server running Ansible. Each play has to reuse one SSH CLI session per device, gather platform facts with iosfacts, and apply interface descriptions with iosconfig using the current cisco.ios collection modules. Which Ansible connection setup meets all three requirements?
- A platform team must stream interface counters from 200 routers into a single dashboard, and the sensor list changes every week without editing any device configurations or causing commits. Which telemetry subscription approach fits all of those constraints?