Course Content
Spanning Tree
An overview of how switches become aware of other switches and prevent loops.
0/2
Multiple Spanning Tree Protocol (MST)
0/1
Advanced OSPF
The (OSPF) protocol scales well with proper network planning. IP addressing schemes, area segmentation, address summarization, and hardware capabilities for each area should considered when designing a network.
0/6
Introduction to Automation Tools  
To provide a high-level overview of some of the most common configuration management and automation tools that are available.
0/3
ENCOR Course
About Lesson

Data Models and Supporting Protocols

Some of the most common data models and associated tools.

High-level overview of some of the most common data models and tools and how they are leveraged in a programmatic approach:

• Yet Another Next Generation (YANG) modeling language

  • Network Configuration Protocol (NETCONF)
  • RESTCONF

YANG Data Models

  • Data models used to describe whatever can be configured, monitored or executed on a device.
  • Data models create a uniform way to describe data across vendor platforms.
  • YANG models use a tree structure. The tree structure represents how to reach a specific element of the model, and the elements can be either configurable or not configurable. Every element has a defined type. For example, an interface can be configured to be on or off.
  • Example 28-5 can be read as follows: There is food. Of that food, there is a choice of snacks. The snack choices are pretzels and popcorn. If it is late at night, the snack choices are two different types of chocolate. A choice must be made to have milk chocolate or dark chocolate, and if the consumer is in a hurry and does not want to wait, the consumer can have the first available chocolate, whether it is milk chocolate or dark chocolate.

YANG Data Models

  • There is a list of interfaces. Of the available interfaces, there is a specific interface that has three configurable speeds.
  • Those speeds are 10 Mbps, 100 Mbps, and auto.

  • The leaf named observed-speed cannot be configured due to the config false command. This is because as the leaf is named, the speeds in this leaf are what was auto-detected (observed); hence,
  • it is not a configurable leaf. It represents the auto-detected value on the interface, not a configurable value.

NETCONF

  • An IETF standard protocol that uses the YANG data models to communicate with the various devices on the network. NETCONF runs over SSH, TLS, and (although not common) SOAP.
  • One of the most important differences is that SNMP can’t distinguish between configuration data and operational data, but NETCONF can. Another key differentiator is that NETCONF uses paths to describe resources, whereas SNMP uses object identifiers (OIDs).
Feature SNMP NETCONF
Resources OIDs Paths
Data Models Defined in MIBs YANG core models
Data modeling language SMI YANG
Management operations SNMP NETCONF
Encoding BER XML,JSON
Transport stack UDP SSH/TCP

A NETCONF path can be similar to interfaces/interface/eth0, which is much more descriptive than what you would expect from SNMP.

  • Collecting the status of specific fields
  • Changing the configuration of specific fields
  • Taking administrative actions
  • Sending event notifications
  • Backing up and restoring configurations
  • Testing configurations before finalizing the transaction

NETCONF

  • Figure 28-15 illustrates how NETCONF uses YANG data models to interact with network devices and then talk back to management applications. The dotted lines show the devices talking back directly to the management applications, and the solid lines illustrate the NETCONF protocol talking between the management applications and the devices.
  • NETCONF exchanges information called capabilities when the TCP connection has been made. Capabilities tell the client what the device it’s connected to can do.
  • Information and configurations are stored in datastores. Datastores can be manipulated by using the NETCONF operations. NETCONF uses Remote Procedure Call (RPC) messages in XML format to send the information between hosts.
NETCONF Operation Description
<get> Requests running configuration and state information of the device
<get-config> Requests some or all of the configuration from a datastore
<edit-config> Edits a configuration datastore by using CRUD operations
<copy-config> Copies the configuration to another datastore
<delete-config> Deletes the configuration

  • NETCONF An example of an OSPF NETCONF RPC message that provides the OSPF routing configuration of an IOS XE device. The same OSPF router configuration that would be seen in the CLI of a router can be seen using NETCONF. The data is just structured in XML format rather than what users are accustomed to seeing in the CLI. It is easy to read the output in these examples because of how legible XML is.

 

RESTCONF

• is used to programmatically interface with data defined in YANG models while also using the datastore concepts defined in NETCONF.

  • RESTCONF uses the same YANG models as
  • NETCONF and IOS XE. The goal of RESTCONF is to provide a RESTful API experience while still leveraging the device abstraction capabilities provided by
  • NETCONF. RESTCONF supports the following HTTP methods and CRUD operations: GET, POST, PUT, DELETE, OPTIONS

 

 

The RESTCONF requests and responses can use either JSON or XML structured data formats.   Example shows a brief example of a RESTCONF GET request on a router to retrieve the logging severity level that is configured. This example uses JSON instead of XML. Notice the HTTP status 200, indicates that the request was successful.

 

 

 

Other useful information:

Join the conversation