{"id":24780687,"url":"https://github.com/umegbewe/dhcpd","last_synced_at":"2025-03-17T14:15:06.403Z","repository":{"id":273194225,"uuid":"917273951","full_name":"umegbewe/dhcpd","owner":"umegbewe","description":"A fast, reliable DHCP server in Go","archived":false,"fork":false,"pushed_at":"2025-01-19T13:55:12.000Z","size":1060,"stargazers_count":70,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T21:58:05.281Z","etag":null,"topics":["dhcp","dhcp-server","go","networking"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umegbewe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-15T17:21:54.000Z","updated_at":"2025-02-21T10:21:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"445b3c96-70c7-475a-ac15-b39add319f64","html_url":"https://github.com/umegbewe/dhcpd","commit_stats":null,"previous_names":["umegbewe/dhcpd"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umegbewe%2Fdhcpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umegbewe%2Fdhcpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umegbewe%2Fdhcpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umegbewe%2Fdhcpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umegbewe","download_url":"https://codeload.github.com/umegbewe/dhcpd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244047646,"owners_count":20389206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dhcp","dhcp-server","go","networking"],"created_at":"2025-01-29T10:50:27.811Z","updated_at":"2025-03-17T14:15:06.369Z","avatar_url":"https://github.com/umegbewe.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"## dhcpd\n\n`dhcpd` is a dhcp server written in Go. It is designed to be fast, reliable and easy to configure.\n\n## Install\n\nGet binary from [releases](https://github.com/umegbewe/dhcpd/releases) or clone:\n\n```bash\ngit clone https://github.com/umegbewe/dhcpd.git\ncd dhcpd\n```\n\nBuild binary:\n```\nmake build\n```\n\n## Running dhcpd\nCreate a conf.yaml with desired settings, see [example conf.yaml](https://github.com/umegbewe/dhcpd/blob/9c62c723f07d68aabbfd38e76c44ea0534d4c70d/conf.yaml)\n\nStart dhcp server with configuration\n\n```bash\n./dhcpd --conf conf.yaml\n\nINFO[2025-01-03T10:07:47+01:00] [INIT] Set to cleanup expired leases every 120 seconds \nINFO[2025-01-03T10:07:47+01:00] [INIT] Metrics server listening on :9100     \nINFO[2025-01-03T10:07:47+01:00] [INIT] DHCP server listening on 0.0.0.0:67 (interface: eth0, IP: 192.168.100.1)\n....\n```\n\nTest with a client e.g dhcping or dhclient:\n\n\n`dhcpd` is configured to bind to 0.0.0.0 (all interfaces) on port 67 but some client require you to pass an IP address you should pass the interface IP\n\n```bash\nsudo dhcping -v -s 192.168.100.1\n\nGot answer from: 192.168.100.1\n```\n\n```bash\ndhclient -i -v eth0\n\nDHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x14e6f62e)\nDHCPOFFER of 192.168.100.92 from 192.168.100.1\nDHCPREQUEST for 192.168.100.92 on eth0 to 255.255.255.255 port 67 (xid=0x2ef6e614)\nDHCPACK of 192.168.100.92 from 192.168.100.1 (xid=0x14e6f62e)\nbound to 192.168.100.92 -- renewal in 261 seconds.\n```\n\n## Testing\nSee [DEVELOPMENT.md](https://github.com/umegbewe/dhcpd/blob/fce86844b650f8a5d32d83b23cd4144a6176426f/DEVELOPMENT.md) guide on how to test ``dhcpd`` in isolated linux namespaces\n\u003cbr\u003e\n\n\n## About\n`dhcpd` uses [boltdb](https://github.com/etcd-io/bbolt) to maintain leases across restarts or crashes, there is a potential for support swapping lease persistent backends in the future (leases.txt, redis, mysql, postgres etc)\n\u003cbr\u003e\n\n`dhcpd` also provides server and lease metrics, accessible at `:9100/metrics`. Additionally, a sample Grafana dashboard [JSON](https://github.com/umegbewe/dhcpd/blob/699c7546e35768876f2b3d40d43bfb46b5d5f612/grafana/%20dashboard.json) is available for visualizing these metrics.\"\n\n\n\u003cimg src=\"https://github.com/umegbewe/dhcpd/blob/main/grafana/screenshot.png\"\u003e\n\n## Future work\nAt this stage dhcpd works well for development environments and small networks.\n\n* Subnet/scope configuration\n* Vendor specific options\n* Optional embedded web UI/API for managing leases\n* Support other databases for lease persistence\n* Choose allocation straetgies i.e random, sequential or segment (current: sequential)\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumegbewe%2Fdhcpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumegbewe%2Fdhcpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumegbewe%2Fdhcpd/lists"}