CPNAE-101 Sample Questions & Answers
Python programming fundamentals like data types and looping constructs make up nearly half the weighting, alongside device-management protocols built on networking libraries, PCAP file processing and traffic monitoring, and requirements engineering within DevOps models.
Launch the full CPNAE-101 simulator →Showing 10 of 20 free samples.
- Question 1Intermediate
Network Device Management · Networking libraries and tools
You are creating a script using
netmikoto push a configuration set to a Cisco IOS device. You want to ensure the script handles potential authentication failures gracefully without crashing. Which exception should you catch?Show answer & explanation
Correct answer: C
Netmiko raises
NetmikoAuthenticationExceptionwhen SSH authentication fails (e.g., wrong username or password). Catching this specific exception allows the script to log the error or retry without crashing. - Question 2Intermediate
Network Monitoring and Analysis · Monitor network traffic using the scapy library
When using
Scapyto monitor network traffic, you want to capture only TCP traffic on port 80. Which BPF filter syntax should you pass to thesniff()function?Show answer & explanation
Correct answer: C
Scapy's
sniff()function uses Berkeley Packet Filter (BPF) syntax. 'tcp and port 80' correctly filters for packets that are both TCP and destined for or originating from port 80. - Question 3Intermediate
Requirements and Systems Engineering · Describe systems concepts related to network engineering
A network architect is defining the system lifecycle for a new SD-WAN deployment. According to general systems engineering principles, which phase immediately follows the 'Concept' stage and precedes 'Production'?
Show answer & explanation
Correct answer: D
The standard system lifecycle generally flows from Concept -> Development -> Production -> Utilization/Support -> Retirement. Development involves the detailed design and implementation before the system goes into live Production.
- Question 4Beginner
Python Programming Fundamentals · Plan and implement the use of data types
You need to store a collection of unique VLAN IDs discovered during a network scan. Duplicate IDs should be automatically removed. Which Python data type is most appropriate?
Show answer & explanation
Correct answer: B
A Set in Python is an unordered collection of unique elements. Adding a duplicate value to a set has no effect, making it the ideal data structure for storing unique VLAN IDs.
- Question 5Intermediate
Network Device Management · Networking libraries and tools
When using
Nornirfor network automation, which component is responsible for holding the information about the devices, groups, and defaults?Show answer & explanation
Correct answer: D
In Nornir, the Inventory component manages the hosts, groups, and defaults. It is typically initialized using plugins like
SimpleInventoryorNetBoxInventory. - Question 6IntermediateSelect 2
Network Device Management · Networking libraries and tools
Select TWO benefits of using
NAPALM(Network Automation and Programmability Abstraction Layer with Multivendor support) in a mixed-vendor environment. (Select TWO)Show answer & explanation
Correct answers: B, D
NAPALM provides a consistent set of functions (e.g.,
get_interfaces(),get_facts()) that work across different vendors (Cisco, Juniper, Arista), abstracting the CLI differences.NAPALM supports replacing the entire configuration or merging changes with support for diffs and rollbacks, enhancing safety in automation.
- Question 7Beginner
Python Programming Fundamentals · Plan and implement the use of data types
True or False: In Python, a tuple is a mutable data type, meaning you can modify its elements after it has been created.
Show answer & explanation
Correct answer: B
False. Tuples in Python are immutable. Once defined, their elements cannot be changed, added, or removed. Lists are mutable.
- Question 8Advanced
Python Programming Fundamentals · Select and implement Python libraries and modules
CASE STUDY: GlobalCorp Network Automation
GlobalCorp has a network of 500 switches across 10 sites. They are implementing a Python-based compliance checker. The script needs to log into each device, run 'show running-config', and verify that the NTP server is set to '10.10.10.1'.
The current script uses a simple
forloop withnetmikoand takes 2 hours to complete. The Network Manager requires the audit to finish in under 15 minutes.Which architectural change to the Python script would BEST achieve this performance requirement?
Show answer & explanation
Correct answer: C
The bottleneck is the serial execution of I/O bound tasks (waiting for network devices). Implementing multithreading or using a framework like Nornir (which uses threading by default) allows multiple devices to be processed simultaneously, drastically reducing total execution time.
- Question 9Beginner
Python Programming Fundamentals · Select and implement Python libraries and modules
You are writing a Python function to validate IP addresses. Which built-in Python module provides the
ip_addressobject that can automatically validate IPv4 and IPv6 formats?Show answer & explanation
Correct answer: D
The
ipaddressmodule (introduced in Python 3.3) provides robust capabilities for creating, manipulating, and operating on IPv4 and IPv6 addresses and networks. - Question 10Intermediate
Network Device Management · Network Management Protocols
Which of the following HTTP methods is primarily used in RESTCONF to create a new resource or replace an existing one entirely?
Show answer & explanation
Correct answer: B
In RESTCONF (and REST APIs generally),
PUTis used to create a new resource or completely replace an existing resource.POSTis often used to create a child resource, andPATCHis used for partial updates.
Ready for the real thing?
The full CPNAE-101 simulator has every exam-style question, timed mode, and instant scoring.