2008-01-07 17:37:19 +00:00
=head1 NAME
2011-06-02 18:54:40 +00:00
B<makedhcp> - Creates and updates DHCP configuration files.
2008-03-14 20:54:31 +00:00
2008-01-07 17:37:19 +00:00
=head1 SYNOPSIS
2012-10-25 20:05:53 +00:00
B<makedhcp> B<-n> [B<-l>|B<--localonly>]
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
B<makedhcp> B<-a> [B<-l>|B<--localonly>]
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
B<makedhcp> B<-a -d> [B<-l>|B<--localonly>]
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
B<makedhcp> B<-d> I<noderange> [B<-l>|B<--localonly>]
2008-03-14 20:54:31 +00:00
2012-10-25 20:05:53 +00:00
B<makedhcp> I<noderange> [B<-s> I<statements>] [B<-l>|B<--localonly>]
2008-01-07 17:37:19 +00:00
2008-08-02 16:18:07 +00:00
B<makedhcp> [I<-h|--help>]
2008-01-07 17:37:19 +00:00
=head1 DESCRIPTION
2012-10-25 20:05:53 +00:00
The B<makedhcp> command creates and updates the DHCP configuration on the management node and service nodes.
2011-05-20 17:33:49 +00:00
The B<makedhcp> command is supported for both Linux and AIX clusters.
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
=over 3
2011-05-20 17:33:49 +00:00
2012-10-25 20:05:53 +00:00
=item 1.
2011-06-02 18:54:40 +00:00
2012-10-25 20:05:53 +00:00
Start by filling out the L<networks(5)|networks.5> table properly.
2008-01-07 17:37:19 +00:00
2012-10-25 20:05:53 +00:00
=item 2.
2009-03-08 19:31:44 +00:00
2012-10-25 20:05:53 +00:00
Then use the B<makedhcp -n> option to create a new dhcp configuration file.
2011-06-02 18:54:40 +00:00
2012-10-25 20:05:53 +00:00
=item 3.
Next, get the node IP addresses and MACs defined in the xCAT database.
Also, get the hostnames and IP addresses pushed to /etc/hosts (using L<makehosts(8)|makehosts.8>) and to DNS (using L<makedns(8)|makedns.8>).
2011-05-20 17:33:49 +00:00
2012-10-25 20:05:53 +00:00
=item 4.
Then run B<makedhcp> with a noderange or the B<-a> option. This will inject into dhcpd configuration data pertinent to the specified nodes.
On linux, the configuration information immediately takes effect without a restart of DHCP.
=back
If you need to delete node entries from the DHCP configuration, use the B<-d> flag.
2008-01-07 17:37:19 +00:00
2008-03-14 20:54:31 +00:00
=head1 OPTIONS
2008-01-07 17:37:19 +00:00
2008-08-02 16:18:07 +00:00
=over 12
=item B<-n>
2012-10-25 20:05:53 +00:00
Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on.
(Which networks dhcpd should listen on can be controlled by the dhcpinterfaces attribute in the L<site(5)|site.5> table.)
The B<makedhcp> command will automatically restart the dhcp daemon after this operation.
This option will replace any existing configuration file (making a backup of it first).
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.
On AIX systems, if there are any non-xCAT entries in the existing configuration file they will be preserved and added to the end of the new configuration file.
2008-08-02 16:18:07 +00:00
=item B<-a>
2012-10-25 20:05:53 +00:00
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.
On AIX systems B<makedhcp> will not add entries for cluster nodes that will be installed using NIM. The entries for these nodes will be managed by NIM.
2008-08-02 16:18:07 +00:00
=item I<noderange>
Add the specified nodes to the DHCP server configuration.
2012-10-25 20:05:53 +00:00
=item B<-s> I<statements>
2008-01-07 17:37:19 +00:00
2011-05-20 17:33:49 +00:00
For the input noderange, the argument will be interpreted like dhcp configuration file text.
2008-01-07 17:37:19 +00:00
2012-10-25 20:05:53 +00:00
=item B<-d> I<noderange>
Delete node entries from the DHCP server configuration. On AIX, any entries created by NIM will not be removed.
2008-08-02 16:18:07 +00:00
=item B<-a -d>
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
Delete all node entries, that were added by xCAT, from the DHCP server configuration.
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
=item B<-l>|B<--localonly>
2008-03-27 13:55:50 +00:00
2012-10-25 20:05:53 +00:00
Configure dhcpd on the local machine only. Without this option, makedhcp will also send this
operation to any service nodes that service the nodes in the noderange.
2008-08-02 16:18:07 +00:00
2012-10-25 20:05:53 +00:00
=item B<-h|--help>
2008-08-02 16:18:07 +00:00
Display usage message.
=back
2008-01-07 17:37:19 +00:00
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
2008-08-02 16:18:07 +00:00
=over 3
=item 1.
2011-06-02 18:54:40 +00:00
Create a new DHCP configuration file and add the network definitions:
2008-08-02 16:18:07 +00:00
makedhcp -n
=item 2.
2008-01-07 17:37:19 +00:00
2008-08-02 16:18:07 +00:00
Define all nodes to the dhcp server:
2008-01-07 17:37:19 +00:00
2008-08-02 16:18:07 +00:00
makedhcp -a
2008-03-27 13:55:50 +00:00
2011-06-02 18:54:40 +00:00
Note: This does not add nodes that will be installed with AIX/NIM.
2008-08-02 16:18:07 +00:00
=item 3.
2008-03-27 13:55:50 +00:00
2008-08-02 16:18:07 +00:00
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).
2008-03-27 13:55:50 +00:00
2008-08-02 16:18:07 +00:00
makedhcp node5 -s 'option root-path \"172.16.0.1:/install/freebsd6.2/x86_64\";'
2008-03-27 13:55:50 +00:00
2008-08-02 16:18:07 +00:00
=back
2008-03-27 13:55:50 +00:00
2011-06-02 18:54:40 +00:00
=head1 FILES
2012-10-25 20:05:53 +00:00
DHCP configuration files:
2011-06-02 18:54:40 +00:00
[AIX] /etc/dhcpsd.cnf
[SLES] /etc/dhcpd.conf
[RH] /etc/dhcp/dhcpd.conf
2008-01-07 17:37:19 +00:00
2008-08-02 16:18:07 +00:00
=head1 SEE ALSO
2008-01-07 17:37:19 +00:00
2008-08-02 16:18:07 +00:00
L<noderange(3)|noderange.3>
2008-01-07 17:37:19 +00:00