Question 633 of 1,819
AI and Network OperationshardTroubleshootingObjective-mapped

CCNA AI and Network Operations Practice Question

This 200-301 practice question tests your understanding of ai and network operations. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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.

Network Topology
G0/0/0198.51.100.1/24G0/0/0198.51.100.2/24EthernetR1R2

You are connected to R1 (198.51.100.1/24). Using RESTCONF, you need to retrieve the current operational status of GigabitEthernet0/0/0 via the ietf-interfaces YANG model, then update its description to 'WAN-Link-to-R2' using a PATCH request with the Cisco-IOS-XE-native YANG model. The candidate must identify the correct base URI, YANG module path, HTTP headers (Accept: application/yang-data+json), interpret the JSON response, and recognize the error that occurs when an incorrect Content-Type header or wrong YANG path is used.

Question 1hardTroubleshooting
Read the full REST/YANG explanation →

Exhibit

R1#show running-config | section interface GigabitEthernet0/0/0
interface GigabitEthernet0/0/0
 ip address 198.51.100.1 255.255.255.0
 description Link-to-R2
 no shutdown
!

R1#show ip interface brief | include GigabitEthernet0/0/0
GigabitEthernet0/0/0  198.51.100.1  YES manual up                    up

RESTCONF base URI: https://198.51.100.1:443/restconf

Curl attempt (GET) — correct:
curl -k -u admin:cisco -H "Accept: application/yang-data+json" https://198.51.100.1/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0%2F0%2F0

Curl attempt (PATCH) — incorrect (wrong YANG path):
curl -k -u admin:cisco -X PATCH -H "Content-Type: application/yang-data+json" -d '{"Cisco-IOS-XE-native:description":"WAN-Link-to-R2"}' https://198.51.100.1/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0%2F0%2F0/description

Response to PATCH above: 400 Bad Request - "YANG path does not match data: expected 'Cisco-IOS-XE-native:interface' at root"

Curl attempt (PATCH) — correct:
curl -k -u admin:cisco -X PATCH -H "Content-Type: application/yang-data+json" -d '{"Cisco-IOS-XE-native:description":"WAN-Link-to-R2"}' https://198.51.100.1/restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=GigabitEthernet0%2F0%2F0/description

Response to correct PATCH: 204 No Content

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

GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:description": "WAN-Link-to-R2"}

The GET request correctly uses the ietf-interfaces YANG path and Accept header to retrieve the interface operational data. The PATCH request fails because it attempts to modify 'description' under the ietf-interfaces model, which is read-only for operational data; the writable 'description' is under Cisco-IOS-XE-native:native/interface/GigabitEthernet. The correct PATCH URI targets the Cisco-IOS-XE-native YANG module path, and the Content-Type must be application/yang-data+json. The 400 error indicates a mismatch between the YANG path in the URI and the data payload.

Key principle: NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:description": "WAN-Link-to-R2"}

    Why this is correct

    This option correctly uses the ietf-interfaces YANG module for the GET request to retrieve operational data, and the Cisco-IOS-XE-native YANG module for the PATCH request to modify the writable description. The Accept header is correctly set for GET, and Content-Type is correctly set for PATCH. The PATCH URI targets the native interface path, which is writable.

    Related concept

    Static NAT maps one inside address to one outside address.

  • GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/json; PATCH request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Content-Type: application/yang-data+json and body {"description": "WAN-Link-to-R2"}

    Why it's wrong here

    This is incorrect because the PATCH request uses the ietf-interfaces YANG path, which is read-only for operational data; the description field under ietf-interfaces is not writable. Additionally, the Accept header for GET should be application/yang-data+json, not application/json, to indicate YANG-encoded data.

  • GET request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Content-Type: application/json and body {"description": "WAN-Link-to-R2"}

    Why it's wrong here

    This is incorrect because the GET request uses the native YANG path, which is for configuration data, not operational status. The PATCH request uses the ietf-interfaces path (read-only) and the Content-Type is wrong (should be application/yang-data+json).

  • GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Content-Type: application/json and body {"Cisco-IOS-XE-native:description": "WAN-Link-to-R2"}

    Why it's wrong here

    This is incorrect because the PATCH request uses the correct URI and body, but the Content-Type header is set to application/json instead of application/yang-data+json. RESTCONF requires Content-Type: application/yang-data+json for PATCH requests with YANG data.

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.

GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:description": "WAN-Link-to-R2"}Correct answer

Why this is correct

This option correctly uses the ietf-interfaces YANG module for the GET request to retrieve operational data, and the Cisco-IOS-XE-native YANG module for the PATCH request to modify the writable description. The Accept header is correctly set for GET, and Content-Type is correctly set for PATCH. The PATCH URI targets the native interface path, which is writable.

GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/json; PATCH request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Content-Type: application/yang-data+json and body {"description": "WAN-Link-to-R2"}Wrong answer — click to see why

Why this is wrong here

The specific factual error is that the ietf-interfaces model's operational data cannot be modified via PATCH; the writable description is under Cisco-IOS-XE-native. Also, the Accept header should be application/yang-data+json.

Why candidates choose this

Candidates might think the same YANG module can be used for both read and write operations, or they may confuse the Accept and Content-Type headers.

GET request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Content-Type: application/json and body {"description": "WAN-Link-to-R2"}Wrong answer — click to see why

Why this is wrong here

The specific factual error is that the GET request should use ietf-interfaces for operational data, and the PATCH request should use the native model with correct Content-Type.

Why candidates choose this

Candidates might assume the native model is always the correct path, or they may incorrectly set the Content-Type to application/json instead of application/yang-data+json.

GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Content-Type: application/json and body {"Cisco-IOS-XE-native:description": "WAN-Link-to-R2"}Wrong answer — click to see why

Why this is wrong here

The specific factual error is that the Content-Type header must be application/yang-data+json, not application/json, to indicate the payload is YANG-encoded JSON.

Why candidates choose this

Candidates might think application/json is acceptable because the data is in JSON format, but RESTCONF requires the specific media type application/yang-data+json.

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: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Detailed technical explanation

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

Key takeaway

NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.

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.

Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related 200-301 NAT questions on configuration and troubleshooting.

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.

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 — Static NAT maps one inside address to one outside address..

What is the correct answer to this question?

The correct answer is: GET request to /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0/0 with Accept: application/yang-data+json; PATCH request to /restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0/0/0 with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:description": "WAN-Link-to-R2"} — The GET request correctly uses the ietf-interfaces YANG path and Accept header to retrieve the interface operational data. The PATCH request fails because it attempts to modify 'description' under the ietf-interfaces model, which is read-only for operational data; the writable 'description' is under Cisco-IOS-XE-native:native/interface/GigabitEthernet. The correct PATCH URI targets the Cisco-IOS-XE-native YANG module path, and the Content-Type must be application/yang-data+json. The 400 error indicates a mismatch between the YANG path in the URI and the data payload.

What should I do if I get this 200-301 question wrong?

Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related 200-301 NAT questions on configuration and troubleshooting.

What is the key concept behind this question?

Static NAT maps one inside address to one outside address.

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