Oracle Solaris DHCP for AI
You can set up your AI install server to also be an Oracle Solaris DHCP server, or you can set up a separate DHCP server.
If you already have an Oracle Solaris DHCP server set up, you might need to configure it to work with AI.
Set Up a DHCP Server on the AI Install Server
If you do not have a DHCP server set up, you can use the installadm create-service command with the -i and -c options to set up a pool of IP addresses to be used with this install service. See Create an Install Service Including Oracle Solaris DHCP Setup for an example. See also the installadm(1M) man page. The -i option sets up a new DHCP server starting from the specified IP address. The -c option set up the specified number of IP addresses in the DHCP table.
Set Up a Separate DHCP Server
If you want to set up a separate Oracle Solaris DHCP server, see Part II, DHCP, in System Administration Guide: IP Services. Then continue with the configuration for AI described in Configure an Existing DHCP Server for AI.
Configure an Existing DHCP Server for AI
If you do not use the -i and -c options, the installadm create-service command provides some instructions for you to configure DHCP. This section provides additional information about configuring DHCP for AI.
Configure the Netmasks Table
Ensure that the DHCP server's netmasks table has correct entries for any networks for which it will be providing DHCP service.
# cat >>/etc/netmasks
192.168.0.0 255.255.255.0
CTRL+D
# getent netmasks 192.168.0.0
192.168.0.0 255.255.255.0
Initialize the DHCP Server Service
Run dhcpconfig(1M) to initialize the DHCP SMF service. The following command creates a file-based repository and a host macro with a default lease of one day. This command also enables the svc:/network/dhcp-server SMF service.
# /usr/sbin/dhcpconfig -D -r SUNWfiles -p /var/dhcp
# dhtadm -P
Name Type Value
==================================================
example-host Macro :Include=Locale:DNSdmain="example.com":DNSserv=192.168.0.1:
Locale Macro :UTCoffst=-25200:
Add Network Information Macros and Tables
To add the macros for each site network, use dhcpconfig to add the site macro and populate network tables. The -t option gives the router for this network. You can use this to also add new network information to DHCP servers hosting existing networks.
# dhcpconfig -N 192.168.0.1 -m 255.255.255.0 -t 192.168.0.1
Create and Add a DHCP Macro for AI
To configure your Oracle Solaris DHCP server for use with AI, create a DHCP macro and use dhtadm to add the macro to the DHCP configuration table, dhcptab(4). See the sample installadm create-service output in Create an Install Service Without DHCP Setup.
The first macro created for an architecture is the default for all clients of that architecture.
Assign Client IP Addresses
Assign client IP addresses if needed.
Use the pntadm(1M) command to add networks to the DHCP network table, dhcp_network(4).
Verify network tables:
# pntadm -L
Give the Client a DHCP Lease
Give the client a DHCP lease and set its DHCP macro to use the correct AI install image. Run the commands in this section on the DHCP server.
Provision the DHCP Lease
The -i option of the pntadm command is the ID of the client to be installed. The -m option specifies the name of this macro. In this example, the name of the macro is the same as the MAC address of the client. This ensures you have only one lease per host.
# pntadm -A 192.168.0.2 -i 01C0FFEEC0FFEE -m 01C0FFEEC0FFEE \
-f "PERMANENT+MANUAL" 192.168.0.0
Check That the Lease Is There
The Flags value 03 represents PERMANENT+MANUAL: The lease is permanent and the DHCP server cannot allocate a different address to the client.
# pntadm -P 192.168.0.0 | grep 01C0FFEEC0FFEE
Client ID Flags Client IP Server IP Lease Expiration Macro Comment
01C0FFEEC0FFEE 03 10.41.30.42 172.30.95.10 Forever 01C0FFEEC0FFEE
Provision the Macro
# dhtadm -g -A -m 01COFFEECOFFEE \
-d ":Include=`uname -n`:BootSrvA=192.168.0.1:BootFile=install_test_ai_x86:"
Check That the New Macro Is in the Table
# dhtadm -P |grep 01C0FFEEC0FFEE
01C0FFEEC0FFEE Macro :Include=example-host:BootSrvA=192.168.0.1:BootFile="install_test_ai_x86":