Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dynamic Host Configuration Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Options== Options are octet strings of varying length. This is called [[Type–length–value]] encoding. The first octet is the option code, the second octet is the number of following octets and the remaining octets are code dependent. For example, the DHCP message-type option for an offer would appear as 0x35, 0x01, 0x02, where 0x35 is code 53 for "DHCP message type", 0x01 means one octet follows and 0x02 is the value of "offer". The following tables list the available DHCP options.{{Ref RFC|2132}}<ref name=":0" /> {| class="wikitable sortable" |+ RFC 1497 (BOOTP Vendor Information Extensions) vendor extensions<ref name=rfc2132/>{{rp|Section 3}} |- ! Code !! Name !! Length !! Notes |- | 0 || Pad || 0 [[Octet (computing)|octets]] || Can be used to pad other options so that they are aligned to the word boundary; is not followed by length byte |- | 1 || Subnet mask || 4 octets || Client's subnet mask as per [https://datatracker.ietf.org/doc/html/rfc950 RFC 950]. If both the subnet mask and the router option (option 3) are included, the subnet mask option must be first. |- | 2 || Time offset || 4 octets ||Offset of the client's subnet in seconds from Coordinated Universal Time (UTC). The offset is expressed as a two's complement 32-bit integer. A positive offset indicates a location east of the zero meridian and a negative offset indicates a location west of the zero meridian. |- | 3 || Router || Multiples of 4 octets || Available routers, should be listed in order of preference |- | 4 || Time server || Multiples of 4 octets || Available [[Time Protocol]] servers to synchronise with, should be listed in order of preference |- | 5 || Name server || Multiples of 4 octets || Available [[IEN 116]] name servers, should be listed in order of preference |- | 6 || Domain name server || Multiples of 4 octets || Available [[DNS]] servers, should be listed in order of preference |- | 7 || Log server || Multiples of 4 octets || Available log servers, should be listed in order of preference |- | 8 || Cookie server || Multiples of 4 octets || ''Cookie ''in this case means "fortune cookie" or "quote of the day", a pithy or humorous anecdote often sent as part of a logon process on large computers; it has nothing to do with [[HTTP cookie|cookies sent by websites]]. |- | 9 || LPR Server || Multiples of 4 octets ||A list of [[Line Printer Daemon protocol]] servers available to the client, should be listed in order of preference |- | 10 || Impress server || Multiples of 4 octets ||A list of Imagen Impress servers available to the client, should be listed in order of preference |- | 11 || Resource location server || Multiples of 4 octets ||A list of [[Resource Location Protocol]] servers available to the client, should be listed in order of preference |- | 12 || Host name || Minimum of 1 octet ||Name of the client. The name may be qualified with the local domain name. |- | 13 || Boot file size || 2 octets || Length of the boot image in 512B blocks |- | 14 || [[Merit Network|Merit]] dump file || Minimum of 1 octet || Path where crash dumps should be stored |- | 15 || Domain name || Minimum of 1 octet || |- | 16 || Swap server || 4 octets || |- | 17 || Root path || Minimum of 1 octet || |- | 18 || Extensions path || Minimum of 1 octet || |- | 255 || End || 0 octets || Used to mark the end of the vendor option field |} {| class="wikitable sortable" |+ IP layer parameters per host<ref name=rfc2132/>{{rp|Section 4}} |- ! Code !! Name !! Length !! Notes |- | 19 || IP forwarding enable/disable || 1 octet || |- | 20 || Non-local source routing enable/disable || 1 octet || |- | 21 || Policy filter || Multiples of 8 octets || |- | 22 || Maximum datagram reassembly size || 2 octets || |- | 23 || Default IP time-to-live || 1 octet || |- | 24 || Path MTU aging timeout || 4 octets || |- | 25 || Path MTU plateau table || Multiples of 2 octets || |} {| class="wikitable sortable" |+ IP Layer Parameters per Interface<ref name=rfc2132/>{{rp|Section 5}} |- ! Code !! Name !! Length !! Notes |- | 26 || Interface MTU || 2 octets || |- | 27 || All subnets are local || 1 octet || |- | 28 || Broadcast address || 4 octets || |- | 29 || Perform mask discovery || 1 octet || |- | 30 || Mask supplier || 1 octet || |- | 31 || Perform router discovery || 1 octet || |- | 32 || Router solicitation address || 4 octets || |- | 33 || Static route || Multiples of 8 octets || A list of destination/router pairs |} {| class="wikitable sortable" |+ Link layer parameters per interface<ref name=rfc2132/>{{rp|Section 6}} |- ! Code !! Name !! Length !! Notes |- | 34 || Trailer encapsulation option || 1 octet || |- | 35 || ARP cache timeout || 4 octets || |- | 36 || Ethernet encapsulation || 1 octet || |} {| class="wikitable sortable" |+ TCP parameters<ref name=rfc2132/>{{rp|Section 7}} |- ! Code !! Name !! Length !! Notes |- | 37 || TCP default TTL || 1 octet || |- | 38 || TCP keepalive interval || 4 octets || |- | 39 || TCP keepalive garbage || 1 octet || |} {| class="wikitable sortable" |+ Application and service parameters<ref name=rfc2132/>{{rp|Section 8}} |- ! Code !! Name !! Length !! Notes |- | 40 || Network information service domain || Minimum of 1 octet || |- | 41 || Network information servers || Multiples of 4 octets || |- | 42 || [[Network Time Protocol]] (NTP) servers || Multiples of 4 octets || |- | 43 || Vendor-specific information || Minimum of 1 octets || |- | 44 || NetBIOS over TCP/IP name server || Multiples of 4 octets || |- | 45 || NetBIOS over TCP/IP datagram Distribution Server || Multiples of 4 octets || |- | 46 || NetBIOS over TCP/IP node type || 1 octet || |- | 47 || NetBIOS over TCP/IP scope || Minimum of 1 octet || |- | 48 || [[X Window System]] font server || Multiples of 4 octets || |- | 49 || X Window System display manager || Multiples of 4 octets || |- | 64 || [[Network Information Service]]+ domain || Minimum of 1 octet || |- | 65 || Network Information Service+ servers || Multiples of 4 octets || |- | 68 || Mobile IP home agent || Multiples of 4 octets || |- | 69 || [[Simple Mail Transfer Protocol]] (SMTP) server || Multiples of 4 octets || |- | 70 || [[Post Office Protocol]] (POP3) server || Multiples of 4 octets || |- | 71 || [[Network News Transfer Protocol]] (NNTP) server || Multiples of 4 octets || |- | 72 || Default [[World Wide Web]] (WWW) server || Multiples of 4 octets || |- | 73 || Default [[Finger protocol]] server || Multiples of 4 octets || |- | 74 || Default [[Internet Relay Chat]] (IRC) server || Multiples of 4 octets || |- | 75 || [[StreetTalk]] server || Multiples of 4 octets || |- | 76 || StreetTalk Directory Assistance (STDA) server || Multiples of 4 octets || |} {| class="wikitable sortable" |+ DHCP extensions<ref name=rfc2132/>{{rp|Section 9}} |- ! Code !! Name !! Length !! Notes |- | 50 || Requested IP address || 4 octets || |- | 51 || IP address lease time || 4 octets || |- | 52 || Option overload || 1 octet || |- | 53 || DHCP message type || 1 octet || |- | 54 || Server identifier || 4 octets || |- | 55 || Parameter request list || Minimum of 1 octet || |- | 56 || Message || Minimum of 1 octet || |- | 57 || Maximum DHCP message size || 2 octets || |- | 58 || Renewal (T1) time value || 4 octets || |- | 59 || Rebinding (T2) time value || 4 octets || |- | 60 || Vendor class identifier || Minimum of 1 octet || |- | 61 || Client identifier || Minimum of 2 octets || |- | 66 || TFTP server name || Minimum of 1 octet || |- | 67 || Bootfile name || Minimum of 1 octet || |} ===DHCP message types=== This table lists the DHCP message types. These codes are the value in the DHCP extension 53, shown in the table above. {| class="wikitable sortable" |+ DHCP message types |- ! Code !! Name !! Length !! RFC |- | 1 || DHCPDISCOVER || 1 octet || {{Sum RFC|2132|plain=yes}}{{Ref RFC|2132|rsection=9.6}} |- | 2 || DHCPOFFER || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 3 || DHCPREQUEST || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 4 || DHCPDECLINE || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 5 || DHCPACK || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 6 || DHCPNAK || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 7 || DHCPRELEASE || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 8 || DHCPINFORM || 1 octet || {{Sum RFC|2132|plain=yes}} |- | 9 || DHCPFORCERENEW || 1 octet || {{Sum RFC|3203|plain=yes}}{{Ref RFC|3203|rsection=4}} |- | 10 || DHCPLEASEQUERY || 1 octet || {{Sum RFC|4388|plain=yes}}{{Ref RFC|4388|rsection=6.1}} |- | 11 || DHCPLEASEUNASSIGNED || 1 octet || {{Sum RFC|4388|plain=yes}} |- | 12 || DHCPLEASEUNKNOWN || 1 octet || {{Sum RFC|4388|plain=yes}} |- | 13 || DHCPLEASEACTIVE || 1 octet || {{Sum RFC|4388|plain=yes}} |- | 14 || DHCPBULKLEASEQUERY || 1 octet || {{Sum RFC|6926|plain=yes}}{{Ref RFC|6926|rsection=6.2.1}} |- | 15 || DHCPLEASEQUERYDONE || 1 octet || {{Sum RFC|6926|plain=yes}} |- | 16 || DHCPACTIVELEASEQUERY || 1 octet || {{Sum RFC|7724|plain=yes}}{{Ref RFC|7724|rsection=5.2.1}} |- | 17 || DHCPLEASEQUERYSTATUS || 1 octet || {{Sum RFC|7724|plain=yes}} |- | 18 || DHCPTLS || 1 octet || {{Sum RFC|7724|plain=yes}} |} ====Client vendor identification==== An option exists to identify the vendor and functionality of a DHCP client. The information is a [[Variable-length code|variable-length string]] of characters or octets which has a meaning specified by the vendor of the DHCP client. One method by which a DHCP client can communicate to the server that it is using a certain type of hardware or firmware is to set a value in its DHCP requests called the Vendor Class Identifier (VCI) (Option 60). The value to which this option is set gives the DHCP server a hint about any required extra information that this client needs in a DHCP response. Some types of [[set-top boxes]] set the VCI to inform the DHCP server about the hardware type and functionality of the device. An [[Aruba Networks|Aruba]] campus [[wireless access point]], for example, supplies value 'ArubaAP' as option 60 in its DHCPDISCOVER message.<ref name="option60">{{cite web|title=Aruba DHCP Option 60|date=7 October 2020 |url=https://the-ethernets.com/2020/10/aruba-dhcp-option-60/}}</ref> The DHCP server can then augment its DHCPOFFER with an IP address of an Aruba [[wireless controller]] in option 43, so the access point knows where to register itself. Setting a VCI by the client allows a DHCP server to differentiate between client machines and process the requests from them appropriately. ===Other extensions=== {| class="wikitable sortable" |+ Documented DHCP options |- ! Code !! Name !! Length !! RFC |- | 77 || User Class || Minimum of 2 octets || {{Sum RFC|3004|plain=yes|ref=yes}} |- | 82 || [[#Relay agent information sub-options|Relay agent information]] || Minimum of 2 octets || {{Sum RFC|3046|plain=yes|ref=yes}} |- | 85 || [[Novell Directory Service]] (NDS) servers || Minimum of 4 octets, multiple of 4 octets || {{Sum RFC|2241|plain=yes}}{{Ref RFC|2241|rsection=2}} |- | 86 || NDS tree name || Variable || {{Sum RFC|2241|plain=yes}}{{Ref RFC|2241|rsection=3}} |- | 87 || NDS context || Variable || {{Sum RFC|2241|plain=yes}}{{Ref RFC|2241|rsection=4}} |- | 100 || [[Time zone]], POSIX style || Variable || {{Sum RFC|4833|plain=yes|ref=yes}} |- | 101 || [[Time zone]], [[tz database]] style || Variable || {{Sum RFC|4833|plain=yes}} |- | 114 || DHCP Captive-Portal || Variable || {{Sum RFC|8910|plain=yes|ref=yes}} |- | 119 || [[Search domain|Domain search]] || Variable || {{Sum RFC|3397|plain=yes|ref=yes}} |- | 121 || Classless static route || Variable || {{Sum RFC|3442|plain=yes|ref=yes}} |- | 209 || Configuration File || Variable || {{Sum RFC|5071|plain=yes|ref=yes}} |- | 210 || Path Prefix || Variable || {{Sum RFC|5071|plain=yes}} |- | 211 || Reboot Time || Variable || {{Sum RFC|5071|plain=yes}} |} ====Relay agent information sub-options==== The relay agent information option (option 82) specifies container for attaching sub-options to DHCP requests transmitted between a DHCP relay and a DHCP server.<ref name="ietf_spec_dhcp82">{{cite journal|last1=Patrick|first1=Michael|title=DHCP Relay Agent Information Option|url=https://tools.ietf.org/html/rfc3046|website=IETF Documents|publisher=[[IETF]]|access-date=22 July 2017|doi=10.17487/RFC3046|date=January 2001|doi-access=|url-access=subscription}}</ref> {| class="wikitable sortable" |+ Relay agent sub-options |- ! Code !! Name !! Length !! RFC |- | 1 || Agent Circuit ID || Minimum of 1 octet || {{Sum RFC|3046|plain=yes|ref=yes}} |- | 2 || Agent Remote ID || Minimum of 1 octet || {{Sum RFC|3046|plain=yes}} |- | 4 || Data-Over-Cable Service Interface Specifications (DOCSIS) device class || 4 octets || {{Sum RFC|3256|plain=yes|ref=yes}} |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)