[/etc/dhcp/dhcpd.conf line XXX: expect humeric value.Texpecting numeric value.」が出力された時の対応

Linux

[/etc/dhcp/dhcpd.conf line XXX: expect humeric value.Texpecting numeric value.」が出力された時の対応

[/etc/dhcp/dhcpd.conf line XXX: expect humeric value.Texpecting numeric value.」が出力された時の対応方法 (XXXは行数です。)

/etc/dhcp/dhcpd.conf ファイルを編集し、dhcpサービスを再起動したところ、起動しなくなりました。下記は「messages」ファイルに出力されたエラーです

Oct 3 11:35:51 dhon dhcpd: Internet Systems Consortium DHCP Server 419 
Oct 3 11:35:51 dhcp dhcpd: Copyright 2004-2010 Internet Systems Consortium 
Oct 3 11:35:51 dhcp dhcpd: All rights reserved.
Oct 3 11:35:51 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp 
Oct 3 11:35:51 dhcp dhcpd : /etc/dhcp/dhcpd.conf line 301: expecting numeric value. 
Oct 3 11:35:51 dhcp dhcpd: host host111720 { hardware ethernet 94-87-8U-74-6X-99; 
Oct 3 11:35:51 dhcp dhcpd:                                      ^
Oct 3 11:35:51 dhcp dhcpd: /etc/dhcp/dhcpd.conf line 302: expecting numeric value. 
Oct 3 11:35:51 dhcp dhcpd: host host111730 { hardware ethernet 94-87-8U-74-8X-8D; 
Oct 3 11:35:51 dhcp dhcpd:                                      ^
Oct 3 11:35:51 dhcp dhcpd: WARNING: Host declarations are global. They are not limited to the scope you declared them in. 
Oct 3 11:35:51 dhcp dhcpd: Configuration file errors encountered -- exiting available 
Oct 3 11:35:51 dhcp dhcpd:
Oct 3 11:35:51 dhcp dhcpd: This version of ISC DHCP is based on the release available  
Oct 3 11:35:51 dhcp dhcpd: on ftp. isc.org. Features have been added and other changes 
Oct 3 11:35:51 dhcp dhcpd: have been made to the base software release in order to make
Oct 3 11:35:51 dhcp dhcpd: it work better with this distribution.
Oct 3 11:35:51 dhcp dhcpd: Please report for software via the Red Hat Bugzilla site:
Oct 3 11:35:51 dhcp dhcpd:        http://bugzilla.redhat.com
Oct 3 11:35:51 dhcp dhcpd: 
Oct 3 11:35:51 dhcp dhcpd: exiting. 

 

 

原因と対策

ログにも出力されている通り、/etc/dhcp/dhcpd.confファイルの301行目と302行目の2箇所に問題がある事が分かります。「expecting numeric value」は書式が間違っている事を表しています。

今回はマックアドレスをWindows形式の「94-87-8U-74-6X-99」としてしまった事が原因でした。「94:87:8U:74:6X:99」と変更したら問題なく起動しました。







コメント

タイトルとURLをコピーしました