Question 118 of 500
Automation and Quality of ServicehardMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the class name must be defined in a separate class-map before it can be referenced inside the policy-map. This is because Cisco IOS enforces a strict hierarchical structure for Modular QoS CLI (MQC): a class-map must exist as a standalone object in the YANG data model before it is invoked by a policy-map. When NETCONF pushes a policy-map that references an undefined class, the device rejects the configuration with the 'invalid policy-map structure' error, as the YANG model cannot validate the cross-reference. On the Cisco SPCOR 350-501 exam, this tests your understanding of MQC ordering and NETCONF/YANG data modeling constraints—a common trap is assuming the class can be defined inline within the policy-map. Remember the memory tip: "Class first, policy last—define before you reference."

350-501 Automation and Quality of Service Practice Question

This 350-501 practice question tests your understanding of automation and quality of service. 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.

Exhibit

<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
    <policy>
      <policy-map>
        <name>QOS-POLICY</name>
        <class>
          <name>VOICE</name>
          <priority>
            <level>1</level>
          </priority>
          <police>
            <cir>64000</cir>
            <bc>8000</bc>
            <conform-action>
              <transmit/>
            </conform-action>
            <exceed-action>
              <drop/>
            </exceed-action>
          </police>
        </class>
      </policy-map>
    </policy>
  </native>
</config>

Refer to the exhibit. An engineer pushes this XML configuration via NETCONF, but the device rejects it with an error stating 'invalid policy-map structure'. What is the problem?

Question 1hardmultiple choice
Read the full REST/YANG explanation →

Exhibit

<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
  <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
    <policy>
      <policy-map>
        <name>QOS-POLICY</name>
        <class>
          <name>VOICE</name>
          <priority>
            <level>1</level>
          </priority>
          <police>
            <cir>64000</cir>
            <bc>8000</bc>
            <conform-action>
              <transmit/>
            </conform-action>
            <exceed-action>
              <drop/>
            </exceed-action>
          </police>
        </class>
      </policy-map>
    </policy>
  </native>
</config>

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 class name must be defined in a class-map before being referenced in the policy-map

The error 'invalid policy-map structure' occurs because the policy-map references a class name that has not been defined in a class-map beforehand. In Cisco IOS, a class-map must exist before it can be used inside a policy-map; otherwise, the device rejects the configuration as structurally invalid.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 class name must be defined in a class-map before being referenced in the policy-map

    Why this is correct

    The YANG model requires that class-maps are defined separately. This XML attempts to define a class inline, which is not allowed.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The configuration is missing the class-default class

    Why it's wrong here

    The class-default is implicitly present; it does not need to be explicitly defined in the policy-map.

  • The YANG model does not support the 'police' keyword

    Why it's wrong here

    The Cisco-IOS-XE-native YANG model supports police; it is a valid command.

  • The priority and police commands cannot coexist in the same class

    Why it's wrong here

    In Cisco IOS, you can configure both priority and police in the same class; the policy-map would accept it if structured correctly.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the dependency between class-maps and policy-maps, where candidates mistakenly think the error is about missing class-default or command incompatibility, rather than the fundamental requirement that a class must be defined before it is referenced.

Trap categories for this question

  • Command / output trap

    The Cisco-IOS-XE-native YANG model supports police; it is a valid command.

Detailed technical explanation

How to think about this question

Under the hood, NETCONF validates the configuration against the YANG data model before applying it. The YANG model enforces that any class referenced in a policy-map must already exist in the device's running configuration or be defined in the same NETCONF payload. This prevents orphaned class references and ensures the policy-map structure is complete. In real-world scenarios, engineers often batch multiple NETCONF operations and must order them so that class-maps are created before policy-maps that reference them.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the 350-501 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related 350-501 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 350-501 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 350-501 question test?

Automation and Quality of Service — This question tests Automation and Quality of Service — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The class name must be defined in a class-map before being referenced in the policy-map — The error 'invalid policy-map structure' occurs because the policy-map references a class name that has not been defined in a class-map beforehand. In Cisco IOS, a class-map must exist before it can be used inside a policy-map; otherwise, the device rejects the configuration as structurally invalid.

What should I do if I get this 350-501 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

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.

Loading comments…

Sign in to join the discussion.

This 350-501 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-501 exam.