この節では、AI インストールに必要な情報を提供するように ISC DHCP を構成する方法について説明します。
dhcpd.conf ファイル内に基本的なネットワークを定義します。次の例では、192.168.0.0/24 ネットワークが、2 - 100 の IP アドレスを 192.168.0.1 のルーターとともに提供するように定義されています。
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.100;
option routers 192.168.0.1;
}
同様に、dhcpd.conf ファイルに DNS 情報を追加します。各サブネットに異なる DNS 情報が提供されるようにする場合は、ディレクティブをサブネットブロック内に配置するか、またはディレクティブをファイルの先頭に配置してすべてのサブネットに影響を与えるようにします。
option domain-name "example.com"; option domain-name-servers 192.168.0.1;
AI では、DHCP 内にブートサーバーとブートファイルの設定が必要です。自動インストールのためにクライアントマシンをブートする場合、そのクライアントは、ブートファイルを (AI サーバーから) 取得する場所と、そのブートファイルの名前がわかっている必要があります。これらの情報は、AI サービスを設定するときに、installadm create-service コマンドによって提供されます。次の例は、installadm create-service コマンドからの部分的な出力を示しています。
Boot server IP (BootSrvA) : 192.168.0.1 Boot file (BootFile) : install_test_ai_x86 GRUB Menu (GrubMenu) : menu.lst.install_test_ai_x86
ISC DHCP の用語では、ブートサーバーは next-server ディレクティブであり、ブートファイルは filename ディレクティブです。次の例に示すように、サブネットグループにこれらのディレクティブを追加します。
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.100;
option routers 192.168.0.1;
filename "install_test_ai_x86";
next-server 192.168.0.1;
}
SPARC AI サービスの場合は、BootFile オブジェクトに同じ filename ディレクティブを使用します。SPARC インストールには、next-server (BootSvrA) ディレクティブは必要ありません。
AI を使用して SPARC および x86 マシンの両方をインストールする場合は、ISC DHCP の class ディレクティブを使用して、SPARC クライアントにはブートファイル情報を提供し、x86 クライアントにはブートファイルとブートサーバーの情報を提供します。ブート固有の情報を個別の class ディレクティブで提供すると、ネットワーク上のアーキテクチャーごとにデフォルトのサービスを設定できます。
次の例は、x86 ハードウェアブートの class 定義です。
class "PXEBoot" {
option dhcp-class-identifier "PXEClient";
filename "install_test_ai_x86";
next-server 192.168.0.1;
}
次の例は、SPARC ハードウェアブートの class 定義です。SPARC には next-server ディレクティブが必要ないことに注意してください。
class "SPARC" {
match if ( substring (option vendor-class-identifier, 0, 5) = "SUNW." ) and not
( option vendor-class-identifier = "SUNW.i86pc" );
filename "http://192.168.0.1:5555/cgi-bin/wanboot-cgi";
}
これらのクラス定義では、SPARC クライアントはリースを要求して SPARC 固有の情報を取得し、x86 クライアントは x86 に固有の情報を要求して取得します。次の例は、dhcpd.conf ファイル全体を示しています。
# option definitions common to all supported networks...
option domain-name "example.com";
option domain-name-servers 192.168.0.1;
default-lease-time 600;
max-lease-time 86400;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
# This is an easy way to discriminate on SPARC clients
class "SPARC" {
match if ( substring (option vendor-class-identifier, 0, 5) = "SUNW." ) and not
( option vendor-class-identifier = "SUNW.i86pc" );
filename "http://192.168.0.1:5555/cgi-bin/wanboot-cgi";
}
# This is a class to discriminate on PXE booting x86 clients
class "PXEBoot" {
option dhcp-class-identifier "PXEClient";
filename "install_test_ai_x86";
next-server 192.168.0.1;
}
# This is a very basic subnet declaration
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.100;
option routers 192.168.0.1;
}