Questions tagged [ietf-netconf]

The NETCONF protocol defines a simple remote procedure call mechanism through which a network device can be managed, configuration data information can be retrieved, and new configuration data can be uploaded and manipulated. Use this tag for questions related to the NETCONF protocol (of any version) and tools that leverage it.

The NETCONF protocol allows the device to expose a full, formal application programming interface (API). Applications can use this straightforward API to send and receive full and partial configuration data sets.

Two versions of the protocol have been published at the time of writing, NETCONF 1.0 and 1.1. The first version was published as RFC4741 and was later obsoleted by RFC6241. Both versions are still in circulation.

The protocol uses a remote procedure call (RPC) paradigm. A client encodes an RPC in XML and sends it to a server using a secure, connection-oriented session. The server responds with a reply encoded in XML. The contents of both the request and the response are fully described in XML DTDs or XML schemas, or both, allowing both parties to recognize the syntax constraints imposed on the exchange.

A typical exchange between a client and server would look like this:

<rpc message-id="101"
     xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
     xmlns:ex="http://example.net/content/1.0"
     ex:user-id="fred">
  <get/>
</rpc>

<rpc-reply message-id="101"
     xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
     xmlns:ex="http://example.net/content/1.0"
     ex:user-id="fred">
  <data>
    <!-- contents here... -->
  </data>
</rpc-reply>

The protocol is conceptually structured into several layers:

         Layer                 Example
    +-------------+      +-----------------+      +----------------+
(4) |   Content   |      |  Configuration  |      |  Notification  |
    |             |      |      data       |      |      data      |
    +-------------+      +-----------------+      +----------------+
           |                       |                      |
    +-------------+      +-----------------+              |
(3) | Operations  |      |  <edit-config>  |              |
    |             |      |                 |              |
    +-------------+      +-----------------+              |
           |                       |                      |
    +-------------+      +-----------------+      +----------------+
(2) |  Messages   |      |     <rpc>,      |      | <notification> |
    |             |      |   <rpc-reply>   |      |                |
    +-------------+      +-----------------+      +----------------+
           |                       |                      |
    +-------------+      +-----------------------------------------+
(1) |   Secure    |      |  SSH, TLS, BEEP/TLS, SOAP/HTTP/TLS, ... |
    |  Transport  |      |                                         |
    +-------------+      +-----------------------------------------+
  1. The Secure Transport layer provides a secure and reliable transport of messages between a client and a server. SSH is the most commonly used protocol for this layer of NETCONF, followed by TLS. RFC6242 and RFC7589 describe how they are utilized as secure NETCONF transport.
  2. The Messages layer provides a mechanism for encoding remote procedure calls (RPCs) and notifications.
  3. The Operations layer defines a set of base protocol operations to retrieve and edit the configuration data.
  4. The Content layer consists of configuration data and notification data.

While the RFC does not specify how Content and Operations layers are modeled, a (initially) NETCONF specific modeling language, called YANG, has been developed for this purpose (see ietf-netmod-yang tag for more information).

Basic NETCONF operations have been standardized and consist of:

  • get
  • get-config
  • edit-config
  • copy-config
  • delete-config
  • lock
  • unlock
  • close-session
  • kill-session
  • validate
  • commit
  • confirmed-commit
  • cancel-commit
  • create-subscription*
  • get-schema*
  • partial-lock*
  • partial-unlock*

*specified in a separate RFCs

Learn more about NETCONF here:

(also the sources of most of the content on this page)

77 questions
0
votes
1 answer

RPC Request for get-schema of bbf(broadband forum) yangs

I am trying below RPC request for module bbf-dot1q-types. but facing error like identifier is not found. Please help me on this to what is the right RPC request for bbf yangs.
sowji
  • 43
  • 1
  • 6
0
votes
1 answer

usage of yang model ietf-routing

I am trying to add config data according to these yang modules: https://github.com/mbj4668/pyang/blob/master/modules/ietf/ietf-routing.yang https://github.com/mbj4668/pyang/blob/master/modules/ietf/ietf-ipv4-unicast-routing.yang I am getting error…
m.divya.mohan
  • 2,261
  • 4
  • 24
  • 34
