200-901 Infrastructure and Automation Practice Question
Exhibit
Refer to the exhibit.
yang-module: Cisco-IOS-XE-native
container native
container ip
list route
key "prefix mask"
leaf prefix { type inet:ipv4-address; }
leaf mask { type inet:ipv4-prefix-length; }
leaf next-hop { type inet:ipv4-address; }Refer to the exhibit. Based on the YANG model snippet, what is the data type of the 'mask' leaf?
⚠ Common exam trap
Cisco often tests the distinction between 'inet:ipv4-address' (a full address) and 'inet:ipv4-prefix-length' (the /N notation), tricking candidates who confuse the subnet mask value with its prefix length representation.
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
✓
inet:ipv4-prefix-length
The 'mask' leaf is defined with the type 'inet:ipv4-prefix-length', which represents a decimal integer from 0 to 32 indicating the number of leading 1 bits in the subnet mask (e.g., 24 for /24). This is the correct data type for a prefix length in YANG models, not an IPv4 address or a generic string.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
inet:ipv4-address
Why it's wrong here
This is the type for the 'prefix' leaf, not 'mask'.
- ✓
inet:ipv4-prefix-length
Why this is correct
The exhibit shows the type as inet:ipv4-prefix-length.
- ✗
uint8
Why it's wrong here
While similar, the exact type is ipv4-prefix-length, which is typically derived from uint8 but specifically defined.
- ✗
string
Why it's wrong here
The type is not string; it's a numeric range.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 989 original 200-901 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 200-901 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-901 exam.