Forge Home

dhcp

Manage the ISC dhcp daemon

134,191 downloads

1,214 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 6.1.0 (latest)
  • 6.0.0
  • 5.0.1
  • 5.0.0
  • 4.0.1
  • 4.0.0
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.1.0
  • 2.0.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Sep 26th 2016
This version is compatible with:
  • , , , , Archlinux

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-dhcp', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-dhcp
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-dhcp --version 1.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/dhcp — version 1.0.1 Sep 26th 2016

DHCP module for Puppet

Installs and manages a DHCP server.

Features

  • Multiple subnet support
  • Host reservations
  • Secure dynamic DNS updates when combined with Bind
  • Can create a dummy (ignored) subnet so that the server can be used only as a helper-address target

Usage

Define the server and the zones it will be responsible for.

class { 'dhcp':
  service_ensure => running,
  dnsdomain      => [
    'dc1.example.net',
    '1.0.10.in-addr.arpa',
  ],
  nameservers  => ['10.0.1.20'],
  ntpservers   => ['us.pool.ntp.org'],
  interfaces   => ['eth0'],
  dnsupdatekey => '/etc/bind/keys.d/rndc.key',
  dnskeyname   => 'rndc-key',
  require      => Bind::Key['rndc-key'],
  pxeserver    => '10.0.1.50',
  pxefilename  => 'pxelinux.0',
  omapi_port   => 7911,
}

dhcp::pool

Define the pool attributes. This example will create a pool, which serves IPs of two different ranges in the same network.

dhcp::pool{ 'ops.dc1.example.net':
  network => '10.0.1.0',
  mask    => '255.255.255.0',
  range   => ['10.0.1.10 10.0.1.100', '10.0.1.200 10.0.1.250' ],
  gateway => '10.0.1.1',
}

dhcp::ignoredsubnet

Define a subnet that will be ignored - useful for making the DHCP server only respond to requests forwarded by switches etc.

dhcp::ignoredsubnet{ 'eth0':
  network => '10.0.0.0',
  mask    => '255.255.255.0',
}

dhcp::host

Create host reservations.

dhcp::host { 'server1':
  comment => 'Optional descriptive comment',
  mac => '00:50:56:00:00:01',
  ip  => '10.0.1.51',
}

parameters

Parameters are available to configure pxe or ipxe

Boot ipxe from pxe. When configured this overrides pxefilename. For more information see ipxe.org.

class { 'dhcp':
  ipxe_filename  => 'undionly.kpxe',
  ipxe_bootstrap => 'bootstrap.kpxe',
  pxeserver      => '10.0.1.50',
}

Contributors

Zach Leslie zach.leslie@gmail.com Ben Hughes git@mumble.org.uk Sam Dunster sdunster@uow.edu.au Garrett Honeycutt gh@learnpuppet.com Matt Kirby mk.kirby@gmail.com