The correct RESTCONF operations use the URI /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with the Accept header set to application/yang-data+json for a GET, followed by a PATCH to the same URI using Content-Type: application/yang-data+json and a body of {"ietf-interfaces:interface":{"duplex":"full"}}, expecting a 204 No Content response. This is correct because RESTCONF requires the YANG module prefix (ietf-interfaces) in the URI path to match the data model exactly, and the media type application/yang-data+json is mandatory for both request and response headers—using application/json instead triggers a 415 Unsupported Media Type error. On the CCNA 200-301 v2 exam, this tests your ability to distinguish between correct YANG paths and header syntax, with a common trap being the use of Cisco-IOS-XE-native:interface/GigabitEthernet0/0, which returns a 404 because it references the wrong module. Remember the memory tip: “PATCH needs the same path, yang-data type, and a 204—no content, no problem.”
CCNA AI and Network Operations Practice Question
This 200-301 practice question tests your understanding of ai and network operations. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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
Which option performs the RESTCONF operations correctly?
R1#show running-config | section interface GigabitEthernet0/0
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.252
duplex auto
speed auto
!
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES NVRAM up up
A
GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"ietf-interfaces:interface":{"duplex":"full"}}; expect 204 No Content.
This option correctly uses the RESTCONF base URI /restconf/data/ with the ietf-interfaces YANG module path. The Accept header is set to application/yang-data+json, and the PATCH request uses the correct Content-Type and JSON body structure. A successful PATCH returns 204 No Content.
B
GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/json; then PATCH same URI with Content-Type: application/json and body {"duplex":"full"}; expect 204 No Content.
Why wrong: This is incorrect because the Accept and Content-Type headers must be application/yang-data+json, not application/json. Using application/json will cause the router to return a 415 Unsupported Media Type error.
C
GET /restconf/data/Cisco-IOS-XE-native:interface/GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:interface":{"duplex":"full"}}; expect 204 No Content.
Why wrong: This is incorrect because the YANG path uses the Cisco-IOS-XE-native module, which is not the correct module for the duplex setting. The ietf-interfaces module should be used. Using the wrong module path will result in a 404 Not Found error.
D
GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"duplex":"full"}; expect 200 OK.
Why wrong: This is incorrect because the JSON body for a PATCH request must include the YANG module prefix and the interface container, not just the leaf. Additionally, a successful PATCH returns 204 No Content, not 200 OK.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"ietf-interfaces:interface":{"duplex":"full"}}; expect 204 No Content.
The correct base URI for RESTCONF is /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0. The Accept header must be application/yang-data+json. If the Content-Type header is incorrect (e.g., application/json), the router will return a 415 Unsupported Media Type error. Using the wrong YANG module path, such as Cisco-IOS-XE-native:interface/GigabitEthernet0/0, will result in a 404 Not Found because the data model does not match. After a successful GET, the PATCH request must include the same URI with Content-Type: application/yang-data+json and a JSON body specifying "duplex": "full". The response should be a 204 No Content if successful.
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 /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"ietf-interfaces:interface":{"duplex":"full"}}; expect 204 No Content.
Why this is correct
This option correctly uses the RESTCONF base URI /restconf/data/ with the ietf-interfaces YANG module path. The Accept header is set to application/yang-data+json, and the PATCH request uses the correct Content-Type and JSON body structure. A successful PATCH returns 204 No Content.
Related concept
Static NAT maps one inside address to one outside address.
✗
GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/json; then PATCH same URI with Content-Type: application/json and body {"duplex":"full"}; expect 204 No Content.
Why it's wrong here
This is incorrect because the Accept and Content-Type headers must be application/yang-data+json, not application/json. Using application/json will cause the router to return a 415 Unsupported Media Type error.
✗
GET /restconf/data/Cisco-IOS-XE-native:interface/GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:interface":{"duplex":"full"}}; expect 204 No Content.
Why it's wrong here
This is incorrect because the YANG path uses the Cisco-IOS-XE-native module, which is not the correct module for the duplex setting. The ietf-interfaces module should be used. Using the wrong module path will result in a 404 Not Found error.
✗
GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"duplex":"full"}; expect 200 OK.
Why it's wrong here
This is incorrect because the JSON body for a PATCH request must include the YANG module prefix and the interface container, not just the leaf. Additionally, a successful PATCH returns 204 No Content, not 200 OK.
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 /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"ietf-interfaces:interface":{"duplex":"full"}}; expect 204 No Content.Correct answer▾
Why this is correct
This option correctly uses the RESTCONF base URI /restconf/data/ with the ietf-interfaces YANG module path. The Accept header is set to application/yang-data+json, and the PATCH request uses the correct Content-Type and JSON body structure. A successful PATCH returns 204 No Content.
✗GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/json; then PATCH same URI with Content-Type: application/json and body {"duplex":"full"}; expect 204 No Content.Wrong answer — click to see why▾
Why this is wrong here
The specific factual error is that RESTCONF requires the media type application/yang-data+json for YANG data, not generic application/json.
Why candidates choose this
Candidates might think that application/json is acceptable because it is a common JSON media type, but RESTCONF mandates the specific yang-data+json subtype.
✗GET /restconf/data/Cisco-IOS-XE-native:interface/GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"Cisco-IOS-XE-native:interface":{"duplex":"full"}}; expect 204 No Content.Wrong answer — click to see why▾
Why this is wrong here
The specific factual error is that the duplex setting is defined in the ietf-interfaces YANG model, not in Cisco-IOS-XE-native. The URI path must match the data model.
Why candidates choose this
Candidates might assume that Cisco-specific modules are required for device configuration, but for standard interface settings like duplex, the IETF model is used.
✗GET /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"duplex":"full"}; expect 200 OK.Wrong answer — click to see why▾
Why this is wrong here
The specific factual errors are: (1) The PATCH body must be structured as {"ietf-interfaces:interface":{"duplex":"full"}} to match the YANG data tree; (2) The success response for PATCH is 204 No Content, not 200 OK.
Why candidates choose this
Candidates might think that sending only the leaf is sufficient and that 200 OK is the standard success response, but RESTCONF uses 204 for successful PATCH and requires the full data path.
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.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this 200-301 question in full detail.
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.
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 /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0 with Accept: application/yang-data+json; then PATCH same URI with Content-Type: application/yang-data+json and body {"ietf-interfaces:interface":{"duplex":"full"}}; expect 204 No Content. — The correct base URI for RESTCONF is /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet0/0. The Accept header must be application/yang-data+json. If the Content-Type header is incorrect (e.g., application/json), the router will return a 415 Unsupported Media Type error. Using the wrong YANG module path, such as Cisco-IOS-XE-native:interface/GigabitEthernet0/0, will result in a 404 Not Found because the data model does not match. After a successful GET, the PATCH request must include the same URI with Content-Type: application/yang-data+json and a JSON body specifying "duplex": "full". The response should be a 204 No Content if successful.
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 →
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.
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.