1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #
- # Gateway DHCP server configuration (Salt managed)
- #
- {%- set sites = salt['pillar.get']('sites', {}) %}
- {%- set te = salt['pillar.get']('te', {}) %}
- {%- set node_config = salt['pillar.get']('nodes:' ~ grains['id']) %}
- {%- set te_prefixes = salt['ffho_net.get_te_prefixes'](te, grains['id'], 'v4') %}
- # The ddns-updates-style parameter controls whether or not the server will
- # attempt to do a DNS update when a lease is confirmed. We default to the
- # behavior of the version 2 packages ('none', since DHCP v2 didn't
- # have support for DDNS.)
- ddns-update-style none;
- log-facility local7;
- default-lease-time 600;
- max-lease-time 3600;
- # Use Anycast DNS server(s)
- option domain-name-servers 10.132.251.53;
- {% for site in node_config.get ('sites', [])|sort %}
- {%- set site_config = sites.get (site) %}
- {%- set site_prefix = site_config.get ('prefix_v4') %}
- {%- set brige_ips = salt['ffho_net.get_node_iface_ips'] (node_config, 'br-' ~ site) %}
- # {{ site }} / {{ site_config.get ('name') }}
- subnet {{ site_prefix.split ('/')[0] }} netmask {{ salt['ffho_net.cidr_to_dotted_mask'](site_prefix) }} {
- pool {
- # monitor: 75% 90% Y {{ grains['nodename'] }}/{{ site }} DHCP pool
- # Use our own IP as gateway for our clients
- option routers {{ brige_ips['v4'][0] }};
- # Range(s) of IPs to lease to clients
- {%- for prefix in te_prefixes|sort %}
- {%- set prefix_config = te_prefixes.get (prefix) %}
- {%- if 'dhcp_range' in prefix_config %}
- range {{ prefix_config.get ('dhcp_range') }};
- {%- endif %}
- {%- endfor %}
- }
- }
- {% endfor %}
- ################################################################################
- # Static DHCP binding for IPs with the mesh #
- ################################################################################
- host suche {
- hardware ethernet b8:27:eb:01:ca:73;
- fixed-address 10.132.3.110;
- }
- host minetest {
- hardware ethernet b8:27:eb:96:17:fb;
- fixed-address 10.132.3.111;
- }
- host zockerbude {
- hardware ethernet 1e:f6:d7:28:a7:76;
- fixed-address 10.132.3.112;
- }
- # RaspPi spiegelt Wikipedia + das Ubuntuuser Wiki (bitpage)
- host wissen {
- hardware ethernet b8:27:eb:c4:f5:d8;
- fixed-address 10.132.3.114;
- }
- # rPi von davediehose, spiegelt OpenWRT repo und Zeuch
- host davesrv {
- hardware ethernet b8:27:eb:50:36:6f;
- fixed-address 10.132.3.115;
- }
- host mumble {
- hardware ethernet b8:27:eb:44:c4:68;
- fixed-address 10.132.3.116;
- }
|