Coder Social home page Coder Social logo

dhcp-relay's Introduction

DHCPv4-Relay (opinionated Golang implementation).

This repository contains a DHCPv4 Relay agent written in Go (Golang). This relay agent listens for DHCPv4 requests and forwards them to the specified DHCPv4 server. The application is specially tailored to work in Kubernetes clusters using the hostNetwork container option but can also operate in any other Linux based environment.

Features

  • Listens to traffic on all interfaces without specifically binding to them.
  • No restarts on interface changes.
  • Supports forwarding to the DHCPv4 server via IP address or a dynamic DNS record (K8s Service).
  • Uses BPF to filter out unrelated network traffic in kernel space.
  • Minimalistic design with minimal configuration from CLI.
  • On-demand runtime pprof endpoints availability for on-premises debugging.
  • Requires only CAP_NET_RAW to operate.

Non-features

  • Support for DHCPv6 (DHCP for IPv6).
  • Support for RFC3396 (split options).
  • Explicit list of interfaces to bind to (upstream and/or downstream).
  • Hot reloading for any CLI config options (obviously).
  • Custom interface to range bindings via Link Selection sub-option.
  • Full support for chained DHCPv4-Relay setups (point your relays directly to DHCP Server).

Minimal operation expectations

  • Linux kernel with AF_PACKET, BPF support.
  • CAP_NET_RAW.
  • Network connectivity to DHCPv4 server (and relayed clients).
  • At least one Global unicast IPv4 address on the receiving network interface.
  • Enough CPU/MEM resources for expected load footprint.

Known Issues and Limitations

  • No-op PacketConn listner on DHCPv4 Server port (Severity: none).
  • Some unrelated network traffic comes through to the application before BPF gets applied to the listening socket (Severity: annoyance).
  • Tested only on linux,amd64 platform (Severity: low).

Additional Documentation & Resources

Contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

dhcp-relay's People

Contributors

dependabot[bot] avatar s3rj1k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

s3rj1k pbasov

dhcp-relay's Issues

Future of the project?

I would like to raise an issue about project future, what plans Mirantis has for it considering the single maintainer is no longer able to maintain the project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.