aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tg19/dhcp/templates
diff options
context:
space:
mode:
authorOle Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com>2019-11-11 22:14:22 +0100
committerOle Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com>2019-11-11 22:14:22 +0100
commitef8122013956d09127c25285fde92b39c4e8af55 (patch)
tree34ce1266ae41d86e9378f481c1afb1e00be9c90c /examples/tg19/dhcp/templates
parent1f190fed23d84fa00559653e868e6be5ff6451aa (diff)
A little TG19 scripts and config
Diffstat (limited to 'examples/tg19/dhcp/templates')
-rw-r--r--examples/tg19/dhcp/templates/dhcpd.conf20
-rw-r--r--examples/tg19/dhcp/templates/dhcpd6.conf17
-rw-r--r--examples/tg19/dhcp/templates/fap_dhcp4.conf14
3 files changed, 51 insertions, 0 deletions
diff --git a/examples/tg19/dhcp/templates/dhcpd.conf b/examples/tg19/dhcp/templates/dhcpd.conf
new file mode 100644
index 0000000..e91d8b5
--- /dev/null
+++ b/examples/tg19/dhcp/templates/dhcpd.conf
@@ -0,0 +1,20 @@
+# Autogenerated dhcpd.conf from gondul
+
+{% for (network, n) in objects["read/networks"].networks|dictsort %}
+{% if n != None and n.subnet4 != None and n.vlan != 666 %}
+# {{network}}
+subnet {{ n.subnet4|networkId }} netmask {{ n.subnet4|netmask }} {
+ range {{ n.subnet4|getFirstDhcpIp }} {{ n.subnet4|getLastDhcpIp }};
+ option subnet-mask {{ n.subnet4|netmask }};
+ option routers {{ n.gw4 }};
+ option domain-name "{{network}}.tg19.gathering.org";
+ ddns-domainname "{{network}}.tg19.gathering.org";
+}
+
+zone {{network}}.tg19.gathering.org {
+ primary 127.0.0.1;
+ key DHCP_UPDATER;
+}
+
+{% endif %}
+{% endfor %}
diff --git a/examples/tg19/dhcp/templates/dhcpd6.conf b/examples/tg19/dhcp/templates/dhcpd6.conf
new file mode 100644
index 0000000..01bca44
--- /dev/null
+++ b/examples/tg19/dhcp/templates/dhcpd6.conf
@@ -0,0 +1,17 @@
+# Autogenerated dhcpd6.conf from gondul
+
+{% for (network, n) in objects["read/networks"].networks|dictsort %}
+{% if n != None and n.subnet6 != None %}
+# {{network}}
+subnet6 {{ n.subnet6|networkId }}/{{ n.subnet6|cidr }} {
+ range6 {{ n.subnet6|networkId }}1000 {{ n.subnet6|networkId }}9999;
+ option domain-name "{{network}}.tg19.gathering.org";
+}
+
+zone {{network}}.tg19.gathering.org {
+ primary 127.0.0.1;
+ key DHCP_UPDATER;
+}
+
+{% endif %}
+{% endfor %}
diff --git a/examples/tg19/dhcp/templates/fap_dhcp4.conf b/examples/tg19/dhcp/templates/fap_dhcp4.conf
new file mode 100644
index 0000000..548d921
--- /dev/null
+++ b/examples/tg19/dhcp/templates/fap_dhcp4.conf
@@ -0,0 +1,14 @@
+{% for (network, n) in objects["read/networks"].networks|dictsort %}{% if n != None and n.subnet4 != None and n.vlan == 666 %}
+# {{network}}
+subnet {{ n.subnet4|networkId }} netmask {{ n.subnet4|netmask }} {
+ option subnet-mask {{ n.subnet4|netmask }};
+ option routers {{ n.gw4 }};
+ pool {
+ range {{ n.subnet4|getFirstFapIP}} {{ n.subnet4|getLastDhcpIp }};
+ allow members of "fap-vendor-class";
+ allow members of "fap-mac";
+ }
+}
+
+{% endif %}
+{% endfor %} \ No newline at end of file