From f08fe6bfad6f9d044512142f104609d5c092a4f1 Mon Sep 17 00:00:00 2001 From: Brian Freeman Date: Fri, 4 Aug 2017 17:14:28 +0000 Subject: Initial KEA DHCP Hook Change-Id: I21c8184c8845e620400d0c2419b6ff16c7ffecc9 Signed-off-by: Brian Freeman --- vnfs/vCPE/kea-sdnc-notify-mod/README.md | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 vnfs/vCPE/kea-sdnc-notify-mod/README.md (limited to 'vnfs/vCPE/kea-sdnc-notify-mod/README.md') diff --git a/vnfs/vCPE/kea-sdnc-notify-mod/README.md b/vnfs/vCPE/kea-sdnc-notify-mod/README.md new file mode 100644 index 00000000..cee91073 --- /dev/null +++ b/vnfs/vCPE/kea-sdnc-notify-mod/README.md @@ -0,0 +1,68 @@ +# +# kea-sdnc-notify-mod + +Kea module utilizing hooks api to notify SDNC of macaddr, yiaddr, dhcp-msg-name via HTTP POST request. + +# ONAP installation of vDHCP will intall and configure on the vDHCP VM +# +# for local development/testing follow these steps. +# + +# +# install kea on ubuntu +apt-get install kea-dhcp4-server + + +# +# Usage +Install the compiled library from the ./build direction to /usr/local/lib/kea-sdnc-notify.so + +Configure /etc/kea/kea-sdnc-notify.conf using the ./etc example + +Configure /etc/kea/kea-dhcp4.conf usign the ./etc example + +The hook will POST json from the the variables from the DHCP Acknowledgement message to the SDNC "url" in the form of "url+macaddr" +"url": "http://localhost/sdnc.php?macaddr=" + +Example: http://localhost/sdnc.php?macaddr=aa:bb:cc:dd:ee:ff + +In the ONAP installation instead of localhost it will be to either a DMaaP Topic or to SDNC directly. + + +## START DHCP +[as root] +cd /etc/init.d +./kea-dhcp4-server start or +./kea-dhcp4-server restart + +./kea-dhcp4-server stop + +## logs are in +/var/log/kea-dhcp4.log + +## Build requirements +This software has been developed on Ubuntu 16.04. + +apt-get install g++ libcurl4-gnutls-dev libboost-dev kea-dev + +./build.sh + +## Intallation in ONAP +The vdhcp install scripts for ONAP will do the build on the vDHCP VM from these source files and copy the resulting library into /usr/local/lib and the configuration files into /etc/kea + +## Testing locally + +#### USE THIS ON OPENSTACK UBUNTU 16.04 GUEST VM + +Create a veth pair: + +ip link add veth0 type veth peer name veth1 + +ip link set veth0 up && ip link set veth1 up + +ip address add dev veth0 10.3.0.1/24 + +dhclient -d -v veth1 + +dhclient -d -v veth1 -r (to release) + -- cgit 1.2.3-korg