[dhcp1 (primary)]---[dhcp2(secondary)]
Install dhcp service on both servers
Configure as the following:
1#Master dhcp server: 192.168.200.10
#vim /etc/dhcpd.conf
failover peer "dhcp" {
primary;
address 192.168.200.10; # local host IP address
port 647; # make sure this port is not used by other programs
peer address 192.168.200.20; # backup host IP address
peer port 647;
max-response-delay 60;
max-unacked-updates 10;
mclt 600;
split 128;
load balance max seconds 3;
}
subnet 192.168.200.0 netmask 255.255.255.0 {
pool {
failover peer "dhcp";
range 192.168.200.100 192.168.200.200;
deny dynamic bootp clients;
}
option routers 192.168.200.2;
}
2#Slave dhcp server: 192.168.200.20
#vim /etc/dhcpd.conf
failover peer "dhcp" {
secondary;
address 192.168.200.20; # local host IP address
port 647; # make sure this port is not used by other
programs
peer address 192.168.200.10; # primary host IP address
peer port 647;
max-response-delay 60;
max-unacked-updates 10;
subnet 192.168.200.0 netmask 255.255.255.0 {
pool {
failover peer "dhcp";
range 192.168.200.100 192.168.200.200;
deny dynamic bootp clients;
}
option routers 192.168.200.2;
}