DevNet Associate (DEVASC) v1.0 practice questions

200 free questions with answers and explanations.

Practice test
  1. 151.A network engineer is using the 'pyang' tool to validate a custom YANG module for a new network service. After running the validation, the engineer wants to generate a tree-like representation of the module's data model to easily visualize its hierarchical structure and identify potential issues. Which 'pyang' format option should be used?Infrastructure and Automation
  2. 152.A network engineer is writing a Python script to automate the deployment of a new BGP configuration on a Cisco IOS XR router. The configuration involves multiple BGP neighbors, address-family configurations, and route-maps. The engineer wants to ensure that the entire configuration is applied as a single transaction, and if any part fails, the entire transaction is rolled back. Which NETCONF capability is essential for this transactional behavior?Infrastructure and Automation
  3. 153.A network administrator is designing an automated workflow to deploy configuration changes across multiple Cisco IOS XE devices. The solution requires push-based configuration and the ability to define the desired state of devices. Which automation tool, known for its agentless architecture and use of YAML playbooks, is best suited for this task?Infrastructure and Automation
  4. 154.A network operations team needs to collect real-time, high-frequency telemetry data from thousands of network devices for performance monitoring and anomaly detection. The data should be streamed continuously rather than polled periodically. Which protocol is best suited for this requirement, offering efficient, persistent connections and often leveraging Protocol Buffers for data serialization?Infrastructure and Automation
  5. 155.A network engineer wants to automate the process of collecting real-time interface statistics (e.g., bandwidth utilization, packet drops) from a large number of routers and switches. The collected data needs to be continuously streamed to an analytics platform for immediate anomaly detection. Which network telemetry approach is best suited for this requirement?Infrastructure and Automation
  6. 156.A developer is integrating a custom application with network devices using RESTCONF. The application needs to retrieve a list of all active interfaces from a device. Which HTTP method is typically used in RESTCONF for retrieving resources?Infrastructure and Automation
  7. 157.A network automation engineer is building a system to discover new devices, automatically assign them to appropriate configuration groups, and then apply initial baseline configurations based on their role. This entire process needs to be orchestrated and managed from a central platform. Which type of automation solution is best suited to coordinate these multiple, sequential tasks?Infrastructure and Automation
  8. 158.A network engineer is tasked with configuring a new set of VLANs across 50 access switches. The engineer wants to ensure consistency and speed by using a configuration management tool that relies on a master-minion architecture for centralized control and state enforcement. Which automation tool is best suited for this requirement?Infrastructure and Automation
  9. 159.A network automation engineer is developing a Python application that interacts with various network devices from different vendors. The application needs to retrieve and configure network settings using a standardized, structured data model. To ensure interoperability and consistency across diverse devices, which data modeling language is best suited for defining the structure and constraints of the network configuration and operational data?Infrastructure and Automation
  10. 160.A network architect is designing a solution for zero-touch provisioning (ZTP) of new branch office routers. The solution needs to dynamically fetch initial configuration files and software images from a central server based on the device's serial number or MAC address. Which protocol is commonly used by network devices to discover the provisioning server and download necessary files during ZTP?Infrastructure and Automation
  11. 161.A network operator wants to retrieve specific operational data (e.g., interface statistics) from a Cisco IOS XE device using a programmatic interface. The data needs to be structured and validated against a schema. Which technology, often used with NETCONF or RESTCONF, defines the structure and semantics of configuration and operational data?Infrastructure and Automation
  12. 162.A large enterprise is adopting an Infrastructure as Code (IaC) strategy. They need a system that can manage configuration across thousands of servers, enforce a desired state, and handle complex dependencies. The solution should be highly scalable and provide real-time reporting on compliance. Which automation tool, known for its master-minion architecture and high-speed communication, is best suited for this scale and set of requirements?Infrastructure and Automation
  13. 163.A network engineer is using a Python script to interact with a Cisco IOS XE device. The script needs to retrieve specific operational state information, such as interface statistics or routing table entries, in a structured, machine-readable format. The device supports NETCONF. Which NETCONF operation should the engineer use to achieve this?Infrastructure and Automation
  14. 164.A network operations team needs a standardized way to define the configuration and operational state of network devices, ensuring interoperability between different vendors and tools. This definition should be human-readable, machine-parsable, and support hierarchical data structures. Which data modeling language is designed for this purpose in network programmability?Infrastructure and Automation
  15. 165.A network architect is designing a system for network programmability that needs to support both configuration changes and operational data retrieval. The system requires a human-readable, text-based data format that is easy to parse and generate, often used with RESTful APIs. Which data format would be the most suitable choice?Infrastructure and Automation
  16. 166.A network automation engineer is tasked with building an event-driven automation system. When a specific syslog message is received from a device, a Python script should be triggered to remediate the issue. Which component is responsible for orchestrating these event-driven workflows, often acting as a 'glue' between different systems and scripts?Infrastructure and Automation
  17. 167.A network developer is integrating a custom application with a Cisco IOS XE device to retrieve specific configuration data using the RESTCONF protocol. The application needs to fetch the running configuration of a particular interface. Which HTTP method should the developer use for this operation?Infrastructure and Automation
  18. 168.A network automation engineer is developing a Python script to interact with a Cisco device using NETCONF. After establishing an SSH connection, the script needs to send an RPC request to retrieve the device's running configuration. Which Python library is commonly used for NETCONF client operations, simplifying the XML handling and session management?Infrastructure and Automation
  19. 169.A senior network architect is evaluating different approaches for network telemetry. The requirement is for high-frequency, push-based streaming of operational data from thousands of network devices to a central collector, minimizing latency and bandwidth consumption. Which approach is best suited for this scenario?Infrastructure and Automation
  20. 170.A junior network engineer is tasked with automating the deployment of a standardized firewall rule set across multiple security appliances. The solution needs to define the desired state of the firewall rules in a declarative manner and apply these configurations consistently. Which concept best describes this approach?Infrastructure and Automation
  21. 171.A network device supports telemetry streaming using gRPC. Which data encoding format is typically used with gRPC for efficient serialization and deserialization of structured data?Infrastructure and Automation
  22. 172.A network automation script is designed to retrieve operational state data, such as interface statistics and routing table entries, from a Cisco IOS XE device. The script needs to use a standards-based, XML-encoded protocol for this purpose, and the data should be retrieved from the device's current operational state without modifying its configuration. Which NETCONF operation is most appropriate?Infrastructure and Automation
  23. 173.A network engineer needs to programmatically configure a new QoS policy on a Cisco IOS XE router. The policy involves setting a new class map and applying a service policy to an interface. Which of the following data models is most appropriate for defining the structure and semantics of this configuration?Infrastructure and Automation
  24. 174.A network engineer is using a custom Python script to automate the configuration of Cisco IOS XE devices. The script needs to send configuration changes to the device, but also needs the ability to validate these changes against the device's configuration rules before they are applied. Which NETCONF operation, specifically when used with the ':validate' capability, allows the engineer to check the syntax and semantics of configuration data without committing it?Infrastructure and Automation
  25. 175.A developer is debugging a Python script that interacts with a REST API. The script frequently encounters 'KeyError' exceptions when trying to access values from a dictionary returned by the API, even though the keys seem to exist in successful responses. They want to ensure the script handles cases where a key might be missing gracefully without crashing. Which Python dictionary method provides a safe way to retrieve a value, returning a default if the key is not found?Software Development and Design
  26. 176.A developer is designing a RESTful API for a network device management system. The API needs to allow clients to retrieve information about specific network interfaces, create new interfaces, update existing interfaces, and delete interfaces. To adhere to REST principles, which HTTP method should be used for retrieving a list of all network interfaces?Software Development and Design
  27. 177.A junior developer is working on a network automation project and needs to ensure that their changes to the Python codebase are tracked and can be easily reverted if issues arise. They also need to collaborate with other team members on the same codebase. Which version control system is best suited for these requirements in a distributed development environment?Software Development and Design
  28. 178.A junior developer is struggling to understand the flow of data and control in a complex Python application that processes network telemetry. The application uses multiple functions, classes, and external libraries, making it difficult to trace how data is transformed and passed between different components. Which type of diagram would be most effective for visually representing the sequence of operations and decisions within the application's logic?Software Development and Design
  29. 179.A developer is creating a new application that needs to securely send sensitive configuration data between two microservices. The data must be human-readable for debugging purposes but also easily parseable by machines. Which data format is best suited for this requirement, combining readability with structured data representation?Software Development and Design
  30. 180.A network automation script needs to process a large dataset of network device configurations, where each configuration is represented as a string. The script must efficiently identify and remove duplicate configuration lines while preserving the original order of the unique lines. Which Python data structure is most suitable for this task, balancing efficiency and order preservation?Software Development and Design
  31. 181.A developer needs to implement a function in Python that calculates the factorial of a given non-negative integer. The function should call itself repeatedly with a smaller input until a base case is reached. Which programming concept is being described here?Software Development and Design
  32. 182.A network engineer is writing a Python script to automate the configuration of multiple devices. They need to define a reusable block of code that takes device credentials and configuration commands as input, connects to a device, applies the commands, and then disconnects. This block of code will be called multiple times with different inputs. Which Python construct is most appropriate for encapsulating this reusable logic?Software Development and Design
  33. 183.A team of developers is collaborating on a large network automation project. They need a systematic approach to manage and track changes to their codebase, ensuring that multiple developers can work simultaneously without overwriting each other's work, and that a complete history of all modifications is maintained. Which software development tool is primarily designed to address these requirements?Software Development and Design
  34. 184.A developer is writing a Python script to interact with a network device using its CLI. The script needs to send commands and parse the output. To make the script robust, the developer wants to ensure that if a command fails or the device becomes unreachable, the script logs the error and continues execution for other devices, rather than crashing. Which Python construct should be used to handle potential runtime errors gracefully?Software Development and Design
  35. 185.A developer is designing a Python application that needs to manage network device configurations. The application frequently needs to store and retrieve unique identifiers for devices, along with their corresponding configuration settings. It's crucial that duplicate identifiers are not stored, and the order of insertion does not matter for the identifiers themselves, although the associated configuration might be complex. Which Python data structure is most suitable for efficiently handling the unique device identifiers?Software Development and Design
  36. 186.A developer is building a network monitoring application using Python. The application needs to retrieve real-time data from various network devices. Each device exposes a REST API endpoint that returns its status as a JSON object. The developer wants to use a Python library that simplifies HTTP requests and handles JSON parsing automatically. Which library is the most suitable choice for this task?Software Development and Design
  37. 187.A software development team is adopting a methodology that emphasizes iterative development, frequent feedback, and adaptive planning. They want to deliver working software frequently, typically every few weeks, and be able to respond quickly to changing requirements. Which software development methodology aligns best with these principles?Software Development and Design
  38. 188.A development team is working on a network automation script using Git. A junior developer cloned the `main` repository and started working on a new feature. Before pushing their changes, they realize that the `main` branch has been updated with several critical bug fixes. They want to incorporate these latest changes from `main` into their local feature branch without creating an additional merge commit on their feature branch, and then continue working on their feature. Which Git command sequence would achieve this?Software Development and Design
  39. 189.A development team is using Git for version control. They have a `main` branch and several feature branches. A developer has finished working on `feature-X` and needs to integrate their changes into `main`. The `main` branch has received several new commits since `feature-X` was branched off. The team wants to maintain a clean, linear history on `main` without introducing merge commits for every feature. Which Git operation should the developer use to achieve this?Software Development and Design
  40. 190.A developer is writing an automation script that interacts with a Cisco API. To ensure the script can recover from temporary network glitches or API rate limiting, the developer wants to implement a retry mechanism with an exponential backoff strategy. Which of the following Python libraries is best suited for adding robust retry logic to HTTP requests?Understanding and Using APIs
  41. 191.A developer is creating a Python script to interact with a RESTful API. The API requires that the request body for creating a new resource be sent as a JSON string with a specific content type. Which of the following Python `requests` library methods automatically handles both the serialization of a Python dictionary to JSON and sets the `Content-Type: application/json` header?Software Development and Design
  42. 192.A security auditor is reviewing an application that uses a Cisco API. They discover that the application stores API keys directly in the client-side JavaScript code. What is the primary security risk associated with this practice?Understanding and Using APIs
  43. 193.A development team is deploying a new web application to a Kubernetes cluster. They need to ensure that database credentials, API keys, and other sensitive configuration data are securely stored and made available to their application containers without being exposed in their deployment manifests or source code. Which Kubernetes object is specifically designed for this purpose?Application Deployment and Security
  44. 194.A web application uses OAuth 2.0 for user authentication and authorization. After a user successfully logs in through an identity provider, the client application receives an access token. The developer needs to ensure that this access token is used securely when making API calls to a protected resource server. Which HTTP header is the standard and most secure way to transmit this token?Application Deployment and Security
  45. 195.A network operations team is developing an automation script to provision new VLANs on multiple Cisco switches using an API. The API documentation states that the endpoint for creating VLANs is `/api/v1/devices/{device_id}/vlans` and accepts a JSON payload for VLAN configuration. Which type of OpenAPI parameter defines `{device_id}` in this URL path?Understanding and Using APIs
  46. 196.A network engineer is debugging a Python script that interacts with a Cisco DNA Center API. The script is consistently failing with an HTTP 401 Unauthorized error, even though the API key used is known to be correct and active. The engineer suspects an issue with how the authentication token is being sent. Which of the following HTTP headers is typically used to send bearer tokens for API authentication?Understanding and Using APIs
  47. 197.A developer is using Postman to test a new REST API endpoint that requires sending a JSON payload in the request body. After configuring the request, they receive an HTTP 415 Unsupported Media Type error. Which of the following actions should the developer take to resolve this issue?Understanding and Using APIs
  48. 198.A network automation engineer is developing a Python script to interact with a Cisco Meraki API. The API documentation specifies that all requests must include a custom header named 'X-Meraki-API-Key' with the API key value. Which of the following `requests` library snippets correctly adds this custom header to a GET request?Understanding and Using APIs
  49. 199.A developer is designing an application that will interact with a Cisco API to provision network devices. The API uses REST principles. Which of the following HTTP methods is typically used to create a new resource on the server?Understanding and Using APIs
  50. 200.A DevOps team is implementing a CI/CD pipeline for a new microservice. They want to automate the process of building the application, running unit and integration tests, and pushing the resulting Docker image to a container registry. Which specific stage of the CI/CD pipeline does this set of activities primarily represent?Application Deployment and Security