0
votes
1 answer

Unable to access Yang capabilities via Python ncclient

I have a Cisco CSRv1000 with Cisco XE version 16.8.1a. I have enabled netconf-yang and when i run the command ssh -2 -s admin@172.30.43.115 netconf it displays the YANG on CLI. However if i run the following code on python, it gives an error…
Mervin Hemaraju
  • 1,921
  • 2
  • 22
  • 71
0
votes
1 answer

leaf name and type name can be same in yang

Below example is correct yang statement or not? it is valid by pyang but JNC is unable to process grouping TLId { leaf age { type Age; mandatory true; } } typedef Age { type string { pattern '[0-9][0-9]'; } } Please suggest
0
votes
1 answer

editing 'config false' leaf in YANG

How do I change 'config false' leafs and update the values in my server so when a client make get-config command he will get the updated value? leaf state { type enumeration { enum DISABLED { description "array carrier is not…
0
votes
3 answers

Error "Duplicate namespace in XML input" when retrieving a list over NETCONF using Opendaylight

I am using Opendaylight (release 0.10.1) as NETCONF client to send requests to a Netopeer2 server. My YANG model is a third-party model consisting of several modules which contain, among other attributes, several list elements. This translates into…
0
votes
1 answer

how can i change a yang model into a xml or json file,when there is a union type element?

''' i want to change a yang model into xml, but there is a union type in yang model, and the odl check there is a error in the xml, i don`t known how to solve it ''' ''' the part of yang model leaf prefix { type leafref { …
0
votes
0 answers

How to use pyang module to compile, validate yang operations and sending back command to device

I am working on a project where i have to get yang files from device , edit them and then validate the yang structure and send back command as RPC to the device. I am able to login into device using ncclient on port 830
0
votes
2 answers

ncclient.operations.rpc.RPCError: 'YANG framework' detected the 'fatal' condition 'Operation not supported on this datastore'

I am configuring the hostname of my cisco XR using ncclient. But I am receiving bellow an RPCError- Traceback (most recent call last): File "obj4.py", line 13, in edit_result = device.edit_config(target='running',config=host_name,…
Prarthana Shedge
  • 135
  • 1
  • 3
  • 11
0
votes
1 answer

Starting a subsystem process with sshd on a constrained embedded system

I am trying to get the yuma123 open source implementation of a NETCONF Server running on an embedded Linux system. The NETCONF Server uses sshd, and yuma123 appears to assume that it is the openssh implementation of sshd as it uses the…
NetHead
  • 71
  • 1
  • 10
0
votes
0 answers

How to exclude module name in leaf value of Identityref during ODL validation?

I have YANG model and JSON object which will be verified by ODL (see bellow). I need to exclude module name from JSON to verify. When I exclude module name from identityref ("type": "center-car-sale-type:sedan") and send only identityref name…
0
votes
1 answer

What are the SDK's in C/C++ (Open source) I can use to develop Netconf client and Server

I am looking to develop a client and agent using any open source netconf frameworks. Can anyone please suggest an open source library which is similar like How NetSNMP is there for SNMP.
0
votes
3 answers

Can Netconf protocol be used for monitoring the device data?

I have been using the SNMP to read the object id's for monitoring the network devices. I have come across a protocol called "NetConf" which is used for network configuration. Netconf also provides some API's to read the network device data. Can I be…
0
votes
0 answers

Comparison based default value for a leaf in a same list in yang model

I would like to assign different default value to a leaf according to type of key the list entries take. as an example, although not correct: typedef type-id { type enumeration { enum a{ value 1; } enum b{ value…
yogi
  • 107
  • 1
  • 9
0
votes
2 answers

Opendaylight netconf-testtool build failed

Hi I tried to clone the repository and build the source as mentioned in the opendaylight wiki page. But the build is failing. Link: https://wiki.opendaylight.org/view/OpenDaylight_Controller:Netconf:Testtool#Building_testtool The following are the…
Bala Krishnan
  • 374
  • 3
  • 18