summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-04 13:56:23 +0200
committerGitHub <noreply@github.com>2024-04-04 13:56:23 +0200
commitd729069c58c0a670e1f57d6d12c57a41e330742b (patch)
tree71d6a531dfa6b60e89ea478fd871775514edeb29 /data
parentdf2f99f2db19194ece81141c85e6bbb27cbe24ca (diff)
parentc6e80f7ab8a241f75fab25f14d64ccb6750d6efe (diff)
downloadvyos-1x-d729069c58c0a670e1f57d6d12c57a41e330742b.tar.gz
vyos-1x-d729069c58c0a670e1f57d6d12c57a41e330742b.zip
Merge pull request #3239 from nicolas-fort/T6068-sag
T6068: T6171: change <fail-over> node to <high-availability>; add <mode> parameter
Diffstat (limited to 'data')
-rw-r--r--data/templates/dhcp-server/dhcpd.conf.j219
1 files changed, 10 insertions, 9 deletions
diff --git a/data/templates/dhcp-server/dhcpd.conf.j2 b/data/templates/dhcp-server/dhcpd.conf.j2
index 639526532..d00837389 100644
--- a/data/templates/dhcp-server/dhcpd.conf.j2
+++ b/data/templates/dhcp-server/dhcpd.conf.j2
@@ -41,19 +41,20 @@ class "ubnt" {
{% endfor %}
{% endif %}
-{% if failover is vyos_defined %}
-# DHCP failover configuration
-failover peer "{{ failover.name }}" {
-{% if failover.status == 'primary' %}
+{% if high_availability is vyos_defined %}
+# DHCP HA configuration
+{% set split_value = '256' if high_availability.mode == 'active-passive' else '128' %}
+failover peer "{{ high_availability.name }}" {
+{% if high_availability.status == 'primary' %}
primary;
mclt 1800;
- split 128;
-{% elif failover.status == 'secondary' %}
+ split {{ split_value }};
+{% elif high_availability.status == 'secondary' %}
secondary;
{% endif %}
- address {{ failover.source_address }};
+ address {{ high_availability.source_address }};
port 647;
- peer address {{ failover.remote }};
+ peer address {{ high_availability.remote }};
peer port 647;
max-response-delay 30;
max-unacked-updates 10;
@@ -215,7 +216,7 @@ shared-network {{ network }} {
pool {
{% endif %}
{% if subnet_config.enable_failover is vyos_defined %}
- failover peer "{{ failover.name }}";
+ failover peer "{{ high_availability.name }}";
deny dynamic bootp clients;
{% endif %}
{% if subnet_config.range is vyos_defined %}