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.xjoin
GUI consists of two parts:
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
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.
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
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:
nets
file, please refer to the man page, nets (1).
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.200The 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
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:
namepool
file, please refer to the man page, namepool (1).
acme.com 142.132.3.1 pc alpha bravo charlie delta echo engr.acme.com dhcpserver EngrPC victor whiskey xray yankee zuluThe 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
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:
/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
utility dumps the information stored in the lease database files. The dumped lease information includes:
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
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:
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.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.
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).