300-435 exam dumps

300-435 practice question 70 of 322

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

300-435 Question 70

Select 4

You are tasked with automating the configuration of multiple Cisco devices using NetMiko. To ensure proper device management, you need to establish an SSH connection, execute a configuration command, and verify its success. Which of the following steps should you include in your Python script to accomplish this?

  1. A

    Use the 'ConnectHandler' function to establish the SSH connection to the device.

  2. B

    Invoke the 'send_command' method to push the configuration changes to the device.

  3. C

    Use the 'send_config_set' method to apply configuration commands in global configuration mode.

  4. D

    Verify the configuration changes by executing 'show' commands using the 'send_command' method.

  5. E

    Close the connection using the 'disconnect' method after the configuration is complete.

Show answer and explanation

Correct answers: A, C, D, E

Explanation

NetMiko provides a simple and effective way to automate device management tasks. To manage devices effectively, you must first establish an SSH connection using 'ConnectHandler'. Configuration changes should be applied using 'send_config_set' to ensure they are executed in the global configuration mode. Verifying the changes using 'send_command' with appropriate 'show' commands is crucial to ensure the intended outcome. Finally, always close the connection using 'disconnect' to avoid resource leaks.

  • A. Correct.

    'ConnectHandler' is the correct method to establish an SSH connection in NetMiko. Without this, you cannot communicate with the device.

  • B. Incorrect.

    'send_command' is used for running show commands or retrieving information, not for pushing configuration changes to the device.

  • C. Correct.

    'send_config_set' is the appropriate method in NetMiko to apply configuration commands in global configuration mode.

  • D. Correct.

    Verifying configuration changes is a best practice and can be done using 'send_command' to execute 'show' commands.

  • E. Correct.

    Closing the SSH connection using 'disconnect' is essential to release resources and complete the session cleanly.

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