System Administration Guide: IP Services
Previous Next

DHCP Client Systems With Multiple Network Interfaces

The DHCP client can simultaneously manage several different interfaces on one system. The interfaces can be physical interfaces or logical interfaces. Each interface has its own IP address and lease time. If more than one network interface is configured for DHCP, the client issues separate requests to configure them. The client maintains a separate set of network configuration parameters for each interface. Although the parameters are stored separately, some of the parameters are global in nature. The global parameters apply to the system as a whole, rather than to a particular network interface.

The host name, NIS domain name, and time zone are global parameters and should have the same values for each interface. However, these values may differ due to errors in the information specified by the DHCP administrator. To ensure that there is only one answer to a query for a global parameter, only the parameters for the primary network interface are requested. You can insert the word primary in the /etc/dhcp.interface file for the interface that you want to be treated as the primary interface. If the primary keyword is not used, the first interface in alphabetical order is considered to be the primary interface.

The DHCP client manages leases for logical interfaces and physical interfaces identically, except for the following limitations on logical interfaces:

  • The DHCP client does not manage the default routes that are associated with logical interfaces.

    The Solaris kernel associates routes with physical interfaces, not logical interfaces. When a physical interface's IP address is established, the necessary default routes should be placed in the routing table. If DHCP is used subsequently to configure a logical interface associated with that physical interface, the necessary routes should already be in place. The logical interface uses the same routes.

    When a lease expires on a physical interface, the DHCP client removes the default routes that are associated with the interface. When a lease expires on a logical interface, the DHCP client does not remove the default routes associated with the logical interface. The associated physical interface and possibly other logical interfaces might need to use the same routes.

    If you need to add or remove default routes that are associated with a DHCP-controlled interface, you can use the DHCP client event script mechanism. See DHCP Client Event Scripts.

  • The DHCP client does not automatically generate client identifiers for logical interfaces.

    The client identifier is used to uniquely identify a DHCP client so that it can receive configuration information that is specifically targeted to that client. For physical interfaces, the DHCP client identifier is derived from the media access control (MAC) address of the system's network interface hardware. However, no Internet standard exists for the format of DHCP client identifiers for physical interfaces that have multiple leases. You must create your own client identifier for any logical interface that you want to be configured through DHCP. The client identifier must be specified in the /etc/default/dhcpagent file with the interface.CLIENT_ID keyword. For example, to specify the client identifier orangutan-ce0–1 for the logical interface ce0:1, you would use the following entry:

    ce0:1.CLIENT_ID=orangutan-ce0-1

    See the /etc/default/dhcpagent file and the dhcpagent(1M) man page for more information about the parameters you can set in the file.

    If you do not configure a client identifier, ifconfig fails when it tries to configure the logical interface to use DHCP. The error message is:

    ifconfig: ce0:1: interface does not have a configured DHCP client id
Previous Next