Options are keywords for network configuration parameters that the DHCP server can pass to clients. In the Oracle Solaris DHCP service, you cannot create, delete, or modify the standard DHCP options. The standard options are defined by the DHCP protocol, so the options cannot change. You can only perform tasks on options that you create for your site. For this reason, when you first set up your DHCP service, the Options tab in DHCP Manager is empty until you create options for your site.
If you create options on the DHCP server, you must also add information about the options on the DHCP client. For the Oracle Solaris DHCP client, you must edit the /etc/dhcp/inittab file to add entries for the new options. See the dhcp_inittab(4) man page for more information about this file.
If you have DHCP clients that are not Oracle Solaris clients, refer to the documentation for those clients for information about adding options or symbols. See About DHCP Options for more information about options in Oracle Solaris DHCP.
You can use either DHCP Manager or the dhtadm command to create, modify, or delete options.
Options are called symbols in the DHCP literature. The dhtadm command and its related man page also refer to options as symbols.
The following task map lists tasks that you must perform to create, modify, and delete DHCP options. The task map contains links to procedures for the tasks.
Task |
Description |
For Instructions |
---|---|---|
Create DHCP options. |
Add new options for information not covered by a standard DHCP option. |
How to Create DHCP Options (DHCP Manager) How to Create DHCP Options (dhtadm) Modifying the Oracle Solaris DHCP Client's Option Information |
Modify DHCP options. |
Change properties of DHCP options you have created. | |
Delete DHCP options. |
Remove DHCP options that you have created. |
Before you create DHCP options, you should be familiar with the option properties listed in the following table.
Table 15–5 DHCP Option Properties
If you need to pass client information for which there is not already an existing option in the DHCP protocol, you can create an option. See the dhcp_inittab(4) man page for a list of all the options that are defined in Oracle Solaris DHCP before you create your own option.
You can use the dhtadm -A -s command or DHCP Manager's Create Option dialog box to create new options.
The following figure shows DHCP Manager's Create Option dialog box.
In DHCP Manager, select the Options tab.
See How to Start and Stop DHCP Manager for information about DHCP Manager.
Choose Create from the Edit menu.
The Create Options dialog box opens.
Type a short descriptive name for the new option.
The name can contain up to 128 alphanumeric characters and spaces.
Type or select values for each setting in the dialog box.
Refer to Table 15–5 for information about each setting, or view the DHCP Manager help.
Select Notify DHCP Server of Change if you are finished creating options.
This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.
Click OK.
You can now add the option to macros, and assign a value to the option to pass to clients.
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.
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 |
Is an alphanumeric string of 128 characters of less.
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 15–5 for information about how to determine the vendor client class.
Is a numeric value that is appropriate to the option category, as explained in Table 15–5.
Is specified by a keyword that indicates the type of data that is passed with the option, as explained in Table 15–5.
Is specified as a nonnegative number, as explained in Table 15–5.
Is a nonnegative number, as explained in Table 15–5.
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
If you have created options for your DHCP service, you can change the properties for these options. You can use the dhtadm -M -s command or DHCP Manager's Option Properties dialog box to modify options.
Note that you should modify the Oracle Solaris DHCP client's option information to reflect the same modification that you make to the DHCP service. See Modifying the Oracle Solaris DHCP Client's Option Information.
The following figure shows DHCP Manager's Option Properties dialog box.
In DHCP Manager, select the Options tab.
See How to Start and Stop DHCP Manager for information about DHCP Manager.
Select the option that you want to modify.
Choose Properties from the Edit menu.
The Option Properties dialog box opens.
Edit the properties as needed.
See Table 15–5 for information about the properties, or view the DHCP Manager help.
Select Notify DHCP Server of Change when you are finished with options.
The change is made to the dhcptab table. The DHCP server is signaled to reread the dhcptab table to put the changes into effect.
Click OK.
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.
Modify an option by typing a command using the following format:
# dhtadm -M -s option-name -d 'category,code,data-type,granularity,maximum' -g |
Specifies the name of the option that you want to change.
Can be Site, Extend, or Vendor=list-of-classes. list-of-classes is a space-separated list of vendor client classes to which the option applies. For example, SUNW.Sun-Blade-100 SUNW.Ultra-80 SUNWi86pc.
Specifies a numeric value that is appropriate to the option category, as explained in Table 15–5.
Specifies a keyword that indicates the type of data that is passed with the option, as explained in Table 15–5.
Is a nonnegative number, as explained in Table 15–5.
Is a nonnegative number, as explained in as explained in Table 15–5.
Note that you must specify all of the DHCP option properties with the -d switch, not just the properties that you want to change.
The following command would modify an option called NewOpt. The option is a Site category option. The option's code is 135. The option's value can be set to a single 8-bit unsigned integer.
# dhtadm -M -s NewOpt -d 'Site,135,UNUMBER8,1,1'
The following command would modify an option called NewServ, which is a Vendor category option. The option now applies to clients whose machine type is SUNW,Sun-Blade-100 or SUNW,i86pc. The option's code is 200. The option's value can be set to one IP address.
# dhtadm -M -s NewServ -d 'Vendor=SUNW.Sun-Blade-100 \ SUNW.i86pc,200,IP,1,1' -g
You cannot delete standard DHCP options. However, if you have defined options for your DHCP service, you can delete these options by using DHCP Manager or the dhtadm command.
In DHCP Manager, select the Options tab.
See How to Start and Stop DHCP Manager for information about DHCP Manager.
Select the option that you want to delete.
Choose Delete from the Edit menu.
The Delete Option dialog box opens.
Select Notify DHCP Server of Change if you are finished deleting options.
This selection tells the DHCP server to reread the dhcptab table to put the change into effect immediately after you click OK.
Click OK.
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.
Delete a DHCP option by typing a command using the following format:
# dhtadm -D -s option-name -g |
If you add a new DHCP option to your DHCP server, you must add a complementary entry to each DHCP client's option information. If you have a DHCP client that is not a Oracle Solaris DHCP client, refer to that client's documentation for information about adding options or symbols.
On an Oracle Solaris DHCP client, you must edit the /etc/dhcp/inittab file and add an entry for each option that you add to the DHCP server. If you later modify the option on the server, you must also modify the entry in the client's /etc/dhcp/inittab file.
Refer to the dhcp_inittab(4) man page for detailed information about the syntax of the /etc/dhcp/inittab file.
If you added DHCP options to the dhcptags file in a previous Oracle Solaris release, you must add the options to the /etc/dhcp/inittab file. See DHCP Option Information for more information.