CPNAE-101 Sample Questions

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.

  1. Question 1Intermediate

    Network Device Management · Networking libraries and tools

    You are creating a script using netmiko to 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 NetmikoAuthenticationException when SSH authentication fails (e.g., wrong username or password). Catching this specific exception allows the script to log the error or retry without crashing.

  2. Question 2Intermediate

    Network Monitoring and Analysis · Monitor network traffic using the scapy library

    When using Scapy to monitor network traffic, you want to capture only TCP traffic on port 80. Which BPF filter syntax should you pass to the sniff() 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.

  3. 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.

  4. 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.

  5. Question 5Intermediate

    Network Device Management · Networking libraries and tools

    When using Nornir for 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 SimpleInventory or NetBoxInventory.

  6. 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.

  7. 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.

  8. 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 for loop with netmiko and 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.

  9. 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_address object that can automatically validate IPv4 and IPv6 formats?

    Show answer & explanation

    Correct answer: D

    The ipaddress module (introduced in Python 3.3) provides robust capabilities for creating, manipulating, and operating on IPv4 and IPv6 addresses and networks.

  10. 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), PUT is used to create a new resource or completely replace an existing resource. POST is often used to create a child resource, and PATCH is used for partial updates.

Ready for the real thing?

The full CPNAE-101 simulator has every exam-style question, timed mode, and instant scoring.