Le protocole DHCP est un service réseau TCP/IP. Il permet aux ordinateurs clients d'obtenir automatique une configuration réseau.
mettre en place de la redondance de serveurs DHCP. La redondance consiste à avoir deux serveurs DHCP, ainsi dans le cas où il y en a un qui tombe en , le second peut assurer la continuité de service.
La redondance de DHCP assure
la répartition de la charge (loadbalancing) Les deux serveurs sont actifs, chacun d’entre eux gère une partie de la plage d’adresses
La continuité de service / failover : Lorsqu’un serveur tombe le second prend le relais est assure la continuité de service.
--------------------------------------------
srv1
---------------------------------------------
--------------install-----------------
apt-get install vim
apt-get install isc-dhcp-server
sudo vi /etc/default/isc-dhcpd-server
--------------isc-dhcpd-server-------
ajouter eth0
INTERFACES="eth0"
:
wq
---------
--------------------------------------------------------------------------------
sudo cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.old
vi /etc/dhcp/dhcpd.conf
-------------
:g/^#/d
--------------------config----------------------
ping-check on;
ping-timeout 2;
deny duplicates;
log-facility local7;
authoritative;
failover peer "titi-over"
{
primary ;
address 192.168.0.1;
port 647;
peer address 192.168.0.2;
peer port 647;
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
split 255;
load balance max seconds 3;
}
subnet 192.168.0.0 netmask 255.255.255.0
{
pool{
failover peer "titi-over";
option routers 192.168.0.254;
option domain-name-servers 192.168.0.254, 8.8.8.8 ;
range 192.168.0.100 192.168.0.199;
option domain-name "titi.lesbontutos.lan";
default-lease-time 28800 ;
max-lease-time 36000 ;
}
}
---------
:wq
--------------------------------fin-config---------------------------
--------log dhcpd
sudo touch /var/log/dhcpd.log
sudo chown syslog:adm /var/log/dhcpd.log
sudo chmod 0640 /var/log/dhcpd.log
Puis ajouter ceci dans le fichier /etc/rsyslog.d/50-default.conf :
local7.* /var/log/dhcpd.log
modifier *.*;auth,authpriv.none;
*.*;auth,authpriv.none;local7.none -/var/log/syslog
-----
sudo -i
/etc/init.d/syslog restart
/etc/init.d/isc-dhcp-server start
-----------------------------------------
srv2
--------------------------------------------
apt-get install vim
apt-get install isc-dhcpd-server
sudo vi /etc/default/isc-dhcpd-server
ajouter eth0
INTERFACES="eth0"
#:wq
sudo cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.old
vi /etc/dhcp/dhcpd.conf
:s/^#/d
-------------config------------------
ping-check on;
ping-timeout 2;
deny duplicates;
log-facility local7;
authoritative;
failover peer "titi-over"
{
secondary;
address 192.168.0.2;
port 647;
peer address 192.168.0.1;
port 647;
max-response-delay 60;
max-unacked-updates 10;
load balance max seconds 3;
}
subnet 192.168.0.0 netmask 255.255.255.0
{
pool{
failover peer "titi-over";
option routers 192.168.0.254;
option domain-name-servers 192.168.0.254, 8.8.8.8;
range 192.168.0.100 192.168.0.199;
option domain-name "titi.lesbontutos.lan";
default-lease-time 28800 ;
max-lease-time 36000 ;
}
}
--------
:wq
------------------find-config---------------
------log dhcp
sudo touch /var/log/dhcpd.log
sudo chown syslog:adm /var/log/dhcpd.log
sudo chmod 0640 /var/log/dhcpd.log
Puis ajouter ceci dans le fichier /etc/rsyslog.d/50-default.conf :
local7.* /var/log/dhcpd.log
modifier *.*;auth,authpriv.none;
*.*;auth,authpriv.none;local7.none -/var/log/syslog
-----
sudo -i
/etc/init.d/rsyslog restart
/etc/init.d/isc-dhcp-server start
-----------------------------------------
Watch video cluster dhcp (failover) online without registration, duration hours minute second in high quality. This video was added by user Aven&CO 07 January 2016, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,472 once and liked it 29 people.