System Administration Guide: IP Services

DHCP Client Startup

In most cases, there is nothing you need to do for DHCPv6 client startup. The in.ndpd daemon starts up DHCPv6 automatically when it is needed. You might need to touch /etc/hostname6.$IFNAME to configure an interface to be plumbed for IPv6 at boot time. However, the installer already does this if you enable IPv6 on your system at install time.

For DHCPv4, however, you must request the client startup, if that was not done during Oracle Solaris installation. See How to Enable the Oracle Solaris DHCP Client.

The dhcpagent daemon obtains configuration information that is needed by other processes involved in booting the system. For this reason, the system startup scripts start dhcpagent early in the boot process and wait until the network configuration information from the DHCP server arrives.

Although the default is to run DHCPv6, you can choose to not have DHCPv6 run. After DHCPv6 starts running, you can stop it with the ifconfig command. You can also disable DHCPv6 so that it does not start on reboot, by modifying the /etc/inet/ndpd.conf file.

For example, to immediately shut down DHCPv6 on the interface named “hme0.”

ex# echo ifdefault StatefulAddrConf false >> /etc/inet/ndpd.conf  
ex# pkill -HUP -x in.ndpd   
ex# ifconfig hme0 inet6 dhcp release

The presence of the file /etc/dhcp.interface (for example, /etc/dhcp.ce0 on a Sun Fire 880 system) indicates to the startup scripts that DHCPv4 is to be used on the specified interface. Upon finding a dhcp.interface file, the startup scripts start dhcpagent.

After startup, dhcpagent waits until it receives instructions to configure a network interface. The startup scripts issue the ifconfig interface dhcp start command, which instructs dhcpagent to start DHCPv4 as described in How DHCP Works. If commands are contained within the dhcp.interface file, they are appended to the dhcp start option of ifconfig. See the ifconfig(1M) man page for more information about options used with the ifconfig interface dhcp command.