Using DHCP with JET 


Jumpstart on SPARC machines traditionally made use of RARP, BOOTP etc to get the required information for building over the network. This method does not work on x86 based machines, and required that there be a boot server on every subnet.

DHCP is the method used by x86 based machines to start a non-attended network boot, and it also has the advantage of being able to traverse subnets through the use of DHCP forwarders.

However, its often a little more difficult to set up, configure and manage . To accomodate the x86 based servers, and the ability to jumpstart over multiple subnets, we have added DHCP support to the core toolkit.

There are also some new x86 specific configuration variables in the base module.

Possible DHCP configurations

  • Local DHCP server hosted on the Jumpstart server.
  • Remote DHCP server.
  • Multiple remote DHCP servers.

If all you need to do is install x86 based servers, then the first option is the easiest to configure and set up. Additionally if you configure the routers as DHCP forwarders, you can also jumpstart on any subnet that can "see" this DHCP server. Unfortunately this scenario is slightly unrealistic as its likely that there's a real DHCP server lurking somewhere.

This is where option 2 becomes useful. If there is already an enterprise wide DHCP server, and it's running Sun's DHCP, then you're in luck! All you need to do is set up an ssh relationship between your server and it, and JET will do the rest for you.

Finally, there may in fact be multiple DHCP servers, possibly one per subnet. JET allows you to specify which subnets are served by which dhcp server.

Simple Local DHCP server

Firstly, you need to set up your DHCP server. A script called "make_dhcp" is provided in /opt/SUNWjet/Products/base_config. You only really need to run the first "dhcpconfig" command in the file, as if you've populated either the client's sysidcfg_default_route or the /opt/SUNWjet/etc/defaultrouters file, JET will create the network macro for you when you run make_client.

However, you're on your own configuring the DHCP forwarding if you're going to be DHCP serving a bunch on non-directly connected subnets smile . If there are subnets that the JET server is NOT directly connected to, you will need to list them in the /opt/SUNWjet/etc/server_interfaces file with the JET server IP address as the preferred server.

Once you've done this, you need to specify the machine types you are going to install. Edit the variable JS_DHCP_VENDOR in /opt/SUNWjet/etc/jumpstart.conf to add them. (for x86 its i86pc, for SPARC machines, its the output of "uname -i", with the comma changed to a period. You can list multiple by space seperating.

In your client template, simply specify "dhcp" as your client allocation method using the base_config_client_allocation variable. For intel boxes just PXE boot, for SPARC boxes you need to type boot net:dhcp - install.

Remote DHCP server

If your DHCP server is remote, you've got a little more work to do. Edit the /opt/SUNWjet/etc/dhcp.conf file and provide a name for the remote dhcp server. You then need to set up ssh between the JET server and the DHCP server so that you can ssh in without supplying a password.

Once you've done this, just follow the steps above from the editting jumpstart.conf bit onwards.

(Note, you need to make sure that the default route that the DHCP server passes to the client will allow the client to be able to route to the JET server. This is set in the Network Macro on the DHCP server.)

Multiple Remote DHCP servers

Support for multiple remote DHCP servers is a simple extension to the above. Edit the /opt/SUNWjet/etc/dhcp_servers file and list the subnets and the servers that will be DHCPing them. You'll need to then set up each DHCP server with ssh relationships with the JET server as above.

If the subnet is not listed in the dhcp_servers file, JET will revert to the configuration defined in the dhcp.conf file.

NON-Sun, NON-ssh DHCP servers

Jet provides a mechanism which allows you to plug in helper scripts to support other types of DHCP server. The /opt/SUNWjet/Utils/dhcp directory contains 3 files: checkdhcp, configdhcp and deconfigdhcp. Each of these files calles a script of a similar name based on the settings in the dhcp.conf file. i.e. If the DHCP_FORMAT was set to SUN (the default), it would call checkdhcp_SUN. If it was remote and the method was "ssh", it would call checkdhcp_SUN_ssh. To add support for other dhcp types and remote communication mechanisms, you simply need to specify the new format/type in dhcp.conf, and then create the scripts of the correct name in the dhcp directory. (configdhcp_xx_yy does all the real work. It reads the settings required for the client in a file called dhcp.config in the Client directory and communicates with the DHCP server to set them up for you)