Created
June 14, 2017 04:58
-
-
Save umardx/ed1ba54037732fdff463c19db7cb5433 to your computer and use it in GitHub Desktop.
DHCP Failover Config File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DHCP Configuration | |
| ====================================================================== | |
| Primary Server | |
| ====================================================================== | |
| #dhcpd.conf | |
| authoritative; | |
| option domain-name "localdomain.dx"; | |
| option domain-name-servers 192.168.10.11, 192.168.10.12; | |
| default-lease-time 600; | |
| max-lease-time 7200; | |
| # fail over configuration | |
| failover peer "dhcp-backup" { | |
| primary; # This is the primary | |
| address 192.168.1.11; # This DHCP Server IP Address | |
| port 647; | |
| peer address 192.168.10.12; # Secondary DHCP Server ip address | |
| peer port 647; | |
| max-response-delay 60; | |
| max-unacked-updates 10; | |
| load balance max seconds 3; | |
| } | |
| subnet 192.168.10.0 netmask 255.255.255.0 { | |
| option domain-name "localdomain.dx"; | |
| option domain-name-servers 192.168.10.11, 192.168.10.12; | |
| option broadcast-address 192.168.10.255; | |
| option routers 192.168.10.1; | |
| pool { | |
| failover peer "dhcp-backup"; | |
| range 192.168.10.201 192.168.10.230; | |
| default-lease-time 6000; | |
| max-lease-time 72000; | |
| } | |
| } | |
| #Static Lease Configuration | |
| host ns1 { | |
| hardware ethernet 00:80:33:c3:EE:AA; | |
| fixed-address 192.168.10.11; | |
| } | |
| ======================================================================= | |
| DHCP Lease Database Check | |
| ======================================================================= | |
| cat /var/lib/dhcpd/dhcpd.leases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ==================================================================================== | |
| Secondary Server | |
| ==================================================================================== | |
| #dhcpd.conf | |
| authoritative; | |
| option domain-name "nlocaldomain.dx"; | |
| option domain-name-servers 192.168.10.11, 192.168.10.12; | |
| default-lease-time 600; | |
| max-lease-time 7200; | |
| # fail over configuration | |
| failover peer "dhcp-backup" { | |
| secondary; # This is the secondary | |
| address 192.168.1.12; # This DHCP Server IP Address | |
| port 647; | |
| peer address 192.168.10.11; # Primary DHCP Server ip address | |
| peer port 647; | |
| max-response-delay 60; | |
| max-unacked-updates 10; | |
| load balance max seconds 3; | |
| } | |
| subnet 192.168.10.0 netmask 255.255.255.0 { | |
| option domain-name "nlocaldomain.dx"; | |
| option domain-name-servers 192.168.10.11, 192.168.10.12; | |
| option broadcast-address 192.168.10.255; | |
| option routers 192.168.10.1; | |
| pool { | |
| failover peer "dhcp-backup"; | |
| range 192.168.10.201 192.168.10.230; | |
| default-lease-time 6000; | |
| max-lease-time 72000; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment