Getting Started With NETCONF & YANG
Getting Started With NETCONF & YANG
Management
Client YANG model
application
<interfaces> Model definition example:
<interface> list interface {
XML message
<ifIndex>11</ifIndex> key "ifName“;
<ifName>10GE1/0/1.1</ifName> min-elements "0“;
<ifPhyType>10GE</ifPhyType> max-elements “unbounded”;
transmission:
<ifParentIfName>10GE1/0/1 leaf ifName {
</ifParentIfName> config "true“;
<ifNumber>1</ifNumber> type "string“; }
</interface> leaf ifIndex {
</interfaces> config "false“;
</ifm> type "uint32“;
}
}
Server
Similar to SNMP that uses MIB files to model data, NETCONF uses Yet Another Next
Generation (YANG) as a data modeling language to describe the interaction models
between the NETCONF client and server.
CLI
The devices of
Security
different vendors fail
Difficult to risk
to communicate with communicate Telnet connection
each other
Complex in
parsing
The SNMP configuration efficiency is low, and the transaction mechanism is not
supported. Therefore, SNMP is often used for monitoring.
Difficult to deliver
configurations Few MIB objects that support the write operation
No support for the SNMP operations are stateless. Therefore, the operations
transaction
mechanism cannot be interrupted in the case of a configuration failure
Good scalability
Vendors can customize new
Operations layer capabilities to implement specific
On-demand
defines the RPC method functions.
Data types/structures can be
extended.
Automation
Connection-oriented
The connection-oriented transport
layer protocol SSH/SSL is used,
improving security and reliability.
<get>: obtains part or all of the running configuration data and status data from
the <running/> configuration datastore.
<get-config>: obtains configuration data.
<edit-config>: creates, modifies, or deletes configuration data.
<copy-config>: replaces a configuration datastore with the contents of another
complete configuration datastore.
<delete-config>: deletes all data in a non-running configuration datastore.
<lock>: locks the configuration datastore of a device. A locked configuration
datastore cannot be modified by other NETCONF users.
<unlock>: unlocks the configuration datastore of a device.
<close-session>: terminates a NETCONF session gracefully.
<kill-session>: forcibly terminates another NETCONF session.
Service User
If functions are implemented based on YANG models, configuration engineers do not need to
pay attention to the definitions of YANG models and the differences between the YANG
models. The corresponding application automatically parses the YANG model data, shifting the
focus of engineers from device and function differences to user requirements. The engineers
can achieve automatic configuration only by operating the graphical application.
User Service
Engineer Function
Client APP
Adaptation layer
Server
Device of vendor A Device of vendor B
2015-
2002.6 2006.11 2010.10 2011.7 2014
2016
YANG became a
RFC 4771 RFC 6241 mainstream data model
The NETCONF workgroup released the first The NETCONF workgroup released the in the industry.
version of NETCONF, defining the basic second version of NETCONF and
NETCONF framework and operations. This determined the combination with YANG.
version did not clearly define the content layer
but solved some problems raised in RFC 3535.
Client Server
Hello. I support the following capabilities: Hello. I support the following capabilities:
Step 2 Lock the <running/> configuration datastore to avoid conflicts with other clients.
Follow-up procedure Terminate the NETCONF session and tear down the SSH connection.
Abbreviations English