| 1 | = DHCP failover setup = |
| 2 | |
| 3 | == Master server == |
| 4 | {{{ |
| 5 | include "/usr/local/etc/dhcpd-classes.conf"; |
| 6 | |
| 7 | ldap-server "127.0.0.1"; |
| 8 | ldap-port 389; |
| 9 | ldap-username "cn=root,dc=rionet,dc=cz"; |
| 10 | ldap-password "rio33net"; |
| 11 | ldap-base-dn "dc=rionet,dc=cz"; |
| 12 | ldap-method dynamic; |
| 13 | ldap-debug-file "/var/log/dhcp-ldap-startup.log"; |
| 14 | |
| 15 | authoritative; |
| 16 | |
| 17 | subnet 172.25.8.0 netmask 255.255.255.248 { } |
| 18 | |
| 19 | failover peer "dhcp" { |
| 20 | primary; |
| 21 | address 172.25.8.4; # local host IP address |
| 22 | port 647; # make sure this port is not used by other programs |
| 23 | peer address 172.25.8.250; # backup host IP address |
| 24 | peer port 647; |
| 25 | max-response-delay 60; |
| 26 | max-unacked-updates 10; |
| 27 | mclt 7200; |
| 28 | split 128; |
| 29 | load balance max seconds 5; |
| 30 | } |
| 31 | }}} |
| 32 | |
| 33 | == Slave server == |
| 34 | |
| 35 | {{{ |
| 36 | include "/usr/local/etc/dhcpd-classes.conf"; |
| 37 | |
| 38 | ldap-server "127.0.0.1"; |
| 39 | ldap-port 389; |
| 40 | ldap-username "cn=root,dc=rionet,dc=cz"; |
| 41 | ldap-password "rio33net"; |
| 42 | ldap-base-dn "dc=rionet,dc=cz"; |
| 43 | ldap-method dynamic; |
| 44 | ldap-debug-file "/var/log/dhcp-ldap-startup.log"; |
| 45 | |
| 46 | authoritative; |
| 47 | |
| 48 | failover peer "dhcp" { |
| 49 | secondary; |
| 50 | address 172.25.8.250; # local host IP address |
| 51 | port 647; # make sure this port is not used by other programs |
| 52 | peer address 172.25.8.4; # primary host IP address |
| 53 | peer port 647; |
| 54 | max-response-delay 60; |
| 55 | max-unacked-updates 10; |
| 56 | } |
| 57 | |
| 58 | subnet 172.25.8.248 netmask 255.255.255.248 { } |
| 59 | }}} |
| 60 | |