概述
General Options
Option 1 (Subnet Mask)
Description
The subnet mask option specifies the client's subnet mask as per RFC 950. If both the subnet mask and the router option are specified in a DHCP reply, the subnet mask option MUST be first. The code for the subnet mask option is 1, and its length is 4 octets.
VALIDVALUE
e.g. 255.255.0.0
SETTING
netmask
Option 3 (Router)
Description
The router option specifies a list of IP addresses for routers on the client's subnet. Routers SHOULD be listed in order of preference. The code for the router option is 3. The minimum length for the router option is 4 octets, and the length MUST always be a multiple of 4.
VALIDVALUE
e.g. 192.168.0.1
SETTING
gateway
Option 4 (Time Server)
Description
The time server option specifies the time server (RFC 868), available to the client. The code for the time server option is 4. The minimum length for this option is 4 octets, and the length MUST always be a multiple of 4. Time Server is mapped to NTP Server.
Available since 8.5.1
VALIDVALUE
192.53.103.103, de.pool.ntp.org
SETTING
ntp_server
Option 6 (DNS Server)
Description
The domain name server option specifies a list of Domain Name System (STD 13, RFC 1035) name servers available to the client. Servers SHOULD be listed in order of preference. The code for the domain name server option is 6. The minimum length for this option is 4 octets, and the length MUST always be a multiple of 4.
VALIDVALUE
Private: 192.168.0.9
Public: 174.129.1.129
SETTING
dns_server1
dns_server2
Option 12 (Hostname)
Description
This option specifies the name of the client. The name may or may not be qualified with the local domain name (see section 3.17 for the preferred way to retrieve the domain name). See RFC 1035 for character set restrictions. The code for this option is 12, and its minimum length is 1.
VALIDVALUE
phone123
SETTING
phone_name
Option 15 (DNS Domain)
Description
This option specifies the domain name that client should use when resolving hostnames via the Domain Name System. The code for this option is 15. Its minimum length is 1.
VALIDVALUE
company.com
SETTING
dns_domain
Option 42 (NTP Server)
Description
The NTP server option specifies the NTP server (RFC 868), available to the client. The code for the NTP server option is 42. The minimum length for this option is 4 octets, and the length MUST always be a multiple of 4.
VALIDVALUE
192.53.103.103, de.pool.ntp.org
SETTING
ntp_server
Option 50 (Requested IP Address)
Description
This option is used in a client request (DHCPDISCOVER) to allow the client to request that a particular IP address be assigned. The code for this option is 50, and its length is 4.
Option 51 (IP Address Lease Time)
Description
This option is used in a client request (DHCPDISCOVER or DHCPREQUEST) to allow the client to request a lease time for the IP address. In a server reply (DHCPOFFER), a DHCP server uses this option to specify the lease time it is willing to offer. The time is in units of seconds, and is specified as a 32-bit unsigned integer. The code for this option is 51, and its length is 4.
Option 53 (DHCP Message Type)
Description
This option is used to convey the type of the DHCP message. The code for this option is 53, and its length is 1. Legal values for this option are:
1. DHCPDISCOVER
2. DHCPOFFER
3. DHCPREQUEST
4. DHCPDECLINE
5. DHCPACK
6. DHCPNAK
7. DHCPRELEASE
8. DHCPINFORM
Option 54 (Server Identifier)
Description
This option is used in DHCPOFFER and DHCPREQUEST messages, and may optionally be included in the DHCPACK and DHCPNAK messages. DHCP servers include this option in the DHCPOFFER in order to allow the client to distinguish between lease offers. DHCP clients use the contents of the 'server identifier' field as the destination address for any DHCP messages unicast to the DHCP server. DHCP clients also indicate which of several lease offers is being accepted by including this option in a DHCPREQUEST message. The identifier is the IP address of the selected server. The code for this option is 54, and its length is 4.
Option 55 (Parameter Request List)
Description
This option is used by a DHCP client to request values for specified configuration parameters. The list of requested parameters is
specified as n octets, where each octet is a valid DHCP option code as defined in this document. The client MAY list the options in order of preference. The DHCP server is not required to return the options in the requested order, but MUST try to insert the requested options in the order requested by the client. The code for this option is 55. Its minimum length is 1.
Option 120 (SIP Servers)
Description
RFC 3361
VALIDVALUE
e.g. sip.company.com
Option 125 (Vendor-Identifying Vendor-Specific)
Description
RFC 3925
VALIDVALUE
e.g.
Option 135 (HTTP Proxy for phone-specific applications)
Description
RFC 4578
VALIDVALUE
Option 143 ()
Description
RFC 3942
VALIDVALUE
VLAN Options
Option 132 (vlan-id)
Description
Read more about vlan tagging and vlan id here: IEEE802.1Q.
supported since 7.3.24/8.2.7.
VALIDVALUE
vlan id
linux dhcpd3 syntax example:
option vlan-id code 132 = text ;
option vlan-id "128";
SETTING
vlan_id
Option 133 (vlan-qos)
Description
Here you can read more about vlan tagging IEEE802.1Q and vlan qos IEEE802.1P.
supported since 7.3.24/8.2.7.
VALIDVALUE
<vlan qos>
linux dhcpd3 syntax example:
option vlan-qos code 133 = text ;
option vlan-qos "5";
SETTING
vlan_qos
Auto Provisioning Options
Option 43 (vendor-encapsulated-options)
Firmware
Encapsulated Option 66 and Option 67 are supported since 7.3.17/8.2.1
Encapsulated Option 132 and Option 133 are supported since 7.3.24/8.2.7.
Description
Encapsulated DHCP options, for encoding see RFC 2132 Section 2. DHCP Option Field Format; One can tunnel vendor specific DHCP options depending on the vendor-id (option 60) send before from the phone to the DHCP server. Vendor specific DHCP options may be provided encapsulated in option 43, see RFC 2132 Section 8.4. Vendor Specific Information.
VALIDVALUE (Examples)
linux dhcpd3 syntax:
option vendor-encapsulated-options
42:0c:68:74:74:70:3a:2f:2f:74:65:73:74:00:43:12:73:6e:6f:6d:2f:73:65:74:74:69:6e:67:73:2e:70:68:70:00;
Which means tunnel opt 66 http://test and opt 67 snom/settings.php via opt 43.
option vendor-encapsulated-options
84:02:33:00;
Which means tunnel opt 132 value 3 via opt 43.
option vendor-encapsulated-options
84:04:31:31:34:00:85:02:35:00;
Which means tunnel opt 132 value 114 and opt 133 value 5 via opt 43.
Option 60 (Vendor class identifier)
Firmware
Supported since 7.3.15
Description
This option is used by DHCP clients to optionally identify the vendor type and configuration of a DHCP client. The information is a string of n octets, interpreted by servers. Vendors may choose to define specific vendor class identifiers to convey particular configuration or other identification information about a client. For example, the identifier may encode the client's hardware configuration. Servers not equipped to interpret the class-specific information sent by a client MUST ignore it (although it may be reported). Servers that respond SHOULD only use option 43 to return the vendor-specific information to the client. The code for this option is 60, and its minimum length is 1.
The phone sends its type (i.e. snom320) via this option to the DHCP server.
Option 66 (TFTP server name)
Description
This option is used to identify a TFTP server when the 'sname' field in the DHCP header has been used for DHCP options. The code for this option is 66, and its minimum length is 1.
VALIDVALUE
<protocol> : // <IP address> or <domain> e.g. http://10.0.0.2, https://provisioning.company.com
<IP address> or <domain> e.g. 10.0.0.2, provisioning.company.com
where <protocol> = server type/protocol
where <IP address> = server IP address
where <domain> = server domain name
NOTE
Without specifying the <protocol> the firmware will attempt all supported server protocol types consecutively:
1. tftp://...
2. http://...
3. https://...
SETTING
update_server
Option 67 (Bootfile name)
Description
This option is used to identify a bootfile when the 'file' field in the DHCP header has been used for DHCP options. The code for this option is 67, and its minimum length is 1.
VALIDVALUE
<path> e.g. settingfiles/snom/snom300.cfg, settingfiles/snom/snom320.htm, settingfiles/snom/snom360.xml
<empty> or <not used>
where <path> = path to the location of the setting file/script file
NOTE
If this option is empty or not specified at all the firmware automatically requests the following setting files, except the whole URL is encoded in option 66:
all snom300 phones request --> http://<domain>/snom300.htm
all snom320 phones request --> http://<domain>/snom320.htm
all snom360 phones request --> http://<domain>/snom360.htm
all snom370 phones request --> http://<domain>/snom370.htm
all snom820 phones request --> http://<domain>/snom820.htm
all snom870 phones request --> http://<domain>/snom870.htm
all snom MeetingPoint phones request --> http://<domain>/snommp.htm
SETTING
最后
以上就是时尚小懒虫为你收集整理的DHCP Options的全部内容,希望文章能够帮你解决DHCP Options所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复