Skip to content

Instantly share code, notes, and snippets.

@zxp
Forked from robinsmidsrod/dhcpd.conf
Created June 5, 2013 00:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zxp/5710675 to your computer and use it in GitHub Desktop.
Save zxp/5710675 to your computer and use it in GitHub Desktop.
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
option routers 10.1.1.1;
default-lease-time 3600;
max-lease-time 7200;
option domain-name "smidsrod.lan";
option domain-search "smidsrod.lan";
option domain-name-servers 10.1.1.1;
option netbios-dd-server 10.1.1.2;
option netbios-name-servers 10.1.1.2;
option netbios-node-type 0x8;
option log-servers 10.1.1.2;
option lpr-servers 10.1.1.8;
include "/etc/dhcp/ipxe-green.conf";
}
use-host-decl-names on;
include "/etc/dhcp/static.conf";
allow bootp;
allow booting;
next-server 10.1.1.2; # server.smidsrod.lan
# Disable ProxyDHCP, we're in control of the primary DHCP server
option ipxe.no-pxedhcp 1;
# Make sure the iPXE we're loading supports what we need,
# if not load a full-featured version
if exists ipxe.http and exists ipxe.iscsi
and exists ipxe.bzimage and exists ipxe.pxe
and exists ipxe.elf and exists ipxe.comboot
and exists ipxe.menu {
filename "http://boot.smidsrod.lan/bootstrap.ipxe";
# Still waiting for NFS boot support to be merged
#filename "nfs:nas.smidsrod.lan:/raid/boot:bootstrap.ipxe";
}
elsif exists user-class and option user-class = "iPXE" {
# We're already using iPXE, but not a feature-full version,
# and possibly an out-of-date version from ROM, so load a more
# complete version with native drivers
filename "ipxe.pxe";
}
elsif exists user-class and option user-class = "gPXE" {
# If someone has an old version of gPXE burned into their ROM,
# load a more recent iPXE
filename "ipxe.pxe";
}
else {
# I like to use iPXE-provided drivers, so therefore give ipxe.pxe
# to all non-iPXE clients
filename "ipxe.pxe";
# If not all your hardware is supported by iPXE you might want to use
# UNDI or the more unconvential alternative ipxe.kpxe which includes
# all drivers (including UNDI) and will try to reuse UNDI unless it
# finds a native iPXE driver (this behavior has not been confirmed)
#filename "undionly.kpxe";
#filename "ipxe.kpxe";
}
# Declare the iPXE/gPXE/Etherboot option space
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;
# iPXE options, can be set in DHCP response packet
option ipxe.priority code 1 = signed integer 8;
option ipxe.keep-san code 8 = unsigned integer 8;
option ipxe.skip-san-boot code 9 = unsigned integer 8;
option ipxe.syslogs code 85 = string;
option ipxe.cert code 91 = string;
option ipxe.privkey code 92 = string;
option ipxe.crosscert code 93 = string;
option ipxe.no-pxedhcp code 176 = unsigned integer 8;
option ipxe.bus-id code 177 = string;
option ipxe.bios-drive code 189 = unsigned integer 8;
option ipxe.username code 190 = string;
option ipxe.password code 191 = string;
option ipxe.reverse-username code 192 = string;
option ipxe.reverse-password code 193 = string;
option ipxe.version code 235 = string;
option iscsi-initiator-iqn code 203 = string;
# iPXE feature flags, set in DHCP request packet
option ipxe.pxeext code 16 = unsigned integer 8;
option ipxe.iscsi code 17 = unsigned integer 8;
option ipxe.aoe code 18 = unsigned integer 8;
option ipxe.http code 19 = unsigned integer 8;
option ipxe.https code 20 = unsigned integer 8;
option ipxe.tftp code 21 = unsigned integer 8;
option ipxe.ftp code 22 = unsigned integer 8;
option ipxe.dns code 23 = unsigned integer 8;
option ipxe.bzimage code 24 = unsigned integer 8;
option ipxe.multiboot code 25 = unsigned integer 8;
option ipxe.slam code 26 = unsigned integer 8;
option ipxe.srp code 27 = unsigned integer 8;
option ipxe.nbi code 32 = unsigned integer 8;
option ipxe.pxe code 33 = unsigned integer 8;
option ipxe.elf code 34 = unsigned integer 8;
option ipxe.comboot code 35 = unsigned integer 8;
option ipxe.efi code 36 = unsigned integer 8;
option ipxe.fcoe code 37 = unsigned integer 8;
option ipxe.vlan code 38 = unsigned integer 8;
option ipxe.menu code 39 = unsigned integer 8;
option ipxe.sdi code 40 = unsigned integer 8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment