HPlogo HP-UX Reference Volume 2 of 5 > d

dhcpdb2conf(1M)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

dhcpdb2conf — DHCP client database converter

SYNOPSIS

dhcpdb2conf [dhcpdb2conf_options] [lan_interfaces]

DESCRIPTION

dhcpdb2conf provides a means of translating a client DHCP database into a set of standard configuration file variables. A DHCP client database can contain settings for such items as, IP address, hostname, and default gateway. Using dhcpdb2conf, you can simply list the contents of the database to the screen, create a set of configuration staging files, or execute direct edits on existing configuration files using the values contained in the client database.

Options

dhcpdb2conf allows you to specify a list of interfaces on the command line (e.g. lan0 lan1 ...). If no lan interface is specified, dhcpdb2conf will process all entries referenced in the client database. The entries themselves are defined as a unique lan interface and a list of attributes which correspond to that interface. The attributes can be selected for processing by specifying one or more filter flags on the command line. Each filter flag may be combined with any other filter flag(s). If no filter flag is specified, all the attributes for a lan interface will be processed. The following options are supported:

-a

Using the results of the specified filter, directly apply the variable defintions to the existing configuration files (for example, /etc/rc.config.d/netconf).

-c

Create a set of staging files using the results of the selected filter(s). Each variable processed will be applied to its corresponding configuration file. Specifically, dhcpdb2conf will generate a copy of the existing configuration file. As an example, /etc/rc.config.d/netconf will be copied to /etc/rc.config.d/netconf.dhcp. Once this staging file has been created, the variable that is being processed will be applied to the newly created file.

WARNING: Using the -c option will override any existing values which are currently set in the system's configuration files.

-d

Process the DNS variable set: [domain, nameserver]

-h

Process HOSTNAME

-i

Process the INTERFACE variable set: [IP_ADDRESS, SUBNET_MASK, BROADCAST_MASK, LANCONFIG_ARGS]

-n

Process the NIS variable set: [NISDOMAIN, YPSET_ADDR]

-p

Print results to the screen (stdout), this is the default action if neither -c or -a are specified

-r

Process the ROUTE variable set: [ROUTE_DESTINATION, ROUTE_GATEWAY, ROUTE_COUNT]

-s set index

Specify the variable set index

-t

Process NTPDATE_SERVER

Configuration Files and Variable Names

The files and variables which can be processed are the following:

/etc/rc.config.d/netconf

HOSTNAME INTERFACE_NAME[index] IP_ADDRESS[index] SUBNET_MASK[index] BROADCAST_MASK[index] LANCONFIG_ARGS[index] ROUTE_DESTINATION[index] ROUTE_GATEWAY[index] ROUTE_COUNT[index]

/etc/rc.config.d/namesvrs

NISDOMAIN YPSET_ADDR

/etc/rc.config.d/netdaemons

NTPDATE_SERVER

/etc/resolv.conf

domain nameserver

EXAMPLES

To list the entire contents of the DHCP client database type:

dhcpdb2conf

To list only the INTERFACE variable set for lan0 type:

dhcpdb2conf -i lan0

To list the INTERFACE and ROUTE variable sets for lan0 and lan1 type:

dhcpdb2conf -ir lan0 lan1

To apply the INTERFACE and ROUTE variable sets for lan0 to the existing configuration files type:

dhcpdb2conf -ira lan0

To apply all variable sets to the existing configuration files using lan0 and set index = 1 type:

dhcpdb2conf -a -s 1 lan0

WARNINGS

Using the -c option will override any existing values which are currently set in the system's configuration files.

FILES

/usr/lbin/dhcpdb2conf /etc/dhcpclient.data

© Hewlett-Packard Development Company, L.P.