Commit d77150b8 authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK

Fixed dhcp failover

parent 7c6ac927
......@@ -49,11 +49,11 @@ all:
10.7.0.127:
address: 10.7.0.127
peer_address: 10.7.0.128
primary: primary
primary: true
10.7.0.128:
address: 10.7.0.128
peer_address: 10.7.0.127
primary: secondary
primary: false
gateways:
hosts:
10.7.0.57:
......
failover peer "dhcp-failover" {
{{ primary }};
{% if primary %}
primary;
split 255;
{% endif %}
mclt 3600;
address {{ address }};
port 647;
......
......@@ -41,11 +41,13 @@ include "/usr/local/dhcp/generated/{{ list }}.list";
{% for subnet in subnets %}
# Subnet {{ subnet.name }}
subnet subnet.subnet netmask {{ subnet.netmask }} {
subnet {{ subnet.subnet }} netmask {{ subnet.netmask }} {
interface {{ subnet.interface }};
option subnet-mask {{ subnet.netmask }};
option broadcast-address {{ subnet.broadcast }};
{% if 'routers' in subnet %}option routers {{ subnet.routers }};{% endif %}
{% if 'routers' in subnet %}
option routers {{ subnet.routers }};
{% endif %}
option domain-name-servers {{ subnet.dns | join(", ") }};
option domain-name {{ subnet.domain_name }};
deny unknown-clients;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment