nerdexam
Cisco

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.

Submitted by emma.c· Mar 6, 2026Network Automation

Question

Refer to the exhibit. Which outcome is achieved with this Python code?

Exhibits

350-401 question #413 exhibit 1
350-401 question #413 exhibit 2

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)
  • A
    74% (31)
  • B
    5% (2)
  • C
    14% (6)
  • D
    7% (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.

Aconnects to a Cisco device using SSH and exports the BGP table for the prefixCorrect

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.

Bdisplays the output of the show command in a formatted way

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.

Cconnects to a Cisco device using SSH and exports the routing table information

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.

Dconnects to a Cisco device using Telnet and exports the routing table information

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

#Python scripting#Network automation#SSH#BGP routing

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice