OpenDaylight (ODL) – How to connect to a Juniper device

I spent few hours struggling with Opendaylight (ODL) and after lot of trial and error was able to setup ODL and connect it to Juniper MX device.If I could save some frustrating moment for someone , then writing my first blog is definitely will worth the while.

Please leave your feedback and comments.

Before we start:

What is NETCONF:

Network Configuration Protocol (NETCONF) provides a mechanism 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. The NETCONF protocol operations are realized as remote procedure calls (RPCs).

OpenDaylight uses a proper collection of YANG modules to access the device via NETCONF. In this post we will demonstrate how to configure ODL for NETCONF connections to Junos device running 17.4+. (Any older version will NOT work).

Juniper MX-Series– Version 18.1R1.9

ODL Version – Oxygen

Download and Extract the tar.gz to folder of choice. (karaf-0.8.0)

Setup some JAVA memory environment variable

export JAVA_MIN_MEM=32768M (32G)

export JAVA_MAX_MEM=65536M (64G)

Start ODL

cd karaf-0.8.0

 From ODL CLI install the features:

  • odl-restconf-all
  • odl-netconf-connector-allodl-n
  • etconf-clustered-topology

feature:install odl-restconf-all odl-netconf-connector-all odl-netconf-clustered-topology

set system services netconf ssh
set system services netconf rfc-compliant set system services netconf yang-compliant

ODL will not connect without the knob “rfc-compliant”

Once the setup is complete now time to get ball rolling.

Adding Device: (Example : Nemo)

I use CURL to add device but you could use POSTMAN .

curl -u admin:admin -X PUT \  -H ‘content-type: application/xml’ \  -d ‘   Nemo   IP_ADDRESS</host>   830   Nemo   USERNAME   PASSWORD   false   0’

Once device is added it going to take about 10min before it goes from connecting to connected state.

Use postman to view the status.

Method :


Header :

       Key : Accept       Value: application/json

URL : http://ODL_IP:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf


“node”: [
“node-id”: “Nemo”, “netconf-node-topology:unavailable-capabilities”: {},

“netconf-node-topology:host”: IP_ADDRESS”, “netconf-node-topology:connection-status”: “connected”, “netconf-node-topology:port”: 830

ODL is now connected to Juniper device and can be used for configuration of this device or retrieving operational state.

Leave a Reply

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