Cisco CCNP 300-435 Practice Test Questions and Exam Dumps Part12 Q221-Q240

View Full Cisco CCNP 300-435 Exam Dumps and Practice Test Dumps

 

Question 221.

Which protocol enables programmable network configuration using models?

  1. NETCONF
  2. Telnet
  3. FTP
  4. SMTP

Correct Answer: 1

Explanation:

NETCONF provides a structured protocol for programmatic network configuration and operational data retrieval. It commonly works with YANG models, which define the organization and constraints of network data. Automation applications can use NETCONF operations to retrieve configuration, modify supported settings, and interact with device datastores without depending entirely on CLI commands. Telnet provides remote terminal access, FTP transfers files, and SMTP handles email delivery. Model-driven protocols such as NETCONF help automation systems work with predictable data structures and reduce dependence on unstructured command output.

Question 222.

Which Python keyword creates a conditional branch?

  1. while
  2. if
  3. import
  4. yield

Correct Answer: 2

Explanation:

The Python if keyword evaluates a condition and executes a corresponding block when that condition is true. Network automation scripts frequently use conditional logic to make decisions based on device attributes, API responses, command results, or configuration states. For example, a workflow might apply a particular configuration only when a device belongs to a specified platform group. while creates repeated execution based on a condition, import loads modules, and yield produces generator values. Conditional branching allows automation workflows to adapt their behavior to different runtime situations.

Question 223.

Which HTTP header identifies the media type of request data?

  1. Authorization
  2. Content-Type
  3. User-Agent
  4. Cache-Control

Correct Answer: 2

Explanation:

The HTTP Content-Type header identifies the media type of data contained in a request or response body. When network automation sends a JSON payload to a REST API, it commonly specifies an appropriate JSON media type in this header. This allows the receiving service to understand how the body should be interpreted. Authorization provides authentication credentials or tokens, User-Agent identifies the client application, and Cache-Control controls caching behavior. Correctly setting Content-Type is especially important when APIs accept multiple formats or require a specific representation for configuration requests.

Question 224.

Which NETCONF datastore can stage changes before committing?

  1. startup
  2. backup
  3. candidate
  4. archive

Correct Answer: 3

Explanation:

The NETCONF candidate datastore can hold proposed configuration changes before they are committed to the running configuration on devices that support the candidate capability. This staged workflow allows automation to build and review changes before making them active. An automation process can modify candidate data, perform validation where supported, and then commit the changes. The startup datastore is associated with configuration used during boot, while backup and archive are not standard NETCONF datastores. Candidate configuration is therefore valuable for controlled configuration workflows requiring staging and validation.

Question 225.

Which Python collection preserves insertion order and allows duplicates?

  1. List
  2. Set
  3. Dictionary keys
  4. Frozen set

Correct Answer: 1

Explanation:

A Python list is an ordered collection that can contain duplicate values. This makes lists useful when automation needs to preserve processing order or maintain repeated entries. For example, a workflow might store a sequence of device tasks or collected interface names while retaining their original order. Sets are designed around unique elements, while frozen sets are immutable sets. Dictionary keys must be unique, although modern Python dictionaries preserve insertion order for their mappings. Understanding collection behavior helps automation developers select suitable structures for inventories, processing queues, and result sets.

Question 226.

Which HTTP status commonly represents a malformed client request?

  1. 502
  2. 401
  3. 400
  4. 201

Correct Answer: 3

Explanation:

HTTP status code 400 Bad Request generally indicates that the server cannot process a request because it is malformed or contains invalid client-provided information. In network automation, this may result from an incorrectly structured JSON payload, invalid parameter, missing required field, or unsupported request syntax. Status 401 concerns authentication, 502 indicates a gateway-related server problem, and 201 indicates successful resource creation. Automation scripts should inspect error responses and log useful diagnostic information without exposing sensitive credentials or tokens.

Question 227.

Which Ansible keyword invokes a handler after task changes?

  1. notify
  2. register
  3. delegate_to
  4. ignore_errors

Correct Answer: 1

Explanation:

