DHCP options empower administrators to customize and control client configuration from a central server.
The DHCP protocol itself provides automatic IP assignment, but the wide range of available options allows for the delivery of additional parameters like DNS and NTP servers, default gateways, domain names, and boot files.
With over 250 options, admins can combine settings to achieve advanced configuration tasks. Properly utilizing the flexible DHCP options toolkit is key to unlocking the full capabilities of DHCP for easy centralized management.
Explanation of DHCP (Dynamic Host Configuration Protocol)
DHCP is a network management protocol that provides a framework for passing configuration information to hosts on a TCP/IP network.
DHCP uses a client-server model where DHCP servers automatically assign IP addresses and other network configuration parameters like subnet mask, default gateway, and DNS servers to DHCP clients.
This occurs when clients connect to the network and initiate requests to obtain IP address leases. DHCP helps reduce the administrative overhead of manually configuring parameters on each device.
By using DHCP, IP addresses can be managed centrally on a DHCP server rather than configured locally on each client.
This also allows IP addresses to be assigned dynamically and reused when leases expire, supporting more efficient allocation compared to static IP addressing.
Purpose of DHCP Options
DHCP options provide a framework for specifying additional configuration settings beyond just the IP address and subnet mask. They allow network administrators to centrally manage the distribution of important TCP/IP parameters to clients.
DHCP options enable the automation of configuring clients with the appropriate settings like DNS servers, NTP servers, default gateways, and domain names as soon as they connect to the network.
This prevents needing to manually configure hundreds or thousands of clients individually. The values for these different network settings can also be readily changed by updating the DHCP server configuration rather than modifying each client.
DHCP options utilize standardized numeric codes defined by IANA to identify the different configuration parameters being sent.
Overview of DHCP Option Codes
The configuration parameters sent by DHCP are identified by numeric codes ranging from 1 to 255 called DHCP options. These codes are defined by the Internet Assigned Numbers Authority (IANA). Some examples include:
- 1 – Subnet Mask
- 3 – Router/Default Gateway
- 6 – Domain Name Server
- 42 – Network Time Protocol (NTP) Server
- 66 – TFTP Server Name
- 67 – Bootfile Name
There are over 200 defined DHCP options covering many different network parameters that can be sent to clients. Not all options have to be used. The DHCP server can be configured with the specific options needed for its network and clients.
Common DHCP Options
Option 1 Subnet Mask
The subnet mask is a 32-bit value used in IP addressing to distinguish the network and host portions of an IP address.
By applying the subnet mask to an IP using a bitwise AND operation, clients can determine whether a destination IP is on the same local network or a different remote network.
DHCP option 1 is used to convey the subnet mask from the DHCP server to clients so they can properly identify local vs. remote addresses and contact devices directly or through the configured gateway.
How Option 1 is used in DHCP?
DHCP servers are configured with the appropriate subnet mask value for their network. This is typically 255.255.255.0 (or /24) for small networks giving 254 usable host IPs.
When a DHCP client sends a request to the server asking for network configuration details, the DHCP server will respond and include option 1 containing the configured subnet mask value.
The client then receives this and automatically applies the subnet mask, without needing manual configuration by an admin.
Option 2 Time Offset
Time offset refers to the number of seconds to adjust the client’s local time clock to match the official time for the network’s timezone.
Networks often utilize the Network Time Protocol (NTP) to synchronize time between clients and servers. However, some client devices lack real-time clocks to maintain the current time when offline.
The time offset option allows DHCP servers to specify the precise number of seconds clients should modify their concept of the current time so that log entries, file timestamps, and other time-sensitive operations match the correct time when network time synchronization is lost.
Use Cases for Option 2
Time offset helps enforce consistent time across the network for logging, troubleshooting, access controls, file modifications, and other purposes.
When used with NTP for online devices, it provides redundancy if NTP ever fails. For devices lacking real-time clocks, it provides a way to initialize their time approximately to the proper timezone when booting up offline before obtaining the current time from NTP.
This helps minimize discrepancies in time after booting but before NTP can correct them.
Option 3 Router
Explanation of Default Gateway
The default gateway parameter specifies the IP address of the default router that connects the local network to external networks like the Internet.
Traffic destined for outside the local network is forwarded to the default gateway, which then routes it appropriately.
DHCP option 3 is used to distribute the IP address of the default gateway to DHCP clients.
Role of Option 3 in DHCP
By using option 3, DHCP servers can centrally configure DHCP clients with the correct IP address for the network’s default gateway router.
This removes the need to manually set the default gateway on each client. Having the DHCP server provide the gateway address also simplifies changing the network topology by just updating the DHCP configuration rather than modifying each client.
If the gateway router is replaced, DHCP clients will automatically obtain the new gateway address from the DHCP server.
Option 4 Time Server
A time server is a networked host that provides the current date and time across the network using the Network Time Protocol (NTP).
Enterprise networks often have one or more centralized NTP servers that provide time services to devices across the network.
This maintains consistent time for all clients, which is crucial for logging, scheduling, synchronizing events, access controls, and other purposes.
DHCP option 4 can be used to automatically configure DHCP clients with the IP address(es) of the centralized NTP time server(s).
Configuring Option 4 in DHCP
Network admins configure the DHCP server with the host IP address(es) of the designated NTP time server(s).
When a DHCP client requests network configuration details, the DHCP server will respond and include option 4 listing the NTP server IPs.
The client can then initiate NTP transactions with the specified time servers to obtain the current time without needing manual NTP configuration.
This allows all DHCP clients to seamlessly auto-configure time synchronization.
Option 5 Name Server
Domain Name System (DNS) servers are used to resolve human-friendly hostnames like www.google.com into numeric IP addresses.
Networks utilize one or more DNS servers to provide name resolution services for clients.
DHCP option 5 provides a way for the DHCP server to automatically convey the IP addresses of the DNS name servers to clients.
How to Specify DNS Servers via Option 5?
Network administrators configure the DHCP server with the IP addresses of the designated DNS servers that clients should use for name resolutions.
When a client requests DHCP configuration details, the server will respond and include option 5 listing the configured DNS server IPs.
The client can then contact the specified DNS servers to resolve hostnames without needing manual DNS configuration.
This allows the DHCP server to centrally control DNS server assignment.
Option 6 Domain Name
The domain name specifies the default domain suffix that clients should append to bare hostnames to generate Fully Qualified Domain Names (FQDN).
For example, clients may need to append “.company.com” to hostnames. DHCP option 6 is used to convey the network’s domain name to clients.
When using multiple DNS servers, option 6 provides just the domain name itself. The IP addresses of the DNS servers are specified separately using option 5.
Clients then receive the domain via option 6 and DNS server IPs via option 5 for full DNS configuration.
Option 7 Log Server
Centralized log servers play an important role in IT monitoring and security. They aggregate and analyze log data from clients across the network to identify issues, detect attacks, and gain visibility.
DHCP option 7 provides a method for the DHCP server to automatically configure clients with the IP address of the centralized log server where they should send logging data.
Configuring Option 7
Network administrators first designate a centralized log aggregation server on the network and make note of its IP address.
This log server IP is then configured on the DHCP server as a value for option 7. When DHCP clients request configuration details, the DHCP server will respond and include option 7 specifying the log server IP.
Clients can then automatically send log data to the centralized location without needing manual log server configuration.
Option 8 Cookie Server
In HTTP transactions, web servers can send cookies containing unique identifiers that are returned by clients on subsequent requests to facilitate server-side session management and persistence.
A cookie server is a dedicated host that generates and dispenses unique cookie values to clients. DHCP option 8 can be used to provide clients with the IP address of the cookie server.
While cookie servers were sometimes used in the early days of the web, this functionality is now commonly handled by application code running directly on the web servers rather than via a discrete cookie server. Due to this, option 8 is rarely leveraged today.
Option 9 LPR Server
The Line Printer Remote (LPR) protocol provides capabilities for clients to send print jobs to TCP/IP network-enabled printers.
An LPR server receives LPR requests from clients to facilitate network printing. DHCP option 9 can be utilized to automatically configure clients with the IP address of the LPR server.
Incorporating Option 9 in DHCP
In environments leveraging LPR for network printing, administrators first configure the LPR server with one or more TCP/IP compatible printers.
The IP address of the LPR server is then configured on the DHCP server as the value for option 9.
When DHCP clients request configuration details, the DHCP server will respond and include option 9 specifying the LPR server IP address.
Clients can then automatically direct LPR print jobs to the LPR server without manual configuration.
Option 10 Impress Server
Similar to LPR, the Impress protocol also facilitates network print jobs from clients to TCP/IP capable printers.
An Impress server receives print jobs from Impress clients and processes them to the target printers. DHCP option 10 can automatically provide clients with the IP address of the Impress server.
In networks leveraging Impress printing, admins first configure and deploy an Impress server to handle print jobs. The IP address of this Impress server is then added to the DHCP server settings as the value for option 10.
When clients request DHCP configuration, the server will return option 10 specifying the Impress server IP. Clients can then submit printing over Impress without manual configuration.
Option 11 Resource Location Server
A resource location server is a centralized repository providing clients with the IP addresses of servers hosting specific resources they may request.
Clients query the resource location server with the name of a resource and receive back the IP address of the server hosting it.
DHCP option 11 can be used to provide clients with the IP of the resource location server.
Configuring Option 11
Admins first deploy a resource location server with listings of resources and the associated server IPs.
The IP address of this server is then added to the DHCP server settings as the value for option 11.
When DHCP clients request configuration, the DHCP server will return option 11 specifying the resource location server IP. Clients can then query it for resource IPs.
Option 12 Host Name
DHCP option 12 provides a way for DHCP clients to send their configured hostnames to the DHCP server when requesting an IP address lease.
The DHCP server can then associate the leased IP with the client’s hostname for maintenance purposes.
Some DHCP servers also allow specifying hostnames to be assigned to DHCP clients based on their MAC addresses or other criteria.
When clients send their hostname via option 12, the DHCP server can optionally override it with the administrator-defined hostname for that client.
Option 13 Boot File Size
The boot file size option specifies the number of 512-octet blocks in the default boot image for clients requesting DHCP-assisted booting from the network server. This size helps the server determine which boot file to provide the client.
Diskless Client Configuration
Option 13 is primarily leveraged when performing diskless booting of clients from a network boot server using DHCP.
In diskless client configurations, option 13 along with other boot-related options like next-server and bootfile name help the DHCP and boot servers coordinate to boot the client from the network.
Option 14 Merit Dump File
When client systems crash, they can generate crash dump files containing diagnostic data that administrators can analyze to determine the cause of the crash.
DHCP option 14 provides a way to specify a centralized server where clients should store their crash dump files.
Specifying Merit Dump File Locations
Admins first configure a networked server to collect merit dump files from clients. The IP address of this dump server is then specified as the value for option 14 on the DHCP server.
When clients request DHCP configuration, the server will respond with option 14 indicating the IP where clients should store dump files in the event of crashes.
Option 15 Domain Name
The domain name configures the default domain suffix that clients will append to bare hostnames to form Fully Qualified Domain Names (FQDNs).
DHCP option 15 provides a way for the DHCP server to automatically set the clients’ configured domain name.
Network administrators determine the appropriate domain name for their private network (e.g. company. local).
This domain is then added to the DHCP server settings as the value for option 15.
When DHCP clients request network configuration, the server will respond and include option 15 specifying the domain name. Clients then apply this domain to bare hostnames.
Option 16 Swap Server
Swap servers provide dedicated disk space for clients to temporarily move memory contents to disk storage when they need to free up physical memory.
This swap disk space augments the client’s local memory capacity. DHCP option 16 facilitates automatically configuring clients with the IP address of the centralized swap server.
Admins first configure a server with disk space allocated for client swap purposes. The IP address of this swap server is then added to the DHCP server settings as the value for option 16.
When clients request DHCP configuration, the server responds with option 16 specifying the swap server IP so clients can leverage it for virtual memory needs.
Option 17 Root Path
When performing diskless network booting of clients, the root path designates the location on the boot server where the client should mount its root file system. DHCP option 17 is used to convey this root path to clients.
How to Set the Root Path?
Administrators configure diskless boot servers with directories to house each client’s root file system.
The path to these root directories is then added to the DHCP server as the value for option 17.
On client boot, the DHCP server provides the root path via option 17 so the client knows where to mount its diskless root FS.
Option 18 Extensions Path
The extensions path specifies the location of extensions for diskless clients, such as additional software packages, configurations, and diskless support files. DHCP uses option 18 to inform clients of the extension’s path location on the boot server.
When setting up diskless client boot servers, admins create an extensions directory to house additional client files.
This directory path is then configured on the DHCP server as the value for option 18. Clients receive the extensions path via option 18 when booting, informing them where to access additional extension files.
Option 19 IP Forwarding
DHCP option 19 controls whether the client should enable IP packet forwarding, which allows routing of IP traffic between networks. This feature can be centrally enabled/disabled via the DHCP server.
Admins determine if IP forwarding functionality should be enabled on DHCP clients. 0 is set on the DHCP server to disable forwarding, while 1 enables it.
This value is returned to the client via option 19 upon requesting DHCP configuration. The client then applies this system-wide forwarding rule.
Option 20 Non-Local Source Routing
Non-local source routing allows clients to accept network packets that specify the route the packet should take through networks. This can potentially be exploited maliciously. Option 20 controls non-local acceptance.
Network admins decide if non-local source routing should be enabled or disabled based on their security policies.
0 is configured on the DHCP server to decline non-local packets, while 1 permits them. This value is supplied to clients via option 20, configuring acceptance system-wide.
Option 21 Policy Filter
Network policy filters enforce rules and restrictions on client traffic and usage. They permit/deny actions based on criteria like protocols, ports, IPs, and MAC addresses. DHCP option 21 facilitates the distribution of policy filters.
Admins first create packet filtering policies on a server. The path to the filter files is then configured on the DHCP server as the value for option 21. Clients receive this path via option 21 and apply the centralized policy filters specified in the files.
Option 22 Max Datagram Reassembly Size
IP datagrams may be fragmented into smaller pieces for transmission. This option controls the maximum size IP datagram the client should reassemble from fragments received. The value is set by the DHCP server.
Network administrators determine the appropriate max fragmented datagram size clients should support based on network capabilities and performance requirements.
This value is configured on the DHCP server in bytes as the value for option 22. Clients then receive and apply this maximum reassembly size.
Option 23 Default IP TTL
The IP Time To Live (TTL) value specifies the maximum number of router hops an IP packet can traverse before being discarded. DHCP option 23 controls the default TTL clients applied to IP packets.
Network administrators determine the appropriate default IP TTL value clients should use, keeping in mind that lower values may block connectivity for remote networks.
This desired TTL is configured on the DHCP server as the value for option 23. It is then returned to clients in DHCP responses, setting the default system-wide TTL applied to IP packets.
Option 24 Path MTU Aging Timeout
The Path Maximum Transmission Unit (MTU) specifies the largest packet size that can be sent over a route without fragmentation. DHCP option 24 sets the timeout for Path MTU values cached by clients.
Admins configure the DHCP server with the desired timeout value in seconds that will cause cached Path MTU information to expire on clients.
This allows Path MTU to be recalculated over time as network conditions change. The configured timeout is sent to clients using option 24.
Option 25 Path MTU Plateau Table
This option specifies a table of plateau Path MTU sizes that can be cached by clients for various destination network ranges. It improves Path MTU efficiency.
Network admins determine appropriate plateau Path MTU values for different destination network ranges.
This table is configured on the DHCP server and conveyed to clients via option 25. Clients can then consult the plateau table when calculating Path MTU.
Option 26 Interface MTU
The Interface MTU option specifies the MTU size in bytes clients should set on their local network interface(s). This can maximize efficiency for the local network medium.
How to Set Interface MTU via Option 26?
Admins calculate the optimal MTU value for the client network interface based on networking hardware constraints. This value is set on the DHCP server as option 26. Clients then receive and apply the specified interface MTU.
Option 27 All Subnets Are Local
This option indicates whether a client should consider all configured subnets as part of the local routing domain. When enabled, remote subnets have no gateway.
Network admins determine if all subnets should be treated as local based on network topology. 1 is set on the DHCP server to enable this behavior via option 27, while 0 disables it. Clients adhere to the specified paradigm.
Option 28 Broadcast Address
The broadcast address is used for sending information simultaneously to all hosts on a subnet. DHCP option 28 provides a dynamic configuration of the broadcast address.
Admins configure the appropriate broadcast address value on the DHCP server corresponding to the client subnet(s). This address is relayed to clients through option 28, establishing the broadcast behavior.
Option 29 Perform Mask Discovery
This option controls whether clients should perform subnet mask discovery using ICMP mask request messages or accept the DHCP-supplied mask.
A value of 1 on the DHCP server enables client mask discovery via ICMP messages. A value of 0 disables discovery and mandates clients use the DHCP server-provided mask. This is conveyed to clients via option 29.
Option 30 Mask Supplier
This option controls whether the DHCP server should respond to client ICMP mask request messages with ICMP mask supplier responses.
A value of 1 set on the DHCP server enables it to act as an ICMP mask supplier, responding to client requests. A value of 0 disables this behavior. Clients adhere based on the value received in option 30.
We covered many frequently used options like DNS server, router, domain name, NTP server, and subnet mask which simplify network configuration.
Correct DHCP option settings are crucial for providing clients with appropriate network parameters and ensuring efficient connectivity.