Configure without xjoin

It is possible to configure JOIN entirely without using the xjoin GUI. Instead, the administrator can manually edit the configuration files and use JOIN command line utilities to access and manipulate the JOIN database. In environments where existing shell scripts or programs are used to maintain the address space, this GUI-less approach allows the administrator to use existing tools to manage IP addresses.

Configuration without the xjoin GUI consists of two parts:

  1. The manipulation of human readable configuration files (text)
  2. The manipulation of JOIN database files (binary)
The first set of configuration files can be manually edited by the user using an editor like 'vi'. The second set of configuration files require the use of JOIN command line utilities: jdbdump, jdbmod and jdbreg.


Modifying configuration files

Depending on your environment, you may or may not need to modify all the available configuration files: dhcpcap, nets, netmasks, namepool, and server.pcy. By default, these files are located in the directory /etc/join. They can also reside in the directory described by the environment variable, JOINCONFIG.

dhcpcap

The dhcpcap file describes the various configuration parameters for the clients. This file is similar the standard bootptab file used by most BOOTP servers. Each entry in the file can describe a single machine (per-node basis) or all the machines within a subnet (per-subnet basis) or a group of machines (per-group basis).

The association of tags with specific configuration parameters is made in a file called, dhcptags. This file contains the symbolic description of each parameter acceptable to DHCP, for example, ``gw'' specifies gateway.

Example:

mypc:\
:ht=ether:\
:ha=112233445566:\
:ip=143.32.3.10:\
:gw=143.32.3.1:\
:dn=acme.com
subnet5:\
:nw=143.32.5.0:\
:gw=143.32.5.1:\
:sm=255.255.255.0:\
:dn=engr.acme.com:\
:ds=143.32.5.10:\
:lt=3600:
The first entry, mypc, describes the configuration for a BOOTP client. It describes the client itself, its IP address, the default gateway and the domain name. The second entry, subnet5, describes the parameters for all the clients on a particular subnet, 143.32.5.0. It describes the default gateway, subnet mask, domain name, DNS server address and lease time of the address.

nets

The nets file describes the ranges of IP addresses available to the server for the clients. This pool is used by both BOOTP and DHCP whenever dynamic IP assignment is needed.

Entries in the nets file are separated from one another by new lines. Blank lines and comments (lines beginning with ), are ignored. Each entry consists of three fields:

  1. The network number: expressed as an IP address, for example, 142.132.3.0.
  2. The owner of this IP address range: expressed as the IP address of the server host (142.132.3.1) or the hostname ("dhcpserver").
  3. A range of available addresses for dynamic allocation to hosts on the net: The range is expressed as a pair of IP addresses with a dash, '-', between them, for example, 143.32.3.10-143.32.3.30. There must be no whitespace separating the dash from the IP addresses. More than one range may be specified for each network and they do no need to be contiguous.
For a more detailed description of the syntax of the nets file, please refer to the man page, nets (1).

Example:

The following entries describes the IP ranges for two different networks, each with its own set of IP address:

          143.32.3.0  143.32.3.1  143.32.3.10-143.32.3.30
                                  143.32.3.40-143.32.3.60
                                  143.32.3.75-143.32.3.100

          143.32.5.0  dhcpserver  143.32.5.10-143.32.5.200
The first entry describes 3 non-contiguous ranges of IP address for the network, 143.32.3.0. The second entry describes a single range of addresses for the network 143.32.5.0. Notice the use of an IP address in the first entry (143.32.3.1) and the use of a hostname (``dhcpserver'') in the second entry to describe the owner of the IP address ranges.

namepool

The namepool file describes what names are available for dynamic assignment to clients of the DHCP protocol. It specifies a collection of names available for allocation to DHCP clients. The server will use the names in this file only as a last resort, for example, when the client did not suggest a name and there is no name associated with the IP address being offered to the client. In addition to this pool of names, there is also a name prefix. Once the name pool is exhausted, names are generated from the prefix by appending a number, 1, 2, 3..., and a trailing 'd'. Once a name has been dynamically bound to a host it will never be re-used even if that host subsequently acquires a new name.

Entries in the namepool file are separated from one another by new lines. Blank lines and comments (lines beginning with), are ignored. Each entry consists of four fields:

  1. The domain name to which the names apply .
  2. The owner of these names: expressed as the IP address of the server host (142.132.3.1) or the hostname (``dhcpserver'').
  3. An optional name prefix: the prefix used for generating names once the name pool is exhausted.
  4. A list of names in the pool.
For a more detailed description of the syntax of the namepool file, please refer to the man page, namepool (1).

Example:

             acme.com 142.132.3.1 pc
                               alpha bravo charlie delta echo
             engr.acme.com dhcpserver EngrPC
                               victor whiskey xray yankee zulu
