diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-04-03 15:54:39 +0000 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-04-03 15:54:39 +0000 |
commit | c6e80f7ab8a241f75fab25f14d64ccb6750d6efe (patch) | |
tree | 71d6a531dfa6b60e89ea478fd871775514edeb29 /data | |
parent | df2f99f2db19194ece81141c85e6bbb27cbe24ca (diff) | |
download | vyos-1x-c6e80f7ab8a241f75fab25f14d64ccb6750d6efe.tar.gz vyos-1x-c6e80f7ab8a241f75fab25f14d64ccb6750d6efe.zip |
T6068: T6171: change <fail-over> node from dhcp-server to <high-availability>. Also, add <mode> parameter in order to configure active-active or active-passive behavior for HA.
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/dhcp-server/dhcpd.conf.j2 | 19 |
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 %} |