System Administration Guide, Volume 3

Differences Between dhcptags and inittab

The inittab file contains more information than the dhcptags file, and the syntax used is different.

A sample dhcptags entry is:

33 StaticRt - IPList Static_Routes

where 33 is the numeric code that is passed in the DHCP packet, StaticRt is the option name, IPList indicates the expected data is a list of IP addresses, and Static_Routes is a more descriptive name.

The inittab file consists of one-line records describing each option. The format is similar to the format for defining symbols in dhcptab. The syntax of the inittab is described in the following table.

Table 13-3 DHCP inittab Syntax

Option 

 Description

option-name

Name of the option. The option name must be unique within its option category, and not overlap with other option names in the Standard, Site, and Vendor categories. For example, you cannot have two Site options with the same name, and you should not create a Site option with the same name as a Standard option.  

category

Identifies the namespace in which the option belongs. Must be one of Standard, Site, Vendor, Field, or Internal. 

code

Identifies the option when it is sent over the network. In most cases, the code uniquely identifies the option, without a category. However, in the case of internal categories like Field or Internal, a code might be used for other purposes and thus might not be globally unique. The code should be unique within the option's category, and not overlap with codes in the Standard and Site fields.  

type

Describes the data associated with this option. Valid types are IP, Ascii, Octet, Number, Bool, Unumber8, Unumber16, Unumber32, Snumber8, Snumber16, and Snumber32. For numbers, a preceding `U' or `S' indicates whether the number is unsigned or signed, and the trailing number indicates the number of bits in the number.  

granularity

Describes how many units of data make up a whole value for this option. In the case of Number, granularity describes the number of bytes in the number.  

maximum

Describes how many whole values are allowed for this option. 0 indicates an infinite number. 

consumers

Describes which programs can use this information. This should be set to sdmi, where:

    s - snoop


    d - in.dhcpd


    m - dhcpmgr


    i - dhcpinfo


A sample inittab entry is:

StaticRt Standard, 33, IP, 2, 0, sdmi

This entry describes an option named StaticRt, which is in the Standard category and is option code 33. The expected data is a potentially infinite number of pairs of IP addresses because the type is IP, granularity is 2, and maximum is infinite (0). The consumers of this option are sdmi: snoop, in.dhcpd, dhcpmgr, and dhcpinfo.