Courseiva
AI and Network OperationsmediumMultiple SelectObjective-mapped

CCNA AI and Network Operations Practice Question

Which two statements about YANG are correct?

⚠ Common exam trap

A common exam trap is mistaking YANG for a routing protocol or a data format. Some candidates incorrectly believe YANG replaces protocols like OSPF for adjacency formation or that it is the same as JSON syntax. This confusion arises because YANG models can be encoded in JSON or XML, but YANG itself is a modeling language, not a transport or routing protocol. Misunderstanding this can lead to selecting incorrect answers that describe YANG as performing routing or neighbor discovery functions, which it does not. Recognizing YANG’s role as a data modeling language avoids this pitfall.

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

It defines structured models for configuration and state data

YANG is a data modeling language used to describe configuration and operational state. It is commonly used with NETCONF and RESTCONF, but it is not itself the transport protocol.

Answer analysis

Option-by-option breakdown

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

  • It defines structured models for configuration and state data

    Why this is correct

    YANG is a data modeling language used to define the hierarchical structure of configuration and operational state data on network devices. It specifies which data is available, its constraints, and how it is organized, independent of any particular protocol. The models written in YANG serve as the authoritative schema for management systems and devices.

  • It is commonly associated with NETCONF and RESTCONF

    Why this is correct

    NETCONF and RESTCONF are network management protocols that rely on YANG modules to define the set of data objects, their relationships, and allowable fields. When a client retrieves or modifies device state, the YANG model dictates the exact XML or JSON structure of the request and response. Thus, YANG provides the schema that these protocols act upon, making them strongly associated.

  • It is a replacement for OSPF adjacency formation

    Why it's wrong here

    OSPF is a dynamic routing protocol that exchanges hello packets to form and maintain adjacencies, and builds link-state databases to compute routes. YANG is not a routing protocol and has no mechanism to send hello messages or calculate routing paths. At best, YANG models can be used to configure OSPF parameters, but they can never replace the protocol's adjacency formation process.

    When this WOULD be correct

    In a question asking which protocol or mechanism is used to form OSPF adjacencies, 'OSPF adjacency formation' would be correct, but YANG is unrelated.

  • It is the same thing as JSON syntax

    Why it's wrong here

    JSON is a lightweight data-interchange syntax that encodes key-value pairs, arrays, and nested objects, whereas YANG is a schema language that defines the semantic meaning, types, and constraints of data. Although YANG data can be serialized using JSON syntax, the YANG model itself is not JSON, and a JSON file without a YANG model lacks formal validation rules. They operate at different layers: YANG defines the rules, JSON represents instances.

    When this WOULD be correct

    If the question were 'Which data serialization format is commonly used with YANG?' then 'JSON' would be a correct answer, as YANG models can be encoded in JSON.

  • It automatically discovers neighbors on a LAN

    Why it's wrong here

    YANG does not send or receive any packets, so it cannot discover neighbors on a LAN. Neighbor discovery is performed by protocols like LLDP, CDP, or IPv6 ND, which exchange messages at Layer 2 or Layer 3. YANG is purely a modeling language that describes data structures; it has no runtime behavior in the data plane.

    When this WOULD be correct

    In a question about protocols that automatically discover neighbors on a LAN, options like LLDP (IEEE 802.1AB) or CDP (Cisco Discovery Protocol) would be correct. For example: 'Which protocol automatically discovers neighboring devices on a LAN?'

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.

It defines structured models for configuration and state dataCorrect answer

Why this is correct

YANG is a data modeling language used to define the hierarchical structure of configuration and operational state data on network devices. It specifies which data is available, its constraints, and how it is organized, independent of any particular protocol. The models written in YANG serve as the authoritative schema for management systems and devices.

It is a replacement for OSPF adjacency formationWrong answer — click to see why

Why this is wrong here

YANG is a data modeling language for configuration and state data, not a routing protocol or replacement for OSPF adjacency formation.

★ When this WOULD be the correct answer

In a question asking which protocol or mechanism is used to form OSPF adjacencies, 'OSPF adjacency formation' would be correct, but YANG is unrelated.

Why candidates choose this

Candidates may confuse YANG with protocols that manage network configurations or operations, mistakenly thinking it replaces routing protocols like OSPF.

It is the same thing as JSON syntaxWrong answer — click to see why

Why this is wrong here

YANG is a data modeling language, not a data serialization format. JSON is one possible encoding for YANG-defined data, but YANG itself is not JSON syntax.

★ When this WOULD be the correct answer

If the question were 'Which data serialization format is commonly used with YANG?' then 'JSON' would be a correct answer, as YANG models can be encoded in JSON.

Why candidates choose this

Candidates may confuse YANG's use of JSON for encoding data with YANG being equivalent to JSON, especially when they see YANG examples represented in JSON syntax.

It automatically discovers neighbors on a LANWrong answer — click to see why

Why this is wrong here

YANG is a data modeling language for configuration and state data, not a protocol for automatic neighbor discovery on a LAN. Neighbor discovery on a LAN is typically performed by protocols like LLDP or CDP.

★ When this WOULD be the correct answer

In a question about protocols that automatically discover neighbors on a LAN, options like LLDP (IEEE 802.1AB) or CDP (Cisco Discovery Protocol) would be correct. For example: 'Which protocol automatically discovers neighboring devices on a LAN?'

Why candidates choose this

Candidates may confuse YANG with protocols that perform discovery because YANG is often used in network automation contexts where devices are discovered, but YANG itself does not perform discovery.

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?”

Visual reference

R1 R2 R3 R4 10 100 10 100 OSPF picks R1→R2→R4 (cost 20) over R1→R3→R4 (cost 200)

Quick reference

Routing Protocol Comparison

ProtocolMetricMax HopsAlgorithmType
RIP v2Hop count15Bellman-FordDistance vector
OSPFCost (bandwidth)UnlimitedDijkstra (SPF)Link state
EIGRPComposite metricUnlimitedDUALHybrid
IS-ISCostUnlimitedDijkstraLink state
BGPPolicy / attributesUnlimitedPath vectorPath vector

RIP's 15-hop limit makes it unsuitable for large networks. OSPF and EIGRP dominate modern enterprise deployments.

About these practice questions

One of 1,389 original 200-301 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.