Kea with NETCONF/YANG hackathon

This page has been created to help organize the upcoming IETF 101 Hackathon in London (17-18 March 2018).

ISC did a similar experiment 2 years ago. We managed to get a very basic configuration (one subnet with one pool) configured over netconf. Back then Kea API was pretty basic, so the only thing we could do was to push whole configuration if anything changed. It was rather cumbersome, but worked.

There were significant issues (iirc it failed if second reconfiguration was attempted, no logging configured, no way to configure control channel, so after reconfig Kea was cutting itself off from future updates, etc.) Nevertheless, we managed to provision configuration to Kea using netconf interface.

  1. Hackathon page. Make sure you register!
  2. Summary of the experiment we did 2 years ago:
  3. The code from that hackathon is here:
  4. There is a draft that defines YANG models for DHCP: draft here:
  5. That draft has a github page here: Issues may be reported there or send to the DHC mailing list:

Hackathon plan

The overall goal is to make Kea configuration changes possible via netconf. We want to at least be able to configure:

  • subnets
  • pools
  • lw4over6 options
  • control channel
  • logging

This is just initial sketch, expect changes!

  1. Review the current state of available tools: netopeer, sysrepo.
  2. Review the current state of the DHCP model.
  3. Review the NETCONF code for Kea. It's 2 years old. A LOT has changed.
  4. Discuss available approaches (plugin, integration with Kea, a separate daemon, etc.)
  5. Architectural discussion, come up with a block design.
  6. Bring up old Kea code to latest version if we decide to reuse it.
  7. Extract the YANG model from the draft and try to load it into netopeer/sysrepo repository.
  8. Start hacking the code!

Initial preparation

  1. Register to hackathon.
  2. Make sure you have as much of the environment set up as possible.
  3. Make sure you have write access to kea-yang repo. Send your github login to Tomek Mrugalski, if needed.
  4. ...

Docker/sysrepo install instructions (thanks to Mislav Novakovic)

# Docker

So for development we use docker (, you can get the official docker images from docker hub with the command:

docker pull sysrepo/sysrepo-netopeer2:latest
docker pull sysrepo/sysrepo-netopeer2:devel

The latest tag is based on the master branche of Sysrepo and it's
dependencies while the devel tag is based on the devel branch.

You can also build them locally with:

docker build -t sysrepo/sysrepo-netopeer2:latest -f Dockerfile .

docker build -t sysrepo/sysrepo-netopeer2:devel -f Dockerfile.devel .

I would recommend using the latest tag/master branch.

The dockerfiles can be used as instructions for installing Sysrepo on
a host machine.

You have dockerfiles for other platforms also:

# Documentation
The official Sysrepo documentation is at:

The most important part is the path addressing (XPath), it's explained

A good start would be to read:

# Examples
A good start are the official Sysrepo examples:

There are two plugin examples at:

For configuration data parsing you can take a look at:

And for operational data handling:

# C++ bindings
The C++ bindings require C++11, an example can be found at:

The C++ bindings are primarily used for other SWIG bindings so that
constrained some design choices but they handle the Sysrepo cleanup
behind the scenes.

For building Sysrepo C++ bindings use the cmake command "cmake
Last modified 7 months ago Last modified on Mar 17, 2018, 9:40:59 AM