- A
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown
This playbook correctly uses the ios_config module with network_cli connection to apply the required CLI commands. The lines list includes the interface configuration commands in the correct order, and the connection type is appropriate for Cisco IOS-XE devices.
- B
- name: Configure Loopback hosts: R1 gather_facts: no connection: ssh tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1/24 - no shutdown
Why wrong: This is incorrect because the connection type should be 'network_cli' for Cisco IOS devices, not 'ssh'. Additionally, the IP address format in the ios_config lines should use the subnet mask (255.255.255.0) rather than CIDR notation (/24).
- C
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - shutdown
Why wrong: This is incorrect because the 'shutdown' command disables the interface, whereas the requirement is to configure and enable it. The correct command is 'no shutdown' to bring the interface up.
- D
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown parents: interface Loopback0
Why wrong: This is incorrect because the 'parents' directive is used when the lines are subcommands of a parent configuration block, but here the lines already include the 'interface Loopback0' command. Using 'parents' would cause the playbook to enter interface configuration mode twice, leading to an error.
Quick Answer
The correct answer is the playbook using `network_cli` connection with the three lines under `ios_config`: `interface Loopback0`, `ip address 10.0.0.1 255.255.255.0`, and `no shutdown`. This is correct because Ansible’s `network_cli` connection type is specifically designed for network device configuration over SSH, and the `ios_config` module applies configuration lines in order without needing the `parents` argument when you include the interface line directly in the `lines` list. The subnet mask must be in dotted-decimal format (255.255.255.0) rather than CIDR notation, as Cisco IOS expects the traditional mask syntax. On the CCNA 200-301 v2 exam, this question tests your understanding of Ansible playbook syntax for Cisco IOS-XE automation, a key automation skill now integrated into the exam blueprint. A common trap is using `shutdown` instead of `no shutdown`, which would disable the interface, or using `parents` when the question explicitly forbids it. Memory tip: think “three lines, no parents, mask in dots” to recall the correct structure.
CCNA AI and Network Operations Practice Question
This 200-301 practice question tests your understanding of ai and network operations. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
You are connected to R1 via the console. R1 is a Cisco IOS-XE router. The network manager wants to use an Ansible playbook to configure a loopback interface with IP address 10.0.0.1/24 on R1. You need to write the Ansible YAML playbook that connects to R1 and configures this interface. The playbook must not use the 'parents' argument in the ios_config module.
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
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown
Option A is correct because it uses the network_cli connection type, applies the correct subnet mask (255.255.255.0), includes 'no shutdown' to enable the interface, and does not use the 'parents' argument, meeting the requirement. Option B is wrong because it uses an 'ssh' connection (not network_cli) and writes the IP address in CIDR notation (/24) instead of the required dotted-decimal mask. Option C is wrong because it uses 'shutdown' instead of 'no shutdown', which disables the interface. Option D is wrong because it uses the 'parents' argument, which the stem explicitly forbids, even though the configuration would otherwise be valid.
Key principle: Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown
Why this is correct
This playbook correctly uses the ios_config module with network_cli connection to apply the required CLI commands. The lines list includes the interface configuration commands in the correct order, and the connection type is appropriate for Cisco IOS-XE devices.
Related concept
CIDR notation defines the prefix length.
- ✗
- name: Configure Loopback hosts: R1 gather_facts: no connection: ssh tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1/24 - no shutdown
Why it's wrong here
This is incorrect because the connection type should be 'network_cli' for Cisco IOS devices, not 'ssh'. Additionally, the IP address format in the ios_config lines should use the subnet mask (255.255.255.0) rather than CIDR notation (/24).
- ✗
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - shutdown
Why it's wrong here
This is incorrect because the 'shutdown' command disables the interface, whereas the requirement is to configure and enable it. The correct command is 'no shutdown' to bring the interface up.
- ✗
- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown parents: interface Loopback0
Why it's wrong here
This is incorrect because the 'parents' directive is used when the lines are subcommands of a parent configuration block, but here the lines already include the 'interface Loopback0' command. Using 'parents' would cause the playbook to enter interface configuration mode twice, leading to an error.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.
✓- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdownCorrect answer▾
Why this is correct
This playbook correctly uses the ios_config module with network_cli connection to apply the required CLI commands. The lines list includes the interface configuration commands in the correct order, and the connection type is appropriate for Cisco IOS-XE devices.
✗- name: Configure Loopback hosts: R1 gather_facts: no connection: ssh tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1/24 - no shutdownWrong answer — click to see why▾
Why this is wrong here
The specific factual error: Ansible's ios_config module requires the 'network_cli' connection plugin for Cisco IOS devices, and the 'ip address' command expects a subnet mask, not CIDR prefix length.
Why candidates choose this
Candidates might think 'ssh' is acceptable because Ansible uses SSH for many connections, but network_cli is specifically needed for network device modules. Also, CIDR notation is common in other contexts, leading to confusion.
✗- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - shutdownWrong answer — click to see why▾
Why this is wrong here
The specific factual error: The 'shutdown' command administratively disables an interface, which is opposite to the intended action of enabling it.
Why candidates choose this
Candidates might confuse 'shutdown' with 'no shutdown' or forget that interfaces are often shut by default, so they may think 'shutdown' is needed to enable it.
✗- name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown parents: interface Loopback0Wrong answer — click to see why▾
Why this is wrong here
Uses the 'parents' argument, which is not allowed by the requirement.
Why candidates choose this
Candidates might think 'parents' is required to enter interface configuration mode, but the ios_config module can accept the full commands directly in the lines list.
Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Common exam traps
Common exam trap: usable hosts are not the same as total addresses
Subnetting questions often tempt you into counting all addresses. In normal IPv4 subnets, the network and broadcast addresses are not usable host addresses.
Trap categories for this question
Command / output trap
This is incorrect because the 'shutdown' command disables the interface, whereas the requirement is to configure and enable it. The correct command is 'no shutdown' to bring the interface up.
Detailed technical explanation
How to think about this question
Subnetting questions test whether you can identify the network, broadcast address, usable range, mask and correct subnet. Slow down enough to calculate the block size correctly.
KKey Concepts to Remember
- CIDR notation defines the prefix length.
- Block size helps identify subnet boundaries.
- Network and broadcast addresses are not usable hosts in normal IPv4 subnets.
- The required host count determines the smallest suitable subnet.
TExam Day Tips
- Write the block size before choosing the subnet.
- Check whether the question asks for hosts, subnets or a specific address range.
- Do not confuse /24, /25, /26 and /27 host counts.
Key takeaway
Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.
Real-world example
How this comes up in practice
A network engineer segments a warehouse floor into three subnets: 20 scanners, 5 printers, and 2 management hosts. Picking the wrong mask wastes addresses or leaves too few usable hosts. Exam questions test whether you can apply CIDR notation, calculate block size, and identify the correct usable-host range for a given prefix.
What to study next
Got this wrong? Here's your next step.
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related 200-301 subnetting questions on CIDR, address ranges, and subnet selection.
- →
AI and Network Operations — study guide chapter
Learn the concepts, then practise the questions
- →
AI and Network Operations practice questions
Targeted practice on this topic area only
- →
All 200-301 questions
1,819 questions across all exam domains
- →
CCNA 200-301 v2 study guide
Full concept coverage aligned to exam objectives
- →
200-301 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related 200-301 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Network Infrastructure and Connectivity practice questions
Practise 200-301 questions linked to Network Infrastructure and Connectivity.
Switching and Network Access practice questions
Practise 200-301 questions linked to Switching and Network Access.
IP Routing practice questions
Practise 200-301 questions linked to IP Routing.
Network Services and Security practice questions
Practise 200-301 questions linked to Network Services and Security.
AI and Network Operations practice questions
Practise 200-301 questions linked to AI and Network Operations.
CCNA subnetting practice questions
Practise IPv4 subnetting, CIDR, masks, host ranges and subnet selection.
CCNA OSPF practice questions
Practise OSPF neighbours, router IDs, metrics, areas and routing-table interpretation.
CCNA VLAN practice questions
Practise VLANs, access ports, trunks, allowed VLANs and switching scenarios.
CCNA STP practice questions
Practise spanning tree, root bridge election, port roles and STP troubleshooting.
CCNA EtherChannel practice questions
Practise LACP, PAgP, port-channel behaviour and bundle requirements.
CCNA ACL practice questions
Practise standard and extended ACLs, permit/deny logic and traffic filtering.
CCNA NAT practice questions
Practise static NAT, dynamic NAT, PAT and inside/outside address translation.
Practice this exam
Start a free 200-301 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this 200-301 question test?
AI and Network Operations — This question tests AI and Network Operations — CIDR notation defines the prefix length..
What is the correct answer to this question?
The correct answer is: - name: Configure Loopback hosts: R1 gather_facts: no connection: network_cli tasks: - name: Configure interface ios_config: lines: - interface Loopback0 - ip address 10.0.0.1 255.255.255.0 - no shutdown — Option A is correct because it uses the network_cli connection type, applies the correct subnet mask (255.255.255.0), includes 'no shutdown' to enable the interface, and does not use the 'parents' argument, meeting the requirement. Option B is wrong because it uses an 'ssh' connection (not network_cli) and writes the IP address in CIDR notation (/24) instead of the required dotted-decimal mask. Option C is wrong because it uses 'shutdown' instead of 'no shutdown', which disables the interface. Option D is wrong because it uses the 'parents' argument, which the stem explicitly forbids, even though the configuration would otherwise be valid.
What should I do if I get this 200-301 question wrong?
Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related 200-301 subnetting questions on CIDR, address ranges, and subnet selection.
What is the key concept behind this question?
CIDR notation defines the prefix length.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More 200-301 practice questions
- A switchport connected to another switch should carry multiple VLANs, but it was manually configured as an access port.…
- What problem is HSRP designed to solve?
- Which TWO statements correctly describe the causes or implications of CRC errors, runts, giants, or output errors as see…
- You are connected to R1. Configure IPv4 and IPv6 addressing on R1's interfaces and verify reachability to R2. The curren…
- Which TWO statements accurately describe how AI/ML concepts are applied to network operations in modern enterprise netwo…
- Which TWO switch port configurations are required when connecting a Cisco IP phone and a desktop PC to a single access p…
Last reviewed: Jun 7, 2026
This 200-301 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 200-301 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.