All Projects → coredhcp → Coredhcp

coredhcp / Coredhcp

Licence: mit
Fast, multithreaded, modular and extensible DHCP server written in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Coredhcp

Etcdhcp
A DHCP server backed by etcd
Stars: ✭ 250 (-56.82%)
Mutual labels:  dhcp
forge
ISC Forge is an open source DHCP conformance validation framework, primarily used for testing ISC Kea.
Stars: ✭ 26 (-95.51%)
Mutual labels:  dhcp
pi-ap
Raspberry Pi Access Point: This repo automates the configuration of hostapd, dnsmasq, dhcpcd & wpa_supplicant to transform a Pi into a wireless AP. Requirements: a Pi, an Ethernet cable and a DHCP-enabled port on a router with a 'net connection or a switch connected to this router.
Stars: ✭ 69 (-88.08%)
Mutual labels:  dhcp
ndhc
Privilege-separated secure DHCPv4 client for Linux.
Stars: ✭ 24 (-95.85%)
Mutual labels:  dhcp
net-protocol-over-udp
any application layer protocol base udp (DNS/DHCP/TFTP)
Stars: ✭ 11 (-98.1%)
Mutual labels:  dhcp
noddos
Noddos client
Stars: ✭ 78 (-86.53%)
Mutual labels:  dhcp
Netboot.xyz
Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.
Stars: ✭ 2,753 (+375.47%)
Mutual labels:  dhcp
Sower
Sower is a cross-platform intelligent transparent proxy solution.
Stars: ✭ 391 (-32.47%)
Mutual labels:  dhcp
ipv6-dhclient-script
IPv6 w/ dhclient configuration script (Debian/RedHat-based distros)
Stars: ✭ 68 (-88.26%)
Mutual labels:  dhcp
stork
Stork is a dashboard for BIND 9 and Kea DHCP. It is under active development, with monthly releases. The initial priority is to provide monitoring and troubleshooting support.
Stars: ✭ 53 (-90.85%)
Mutual labels:  dhcp
efi
Ergonomic Rust framework for writing UEFI applications.
Stars: ✭ 44 (-92.4%)
Mutual labels:  dhcp
tentacool
REST API to manage Linux networking via netlink
Stars: ✭ 63 (-89.12%)
Mutual labels:  dhcp
zonemanager
Central DNS/DHCP database with replication to Amazon Route53, BIND, MikroTik routers and other services.
Stars: ✭ 29 (-94.99%)
Mutual labels:  dhcp
bridgeap
Automagically bridge any live interface to any idle interface using NATS, DHCP, and HostAP where applicable
Stars: ✭ 52 (-91.02%)
Mutual labels:  dhcp
systemboot
SystemBoot is a LinuxBoot distribution that works as a system firmware + bootloader, based on u-root
Stars: ✭ 103 (-82.21%)
Mutual labels:  dhcp
Node Dhcp
A DHCP server and client written in pure JavaScript
Stars: ✭ 212 (-63.39%)
Mutual labels:  dhcp
gondul
Network management/monitoring system specialized for temporary events
Stars: ✭ 40 (-93.09%)
Mutual labels:  dhcp
Glass Isc Dhcp
Glass - ISC DHCP Server Interface
Stars: ✭ 486 (-16.06%)
Mutual labels:  dhcp
Dhcp
DHCPv6 and DHCPv4 packet library, client and server written in Go
Stars: ✭ 331 (-42.83%)
Mutual labels:  dhcp
ldhcpd
Light DHCPd -- a DHCP server with a small feature set and a remotely programmable control plane
Stars: ✭ 49 (-91.54%)
Mutual labels:  dhcp

coredhcp

Build Status codecov Go Report Card

Fast, multithreaded, modular and extensible DHCP server written in Go

This is still a work-in-progress

Example configuration

In CoreDHCP almost everything is implemented as a plugin. The order of plugins in the configuration matters: every request is evaluated calling each plugin in order, until one breaks the evaluation and responds to, or drops, the request.

The following configuration runs a DHCPv6-only server, listening on all the interfaces, using a custom server ID and DNS, and reading the leases from a text file.

server6:
    # this server will listen on all the available interfaces, on the default
    # DHCPv6 server port, and will join the default multicast groups. For more
    # control, see the `listen` directive in cmds/coredhcp/config.yml.example .
    plugins:
        - server_id: LL 00🇩🇪ad:be:ef:00
        - file: "leases.txt"
        - dns: 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844

For more complex examples, like how to listen on specific interfaces and configure other plugins, see config.yml.example.

Build and run

An example server is located under cmds/coredhcp/, so enter that directory first. To build a server with a custom set of plugins, see the "Server with custom plugins" section below.

Once you have a working configuration in config.yml (see config.yml.example), you can build and run the server:

$ cd cmds/coredhcp
$ go build
$ sudo ./coredhcp
INFO[2019-01-05T22:28:07Z] Registering plugin "file"
INFO[2019-01-05T22:28:07Z] Registering plugin "server_id"
INFO[2019-01-05T22:28:07Z] Loading configuration
INFO[2019-01-05T22:28:07Z] Found plugin: `server_id` with 2 args, `[LL 00🇩🇪ad:be:ef:00]`
INFO[2019-01-05T22:28:07Z] Found plugin: `file` with 1 args, `[leases.txt]`
INFO[2019-01-05T22:28:07Z] Loading plugins...
INFO[2019-01-05T22:28:07Z] Loading plugin `server_id`
INFO[2019-01-05T22:28:07Z] plugins/server_id: loading `server_id` plugin
INFO[2019-01-05T22:28:07Z] plugins/server_id: using ll 00🇩🇪ad:be:ef:00
INFO[2019-01-05T22:28:07Z] Loading plugin `file`
INFO[2019-01-05T22:28:07Z] plugins/file: reading leases from leases.txt
INFO[2019-01-05T22:28:07Z] plugins/file: loaded 1 leases from leases.txt
INFO[2019-01-05T22:28:07Z] Starting DHCPv6 listener on [::]:547
INFO[2019-01-05T22:28:07Z] Waiting
2019/01/05 22:28:07 Server listening on [::]:547
2019/01/05 22:28:07 Ready to handle requests
...

Then try it with the local test client, that is located under cmds/client/:

$ cd cmds/client
$ go build
$ sudo ./client
INFO[2019-01-05T22:29:21Z] &{ReadTimeout:3s WriteTimeout:3s LocalAddr:[::1]:546 RemoteAddr:[::1]:547}
INFO[2019-01-05T22:29:21Z] DHCPv6Message
  messageType=SOLICIT
  transactionid=0x6d30ff
  options=[
    OptClientId{cid=DUID{type=DUID-LLT hwtype=Ethernet hwaddr=00:11:22:33:44:55}}
    OptRequestedOption{options=[DNS Recursive Name Server, Domain Search List]}
    OptElapsedTime{elapsedtime=0}
    OptIANA{IAID=[250 206 176 12], t1=3600, t2=5400, options=[]}
  ]
...

Plugins

CoreDHCP is heavily based on plugins: even the core functionalities are implemented as plugins. Therefore, knowing how to write one is the key to add new features to CoreDHCP.

Core plugins can be found under the plugins directory. Additional plugins can also be found in the coredhcp/plugins repository.

Server with custom plugins

To build a server with a custom set of plugins you can use the coredhcp-generator tool. Head there for documentation on how to use it.

How to write a plugin

The best way to learn is to read the comments and source code of the example plugin, which guides you through the implementation of a simple plugin that prints a packet every time it is received by the server.

Authors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].