300-435 exam dumps

300-435 practice question 71 of 322

Automating Cisco Enterprise Solutions. Professional level, Cisco. Free question with the correct answer and a full explanation.

300-435 Question 71

Select 4

You are tasked with automating device configuration and monitoring for a Cisco network using NetMiko. A script you are developing needs to connect to multiple Cisco switches, retrieve their interface statuses, and log any interfaces that are administratively down. Which of the following steps must be included in your Python script for this to work correctly?

  1. A

    Use the ConnectHandler class from NetMiko to establish an SSH connection to each switch.

  2. B

    Send the 'show running-config' command to retrieve the interface statuses.

  3. C

    Parse the output of the 'show ip interface brief' command to identify the interfaces that are administratively down.

  4. D

    Store the device connection details, such as IP, username, and password, in a dictionary before establishing the connection.

  5. E

    Use the 'disconnect()' method from the NetMiko connection object to close the SSH session after retrieving the required data.

Show answer and explanation

Correct answers: A, C, D, E

Explanation

To monitor device interfaces for administrative status using NetMiko, the script must establish a connection to each device using the ConnectHandler class. The 'show ip interface brief' command provides the necessary interface status data, and the script must parse this output to identify interfaces that are administratively down. Connection details should be stored in a dictionary for efficient management of multiple devices, and finally, it is crucial to close the SSH session with the 'disconnect()' method to avoid leaving open connections.

  • A. Correct.

    Correct. The ConnectHandler class is used in NetMiko to establish an SSH connection to network devices.

  • B. Incorrect.

    Incorrect. While 'show running-config' provides configuration details, it is not the best command for retrieving interface statuses. The 'show ip interface brief' command is more appropriate.

  • C. Correct.

    Correct. The output of 'show ip interface brief' provides a concise summary of interface statuses, including administrative state.

  • D. Correct.

    Correct. Storing device connection details in a dictionary is a standard practice in NetMiko scripts to organize and handle multiple devices.

  • E. Correct.

    Correct. It is important to close the SSH session with the 'disconnect()' method to free up resources and ensure clean termination of the connection.

Timed practice exam

Take a 300-435 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam