Skip to content

Instantly share code, notes, and snippets.

@packetninja
Created April 21, 2016 09:59
Show Gist options
  • Save packetninja/b1f5656828fbe5157dbc0d96ba07db05 to your computer and use it in GitHub Desktop.
Save packetninja/b1f5656828fbe5157dbc0d96ba07db05 to your computer and use it in GitHub Desktop.
{{ header_tmpl }}
{%- set dhcpvars = dhcp -%}
#
# dhcpd.conf
#
authoritative;
allow booting;
allow bootp;
default-lease-time 86400;
max-lease-time 604800;
log-facility local7;
ddns-update-style none;
#
# Options
#
option domain-name "cl-management.local";
option domain-name-servers 172.30.1.1;
option cumulus-provision-url code 239 = text;
#
# Subnets
#
subnet 172.30.1.0 netmask 255.255.255.0 {
range 172.30.1.100 172.30.1.200;
option subnet-mask 255.255.255.0;
option routers 172.30.1.1;
option default-url = "http://172.30.1.1/onie-installer";
option cumulus-provision-url "http://172.30.1.1/provisioning.sh";
}
{% for host in dhcpvars.keys() %}
host {{ host }} {
option host-name "{{ host }}";
hardware ethernet {{ dhcpvars[host].mac }};
fixed-address 172.30.1.{{ dhcpvars[host].lastoctet }};
}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment