svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
dhcpinfo(1)
dhcpinfo(1) User Commands dhcpinfo(1)
NAME
dhcpinfo - display values of parameters received through DHCP
SYNOPSIS
dhcpinfo [-c] [-i interface] [-n limit] [-v 4|6] code
dhcpinfo [-c] [-i interface] [-n limit] [-v 4|6] identifier
DESCRIPTION
The dhcpinfo utility prints the DHCP-supplied value(s) of the parameter
requested on the command line. The parameter can be identified either
by its numeric code in the DHCP specification, or by its mnemonic iden‐
tifier, as listed in dhcp_inittab(5). This command is intended to be
used in command substitutions in the shell scripts invoked by init(8)
at system boot. It first contacts the DHCP client daemon at system boot
or in event scripts as described in dhcpagent(8). It first contacts the
DHCP client daemon dhcpagent(8) to verify that DHCP has successfully
completed on the requested interface. If DHCP has successfully com‐
pleted on the requested interface, dhcpinfo retrieves the values for
the requested parameter. Parameter values echoed by dhcpinfo should not
be used without checking its exit status. See exit(1).
See dhcp_inittab(5) for the list of mnemonic identifier codes for all
DHCP parameters. See RFC 2132, DHCP Options and BOOTP Vendor Extensions
for more details on DHCPv4 parameters, and RFC 3315, Dynamic Host Con‐
figuration Protocol for IPv6 (DHCPv6), for more details on DHCPv6
parameters.
Output Format
The output from dhcpinfo consists of one or more lines of ASCII text;
the format of the output depends upon the requested parameter. The num‐
ber of values returned per line and the total number of lines output
for a given parameter are determined by the parameter's granularity and
maximum values, respectively, as defined by dhcp_inittab(5).
The format of each individual value is determined by the data type of
the option, as determined by dhcp_inittab(5). The possible data types
and their formats are listed below:
tab(); lw(1.4i) lw(2.1i) lw(2i) lw(1.4i) lw(2.1i) lw(2i) Data TypeFor‐
matdhcp_inittab(5) type Unsigned NumberOne or more decimal digitsT{
UNUMBER8, UNUMBER16, UNUMBER32, UNUMBER64 T} Signed NumberT{ One or
more decimal digits, optionally preceded by a minus sign T}T{ SNUMBER8,
SNUMBER16, SNUMBER32, SNUMBER64 T} IP AddressDotted-decimal notationIP
IPv6 AddressColon-separated notationIPv6 OctetT{ The string 0x followed
by a two-digit hexadecimal value T}OCTET StringZero or more ASCII char‐
actersASCII DUIDDHCP Unique Identifier textDUID Domain NameT{ Standard
dot-separated domain name, RFC 1035 format T}DOMAIN Classless RouteT{
Classless Static Route Identifier, RFC 3442 format T}CLROUTE
Note that the CLROUTE format for Classless Static Route option (option
code 121) is displayed as tuples of destination/prefixlength-gateway
per line. This provides a human-readable representation of the data
that is specified in RFC 3442 for this option.
OPTIONS
The following options are supported:
-c Displays the output in a canonical format. This format
is identical to the OCTET format with a granularity of
1.
-i interface Specifies the interface to retrieve values for DHCP
parameters from. If this option is not specified, the
primary interface is used.
If a primary interface has not been selected for the
system by ifconfig(8) or for this command by -i, the
system automatically selects an interface to consider
as primary for the current command invocation. The
selection chooses the interface whose name sorts lexi‐
cally first, and that has DHCP parameters attached.
This selection does not affect system state. Use ifcon‐
fig(8) to set a primary interface.
The recommended practice in the dhcpagent(8) eventhook
scripts is to specify the desired interface with -i,
rather than relying on primary selection.
For DHCPv6, the interface name used should be the name
of the physical interface, not one of the logical
interfaces created by dhcpagent.
-n limit Limits the list of values displayed to limit lines.
-v4 | 6 Specifies the DHCP version to query. Use -v4for DHCPv4
and -v6 for DHCPv6.
OPERANDS
The following operands are supported:
code Numeric code for the requested DHCP parameter, as defined
by the DHCP specification. Vendor options are specified
by adding 256 to the actual vendor code for DHCPv4, and
65536 for DHCPv6.
identifier Mnemonic symbol for the requested DHCP parameter, as
listed in dhcp_inittab(5).
EXIT STATUS
The following exit values are returned:
0 Successful operation.
2 The operation was not successful. The DHCP client daemon might not
be running, the interface might have failed to configure, or no
satisfactory DHCP responses were received.
3 Bad arguments.
4 The operation timed out.
6 System error (should never occur).
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/network _ Interface StabilityCommit‐
ted
SEE ALSO
dhcp_inittab(5), attributes(7), dhcpagent(8), ifconfig(8), init(8)
Alexander, S., and R. Droms, RFC 2132, DHCP Options and BOOTP Vendor
Extensions, Silicon Graphics, Inc., Bucknell University, March 1997.
Droms, R. , RFC 3315, Dynamic Host Configuration Protocol for IPv6
(DHCPv6), Cisco Systems, July 2003.
Lemon, T., S. Cheshire, and B. Volz. RFC 3442, The Classless Static
Route Option
for Dynamic Host Configuration Protocol (DHCP) version4, Network
Working Group, December 2002.
Mockapetris, P.V. , RFC 1035, Domain names - implementation and speci‐
fication, ISI, November 1987.
Oracle Solaris 11.4 09 Mar 2017 dhcpinfo(1)