350-401 · Question #413
Refer to the exhibit. Which outcome is achieved with this Python code?
The correct answer is A. connects to a Cisco device using SSH and exports the BGP table for the prefix. The Python code establishes an SSH connection to a Cisco device and executes commands to retrieve and export specific BGP routing table information for a given network prefix.
Question
Refer to the exhibit. Which outcome is achieved with this Python code?
Exhibits
Options
- Aconnects to a Cisco device using SSH and exports the BGP table for the prefix
- Bdisplays the output of the show command in a formatted way
- Cconnects to a Cisco device using SSH and exports the routing table information
- Dconnects to a Cisco device using Telnet and exports the routing table information
How the community answered
(42 responses)- A74% (31)
- B5% (2)
- C14% (6)
- D7% (3)
Why each option
The Python code establishes an SSH connection to a Cisco device and executes commands to retrieve and export specific BGP routing table information for a given network prefix.
The code utilizes network automation libraries, likely Netmiko or Paramiko, to establish a secure SSH connection to the Cisco device. It then executes a `show ip bgp <prefix>` or similar command to retrieve detailed BGP routing entries for a specified network, effectively exporting that portion of the BGP table.
While the output might be displayed, the primary outcome described in choice A is more specific and technically accurate for network automation tasks like extracting specific BGP data.
The code specifically focuses on BGP table information for a prefix, not the entire general routing table which would typically involve a `show ip route` command.
Modern network automation predominantly uses SSH for secure, encrypted communication with network devices, not Telnet, which transmits data in plaintext and is considered insecure.
Concept tested: Network device automation with Python (SSH, BGP commands)
Source: https://netmiko.readthedocs.io/en/stable/
Topics
Community Discussion
No community discussion yet for this question.