The first entry describes five names available to the acme.com domain with a name prefix of 'pc'. The second entry describes five different names for the engr.acme.com domain with a name prefix of 'EngrPC'. Notice the use of an IP address in the first entry (143.32.3.1) and the use of a hostname ("dhcpserver") in the second entry to describe the owner of the IP address ranges.

server.pcy

The server.pcy file configures the behavior of the server. This policy file describes various aspects of the server, for example, what sort of name service to use, whether BOOTP should be supported, ping timeout value, etc.

Entries in the server.pcy file are separated from one another by new lines. Blank lines and comments (lines beginning with "#") are ignored. Each new policy option must begin and end on a separate line. Policy options are introduced by a keyword, and may be boolean, or may take a value separated from the keyword by whitespace (but not a new line). If an option is present more than once, only the value attached to the last occurrence will take effect - earlier value(s) will be forgotten.

For a more detailed description of the various parameters accepted by server.pcy, please refer to Chapter 5, ``Server/Security Parameters,'' or the man page server.pcy (5).

Re-initializing the server

Once you've made changes to the configuration files, you must force the server to re-read them. You can either stop and then restart the server or you can force the server to re-initialize by sending it a HUP signal:

# kill -HUP <pid-of-joind>

Modifying the JOIN database files

There are a number of JOIN database files used by the server. By default, these files are located in the directory /var/join. They can also reside in the directory described by the environment variable, JOINSPOOL. These database files contain primarily client lease information and naming information.

JOIN provides three command line utilities to access and manipulate these database files: jdbdump, jdbmod and jdbreg.

jdbdump

The jdbdump utility dumps the information stored in the lease database files. The dumped lease information includes:

MAC address
MAC address type
MAC address length (octets)
IP address
Start of lease (UCT)
Lease expiration (UCT)
Time when lease may be extended (UCT)
Time when host last renewed or acquired this lease (UCT)
IP address of server ``owning'' the lease
Hostname (sans domain)
Domain name
Each line of output describes the lease information for one client. The output is in a format that is used by the jdbmod utility to modify the lease database. Essentially, jdbdump performs read operations on the database while jdbmod perform write operations.

The jdbdump command accepts a number of different flags and arguments. Some of the more important flags are:

-a Dump dates in human readable form
-c Dump currently active leases only
-e Dump expired leases only

For a more detailed description of the jdbdump utility, please refer to the man page, jdbdump (1).

jdbmod

The jdbmod utility modifies the lease and naming information in the JOIN database files. It allows the user to create, delete or modifying existing entries in the database. Its chief purpose is to allow the user to pre-assign static IP address to clients.

jdbmod takes input from a file that describes various entries in the database. The syntax of each entry is similar to the output of jdbdump. Each record to be loaded is terminated by a new line, and the fields within each record delimited by default with the pipe '|' character. Date fields may either be expressed in Universal Coordinated Time (UCT), which is the number of seconds since 00:00 01/01/1970 GMT, or in a variety of formats more easily understood by human (e.g. Mon Jan 09 1995 10:00, 01/09/1995 10:00:00,...)

Although some fields can be empty, each jdbmod entry consists of the following fields:

MAC address
MAC address type
MAC address length (octets)
IP address
Start of lease (UCT)
Lease expiration (UCT)
Time when lease may be extended (UCT)
Time when host last renewed or acquired this lease (UCT)
IP address of server ``owning'' the lease
Hostname (sans domain)
Domain name
The jdbmod command accepts a number of different flags and arguments. Some of the more important flags are:

-d Delete the record.
-e Store the record even if the lease has expired.
-l Store the lease information only. Do not store name information.
-n Store the name information. Do not store lease information.
-w If the record already exists, overwrite it.

By default, jdbmod will store both lease and name information for non-expired and new clients.

For a more detailed description of the jdbmod utility, please refer to the man page, jdbmod (1).

Example:

00:a0:24:8c:6b:09|1|6|143.32.3.20|844989457|844989466|844989466|844989466|143.32.3.1|alpha|acme.com|
01:00:40:05:14:df:11|0|7|143.32.3.21|844989457|844989466|844989466|844989466|143.32.3.1|||

The first entry describes the client called alpha.acme.com with the IP address 143.32.3.20. The second entry describes a Microsoft DHCP client with the IP address 143.32.3.21. No name is given for this client.

jdbreg

The jdbreg utility is used to populate the JOIN database with the MAC address of known MAC clients. If you do not have the parameter, ``Restrict to Known MAC Address'' set to True, you have no need for this utility. jdbreg can add or remove hosts from the list of known MAC addresses.

Each record to be loaded is terminated by a new line, and the fields within each record delimited by default with the pipe '|' character,

Each entry contains the following three fields:

MAC address
MAC address type
MAC address length (octets)
The jdbreg command accepts a number of different flags. Some of the more important flags are:

-d Delete the record.
-s Display all registered MAC addresses.

For a more detailed description of the jdbreg utility, please refer to the man page, jdbreg (1).


Last Modified: 11:22am , November 11, 1996