In this lesson, we will cover:
- How to send a command and retrieve the output from a device.
- How to modify the expected response back from the device.
First of all, we can use
send_command to send a command to the device. Before we do so, we first enter enable mode via
enable(). For example.
By default, the Netmiko
send_command() works by sending the command, and then looking for the device prompt within the output. At the point, the command prompt is found Netmiko determines that this is the end of the output from the command. The command prompt that Netmiko looks for is obtained via the Netmiko method -
Below shows an example for collecting the output of
show version from the ios and eos based devices, using the previously created