nextdhcp

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 2 Imported by: 0

README

NextDHCP

A DHCP server that chains middlewares. Similar to Caddy and CoreDNS

Build Status codecov Go Report Card GitHub release (latest by date)

NextDHCP is an easy to use and extensible DHCP server that chains plugins. It's based on the Caddy server framework and is thus similar to Caddy and CoreDNS.

Getting Started

The following instructions will get you a local copy of the project for development and testing purposes. For production deployments please refer to the documentation hosted on the project website nextdhcp.io. Note that this project is still in early alpha and may not yet be considered stable.

Prerequisites

In order to install, hack and test NextDHCP you need a working Go environment. Since this project already adapted go modules you should use at least version 1.12. For testing it is also recommended to have at least one virtual machine available.

Installing

If you just want to install NextDHCP without planning to hack around in it's source code the following command should be enough to install it

go get github.com/nextdhcp/nextdhcp

This will install the NextDHCP binary into $GOPATH/bin. If you want to start hacking on the project follow the steps below:

First clone the repository to a folder of your choice

git clone https://github.com/nextdhcp/nextdhcp

Finally, enter the directory and build NextDHCP

cd nextdhcp
go generate ./...
go build -o nextdhcp ./
Usage

Before starting NextDHCP you need to create a configuration file. See Dhcpfile for an example.

192.168.0.1/24 {
    lease 1h
    range 192.168.0.100 192.168.0.200
    option router 192.168.0.1
    next-server 10.1.1.1
}

Next, we need to start the DHCP server as root:

sudo ./nextdhcp 

For a list of supported plugins please checkout the content of the plugin directory.

Plugins

  • log - configure log output and level
  • database - the lease database to use. Defaults to the builtin bbolt
  • ifname - sets the network interface a given subnet should be served on
  • lease - configures the lease time
  • nextserver - advertise a TFTP boot server
  • option - configure any DHCP options
  • ranges - lease IP addresses from pre-defined IP ranges
  • servername - sets the server hostname on DHCP messages
  • static - lease static IP addresses to clients based on their MAC address
  • gotify - send push notifications for IP address leases and DHCP requests via gotify

Versioning

We use SemVer for versioning. For all versions available, see the tags on this repository or checkout the release page.

Authors

  • Patrick Pacher - Initial work - ppacher

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Thank you

This project could not have been built without the following libraries or projects. They are either directly used in NextDHCP or provided a lot of inspiration for the shape of the project:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
log
matcher
Package matcher provides a simple "rule" language that may be used inside NextDHCP plugin directives.
Package matcher provides a simple "rule" language that may be used inside NextDHCP plugin directives.
log
lua

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL