From: Marcin Siodelski Date: Mon, 9 Apr 2018 16:52:09 +0000 (+0200) Subject: [5478] Described hot-standby configuration in the User's Guide. X-Git-Tag: trac5549a_base~34^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b573deaf560f6e609567b12903c31161b2b36799;p=thirdparty%2Fkea.git [5478] Described hot-standby configuration in the User's Guide. --- diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index 340811910c..37b729525e 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -3104,7 +3104,7 @@ both the command and the response. secondary and the backup server, with the only difference that the this-server-name should be set to server2 and server3 - on those servers respectively. + on those servers respectively. { "Dhcp4": { @@ -3182,6 +3182,7 @@ both the command and the response. } + Two hook libraries must be loaded to enable HA: libdhcp_lease_cmds.so and @@ -3327,7 +3328,112 @@ both the command and the response. "192.0.3.200 - 192.0.3.250". - + + +
+ Hot Standby Configuration + The following is the example configuration of the primary server + in the hot standby configuration: + +{ +"Dhcp4": { + + ... + + "hooks-libraries": [ + { + "library": "/usr/lib/hooks/libdhcp_lease_cmds.so", + "parameters": { } + }, + { + "library": "/usr/lib/hooks/libdhcp_ha.so", + "parameters": { + "high-availability": [ { + "this-server-name": "server1", + "mode": "hot-standby", + "heartbeat-delay": 10, + "max-response-delay": 10, + "max-ack-delay": 5, + "max-unacked-clients": 5, + "peers": [ + { + "name": "server1", + "url": "http://192.168.56.33:8080/", + "role": "primary", + "auto-failover": true + }, + { + "name": "server2", + "url": "http://192.168.56.66:8080/", + "role": "standby", + "auto-failover": true + }, + { + "name": "server3", + "url": "http://192.168.56.99:8080/", + "role": "backup", + "auto-failover": false + } + ] + } ] + } + } + ], + + "subnet4": [ + { + "subnet": "192.0.3.0/24", + "pools": [ + { + "pool": "192.0.3.100 - 192.0.3.250", + "client-class": "ha_server1" + } + ], + + "option-data": [ + { + "name": "routers", + "data": "192.0.3.1" + } + ], + + "relay": { "ip-address": "10.1.2.3" } + } + ], + + ... + +} + +} + + + + This configuration is very similar to the load balancing + configuration described , + with a few notable differences. + + The mode is now set to hot-standby, + in which only one server is responding to the DHCP clients. + If the primary server is online, the primary server is responding to + all DHCP queries. The standby server takes over the + entire DHCP traffic when it discovers that the primary is unavailable. + + + In this mode, the non-primary active server is called + standby and that's what the role of the second + active server is set to. + + Finally, because there is always one server responding to the + DHCP queries, there is only one scope ha_server1 + in use within pools definitions. In fact, the client-class + parameter could be removed from this configuration without harm, + because there are no conflicts in lease allocations by different + servers as they do not allocate leases concurrently. The + client-class is left in this example mostly for + demonstration purposes, to highlight the differences between the + hot standby and load balancing mode of operation. +