Mike Ramchand's blog, covering mainly JET (Jumpstart Enterprise Toolkit), but with diversions into other stuff, like sailing.. JET Stream

Friday Aug 26, 2005

My first post!!

Well, I registered to blog about 3 months ago, and I've finally gotten around to writing something. In an attempt to concentrate more on presentation than content, I've simply cut and pasted something I'd already written. I keep on getting asked how to set up DHCP with Jet from the external jet-AT-sun-DOT-com alias, so here it is. Next time, I can just point them to my blog!

I guess most of my posts are going to be hints and tips on how to use and deploy JET. As one of the co-authors (the other one is Marty Lee), I suppose you could call this a demand-driven sorry excuse for better documentation! :-)

*JET* stands for Jumpstart Enterprise Toolkit. It's an add-on to Jumpstart which greatly simplifies the initial configuration and setup of a Jumpstart server, and as well as setting up configurations for non-interactive installations of Solaris and additional S/W products on SPARC and i86pc based servers.

It is available for download from "sun.com/downloads":http://www.sun.com/download/products.xml?id=3f5e55d1 , and you can get a quick and dirty overview of how it works "here":http://www.sun.com/bigadmin/content/jet .

JET is also available as a supported product as part of the O/S provisioning component of N1 SPS.

Problems?

I'm trying to use something called Textile for my formatting as it seems very similar to twiki speak, although when I preview this, it doesn't show me what its going to do, so I'm kind of guessing, and hoping it'll look OK when I post it.

Anyway, here's the real meat:

JumpStart and DHCP Servers (and building x86 based servers with PXE)

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.

PXE is the method used by x86 based machines to start a non-attended network boot and is essentially a mini-DHCP client which grabs the name of the bootserver and bootfile from a DHCP server, and proceeds to load/run the named bootfile. So if you want to install x86 (or x64) based machines non-interactively, you kind of need to set up a dhcp server.

DHCP also has the advantage of being able to traverse subnets through the use of DHCP forwarders, so the number of Jumpstart servers required can be reduced.

However, its often a little more difficult to initially 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 in a way that tries to hide all the additional complexity.

Possible DHCP configurations.

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

If no-one minds you running a DHCP server on your JET server, 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 possibly simplistic as its likely that there's a real DHCP server lurking somewhere. (Although the number of DHCP servers running within Datacentres is actually quite low, and you can hope that if there IS a DHCP server, its only serving the desktop based networks.)

This is where option 2 becomes useful. If there already is an enterprise wide DHCP server, and its 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.

N.B. When JET configures your DHCP server, it ONLY replies to clients that have been specifically configured. i.e. it won't just let ANYBODY plug into the network and given them an IP address.

Simple Local DHCP server.

Firstly, you need to set up your DHCP server. A script called "make_dhcp" is provided in /opt/jet/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/jet/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 of non-directly connected subnets :-) . If there are subnets that the JET server is NOT directly connected to, you will need to list them in the /opt/jet/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/jet/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 servers by space separating the values. (Don't forget to surround the whole thing by double quotes.)

In your client template, simply specify "dhcp" as your client_allocation_method. For x64/x8 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/jet/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/jet/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/jet/Utils/dhcp directory contains 3 files: checkdhcp, configdhcp and deconfigdhcp. Each of these files calles a script of asimilar 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)