• 追加された行はこの色です。
  • 削除された行はこの色です。
目次~
#contetns
#contents
**概要 [#b68dbfc7]
ISC DHCPのDHCP Failover Protocolを使用したFailover構成の設定。~
DHCP 2台によるFailover構成を組むことができるが、設定は個々のサーバに格納された設定ファイルに依存するため、設定の同期や再読み込みは別の方式と組み合わせる必要がある。

**構成 [#w3070d91]
DHCPはPrimary / Secondry構成となり、dhcpd.confは専用の設定が必要となる。

**Primary設定 [#c8a02e4b]
-dhcpd.conf
-/etc/dhcp/dhcpd.conf
 ## ---------------------------------
 ##  dhcpd.conf (primary)
 ## ---------------------------------
 ## Date : 2016/04/04
 ## Network : 
 ## 
 
 ## Global setting
 
 ddns-update-style none;
 not authoritative;
 log-facility local6;
 
 ## Failover setting
 failover peer "localnet" {
 failover peer "【Failoverルール名】" {
         primary;
         address 【Primary Server IPaddress】;
         port 519;
         peer address 【Secondry Server IPaddress】;
         peer port 520;
         max-response-delay 60;
         max-unacked-updates 10;
         mclt 300;
         split 128;
         load balance max seconds 3;
 }
 
 include "/etc/dhcp/conf.d/dynamic-lease.conf";
 include "/etc/dhcp/conf.d/static-lease.conf";
 
 # EOF

**Secondry設定 [#o0487043]
-dhcpd.conf
-/etc/dhcp/dhcpd.conf
 ## ---------------------------------
 ##  dhcpd.conf (secondry)
 ## ---------------------------------
 ## Date : 2016/04/04
 ## Network : localnet.asabiya.net
 ## Network : 
 ## 
 
 ## Global setting
 
 ddns-update-style none;
 not authoritative;
 authoritative;
 log-facility local6;
 
 ## Failover setting
 failover peer "localnet" {
 failover peer "【Failoverルール名】" {
         secondary;
         address 【Secondry Server IPaddress】;
         port 519;
         peer address 【Primary Server IPaddress】;
         peer port 520;
         max-response-delay 60;
         max-unacked-updates 10;
         load balance max seconds 3;
 }
 
 include "/etc/dhcp/conf.d/dynamic-lease.conf";
 include "/etc/dhcp/conf.d/static-lease.conf";
 
 # EOF

**動的リースの設定 [#e2743835]
-/etc/dhcp/conf.d/dynamic-lease.conf
 ## ---------------------------------
 ##  dhcpd.conf (dynamic-lease)
 ## ---------------------------------
 ## Date : 2016/04/11
 ## Network : 
 ## 
 
 ## -------------------------
 ##  Dynamic Lease setting
 ## -------------------------
 
 subnet 【ネットワークアドレス】 netmask 【ネットマスク】 {
  pool {
   failover peer "【Failoverルール名】";
   ## IPaddress lease range
   range 【開始アドレス】【終了アドレス】;
   ## IPaddress lease time(Default)
   default-lease-time 3600;
   ## IPaddress lease time(Max)
   max-lease-time 259200;
   ## IPaddress segment rooter address
   option routers 【デフォルトゲートウェイ】;
   ## Domain name
   option domain-name "【ドメイン名】";
   option domain-name-servers 【DNS1】, 【DNS2】,【DNS3】;
   ## Access control
   allow unknown-clients;
   #deny unknown-clients;
  }
 }
 
 
 # EOF

**動作ログ [#i2b4032d]
-Primary (/var/log/dhcpd/dhcpd.log)
 [TIMESTAMP] dhcp01 dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
 [TIMESTAMP] dhcp01 dhcpd: Copyright 2004-2010 Internet Systems Consortium.
 [TIMESTAMP] dhcp01 dhcpd: All rights reserved.
 [TIMESTAMP] dhcp01 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
 [TIMESTAMP] dhcp01 dhcpd: Wrote 11 leases to leases file.
 [TIMESTAMP] dhcp01 dhcpd: Listening on LPF/eth0/00:50:56:80:14:39/192.168.1.0/24
 [TIMESTAMP] dhcp01 dhcpd: Sending on   LPF/eth0/00:50:56:80:14:39/192.168.1.0/24
 [TIMESTAMP] dhcp01 dhcpd: Sending on   Socket/fallback/fallback-net
 [TIMESTAMP] dhcp01 dhcpd: failover peer localnet: I move from recover to startup

-Secondry (/var/log/dhcpd/dhcpd.log)
 [TIMESTAMP] dhcp02 dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
 [TIMESTAMP] dhcp02 dhcpd: Copyright 2004-2010 Internet Systems Consortium.
 [TIMESTAMP] dhcp02 dhcpd: All rights reserved.
 [TIMESTAMP] dhcp02 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
 [TIMESTAMP] dhcp02 dhcpd: Wrote 11 leases to leases file.
 [TIMESTAMP] dhcp02 dhcpd: Listening on LPF/eth0/00:50:56:80:fc:c4/192.168.1.0/24
 [TIMESTAMP] dhcp02 dhcpd: Sending on   LPF/eth0/00:50:56:80:fc:c4/192.168.1.0/24
 [TIMESTAMP] dhcp02 dhcpd: Sending on   Socket/fallback/fallback-net
 [TIMESTAMP] dhcp02 dhcpd: failover peer localnet: I move from recover to startup

**参考 [#ya093934]
[[[Linux][DHCP] ISC DHCPの冗長化設定:http://kometchtech.blog.fc2.com/blog-entry-1209.html]]
~
[[DHCPサーバの2重化(failover)の設定:http://unixservermemo.web.fc2.com/sv/dhcp-failover.htm]]
~


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS