The Network Configuration Protocol
The Network Configuration Protocol (Netconf) provides mechanisms to install, manipulate, and delete the configuration of network devices. It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages. Yang is a data modeling language used with Netconf.
Netconf uses a simple RPC-based (Remote Procedure Call) mechanism to facilitate communication between a client and a server. The client can be a script or application typically running as part of a network manager. The server is typically a network device.
The configuration of features need not be done the traditional way (using CLIs), the client application (controller) reads the Yang model and communicates with the Netconf server (IOS XR) accordingly.
Netconf Sessions and Operations
A Netconf session is the logical connection between a network configuration application and a network device. A device should be capable of supporting multiple sessions and atleast one Netconf session.
Characteristics of a netconf session:
-
Netconf is connection-oriented - SSH is the underlying transport.
-
The netconf client establishes session with the server.
-
Netconf sessions are established with the hello message. Features and capabilities are announced.
-
Sessions can be terminated using the close or kill messages.
Basic Netconf operations:
-
Get configuration <get-config>
-
Get all information <get>
-
Edit configuration <edit-config>
-
Copy configuration <copy-config>
Note
<copy-config> does not support source attribute with “data store” at present.
-
<lock>, <unlock>
-
<kill-session>
-
<close-session>
-
Commit configuration <commit>
The Yang data model
-
Top level nodes and their subtrees
-
Subtrees that augment nodes in other yang models
Example: The aaa Yang model
module: Cisco-IOS-XR-aaa-lib-cfg
+--rw aaa
+--rw accountings
| +--rw accounting* [type listname]
| +--rw type xr:Cisco-ios-xr-string
| +--rw listname xr:Cisco-ios-xr-string
| +--rw rp-failover? Aaa-accounting-rp-failover
| +--rw broadcast? Aaa-accounting-broadcast
| +--rw type-xr? Aaa-accounting
| +--rw method* Aaa-method
| +--rw server-group-name* string
+--rw authorizations
| +--rw authorization* [type listname]
| +--rw type xr:Cisco-ios-xr-string
| +--rw listname xr:Cisco-ios-xr-string
| +--rw method* Aaa-method
| +--rw server-group-name* string
+--rw accounting-update!
| +--rw type Aaa-accounting-update
| +--rw periodic-interval? uint32
+--rw authentications
+--rw authentication* [type listname]
+--rw type xr:Cisco-ios-xr-string
+--rw listname xr:Cisco-ios-xr-string
+--rw method* Aaa-method
+--rw server-group-name* string
Advantages of using the Yang model are:
-
Yang supports programmatic interfaces.
-
Yang supports simplified network management applications.
-
Yang supports interoperability that provides a standard way to model management data.