dhcpconfig - DHCP service configuration utility
dhcpconfig -D -r resource -p path [-u uninterpreted] [-l lease_length] [-n ] [-d DNS_domain] [-a DNS_server_addresses] [-h hosts_resource] [-y hosts_domain]
dhcpconfig -R server_addresses
dhcpconfig -U [-f] [-x] [-h]
dhcpconfig -N network_address [-m subnet_mask] [-b ] [-t router_addresses] [-y NIS-domain] [-a NIS_server_addresses] [-g]
dhcpconfig -C -r resource -p path [-f] [-k] [-u uninterpreted]
dhcpconfig -X filename [-m macro_list] [-o option_list] [-a network_addresses] [-f] [-x] [-g]
dhcpconfig -I filename [-f] [-g]
dhcpconfig -P [parameter[=value],]...
dhcpconfig -S [-f] [-e | -d | -r | -q]
The dhcpconfig command is used to configure and manage the Dynamic Host Configuration Protocol (DHCP) service or BOOTP relay services. It is intended for use by experienced Solaris system administrators and is designed for ease of use in scripts. The dhcpmgr utility is recommended for less experienced administrators or those preferring a graphical utility to configure and manage the DHCP service or BOOTP relay service.
The dhcpconfig command can be run by root, or by other users assigned to the DHCP Management profile. See rbac(5) and user_attr(4).
dhcpconfig requires one of the following function flags: -D, -R, -U, -N, -C, -X, -I, -P or -S.
The dhcpconfig menu driven mode is supported in Solaris 8 and previous versions of Solaris.
dhcpconfig scans various configuration files on your Solaris machine for information it can use to assign values to options contained in macros it adds to the dhcptab configuration table. The following table lists information dhcpconfig needs, the source used, and how the information is used:
|
If you have not set these parameters on your server machine, you should do so before configuring the DHCP server with dhcpconfig. Note that if you specify options with the dhcpconfig -D command line, the values you supply override the values obtained from the system files.
The following options are supported:
-C
The following sub-options are required:
-p path_to_data
-r data_resource
The following sub-options are optional:
-f
-k
-u uninterpreted
-D
The following sub-options are required:
-r data_resource
-p path
The following sub-options are optional:
-a DNS_servers
-d DNS_domain
-h hosts_resource
-l seconds
-n
-y hosts_domain
-u uninterpreted
-I filename
The following sub-options are supported:
-f
-g
-N net_address
The following sub-options are supported:
-a NIS_server_addresses
-b
-g
-m xxx.xxx.xxx.xxx
-t router_addresses
-y NIS_domain_name
-P
parameter[=value],...
Where parameter and value are:
parameter
value
After a parameter has changed the DHCP server requires re-starting before you can use new parameter values.
-R server_addresses
server_addresses is a comma separated list of hostnames and/or IP addresses.
-S
The following sub-options are supported:
-d
-e
-q
0 DHCP service disabled and stopped 1 DHCP service enabled and stopped 2 DHCP service disabled and running 3 DHCP service enabled and running
-r
-U
The following sub-options are supported:
-f
-h
-x
-X filename
The following sub-options are optional:
-a networks_to_export
-g
-m macros_to_export
-o options_to_export
-x
Example 1 Configuring DHCP Service with Binary Files Data Store
The following command configures DHCP service, using the binary files data store, in the DNS domain acme.eng, with a lease time of 28800 seconds (8 hours),
example# dhcpconfig -D -r SUNWbinfiles -p /var/dhcp -l 28800\ -d acme.eng -a 120.30.33.4 -h dns -y acme.eng
Example 2 Configuring BOOTP Relay Agent
The following command configures the DHCP daemon as a BOOTP relay agent, which forwards BOOTP and DHCP requests to the servers having the IP addresses 120.30.33.7 and 120.30.42.132:
example# dhcpconfig -R 120.30.33.7,120.30.42.132
Example 3 Unconfiguring DHCP Service
The following command unconfigures the DHCP service, with confirmation, and deletes the DHCP data tables and host table entries:
example# dhcpconfig -U -x -h
Example 4 Configuring a Network for DHCP Service
The following command configures an additional LAN network for DHCP service, specifying that clients should use router discovery and providing the NIS domain name and NIS server address:
example# dhcpconfig -N 120.30.171.0 -y east.acme.eng.com\ -a 120.30.33.4
Example 5 Converting to SUNWnisplus Data Store
The following command converts a DHCP server from using a text or binary files data store to a NIS+ data store, deleting the old data store's DHCP tables:
example# dhcpconfig -C -r SUNWnisplus -p whatever.com.
Example 6 Exporting a Network, Macros, and Options from a DHCP Server
The following command exports one network (120.30.171.0) and its addresses, the macro 120.30.171.0, and the options motd and PSptrfrom a DHCP server, saves the exported data in file /export/var/120301710_data, and deletes the exported data from the server.
example# dhcpconfig -X /var/dhcp/120301710_export -a 120.30.171.0 -m 120.30.171.0 -o motd,PSptr
Example 7 Importing Data on a DHCP Server
The following command imports DHCP data from a file, /net/golduck/export/var/120301710_data, containing data previously exported from a Solaris DHCP server, overwrites any conflicting data on the importing server, and signals the daemon to reload the dhcptab once the import is completed:
example# dhcpconfig -I /net/golduck/export/var/120301710_data -f -g
Example 8 Setting DHCP Server Parameters
The following command sets the number of minutes that the DHCP server waits before timing out when updating DNS information on DHCP clients to five minutes.
example# example# dhcpconfig -P UPDATE_TIMEOUT=5
Example 9 Re-starting the DHCP server
The following command stops and re-starts the DHCP server.
example# example# dhcpconfig -S -r DHCP server stopped DHCP server started
See attributes(5) for descriptions of the following attributes:
|
dhcpmgr(1M), dhtadm(1M), in.dhcpd(1M), pntadm(1M), dhcp_network(4), dhcptab(4), dhcpsvc.conf(4), nsswitch.conf(4), resolv.conf(4), user_attr(4), attributes(5), dhcp(5), dhcp_modules(5), rbac(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |