dhcpd 不具合

dhcp failover の設定をしているのだが secondary 側の dhcpd が落ちてしまい、その結果、クライアントPCは、IPアドレスの取得が出来ないという現象が発生した.

primary 側にて以下のようなログが残っていた.

dhcpd: DHCPDISCOVER from "NIC Addr" via xl0: peer holds all free leases

ログ全体は、こちら.

Aug 17 10:05:44 indy dhcpd: DHCPDISCOVER from xx:xx:xx:1f:8d:ab (4k-noda dell) via xl0: peer holds all free leases
Aug 17 10:05:46 indy dhcpd: DHCPDISCOVER from xx:xx:xx:20:a0:e6 (Sizai-ukeire) via xl0: peer holds all free leases
Aug 17 10:05:46 indy dhcpd: DHCPDISCOVER from xx:xx:xx:89:33:17 via xl0: peer holds all free leases
Aug 17 10:05:47 indy dhcpd: DHCPREQUEST for 192.168.1.160 from xx:xx:xx:34:b9:cb (5k-GX270A) via xl0
Aug 17 10:05:47 indy dhcpd: DHCPACK on 192.168.1.160 to xx:xx:xx:34:b9:cb (5k-GX270A) via xl0
Aug 17 10:05:47 indy dhcpd: DHCPDISCOVER from xx:xx:xx:d6:ec:0f via xl0: peer holds all free leases
Aug 17 10:05:47 indy dhcpd: DHCPDISCOVER from xx:xx:xx:d6:ec:0f via xl0: peer holds all free leases


100台近くのPCが、IPアドレスの取得に失敗している.


しょうがないので dhcpd.conf を書き換えて dhcp failover を解除してから primary 側の dhcpd を再起動して運用を再開した.要は、dhcp failover する前の設定に戻したと言うことだ.


dhcp failover を切った dhcpd.conf は、以下の通り.

# /etc/dhcpd.conf

authoritative;
option domain-name "example.co.jp";
option domain-name-servers a.ns.example.co.jp;
option subnet-mask 255.255.255.0;

### wins conf
## use wins server
option netbios-name-servers wins.example.co.jp;
option netbios-node-type 8; #Hybrid Type
## unuse wins server
#option netbios-node-type 1; #No WINS Type (Broadcast)

### wpad conf
option wpad code 252 = string;

ddns-update-style none;

default-lease-time 43200;
max-lease-time 86400;

### subnet 192.168.1.0
subnet 192.168.1.0 netmask 255.255.255.0{
        range 192.168.1.1 192.168.1.191;
        option routers gate3.example.co.jp;
        option broadcast-address 192.168.1.255;
        option wpad "http://wpad.example.co.jp/proxy.pac";
  }

ちなみに、dhcp failover 時の dhcpd.conf はコチラ.


その際、dhcpd.leases を書き換えていないので、以下のような

Aug 17 10:21:56 indy dhcpd: /var/db/dhcpd/dhcpd.leases line 10: unknown failover
 peer: hoge

という、エラーがでたが無視している.起動時のログ全体は、こちら.

Aug 17 10:21:56 indy dhcpd: Internet Systems Consortium DHCP Server V3.0.4
Aug 17 10:21:56 indy dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Aug 17 10:21:56 indy dhcpd: All rights reserved.
Aug 17 10:21:56 indy dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Aug 17 10:21:56 indy dhcpd: /var/db/dhcpd/dhcpd.leases line 10: unknown failover peer: hoge
Aug 17 10:21:56 indy dhcpd: failover peer "hoge"
Aug 17 10:21:56 indy dhcpd:               ^
Aug 17 10:21:56 indy dhcpd: /var/db/dhcpd/dhcpd.leases line 2279: unknown failover peer: hoge
Aug 17 10:21:56 indy dhcpd: failover peer "hoge"
Aug 17 10:21:56 indy dhcpd:               ^
Aug 17 10:21:56 indy dhcpd: /var/db/dhcpd/dhcpd.leases line 2284: unknown failover peer: hoge
Aug 17 10:21:56 indy dhcpd: failover peer "hoge"
Aug 17 10:21:56 indy dhcpd:               ^
Aug 17 10:21:56 indy dhcpd: Wrote 191 leases to leases file.
ug 17 10:21:56 indy dhcpd: Listening on BPF/xl0/xx:xx:xx:8a:9d:9f/192.168.1/24
Aug 17 10:21:56 indy dhcpd: Sending on   BPF/xl0/xx:xx:xx:8a:9d:9f/192.168.1/24
Aug 17 10:21:56 indy dhcpd: Sending on   Socket/fallback/fallback-net


追記
DHCP Failover は使わない方が良いみたい.

  • DHCP Failoverに関しては、特にIPv4の環境においては、ISCのリリースノートとかRFCドラフトを読んでいる限り、もうこれ以上何らかの改修がされるとも思えないので、ぶっちゃけ採用はやめとけ、ってのが結論なのですが、いかがでしょ。