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
1
vote
1 answer

how to implement netconf + yang c++ server

currently I'm implementing netconf server in c++. I found this site: https://www.appinf.com/docs/poco-2008.2/NetconfUserGuide.html And thought maybe I'll use poco for the purpose, yet I was unable to find the source code in the github repository,…
1
vote
1 answer

Best way to configure a node with NETCONF

I am quite new to Yang and Netconf based configurations. Is there any opensource visualizer or script where it takes Yang files and help me out while creating XML payload to be used by NETCONF to configure the end node ? Currently it is painful…
codingfreak
  • 4,467
  • 11
  • 48
  • 60
1
vote
1 answer

"Wrong document: namespaces not specified" NETCONF error

I have a problem with NETCONF get-config operation to Nexus 7000 with OS version 7.3(1)D1(1). Sent message has xmlns attribute in rpc tag.
Shoner Sul
  • 105
  • 1
  • 12
1
vote
1 answer

ct_netconfc:open/1 raises an "exception error: bad argument"

I wrote this Erlang module: -module(ncclient). -export([open/0]). open() -> Host = {ssh, {192,168,30,11}}, Port = {port, 830}, User = {user, "admin"}, Pass = {password, "admin"}, ct_netconfc:open([Host, Port, User,…
Ariel Otilibili
  • 260
  • 1
  • 6
1
vote
2 answers

Yang module parsing with yangtools failed

I use opendaylight.yangtools to parse Yang Module files in my application, I'd like only get some information, not instantiate or use it. I add to my Maven pom.xml this dependencies :
moly
  • 11
  • 4
1
vote
1 answer

How to update configurations on a NETCONF enabled device?

My device yang is as shown below - module router { yang-version 1; namespace "urn:sdnhub:odl:tutorial:router"; prefix router; description "Router configuration"; revision "2015-07-28" { description "Initial version."; …
1
vote
1 answer

use of remote procedure call in NETCONF

I was reading RFC6241 about netconf, where it's said about RPC as a messaging mechanism of the protocol. However, the spec defines XML for transmitting RPC messages, so I don't quite understand why this is still called RPC? I used to think of RPC as…
Mark
  • 6,052
  • 8
  • 61
  • 129
1
vote
2 answers

Configuring Juniper routers with PHP NETCONF

I'm using the PHP library for NETCONF: https://github.com/Juniper/netconf-php . So far I have managed to get the configuration parts I need for my scripts, but the recent challenge remains loading new configurations into the router. The logs on my…
Beeelze
  • 503
  • 1
  • 9
  • 25
1
vote
1 answer

NETCONF .net/c# implementation

Is anyone familiar with C#/.Net implementation of NETCONF network management protocol? I tried to look at NetConfWiki and couldn't find any .net implementation.
Harel Ashwal
  • 1,520
  • 1
  • 14
  • 11
1
vote
1 answer

Running into xml invalid attribute name for NETCONF python library

I'm using a high level python library ncclient to edit the configuration of a NETCONF device but I run into this error: ValueError: Invalid attribute name u'xmlns:if' I suspect it has something to do with an xml namespace problem since the lxml…
xflave
  • 143
  • 1
  • 1
  • 9
1
vote
2 answers

Unexpected session close error is thrown when connecting netconf

I am using ncclient to connect to the netconf. However when ever i try to connect through python "ncclient.transport.errors.SessionCloseError: Unexpected session close" error is thrown. the code snippet that i am using is given…
Balachandar
  • 1,538
  • 3
  • 16
  • 25
0
votes
0 answers

Custom yang module usage (ConfD_basic 7.8.3)

I have written 3 function get_temperature(),get_ddr() and get_cpu_load() to calculate temperature,ddr usage and cpu load of an ubuntu system.These functions store the value into a structure.I have also written a custom YANG module…
nanthi
  • 11
  • 3
0
votes
1 answer

ncclient Filters Causing RPC reply to be empty

I'm trying to use Netconf on Cisco IOS XE Router This one Here it's Public but Whenever I use a filter on my commands of get_config , edit_config or get I get an error. This is is on Cisco iox XE version 17.3. The get_config command does work if no…
danlged
  • 3
  • 3
0
votes
0 answers

bad arg and connection errors using Netconf-Yang on IOS-XE

I'm working Netconf-Yang for the first time on an IOS-XE device (Cat 9k, 16.8.1r) and I'm sending the following XML block to change an interface description. I'm using ansible netconf_config with these parameters: - name: netconf playbook hosts:…
MrPoulet
  • 91
  • 1
  • 1
  • 6
0
votes
2 answers

Why netconf is not using XML as data modeling language?

We know Netconf uses yang as data modeling language. Also it comprises of XML. Why XML itself is not used as modeling language?. What stops XML as a data modeling language?.
JavaUser
  • 25,542
  • 46
  • 113
  • 139