The Ansible notify keyword triggers a handler when the associated task reports a change. This allows follow-up actions to occur only when they are needed. For example, a configuration task might notify a handler that reloads a relevant service after the configuration file changes. register stores task output, delegate_to runs a task on a different host, and ignore_errors controls how certain task failures are handled. Using notifications appropriately helps prevent unnecessary repeated operations and keeps playbook behavior organized around meaningful changes.

Question 228.

Which Python library commonly communicates with REST APIs?

  1. Requests
  2. PyTest
  3. Pygments
  4. Tkinter

Correct Answer: 1

Explanation:

Requests is a widely used Python library for making HTTP requests and interacting with REST APIs. Network automation applications can use it to send API requests, specify headers and parameters, provide request bodies, and inspect returned status codes or data. This makes Requests useful for integrating Python automation with controllers, management platforms, and cloud services. PyTest is primarily a testing framework, Pygments provides syntax highlighting, and Tkinter supports graphical interfaces. API-focused libraries simplify communication and allow automation developers to build reusable controller-integration functions.

Question 229.

Which REST operation usually retrieves a collection of resources?

  1. POST
  2. GET
  3. DELETE
  4. PATCH

Correct Answer: 2

Explanation:

A GET request is commonly used to retrieve a resource or collection of resources from a REST API. For example, network automation can use GET to retrieve device inventories, interface records, site information, or policy objects. Query parameters may further restrict the returned collection through filtering, sorting, pagination, or other API-supported mechanisms. POST commonly creates resources or initiates operations, PATCH modifies selected attributes, and DELETE requests resource removal. Automation clients should still follow the specific controller’s API documentation because implementations can differ in their endpoint behavior.

Question 230.

Which technique protects API credentials during transport?

  1. TLS encryption
  2. Plain HTTP
  3. URL fragments
  4. Debug output

Correct Answer: 1

Explanation:

TLS encryption protects information transmitted between an automation client and an HTTPS service. This is important when API requests contain authentication tokens, passwords, configuration information, or other sensitive data. TLS also provides mechanisms for authenticating the remote endpoint through certificates. Plain HTTP does not provide equivalent transport encryption, while URL fragments and debug output are not mechanisms for securing credentials. Automation applications should also protect credentials at rest and avoid exposing them through logs or source code. Secure transport is one component of a broader credential-protection strategy.

Question 231.

Which Python structure is immutable after creation?

  1. List
  2. Dictionary
  3. Tuple
  4. Set

Correct Answer: 3

Explanation:

A Python tuple is immutable, meaning its elements cannot be changed after the tuple has been created. This can be useful when automation needs to represent a fixed group of values that should not be modified during processing. Lists, dictionaries, and sets are mutable collections and can generally be changed after creation. Immutability can help communicate intent and reduce accidental modifications. For network automation, tuples may be suitable for fixed parameter groups or values that need to remain constant while a workflow processes other dynamic information.

Question 232.

Which API feature allows clients to continue through large datasets?

  1. Pagination
  2. Encryption
  3. Authentication
  4. Compression

Correct Answer: 1

Explanation:

Pagination allows an API client to retrieve large datasets in manageable portions. Instead of returning thousands of records in one response, an API can divide the collection into pages or cursor-based segments. Automation workflows can then request subsequent portions until all required records have been collected. This approach reduces memory requirements and response sizes while making large queries easier to manage. Encryption protects transmitted information, authentication verifies client identity, and compression reduces data size. Pagination is therefore primarily concerned with navigating extensive result collections.

Question 233.

Which Git command sends local commits to a remote repository?

  1. git fetch
  2. git pull
  3. git push
  4. git diff

Correct Answer: 3

Explanation:

The Git push command transfers local commits to a configured remote repository. Network automation teams use it to share changes to scripts, templates, tests, and supporting project files with other developers or centralized source-control platforms. git fetch retrieves remote updates without integrating them, git pull retrieves and integrates changes according to the configured workflow, and git diff compares file or repository differences. Using push as part of a controlled development process allows automation changes to undergo review, testing, and approval before production use.

Question 234.

Which automation practice detects unexpected configuration changes?

  1. Drift detection
  2. Packet switching
  3. Address translation
  4. Link aggregation

Correct Answer: 1

Explanation:

Drift detection identifies differences between the actual configuration state and an expected baseline or intended state. In network automation, this can reveal changes introduced manually, by another automation system, or by unexpected device behavior. A workflow can periodically compare selected configuration attributes against a defined standard and report deviations. Packet switching controls traffic forwarding, address translation modifies addressing information, and link aggregation combines physical links. Drift detection supports configuration compliance and helps organizations identify infrastructure that no longer matches approved standards.

Question 235.

Which Python method retrieves a dictionary value safely with a default?

  1. fetch()
  2. lookup()
  3. get()
  4. obtain()

Correct Answer: 3

Explanation:

The Python dictionary get() method retrieves the value associated with a key and can return a specified default when the key is absent. This is useful in network automation when API responses may not always contain optional fields. Instead of directly indexing a missing key and potentially raising a KeyError, automation code can use get() with an appropriate fallback. The other method names are not standard Python dictionary methods for this purpose. Safe dictionary access can make scripts more resilient when processing variable or incomplete API data.

Question 236.

Which HTTP status indicates successful processing with no response body?

  1. 204
  2. 404
  3. 409
  4. 503

Correct Answer: 1

Explanation:

HTTP 204 No Content indicates that a request was successfully processed and that the server has no response body to return. REST APIs may use this response after operations such as successful deletion or updates where no representation needs to be returned. Automation clients should recognize 204 as a successful outcome rather than interpreting an empty body as an error. Status 404 indicates a missing resource, 409 indicates a conflict, and 503 indicates temporary service unavailability. Correctly handling 204 responses prevents false failure reporting in API-based automation.

Question 237.

Which Ansible feature organizes tasks into reusable units?

  1. Roles
  2. Inventory
  3. Facts
  4. Callbacks

Correct Answer: 1

Explanation:

Ansible roles organize reusable automation content into a standardized directory structure. A role can contain tasks, handlers, templates, files, variables, and metadata associated with a particular automation function. This makes large network automation projects easier to maintain because common configuration logic can be reused across multiple playbooks. Inventory identifies managed hosts, facts provide discovered information, and callbacks influence reporting or execution behavior. Roles are especially useful when organizations need standardized configurations that can be applied consistently across many devices or environments.

Question 238.

Which approach validates automation logic without contacting real devices?

  1. Unit testing
  2. Cable testing
  3. Traffic generation
  4. Interface polling

Correct Answer: 1

Explanation:

Unit testing evaluates individual functions or components in isolation and can often be performed without connecting to real network devices. Automation developers can test input handling, data transformations, validation logic, parsing functions, and error-handling paths using controlled test data or mocks. This makes unit tests fast and suitable for continuous integration pipelines. Cable testing, traffic generation, and interface polling involve actual networking activities rather than isolated software validation. Unit testing should complement broader integration and end-to-end testing for network automation projects.

Question 239.

Which mechanism helps prevent excessive concurrent controller requests?

  1. Concurrency control
  2. Address resolution
  3. Route redistribution
  4. Packet encapsulation

Correct Answer: 1

Explanation:

Concurrency control limits or coordinates the number of operations that can execute simultaneously. In controller-based network automation, this can prevent an application from generating more parallel API requests than the service or infrastructure can safely handle. Appropriate limits can reduce timeouts, rate-limit responses, resource contention, and unexpected controller load. Address resolution maps network-layer addresses to link-layer identifiers, route redistribution exchanges routing information between protocols, and packet encapsulation adds protocol headers. Concurrency control is therefore an important consideration when scaling automation workflows.

Question 240.

Which practice preserves a known working automation version?

  1. Version tagging
  2. Packet filtering
  3. DNS forwarding
  4. Port translation

Correct Answer: 1

Explanation:

Version tagging allows a project to identify a specific source-code state as a known release or milestone. In network automation, a tag can mark a tested version of scripts, templates, modules, or supporting files so that teams can clearly identify what was approved for a particular deployment. This improves traceability and can simplify rollback or comparison with later versions. Packet filtering, DNS forwarding, and port translation perform networking functions unrelated to software release management. Consistent version tagging supports controlled automation lifecycle management and clearer release histories.