How To Connect To Netconf Server Using OpenDaylight Netconf Plugin

The OpenDaylight’s Netconf Southbound Plugin can talk with netconf 1.0,1.1 compatible devices and supports netconf over ssh, chunking and eom framing as defined in

To connecting to an external netconf server using opendaylight netconf plugin, create “04-netconf-devices.xml” in following location:


Note: If there is already a file with number 04, create with 05 and so on.

Edit 04-netconf-devices.xml and paste following text in it:

Now you need to update following information with your device details in above xml:

  1. CHANGE_NAME (at line 7)
  2. CHANGE_PORT (at line 8)
  3. CHANGE_USERNAME (at line 9)
  4. CHANGE_IP_ADDRESS (at line 14)
  5. CHANGE_PASSWORD (at line 20)

Note: There has been a change in configuration subsystem as per this email thread. We need to make corresponding changes to above xml. I haven’t tried it yet – once I will do that, I will update it here. Or if you have given it a try, feel free to provide the updated XML in comments below.

Once this is done, start the opendaylight controller. Using below RESTCONF URL, you should be able to view the device details in inventory:


If you want to add more devices to configuration file, copy paste the module information from line 5 to 29 under <modules> tag and update the device information (name, port, username, ip address, password) as done above.

You can also perform get-config on the device and view the configuration data using below RESTCONF URL:



  1. Adi says

    Thanks a lot for your response – when i tried “http://localhost:8080/restconf/config/opendaylight-inventory:nodes/opendaylight-inventory:node/libnetconfd/yang-ext:mount/”, I got “Mount point does not exist.” on the browser … Im new to this ODL environment and hence may be these dumb Q’s

    Thanks once again

  2. Adi says

    Hello admin

    I did it this time – and i got the below error

    “Mount point does not contain any schema with modules.”



  3. Adi says

    My goal: I would like to make my network device [with netconf] be able to show up on ODL GUI – just the way, the nodes from mini net gets discovered.

    I would really appreciate if I can get the requirements and flow to do this – a procedure … I do see lots of documentation and am reading them but these are scattered everywhere when it comes to my objective …

    Once I’m able to discover my device and communicate … I can build more features upon that

    Thanks a lot in advance



  4. Adi says

    Hello Kanika

    Yes I was able to do so but not sure what was exactly expected. Wish there was a way I could have sent you the page I got back.

    First I got an error “This XML file does not appear to have any style information associated with it. The document tree is shown below.
    ” and then below that, it printed an xml file with the capabilities – not sure. Below, Im pasting what i got,ntp,local-users,crypt-hash-md5,authentication,radius,crypt-hash-sha-512,radius-authentication,crypt-hash-sha-256urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2010-09-24,sftp,file

  5. Adi says

    Hello Kanika

    I agree with you and appreciate your help.
    Let us get the discover part working

    Thanks and Regards


    • Kanika says

      Hi Adi,

      As per the output you have posted above, your netconf device is discovered in controller. You should be able to see it in your controller gui now (http://localhost:8080/)

      Also you can use postman in chrome to see restconf output in json format.


  6. Adi says

    Hello Kanika

    I tried going to http://:8080 as Im not on localhost but i was not able to see the discovered node.

    Is there any way we can get on a chat/email so that we can resolve this faster?

    Appreciate all your help


  7. Adi says

    I enabled debug logging for netconf and below is a snippet of the same. I’m still not seeing the node in the GUI

    &revision=2014-01-23, urn:ietf:params:netconf:capability:rollback-on-error:1.0, urn:ietf:params:xml:ns:yang:ietf-yang-types?m
    012-11-08, urn:ietf:params:netconf:capability:url:1.0?scheme=ftp,sftp,file,
    2014-05-16 10:00:19.517 EDT [pool-29-thread-1] DEBUG o.o.c.s.c.n.NetconfDevice#Atlas7800Adi1 – Update device state transactio
    n DOM-2 putting operational data started.
    2014-05-16 10:00:19.517 EDT [pool-29-thread-1] DEBUG o.o.c.s.c.n.NetconfDevice#Atlas7800Adi1 – Update device state transactio
    n DOM-2 putting operational data ended.
    2014-05-16 10:00:19.520 EDT [pool-29-thread-1] DEBUG o.o.c.s.c.n.NetconfDevice#Atlas7800Adi1 – Update device state transactio
    2014-05-16 10:00:44.663 EDT [http-bio-8080-exec-1] INFO o.o.c.u.internal.UserManager – Local Authentication Succeeded for Us
    er: “admin”
    2014-05-16 10:00:44.665 EDT [http-bio-8080-exec-1] INFO o.o.c.u.internal.UserManager – User “admin” authorized for the follo
    wing role(s): [Network-Admin]

    • Kanika says

      Hi Adi,

      Your device is there in MD-SAL but why controller gui is not showing it I am not sure. I am not sure if some bug has been introduced in latest controller version, I would suggest you to post your issues either on mailing list or – there is a wider audience to resolve your queries.


  8. phani says

    HI kanika / Adi

    I would also like to simulate the same, can you please let me know the netconf server which you guys are using ? Are you using any virtual devices which run netconf server ?


  9. phani says

    Thanks for the prompt reply kanika..
    Have learnt a lot about SDN,ODL from your blog..The tutorials are very informative .

    Will definitely try netopeer and check how it works..

    Which Network devices are netconf enabled ?, I mean real devices supporting (yang/netconf) .


  10. Kanika says

    Thanks phani, glad to hear that tutorials could be of any help :)

    Let me know how it goes with netopeer. Well there are couple of vendor specific devices which support netconf.


  11. phani says


    I could connect the ODL controller to the Netconf server by following the below link .
    And was able to get the config/operational data from the device through the RESTCONF API’s using yang-ext:mount module in RESTCONF URL

    How does the APPS running on the ODL access the Device yang data , IS there a way for which MD-SAL would generate the JAVA interfaces for the Yang models learnt from the device , so that Applications running on the ODL could access the device yang data by implementing the auto generated java classes..

    Does MD-SAL save the device yang models data on any local data store on the controller ?

    Would like to understand the role played by MD_SAL in providing the services for the Applications running on the ODL to access the device yang data..

    Your help is very much appreciated…

    Thanks & Regards

  12. Sachi says


    I am trying to connect remote netconf server to ODL and facing the below issue:

    2014-08-21 12:39:19.114 IST [remote-connector-processing-executor-2] ERROR o.o.c.s.c.netconf.NetconfDevice – RemoteDevice{sachi}: Initialization in sal failed, disconnecting from device
    java.lang.NullPointerException: null
    at org.opendaylight.controller.sal.connect.netconf.NetconfStateSchemas.create( ~[na:na]
    at org.opendaylight.controller.sal.connect.netconf.NetconfStateSchemas.create( ~[na:na]
    at org.opendaylight.controller.sal.connect.netconf.NetconfStateSchemas.access$000( ~[na:na]
    at org.opendaylight.controller.sal.connect.netconf.NetconfStateSchemas$NetconfStateSchemasResolverImpl.resolve( ~[na:na]
    at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$ ~[na:na]
    at org.opendaylight.controller.sal.connect.netconf.NetconfDevice$ ~[na:na]
    at ~[na:1.7.0_55]
    at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.7.0_55]
    at java.util.concurrent.ThreadPoolExecutor$ [na:1.7.0_55]
    at [na:1.7.0_55]
    2014-08-21 12:39:19.115 IST [remote-connector-processing-executor-2] WARN o.o.c.s.c.n.l.NetconfDeviceCommunicator – RemoteDevice{sachi}: Session terminated Session closed

  13. jayasree says

    Hi,in place of name,port,USERNAME,IP_ADDRESS,PASSWORD I made changes and have run the controller.But there was a error
    Unrecognised elements [XmlElement{name='worker-thread-group', namespace='urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf'}, XmlElement{name='boss-thread-group', namespace='urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf'}] in XmlElement{name=’module’, namespace=’urn:opendaylight:params:xml:ns:yang:controller:config’}, errorType=application, errorTag=invalid_value, errorSeverity=error, errorInfo={}}
    So,could you please tell me the port here indicates the port on which controller is running or something else.And is the name mentioned here should be also given to netconf server?.So please tell me what are these parameters i.e name,port,username,ip address,password.
    Thanks and Regards,

  14. Girija Sharan Singh says

    Hi All,

    A very well written blog.
    I am using Lithium release of ODL (Karaf distribution) and am trying to play with my Netconf Server from ODL’s Netconf Connector.
    For this, I have created Netconf Server from Docker image and Netconf Connector as mentioned in this link :

    Being said that, in this blog, you have mentioned that “You can also perform get-config on the device and view the configuration data using below RESTCONF URL:

    But, using this I am not able to do get-config, edit-config (and other Netconf operations).
    Please, do let us know how to do these Netconf operations using RESTCONF URLs.
    Do RESTCONF have such URLs, if yes then what are they,or I have to use NETCONF itself ?

    Thanks and Regards,
    Girija Sharan Singh

  15. Annu says

    Hello Kanika ,

    I found this community very interactive and impressive. And I am the new one to get stuck in this netconf stuff. In hope of getting some suggestion, I am posting this with overview and my target.

    Target : connect ODL to remote netconf server over SSH using dlux UI

    I am trying to connect ODL to remote NECTCONF server named confd with IP over port 830, query its capabilities and fetch some data using some of those capabilities using dlux gui

    Created a VM with Ubuntu 16.04 platform and using ODL-Beryllium as SDN controller

    Steps taken:

    1)Installed Java 8 with “export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64″ appended to ” $ nano .profile”
    2)I installed ODL-Be with odl-netconf-connector-all,odl-restconf–all,odl-netconf-connector-ssh,odl-dlux-all feature installed and activated successfully
    3)created ssh keys. Public ssh key is installed in confd server( please note that the ODL intends to connect to remote server via netconf over ssh, for the same public key of ODL is installed in the remote server)

    mkdir ~/.ssh
    chmod 700 ~/.ssh
    ssh-keygen -t rsa

    Results/verficiation :

    athapa@ubuntu:~$ ssh -v -p 830

    I get connected succesfully

    athapa@ubuntu:~$ ssh -s -p 830 netconf

    all the capabilities of remote device is listed

    But, when I try to spawn a new connector via dlux, with following URL in http://localhost:8181/apidoc/explorer/index.html (under mounted resources, in network-topology:network-topology/topology/topology-netconf/node/controller-config/ :


    with sript:

    “module”: [
    "type": "odl-sal-netconf-connector-cfg:sal-netconf-connector",
    "name": "confd",
    "odl-sal-netconf-connector-cfg:address": "",
    "odl-sal-netconf-connector-cfg:port": 830,
    "odl-sal-netconf-connector-cfg:username": false,
    "odl-sal-netconf-connector-cfg:password": false,
    "odl-sal-netconf-connector-cfg:tcp-only": false,
    "odl-sal-netconf-connector-cfg:event-executor": {
    "name": "global-event-executor",
    "type": "netty:netty-event-executor"
    "odl-sal-netconf-connector-cfg:binding-registry": {
    "name": "binding-osgi-broker",
    "type": "opendaylight-md-sal-binding:binding-broker-osgi-registry"
    "odl-sal-netconf-connector-cfg:dom-registry": {
    "name": "dom-broker",
    "type": "opendaylight-md-sal-dom:dom-broker-osgi-registry"
    "odl-sal-netconf-connector-cfg:client-dispatcher": {
    "name": "global-netconf-dispatcher",
    "type": "odl-netconf-cfg:netconf-client-dispatcher"
    "odl-sal-netconf-connector-cfg:processing-executor": {
    "name": "global-netconf-processing-executor",
    "type": "threadpool:threadpool"
    "odl-sal-netconf-connector-cfg:keepalive-executor": {
    "name": "global-netconf-ssh-scheduled-executor",
    "type": "threadpool:scheduled-threadpool"
    "odl-sal-netconf-connector-cfg:reconnect-on-changed-schema": true


    The code executes successfully and I can see confd node in UI of dulx.But in the topology tab nothing is seen yet

    But when I check in http://localhost:8181/apidoc/explorer/index.html , under controller resources tab, in network topology 2013-07-21, then use following url :

    GET http://localhost:8181/restconf/operational/network-topology:network-topology

    I get following respionse:
    “node-id”: “confd”,
    “netconf-node-topology:host”: “″,
    “netconf-node-topology:port”: 830,
    “netconf-node-topology:connection-status”: “connecting”
    “topology-id”: “flow:1″

    As you can see the status is connecting when I try to connect remote NETCONF via dlux. This is on my nerves from a week now and I have tired everything.

    Kindly suggest.

  16. Aruna says

    Hi Kanika,

    Do you have any documentation on “How To Connect To Netconf Server Using OpenDaylight Netconf Plugin using java apis”

  17. says

    I have to thank you for the efforts you’ve put in writing
    this site. I am hoping to see the same high-grade blog posts from you later on as well.
    In fact, your creative writing abilities has encouraged me to get my own blog now ;)

  18. says

    Definitely imagine that which you said. Your fazvourite justification appeared to be on the net
    the easiest factor to be aware of. I say to you, I certainly get annoyed at
    the same time as other folks consiuder worries that they just don’t recognise about.
    You controlled to hit the nail upin the highest and defined out the entire
    thing without having side-effects , folks could take
    a signal. Will probably be back to get more.


Leave a Reply to Annu Cancel reply

Your email address will not be published. Required fields are marked *