[KD6-DANIR] Lite Kernel DHCPv6 PD and NDP implementation

[KD6-DANIR] Lite Kernel DHCPv6 PD and NDP implementation

Today we are happy to introduce a Lite Kernel DHCPv6 Prefix Delegation and Neighbour Discovery implementation


The kernel in the IoT Router issues a DHCPv6 PD request on its egress interface and obtains a /56 from DHCPv6 PD server. Further it splits multiple /64s out of it and sends RAs with /64 on the ingress interfaces. After clients receive the RA the default route is configured (link-local) address of IoT Requesting Router and /64 prefix is used to configure interface IP address.


DANIR implementation at github:

It is an implementation of draft-shytyi-v6ops-danir-03.txt:

You may want to save the time and just have a look at lite working implementation. We invite you to download the VM (ova format exported from VirtualBox) with custom kernel just to try the KD6-DANIR linux kernel module. DOWLOAD LINK

Demo of this implementation:

The DEMO recorded the virtual machines output on the IoT Router, the Client device behind it, and the DHCPv6-PD server.

Compiled with kernel:

Linux ferby 4.19.4pachedkernel-v2 #7 SMP PREEMPT Fri Aug 23 04:58:09 CEST 2019 x86_64 GNU/Linux


Do not forget to enable ipv6 forwarding on the IoT Router.


Patched kernel.

Problems and solutions:


insmod: ERROR: could not insert module danir.ko: Unknown symbol in module

Errors in the journalctl -f during insmod:

Sep 16 23:48:17 ferby kernel: danir: Unknown symbol rt6_add_dflt_router (err 0)
Sep 16 23:48:17 ferby kernel: danir: Unknown symbol addrconf_prefix_rcv (err 0)


Stock kernel doesn’t expose some functions.
Thus such errors appear. need to add few lines of the code to fix the errors.
Example1: EXPORT_SYMBOL(rt2_add_dflt_router);
Example: EXPORT_SYMBOL(addrconf_refix_rcv);