Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR) — Question 235
Which outcome is achieved with this Python code?
client.connect (ip, port= 22, username= usr, password= pswd ) stdin, stdout, stderr = client.exec_command ( 'show ip bgp 192.168.101.0 bestpath\n ' ) print (stdout)
Answer options
- A. connects to a Cisco device using SSH and exports the BGP table for the prefix
- B. displays the output of the show command in a formatted way
- C. connects to a Cisco device using SSH and exports the routing table information
- D. connects to a Cisco device using Telnet and exports the routing table information
Correct answer: A
Explanation
The correct answer is A because the code establishes an SSH connection to a Cisco device and executes a command to show the best path for a specific BGP prefix. Options B and C are incorrect as they misstate the command output and type of information retrieved, while option D is wrong because it incorrectly states that a Telnet connection is used instead of SSH.