Question 297 of 500
Automation and AssurancehardMultiple ChoiceObjective-mapped

Quick Answer

The correct XPath is /native/router/bgp/scope/global/always-compare-med because the Cisco IOS-XE native YANG model enforces a strict hierarchical structure where BGP settings are nested under the 'scope' container to separate global and VRF contexts. The 'always-compare-med' leaf exists only within the global scope, making this path the precise target for automation scripts using the cisco-native YANG model. On the Cisco SPCOR / CCNP Service Provider Core 350-501 exam, this question tests your ability to navigate YANG models for NETCONF/RESTCONF automation, a common topic in the automation and programmability section. A frequent trap is choosing paths that omit the 'scope' container or incorrectly place 'always-compare-med' under a VRF subtree, so remember that global BGP parameters always require the /scope/global prefix. Memory tip: think "scope global" as the mandatory gateway before any global BGP leaf.

350-501 Automation and Assurance Practice Question

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

A network engineer is automating BGP configuration using the Cisco IOS-XE YANG model. They want to enable the 'always-compare-med' feature under BGP. Which XPath expression correctly targets this leaf?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "always"

    Why it matters: Absolute qualifier. An answer using 'always' is only correct if there are genuinely no exceptions — absolute statements are often wrong in networking.

Question 1hardmultiple choice
Open the full BGP breakdown →

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

/native/router/bgp/scope/global/always-compare-med

Option B is correct because the Cisco IOS-XE native YANG model (urn:cisco:params:xml:ns:yang:cisco-native) structures BGP configuration under /native/router/bgp/scope/global/always-compare-med. The 'scope' container is required to differentiate between global and VRF-specific BGP settings, and 'always-compare-med' is a leaf within the global scope. This path accurately reflects the hierarchical model used by Cisco for BGP automation.

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.

  • /bgp/global/always-compare-med

    Why it's wrong here

    Missing the 'native/router' prefix.

  • /native/router/bgp/scope/global/always-compare-med

    Why this is correct

    Correct path according to Cisco IOS-XE YANG model.

    Clue confirmation

    The clue word "always" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • /native/router/bgp/always-compare-med

    Why it's wrong here

    Missing the 'scope/global' containers.

  • /router/bgp/global/always-compare-med

    Why it's wrong here

    Missing 'native' container.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the exact hierarchical path in the native YANG model, and the trap here is that candidates assume a simplified path like /bgp/global/always-compare-med or forget the mandatory 'scope' container, leading them to choose an incomplete or incorrect XPath expression.

Detailed technical explanation

How to think about this question

The Cisco IOS-XE native YANG model uses the 'scope' container to separate global BGP parameters from address-family or VRF-specific parameters, ensuring that automation scripts do not inadvertently modify the wrong context. The 'always-compare-med' leaf, when set to true, forces BGP to compare the Multi-Exit Discriminator (MED) values from different autonomous systems, overriding the default behavior defined in RFC 4271 where MED is only compared among paths from the same AS. In real-world scenarios, this is critical for traffic engineering in multi-homed environments where consistent path selection is required across different providers.

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 small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

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 Assurance — This question tests Automation and Assurance — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: /native/router/bgp/scope/global/always-compare-med — Option B is correct because the Cisco IOS-XE native YANG model (urn:cisco:params:xml:ns:yang:cisco-native) structures BGP configuration under /native/router/bgp/scope/global/always-compare-med. The 'scope' container is required to differentiate between global and VRF-specific BGP settings, and 'always-compare-med' is a leaf within the global scope. This path accurately reflects the hierarchical model used by Cisco for BGP automation.

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.

Are there clue words in this question I should notice?

Yes — watch for: "always". Absolute qualifier. An answer using 'always' is only correct if there are genuinely no exceptions — absolute statements are often wrong in networking.

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