dhcp.client

TCP/IP host configuration utility

Syntax:

dhcp.client [-bdnr] [-h hostname] [-i interface] 
            [-P port]  [-p port] [-s host] &

Options:

-b
Request the DHCP server to unicast its response packets to the client where appropriate (default is to request the server to broadcast).
-d
Write debugging info to the system log.
-h hostname
Hostname of client (default is supplied by the server if the hostname is available).
-i interface
Name of the interface to configure (e.g. en1,en2,...) (default is the first interface found).
-n
Don't modify the resolv.conf file when data for the file is received from the server.
-P port
DHCP server port (default is dhcp port or port 67).
-p port
DHCP client port (default is dhcpc port or port 68).
Note: -P port has been changed from port 68 to port 67.

-s host
Accept packets from this server only; ignore responses from other servers.
-r
Add .node_number to /etc/resolv.conf filename (default is off).

Description:

The dhcp.client obtains the TCP/IP configuration parameters dynamically from a DHCP (Dynamic Host Configuration Protocol) server, then automatically configures your TCP/IP host. You don't have to provide an IP address or any configuration parameters, or run any configuration utilities.


Note: The TCP/IP stack must be started before the dhcp.client.

The minimum commands to run under QNX 4 are:

Tcpip 'hostname' &
dhcp.client &
if_up enx

Note:

Localhost is automatically configured when the TCP/IP stack is started and can't be configured manually if dhcp.client is being used. This can affect the broadcast behavior of the stack if you're attempting to use the 255.255.255.255 address.


The dhcp.client configures the first unconfigured interface found (this includes an interface configured to 0.0.0.0). If the -i option is used, the interface specified is configured even if it was configured previously.


Note: In TCP/IP 4.25A, the ifconfig and route utilities (QNX 4) are no longer required by dhcp.client.

This utility obtains and implements the following information from the DHCP server:

The domain and nameserver are written to /etc/resolv.conf (see the -r option) unless the -n option is specified.

Errors:

Errors that occur during configuration are reported to system log.

See also:

ifconfig, Socket, Socklet, route

RFC 2131