mediumMultiple Choice
CCNP Practice Question: A Python script uses NAPALM to retrieve the ARP…
A Python script uses NAPALM to retrieve the ARP table from a Cisco IOS-XE device:
from napalm import get_network_driver
driver = get_network_driver('ios') device = driver('192.168.1.1', 'admin', 'cisco') device.open() arp_table = device.get_arp_table()
print(arp_table)
device.close()
What is the issue with this script?
⚠ Common exam trap
Cisco often tests the misconception that 'ios' is a catch-all driver for all Cisco IOS-based devices, when in fact IOS-XE requires a separate driver due to its modern API support.
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 fail because the driver name 'ios' is incorrect; it should be 'iosxe' for IOS-XE devices.
The NAPALM driver for Cisco IOS-XE devices is 'iosxe', not 'ios'. The 'ios' driver is designed for classic Cisco IOS, which uses a different data model and CLI structure. Using 'ios' on an IOS-XE device will cause NAPALM to fail when attempting to retrieve data like the ARP table due to incompatible command outputs or missing XML/JSON structures.
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 fail because the driver name 'ios' is incorrect; it should be 'iosxe' for IOS-XE devices.
Why this is correct
The NAPALM driver name must match the device's actual operating system family. For IOS-XE devices, the correct driver is 'iosxe' because that driver uses the appropriate command syntax and parser for IOS-XE's 'show ip arp' output, while the 'ios' driver is reserved for classic Cisco IOS (e.g., Catalyst 2960 running IOS 15.x). Passing 'ios' to an IOS-XE device will make NAPALM issue classic IOS commands that IOS-XE may reject or parse incorrectly, causing the script to fail with an error such as 'unable to execute command' or an invalid output error.
- ✗
The script will work correctly because 'ios' is the correct driver for all Cisco IOS devices.
Why it's wrong here
This is incorrect because 'ios' is not a universal catch-all driver; it is specifically tuned for classic IOS, which uses different command syntax and output formatting than IOS-XE. Devices like the Catalyst 9200 or ASR 1000 run IOS-XE, and NAPALM's 'iosxe' driver is the only one that correctly handles their `show ip arp` output and other operational data. Using 'ios' on an IOS-XE device may initially import successfully but will fail at runtime when the driver cannot understand the returned output or when IOS-XE's CLI differs from classic IOS.
- ✗
The script will fail because the 'get_arp_table()' method requires an argument.
Why it's wrong here
The `get_arp_table()` method does not require any mandatory positional arguments; it optionally accepts a 'vrf' keyword parameter to filter per VRF, but calling it with no arguments is perfectly valid. It returns a list of dictionaries containing MAC, IP, interface, and last_seen keys. If the script were failing, it would not be due to missing arguments, but rather due to the driver mismatch that prevents the method from working correctly.
- ✗
The script will work but only if the device is running IOS-XE 16.12 or later.
Why it's wrong here
This is a red herring: the driver name is the core problem, not the device's software version. Even if the IOS-XE device runs version 16.12 or later, the NAPALM 'ios' driver will still attempt to use classic IOS command extraction logic, which is incompatible with IOS-XE's structured output. The 'iosxe' driver has been available for many releases and is not gated by version 16.12; NAPALM's driver selection is deterministic based on the OS string, not on feature-level version checks.
About these practice questions
This 350-401 question is part of Courseiva's 1,923-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.