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
2
votes
2 answers

Perl - How to make a library specific to individual threads

I am writing a multi threaded script in perl. In which I am using a library Net::Netconf::Manager which inturn uses Net::SSH2. This Net::SSH2(libssh2) doesn't seem to be thread safe when 'shared handles' simulataneously. I quote as in libssh2…
Bala Krishnan
  • 374
  • 3
  • 18
2
votes
1 answer

NETCONF - IOS XE - 16.04.01 cli-config-data throws error

I am trying to execute CLI commands using NETONF RPC in IOS XE 16.04.01. I got the schema for the NETCONF RPC from the device CLI "show netconf schema". Below is the schema specific to edit-config, [0, 1] required 1…
vishnukumar
  • 399
  • 1
  • 3
  • 11
1
vote
0 answers

RFC 6241 interpretation related to file:// URI

The Netconf RFC 6241 provides an example like shown below. file://checkpoint.conf
Ram
  • 301
  • 2
  • 12
1
vote
1 answer

Python Yang on Cisco Routers

I have a Cisco CSR Router with Cisco XE installed. I want to display the YANG capabilities of my router. My code is as follows: main.py from ncclient import manager import xml.etree.ElementTree as ET router = { "host": "10.0.0.1", "port":…
Jake Doeni
  • 23
  • 3
1
vote
4 answers

Modifying a config in Opendaylight

I am needing to modify my Openflow configurations in my Opendaylight (0.11.x sodium) system. I follow the documentation which has helped guide is in creating new configs deleting configs replacing configs but I am not seeing an example or…
E.S.
  • 2,733
  • 6
  • 36
  • 71
1
vote
2 answers

Creating an atomic process for a netconf edit-config request

I am creating a custom system that, when a user submits a netconf edit-config, it will initiate a set of actions in my system that will atomically alter the configuration of our system and then submit a notification to the user of its success or…
E.S.
  • 2,733
  • 6
  • 36
  • 71
1
vote
1 answer

Add data if 'config false' YANG

Can i sent POST(not PUT or PATCH) command if the config statement is false? How? module system { namespace "system:uri"; prefix "sys"; leaf id { config false; type string; } } It's possible to define the leaf as a read-only in…
1
vote
0 answers

How do we convert the augmented yang files to python classes using pyang or any other python library

I have few yang files on the device which include the ietf defined interface yang file (ietf-interfaces.yang) and vendor specific augmented yang file (eci-interfaces-aug.yang) When i use pyang to generate python classes for augmented yang file which…
Muqeed
  • 11
  • 1
1
vote
1 answer

Netconf edit-config

Is this RPC valid? fe-0/0/0
Ram
  • 301
  • 2
  • 12
1
vote
1 answer

Netconf Notifications

RFC 5277 defines notification replay support. Just wondering what customer problems this notification replay can solve? What could be the need to scan through list of past notifications? At any point of time, controllers can always fire "get" RPC…
Ram
  • 301
  • 2
  • 12
1
vote
0 answers

Using postman to access OpenDaylight's REStconf API and configure a YANG Module sitting on a NETCONF Server

I am running OpenDaylight Neon with Postman 7.2.0. I have a NETCONF server sitting on a netopeer2 Docker. Since I can get the operational datastore of the server with GET…
SiSc
  • 163
  • 9
1
vote
1 answer

ncclient: connecting to a NETCONF server

I want use the python library ncclient 0.6.6 with Python 2.7.15 to connect to a NETCONF server (netopeer2) and read out the running config. I tried to follow the example from the manual, running this code in the console: with…
SiSc
  • 163
  • 9
1
vote
0 answers

Python binding to sysrepo gives invalid argument exception

I'm trying to bind some existing Python 2 code with the sysrepo package in OpenWrt. The Python binding uses SWIG to interface with the underlying C/C++. I try to create a YANG object by calling the Session.set_item() function, but I get an…
NetHead
  • 71
  • 1
  • 10
1
vote
0 answers

ODL configuration netconf server fails

I am a newbie to OpenDaylight. I am going to configure an interface through the RESTAPI. Here it is my following…
masoud
  • 31
  • 2
1
vote
0 answers

Catch NETCONF Notification on ONOS

I'm working on SDNs and trying so send data from SB to ONOS and I've used NETCONF as its protocol. is ONOS able to get the message when my NETCONF agent sends notofication? if yes, where does it save the messages and how can I access them?
Majid Roustaei
  • 1,556
  • 1
  • 20
  • 39