mediumMultiple ChoiceObjective-mapped
CCNP Practice Question: A Python script using Netmiko to configure…
A Python script using Netmiko to configure telemetry on a Cisco IOS-XE device:
```python
from netmiko import ConnectHandler
device = { 'device_type': 'cisco_ios', 'host': '192.168.1.1', 'username': 'admin', 'password': 'cisco',
}
connection = ConnectHandler(**device) config_commands = [ 'telemetry ietf subscription 200', 'receiver ip address 10.1.1.100 port 50051 protocol grpc-tcp', 'source-address 10.1.1.1', 'encoding encode-kvgpb', 'filter xpath /interfaces/interface/state/counters', 'update-policy periodic 10000'
]
output = connection.send_config_set(config_commands)
print(output)
connection.disconnect() ```
What is the expected outcome of this script?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The script will configure the telemetry subscription and print the configuration output.
The script connects to the device, enters configuration mode, applies the telemetry subscription commands, and prints the output. The commands are syntactically correct for IOS-XE, so the configuration should be applied successfully.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The script will configure the telemetry subscription and print the configuration output.
Why this is correct
The script uses correct Netmiko syntax and valid IOS-XE commands.
- ✗
The script will fail because 'telemetry ietf subscription' is not a valid command.
Why it's wrong here
This is a valid command on IOS-XE 16.6+.
- ✗
The script will fail because 'send_config_set' requires a list of strings.
Why it's wrong here
The commands are already in a list, which is correct.
- ✗
The script will fail because the device_type should be 'cisco_xe'.
Why it's wrong here
Both 'cisco_ios' and 'cisco_xe' are accepted for IOS-XE devices.
About these practice questions
One of 1,175 original 350-401 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 350-401 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-401 exam.