=head1 NAME

B<makedns> - sets up domain name services (DNS).

=head1 SYNOPSIS

B<makedns> [B<-h>|B<--help>]

B<makedns> [B<-V>|B<--verbose>] [B<-e>|B<--external>] [B<-n>|B<--new>] [I<noderange>]

B<makedns> [B<-V>|B<--verbose>] [B<-e>|B<--external>] [B<-d>|B<--delete> I<noderange>]

=head1 DESCRIPTION

B<makedns> configures a DNS server on the system you run it on, which is typically the xCAT management node.

The list of nodes to include comes from either the B<noderange> provided on the command line or the entries in the local /etc/hosts files. 

There are several bits of information that must be included in the xCAT database before running this command.

You must set the B<forwarders> attributes in the xCAT B<site> definition. 

The B<forwarders> value should be set to the IP address of one or more nameservers at your site that can resolve names outside of your cluster.  With this set up, all nodes ask the local nameserver to resolve names, and if it is a name that the MN DNS does not know about, it will try the forwarder names.

An xCAT B<network> definition must be defined for each network used in the cluster.  The B<net> and B<mask> attributes will be used by the B<makedns> command.

A network B<domain> and B<nameservers> values must be provided either in the B<network> definiton corresponding to the node or in the B<site> definition.

Only entries in /etc/hosts or the hosts specified by B<noderange> that have a corresponding xCAT network definition will be added to DNS.

By default, B<makedns> sets up the B<named> service and updates the DNS records on the local system (management node). If the -e flag is specified, it will also update the DNS records on any external DNS server that is listed in the /etc/resolv.conf on the management node. (Assuming the external DNS server can recognize the xCAT key as authentication.)

For more information on Cluster Name Resolution:
Cluster_Name_Resolution

=head1 OPTIONS

=over 6

=item B<-V>|B<--verbose>

Verbose mode.

=item B<-n>|B<--new>

Use this flag to create new named configuration and db files.

=item B<-d>|B<--delete>

Remove the DNS records.

=item B<-e>|B<--external>

Update DNS records to the external DNS server listed in /etc/resolv.conf.

Enabling the site attribute I<externaldns> means use 'external' DNS by default. If setting I<externaldns> to 1, you need NOT use B<-e> flag in every makedns call.

=item B<noderange>

A set of comma delimited node names and/or group names. See the "noderange" man page for details on additional supported formats.

=back

=head1 Examples

=over 2

=item 1.
To set up DNS for all the hosts in /etc/hosts file.

 makedns

=item 2.
To set up DNS for I<node1>.

 makedns node1

=item 3.
To create a new named configuration and db files for all hosts in /etc/hosts.

 makedns -n

=item 4.
To delete the DNS records for I<node1>.

 makedns -d node1

=back

=head1 SEE ALSO

L<makehosts(8)|makehosts.8>

