System Administration Guide: IP Services

ProcedureHow to Create DHCP Options (dhtadm)

  1. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Create a DHCP option by typing a command using the following format:


    # dhtadm -A -s option-name -d 'category,code,data-type,granularity,maximum' -g
    
    option-name

    Is an alphanumeric string of 128 characters of less.

    category

    Is one of the following: Site, Extend, or Vendor=list-of-classes. list-of-classes is a space-separated list of vendor client classes to which the option applies. See Table 14–5 for information about how to determine the vendor client class.

    code

    Is a numeric value that is appropriate to the option category, as explained in Table 14–5.

    data-type

    Is specified by a keyword that indicates the type of data that is passed with the option, as explained in Table 14–5.

    granularity

    Is specified as a nonnegative number, as explained in Table 14–5.

    maximum

    Is a nonnegative number, as explained in Table 14–5.


Example 14–3 Creating a DHCP Option With dhtadm

The following command would create an option called NewOpt, which is a Site category option. The option's code is 130. The option's value can be set to a single 8-bit unsigned integer.

# dhtadm -A -s NewOpt -d 'Site,130,UNUMBER8,1,1' -g

The following command would create an option called NewServ, which is a Vendor category option that applies to clients whose machine type is SUNW,Sun-Blade-100 or SUNW,Sun-Blade-1000. The option's code is 200. The option's value can be set to one IP address.

# dhtadm -A -s NewServ -d 'Vendor=SUNW.Sun-Blade-100 \ 
SUNW.Sun-Blade-1000,200,IP,1,1' -g