Awesome Open Source
Awesome Open Source


Build Status GoDoc codecov Go Report Card

DHCPv4 and DHCPv6 decoding/encoding library with client and server code, written in Go.

How to get the library

The library is split into several parts:

  • dhcpv6: implementation of DHCPv6 packet, client and server
  • dhcpv4: implementation of DHCPv4 packet, client and server
  • netboot: network booting wrappers on top of dhcpv6 and dhcpv4
  • iana: several IANA constants, and helpers used by dhcpv6 and dhcpv4
  • rfc1035label: simple implementation of RFC1035 labels, used by dhcpv6 and dhcpv4
  • interfaces, a thin layer of wrappers around network interfaces

You will probably only need dhcpv6 and/or dhcpv4 explicitly. The rest is pulled in automatically if necessary.

So, to get dhcpv6 and dhpv4 just run:

go get -u{4,6}


The sections below will illustrate how to use the dhcpv6 and dhcpv4 packages.

See more example code at

Public projects that use it

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (14,405
golang (3,668
dhcp (28

Find Open Source By Browsing 7,000 Topics Across 59 Categories