# dhcpd-multi

> A library to configure a multihome dhcpd server

Latest version **1.0.5** (published 2021-12-29) · BSD license · 0 weekly downloads

## Install

```sh
npm install dhcpd-multi
pnpm add dhcpd-multi
yarn add dhcpd-multi
bun add dhcpd-multi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-12-29 |
| First published | 2021-08-29 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Justin Schwartzbeck |
| Maintainers | justinschw |
| Keywords | dhcp, linux, networking |

## Links

- npm: https://www.npmjs.com/package/dhcpd-multi
- Repository: https://github.com/justinschw/dhcpd-multihome
- Homepage: https://github.com/justinschw/dnsmasq-dhcp#readme
- Issues: https://github.com/justinschw/dhcpd-multihome/issues
- npm.io page: https://npm.io/package/dhcpd-multi

## Dependencies (3)

- [joi](https://npm.io/package/joi.md) ^17.4.2
- [netmask](https://npm.io/package/netmask.md) ^2.0.2
- [systemctl](https://npm.io/package/systemctl.md) 0.2.2

## Recent versions

- 1.0.5 (latest) — 2021-12-29
- 1.0.4 — 2021-09-04
- 1.0.3 — 2021-09-03
- 1.0.2 — 2021-08-29
- 1.0.1 — 2021-08-29
- 1.0.0 — 2021-08-29

## README

# dhcpd-multi
A library to configure a multihome dhcpd server

This basically does what the dhcpd library does, except it allows you to configure for more than one interface. I didn't fork the other one or create a PR simply because I don't want to have to learn typescript.

## Usage
```
// Create an ISC dhcp server for two interfaces
const DHCP = require('dhcpd-multi');

const dhcp = new DHCP({
  defaultLeaseTime: 1200,           // Defaults to 600
  networks: [
    {
      iface: 'eth1',
      subnet: '192.168.4.0',
      domainName: 'example.com',
      nameservers: ['1.1.1.1', '1.1.1.2']
    },
    {
      iface: 'wlan0',
      subnet: '192.168.5.0',
      netmask: '255.255.255.0',     // Defaults to 255.255.255.0
      routers: '192.168.5.1',       // Defaults to first IP in subnet
      beginIP: '192.168.5.2',       // Defaults to second IP in subnet
      endIP: '192.168.5.254',       // Defaults to last IP in subnet
      domainName: 'example1.com',
      nameservers: ['1.1.1.1', '1.1.1.2']
    }
  ]
});

dhcp.deploy().then(() => {
  console.log('DHCP loaded');
}).catch(err => {
  console.error('Failed to load DHCP');
});
```

## Additional options
|Option|Type|Description|Default|
|------|----|-----------|-------|
|defaultLeaseTime|Integer|Default lease time in seconds|600|
|maxLeaseTime|Integer|Maximum lease time in seconds|7200|
|ddnsUpdateStyle|String|ddns-update-style option; see isc-dhcp-server man page |none|
|authoritative|Boolean|This is the authoritative DHCP server on the network|true|

---
_Source: https://npm.io/package/dhcpd-multi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
