NAME

makedhcp - Creates and updates DHCP configuration files.


SYNOPSIS

makedhcp -n

makedhcp -a

makedhcp -a -d

makedhcp -d noderange

makedhcp noderange [-s statements]

makedhcp [-h|--help]


DESCRIPTION

The makedhcp command creates and updates the DHCP configuration file on the local system.

The makedhcp command is supported for both Linux and AIX clusters.

With the -n option, makedhcp will create a new dhcp configuration file. For Linux systems the file will include network entries as well as certain general parameters such as a dynamic range and omapi configuration. For AIX systems the file will include network entries.

If a configuration file already exist the makedhcp command will create a backup before creating a new one.

On AIX systems, if there are any non-xCAT entries in the configuration file they will be preserved and added to the end of the new configuration file.

With a noderange or the -a option, makedhcp will inject configuration data pertinent to the specified nodes that immediately takes effect without a restart of DHCP.

On AIX systems makedhcp will not add entries for cluster nodes that will be installed using NIM. The entries for these nodes will be managed by NIM.

If the -d flag is used with the -a flag then makedhcp will delete all the node entries created by xCAT. The -d flag followed by a noderange will delete the dhcp host definitons for the noderange.

Any entries created by NIM will not be removed.


OPTIONS

-n

Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on. The makedhcp command will automatically restart the dhcp daemon after this operation. This option will replace any existing configuration file!

-a

Define all nodes to the DHCP server. (Will only add nodes that can be reached, network-wise, by this DHCP server.) The dhcp daemon does not have to be restarted after this.

noderange

Add the specified nodes to the DHCP server configuration.

[-s statements]

For the input noderange, the argument will be interpreted like dhcp configuration file text.

-a -d

Delete all node entries added by xCAT from the DHCP server configuration.

-d noderange

Delete all node entries, added by xCAT, in the noderange from the DHCP server configuration.

-h

Display usage message.


RETURN VALUE

0 The command completed successfully.

1 An error has occurred.


EXAMPLES

  1. Create a new DHCP configuration file and add the network definitions:

     makedhcp -n
  2. Define all nodes to the dhcp server:

     makedhcp -a

    Note: This does not add nodes that will be installed with AIX/NIM.

  3. Will cause dhcp on the next request to set root-path appropriately for only node5. Note some characters (e.g. ``) must be doubly escaped (once for the shell, and once for the OMAPI layer).

     makedhcp node5 -s 'option root-path  \"172.16.0.1:/install/freebsd6.2/x86_64\";'


FILES

DHCP configuration files.

[AIX] /etc/dhcpsd.cnf

[SLES] /etc/dhcpd.conf

[RH] /etc/dhcp/dhcpd.conf


SEE ALSO

noderange(3)