The DHCP server manages a pool of IP addresses for a variety of systems on the subnet, including JavaStation computers. During the boot sequence, the DHCP server delivers to the JavaStation its IP address along with other options that enable the JavaStation to operate on the network.
There are three types of configuration information for DHCP in the Solaris operating environment:
/etc/default/dhcp. A file that defines where the next two tables of information are stored. They can be stored either in files or in NIS+ tables.
DHCP network table. A table that maps IP addresses to all the clients on the subnet. The table is updated dynamically as IP addresses are leased and then returned to the pool. If the table is stored in a file, it is generally stored in /var/dhcp. Its name is the IP address of the (sub)net being served by the DHCP server (example: 129_444_124_0).
DHCP service configuration table (dhcptab). A table containing the DHCP options, symbol definitions, and macros used in composing replies to clients. If this information is stored in a file, the filename is dhcptab and it is generally stored in /var/dhcp/.
Solaris DHCP configuration information is managed using the following command line utilities:
dhtadm
dhcpconfig
pntadm
This section provides guidelines for setting up DHCP configuration information (in files) for JavaStation clients. Complete instructions for setting up a Solaris DHCP server are provided in Chapter 4 of the TCP/IP Data Communication Administration Guide, available at http://docs.sun.com and in the following Solaris man pages:
dhcp(4)
dhcptab(4)
in.dhcpd(1M)
dhtadm(1M)
dhcp_network(4)
dhcpconfig(1M)
pntadm(1M)
The /etc/default/dhcp file defines where DHCP configuration files are located. The following is a sample dhcp file.
# This file controls the defaults for datastore type and location # for the DHCP service. Two directives are currently supported, # RESOURCE and PATH. RESOURCE can be either "files" or "nisplus." # PATH can be a UNIX pathname for "files" resources, or a legal # NIS+ directory for "nisplus" resources. # RESOURCE=files PATH=/var/dhcp
The DHCP network table contains a single entry for each client. Each entry contains the client identifier, the client IP address, the lease time, and other information. The DHCP server updates the network table dynamically as IP addresses are leased or relinquished by the clients.
A full description of the DHCP network table is provided in the dhcp_network(4) man page. The following is an example network table contained in the file /var/dhcp/192_9_100_0.
# /var/dhcp/192_9_100_0 # # Client ID[boxv ]Flags[boxv ]Client IP Addr[boxv ]Server IP Addr[boxv ]Lease Time[boxv ]Macro # 010800208E2091 00 192.9.100.10 129.144.205.69 876425811 elvis 010060972CF0D6 00 192.9.100.11 129.144.205.69 876432501 elvis 0108002087EC88 00 192.9.100.12 129.144.205.69 876507437 elvis 00 00 192.9.100.13 129.144.205.69 0 elvis 00 00 192.9.100.14 129.144.205.69 0 elvis
The DHCP Service Configuration Table contains groups of DHCP options that will be delivered to DHCP clients. For a complete description of this table, refer to the dhcptab(4) man page. Throughout this section this table will be called the dhcptab file.
The DHCP options that can be delivered to JavaStation computers are a subset of all the options supported by the DHCP specification. Some DHCP options are required for a successful JavaStation boot; others are optional.
Table 8-3 lists the DHCP options required in dhcptab to boot JavaStation computers. For your reference, the left column gives the option number as defined in the DHCP specification (RFC 2132), if it exists. The middle column gives the symbol name for the option in the Solaris implementation of DHCP (the name used in dhcptab). See "Sample dhcptab File " to see how these names are used.
Table 8-3 DHCP Options Required to Boot JavaStation computers
DHCP Option Name (Number) |
Symbol Name in Solaris dhcptab File |
Definition |
---|---|---|
N/A (This symbol is a DHCP field, not an option.) |
BootSrvA |
The IP address of the server with the initial boot file (either the booter or JavaOS). See Table 8-6 for more information. |
IP Address Lease Time (51) |
LeaseTim |
The duration of the IP address lease. A value of -1 indicates an infinite lease. After this period of time (expressed in seconds) has expired without being renewed, JavaOS shuts down the networking port. |
Subnet Mask (1) |
Subnet |
The subnet mask. |
Time Server (4) |
Timeserv |
The IP address of a server supporting the RFC 868 time port. |
Domain Name Server (6) |
DNSserv |
The IP addresses of one or more DNS servers. JavaOS queries additional DNS servers if the primary server fails to respond. |
DNS Domain Name (40) |
DNSdmain |
The DNS domain name. |
The options DHCP Message Type (53) and Server Identifier (54) are also required in every DHCP packet. However, these options are provided automatically by the DHCP server and do not need to be specified in dhcptab.
Table 8-4 lists the DHCP options that can be interpreted by the DHCP client during the JavaStation boot sequence but are not necessarily required for the boot sequence.
Table 8-4 Optional DHCP Options for Booting JavaStation computers
DHCP Option Name (Number) |
Symbol Name in Solaris dhcptab File |
Definition |
---|---|---|
Bootfile Name (67) |
Bootfile |
The path name of the initial boot file, which can be a "booter" file or JavaOS. The path name is assumed to be relative to the TFTP root directory. If this option is not provided, the name of the booter is assumed to be the same as the Client Class Identifier shown in Table 8-5 and is assumed to be in the TFTP root directory. See Table 8-6 for more information. |
Root Path (17) |
Rootpath |
The NFS-exported directory containing the JavaOS image. This option is used by the booter to locate JavaOS and by JavaOS to locate a newer image to update the flash. This option is required if you are using the booter method or if flash update is enabled. See Table 8-6 for more information. |
Broadcast Address (28) |
Broadcst |
The network broadcast address. |
Router (3) |
Router |
The IP address of the router to be used by the JavaStation clients. If not given, JavaOS uses router discovery to broadcast for a router. |
N/A (Solaris-specific flag) |
LeaseNeg |
A boolean flag which by its presence tells the DHCP server to renew the leases of clients requesting IP address lease renewal. |
NIS Servers (41) |
NISservs |
If not given, JavaOS broadcasts looking for NIS servers. (This only works if the NIS server is on the same subnet.) |
NIS Domain Name (40) |
NISdmain |
The NIS domain name. |
Vendor-Specific Options (43) |
Symbol names are defined by the user. By convention, use JOScmd1-4 and JOSchksm |
A list of vendor-specific options. See "Vendor-Specific Options". |
See "Sample dhcptab File " for examples of how these options are set in dhcptab.
The DHCP specification enables hardware and software vendors to create their own DHCP options. These options are delivered through the use of the Client Class Identifier option and the Vendor-Specific Options option. If a DHCP client identifies itself as being of a certain class of clients, and the DHCP server has been configured to serve that class of clients, then the DHCP server can respond with a set of options that make sense only to that client type.
Vendor-Specific Options can be used to deliver the JavaOS checksum and JavaOS property settings to the JavaStation during the boot sequence.
The checksum identifies the JavaOS image that is available from a network server and helps determine whether that image is updated in JavaStation flash memory, as described on "Task 4: Update Flash Memory with New JavaOS". For more information, see "Managing the JavaOS Checksum".
JavaOS property settings determine the resources JavaOS uses and other JavaOS attributes. JavaOS properties are described in Chapter 9, Setting JavaOS Properties .
The delivery of Vendor-Specific Options to JavaStation clients works as follows. The DHCP client on the JavaStation (the PROM or JavaOS) includes the JavaStation's Client Class Identifier (DHCP Option #60) in every packet sent to the DHCP server. When the DHCP server receives the Client Class Identifier, it can deliver the JavaOS checksum and/or JavaOS property settings in the Vendor-Specific Options if it has been configured to do so.
The JavaStation's Client Class Identifier is specified in the PROM. Table 8-5 lists the Client Class Identifiers for each JavaStation model.
Table 8-5 JavaStation Client Class Identifiers
JavaStation Model |
Client Class Identifier |
---|---|
Brick model |
SUNW.JDM1 |
Tower model |
SUNW.JSIIep |
See "Sample dhcptab File "" for examples of setting the JavaOS checksum and JavaOS properties in dhcptab. Note, however, that JavaOS properties can be delivered to JavaOS using methods other than the DHCP Vendor-Specific Options. See Chapter 9, Setting JavaOS Properties for more information.
The following sample dhcptab file will supply DHCP options to a variety of clients on a network. Some options are common to all clients. Other options are specific to clients attached to the server; to classes of JavaStation clients; or to specific JavaStation machines. Note that dhcptab can serve many different clients, not just JavaStation computers.
# /var/dhcp/dhcptab # # This file is a sample DHCP server configuration database for # JavaStation clients. # # Refer to dhcptab(4) for details. This table is generated by # using the dhcpconfig(1M) command in conjunction with the # dhtadm(1M) command. It can be administered with the dhtadm # command. # The following are symbol definitions for the Vendor-Specific # Options. JOScmd1-4 can be used in macros that set JavaOS # properties. JOSchksm is the JavaOS checksum. Refer to the # dhcptab(4) man page for symbol definition syntax. JOScmd1 s Vendor=SUNW.JSIIep SUNW.JDM1,101,ASCII,1,0 JOScmd2 s Vendor=SUNW.JSIIep SUNW.JDM1,102,ASCII,1,0 JOScmd3 s Vendor=SUNW.JSIIep SUNW.JDM1,103,ASCII,1,0 JOScmd4 s Vendor=SUNW.JSIIep SUNW.JDM1,104,ASCII,1,0 JOSchksm s Vendor=SUNW.JSIIep,128,NUMBER,4,1
# Standard macros generated when configured with dhcpconfig(1M). # The first is the time offset from GMT (UTC) time, the second # applies to all clients serviced by this server, and the third # applies to all clients attached to one of the nets attached to # the server. Locale m :UTCoffst=-25200: gibson m :Include=Locale:Timeserv=10.146.103.191:\ :LeaseTim=259200:LeaseNeg:\ :DNSserv=10.146.1.151 10.146.1.152 10.144.1.57:\ :DNSdmain=foo.bar.com: 10.146.103.0 m :Broadcst=10.146.103.255:\ :Subnet=255.255.255.0:\ :MTU=1500:Router=10.146.103.1:\ :NISdmain=nis.foo.bar.com:\ :NISservs=10.146.103.22:\ :BootSrvA=10.146.103.191: # These are macros used to configure specific classes of clients. # In this case the JavaStation tower and brick models respectively. SUNW.JSIIep m :Rootpath="/export/root/javaos/JSIIep":\ :JOScmd1="-ihttp://gibson:8080/properties":\ :JOSchksm=0x13d624be: SUNW.JDM1 m :Rootpath="/export/root/javaos/JDM1":\ :JOScmd1="-ihttp://gibson:8080/properties.JDM1": # The macros below contain individual DHCP options for the two # JavaStation computers whose client ID's (derived from the # Ethernet address) match the keys. Here each JavaStation gets # its boot image from a boot server other than the DHCP server. # Notice also that the second JavaStation gets a different # properties file as well as empty vendor options that override # any previous default definitions. 0800208E0668 m :BootSrvA=10.146.103.11:\ :JOSchksm=0x13b74098: 08002087BED4 m :BootSrvA=10.146.103.114:\ :JOScmd1="-ihttp://redwings/properties":\ :JOScmd2="":JOScmd3="":JOScmd4="":\ :JOSchksm=0x13dd4e2d:
Each time you receive a new copy of JavaOS, you can configure the DHCP server to deliver the new copy to JavaStation computers by following the first set of instructions below. To disable JavaOS updating on the JavaStation computers, follow the second set of instructions.
Determine the checksum.
The checksum is contained in the first four bytes of the last 12 bytes of the JavaOS binary file. To determine the checksum, type:
% tail -4c /export/root/javaos/JSIIep/javaos | od -xv \ | nawk '{print $2 $3}' 14eb02a1
Use dhtadm to add the new checksum to the DHCP configuration.
The command to add a new checksum is:
% dhtadm -M -m SUNW.JSIIep -e JOSchksm=0x checksum
% dhtadm -M -m SUNW.JSIIep -e JOSchksm=0x14eb02a1
At boot up, each JavaStation will update its flash memory with the new JavaOS and then reboot using the new JavaOS.