A network engineer needs to automate the backup of running configurations from multiple Cisco IOS XE devices to a central TFTP server. Which tool is best suited for this task in a Python-based automation framework?
Trap 1: RESTCONF
RESTCONF is a model-driven network management protocol that uses HTTP methods (GET, POST, PUT, DELETE) to manipulate YANG-defined data structures over HTTPS. It is designed for structured, API-based device configuration and state retrieval, not for emulating CLI commands or interacting with a device's command-line interface. Backing up a running configuration via CLI requires an SSH/CLI transport, which RESTCONF does not provide, making it unsuitable for this specific task.
Trap 2: Ansible
Ansible is an open-source automation platform that uses YAML playbooks and modules (e.g., ios_command, ios_config) to manage network devices over SSH or other protocols. While Ansible can automate configuration backups, it is a standalone tool requiring an Ansible control node and inventory, not a Python library that can be directly imported into a custom script. Because the engineer needs to integrate SSH-based backup into a Python automation workflow, Ansible would be an external orchestration layer, not the underlying SSH connectivity library.
Trap 3: Netmiko
Netmiko is a high-level Python library built on top of Paramiko that abstracts away many SSH and CLI complexities for network device interaction. While Netmiko could also be used to automate configuration backups and is convenient for multi-vendor support, the question specifically targets the underlying SSH library that provides raw SSH connectivity — which is Paramiko. Netmiko adds a layer of device-specific command handling and expects a deterministic CLI prompt, whereas Paramiko is the actual SSH protocol implementation that Netmiko relies on; thus Paramiko is the more fundamental correct answer.
- A
RESTCONF
Why wrong: RESTCONF is a model-driven network management protocol that uses HTTP methods (GET, POST, PUT, DELETE) to manipulate YANG-defined data structures over HTTPS. It is designed for structured, API-based device configuration and state retrieval, not for emulating CLI commands or interacting with a device's command-line interface. Backing up a running configuration via CLI requires an SSH/CLI transport, which RESTCONF does not provide, making it unsuitable for this specific task.
- B
Ansible
Why wrong: Ansible is an open-source automation platform that uses YAML playbooks and modules (e.g., ios_command, ios_config) to manage network devices over SSH or other protocols. While Ansible can automate configuration backups, it is a standalone tool requiring an Ansible control node and inventory, not a Python library that can be directly imported into a custom script. Because the engineer needs to integrate SSH-based backup into a Python automation workflow, Ansible would be an external orchestration layer, not the underlying SSH connectivity library.
- C
Paramiko
Paramiko is a pure-Python implementation of the SSHv2 protocol, providing a low-level SSH client (paramiko.SSHClient) that can authenticate with network devices and execute CLI commands directly. It is the foundational library that actually handles SSH session establishment, encryption, and command execution, making it the correct choice when the requirement is to automate backup of the running configuration via SSH from Python. Its low-level API allows precise control over the SSH connection, including handling interactive prompts and command output.
- D
Netmiko
Why wrong: Netmiko is a high-level Python library built on top of Paramiko that abstracts away many SSH and CLI complexities for network device interaction. While Netmiko could also be used to automate configuration backups and is convenient for multi-vendor support, the question specifically targets the underlying SSH library that provides raw SSH connectivity — which is Paramiko. Netmiko adds a layer of device-specific command handling and expects a deterministic CLI prompt, whereas Paramiko is the actual SSH protocol implementation that Netmiko relies on; thus Paramiko is the more fundamental correct answer.