The Name Service Search Option for DHCP
Extracted elements (8)
To avoid inventing a new namespace, the option reuses existing DHCP option codes (from RFC 2132) to identify name services rather than defining a parallel identification scheme. This allows the search order option to piggyback on already-standardized name service options.
A DHCP client may receive name services in this option that it does not support or has not been configured to access, and may receive entries for which no corresponding DHCP option was supplied. Clients interpret this option in a system-specific manner outside the scope of this document.
A DHCP server SHOULD return name service option codes in its preferred order, with earlier entries in the list indicating more preferred name services.
The Name Service Search Option (DHCP option code 117) allows a DHCP server to specify the ordered list of name services a client should consult when resolving hostnames. The minimum length is 2 bytes, and each name service is represented as a 16-bit network byte order integer option code.
The value 0 in the name service search list indicates the client should use local naming information (e.g., /etc/hosts on UNIX systems). The defined name service option codes are: DNS=6, NIS=41, NetBIOS/TCP=44, NIS+=65.
IANA assigned option code 117 for the Name Service Search Option defined in this document.
DHCP currently provides no authentication or security mechanisms. Potential exposures to attack are discussed in section 7 of RFC 2131; this option inherits those vulnerabilities, allowing a rogue DHCP server to redirect name service lookups.
Option code is 117 (1 byte), followed by a length field (1 byte), followed by an ordered sequence of 16-bit big-endian integers, each representing a DHCP option code for a name service. Minimum length is 2 bytes (one name service entry).