2007年9月9日星期日

DHCP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

RFC2131 - Dynamic Host Configuration Protocol
http://www.ietf.org/rfc/rfc2131.txt?number=2131

RFC2132 - DHCP Options and BOOTP Vendor Extensions
http://www.ietf.org/rfc/rfc2132.txt?number=2132

RFC3046 -DHCP Relay Agent Information Option
http://www.ietf.org/rfc/rfc3046.txt?number=3046

RFC3396 - Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)
http://www.ietf.org/rfc/rfc3396.txt?number=3396

RFC3925 - Vendor-Identifying Vendor Options for Dynamic Host Configuration Protocol version 4 (DHCPv4)

http://www.ietf.org/rfc/rfc3925.txt?number=3925

RFC3495 - Dynamic Host Configuration Protocol (DHCP) Option for CableLabs Client Configuration
http://www.ietf.org/rfc/rfc3495.txt?number=3495

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

为做到通用,DHCP允许分配3种类型的地址:
  • 类似BOOTP,DHCP允许手工配置,管理人员可为特定的某台计算机配置特定的地址
  • DHCP也允许自动配置,管理人员允许DHCP服务器为第一次上网的机器分配一个永久地址
  • DHCP允许完全动态配置,服务器可使计算机在一段有限的时间内“租用”一个地址
由于DHCP允许一台主机无人工干预即可获得通信所需的全部参数,所以DHCP是允许自动配置的。当然,自动配置受到管理上的约束。

为适应各种可能的环境,DHCP不指定租用期的固定长度,而是让客户申请某一个租用期,并由服务器通知客户它认可的租用期。

BOOTP和DHCP都使用中继代理(relay agent),中继代理允许计算机与非本地网络上的服务器联系。当中继代理接收到来自客户的广播申请,他将申请转发到服务器,然后返回服务器发给主机的响应。中继代理使多地址配置变得复杂,因为服务器可能收到同一台机器发出的多个请求。由于BOOTP和DHCP都使用了客户标识符,我们假定一个多地址客户发送识别特定接口的一个值(如一个唯一的硬件地址),因此即使是通过中继代理收到请求,服务器也能区分一台多地址主机发出的多个请求。


上图为客户使用DHCP获取其IP地址时的6个主要状态和状态间的转换

为使用DHCP,一台主机通过把报文广播给本地网上服务器而成为客户。然后该主机收集服务器提供的地址,从中选择一个地址并验证服务器是否接受。

当不再需要租用地址时,DHCP允许客户终止租用,不再等待租用到期。

当DHCP客户进入已绑定状态后,客户设置3个定时器,分别控制租用更新重新绑定到期
  • 第一个定时器的默认值通常是总租用期的50%,当其到期时客户必须尝试重新租用期。
  • 第二个定时器在租用期的87.5%时到期,并使客户从更新状态转换到重绑定状态。
  • 客户转换到重绑定状态后,已经请求原服务器和本地网络上其他服务器延长其租用期,很少有客户在第三个定时器到期前还没有从任何一个服务器收到响应。
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

DHCP Options的总结
The Dynamic Host Configuration Protocol (DHCP) [1] provides a framework for passing
configuration information to hosts on a TCP/IP network. Configuration parameters and
other control information are carried in tagged data items that are stored in the 'options' field
of the DHCP message. The data items themselves are also called "options."

RFC2132:
0 - pad option
255 - end option
1 - subnet mask
2 - time offset
3 - router option
4 - time server option
5 - name server option
6 - domain name server option
7 - log server option
8 - cookie server option
9 - LRP server option
10 - impress server option
11 - resource location server option
12 - host name option
13 - boot file size option
14 - merit dump file
15 - domain name
16 - swap server
17 - root path
18 - extensions path
19 - IP Forwarding Enable/Disable Option
20 - Non-Local Source Routing Enable/Disable Option
21 - Policy Filter Option
22 - Maximum Datagram Reassembly Size
23 - Default IP Time-to-live
24 - Path MTU Aging Timeout Option
25 - Path MTU Plateau Table Option
26 - Interface MTU Option
27 - All Subnets are Local Option
28 - Broadcast Address Option
29 - Perform Mask Discovery Option
30 - Mask Supplier Option
31 - Perform Router Discovery Option
32 - Router Solicitation Address Option
33 - Static Route Option
34 - Trailer Encapsulation Option
35 - ARP Cache Timeout Option
36 - Ethernet Encapsulation Option
37 - TCP Default TTL Option
38 - TCP Keepalive Interval Option
39 - TCP Keepalive Garbage Option
40 - Network Information Service Domain Option
41 - Network Information Servers Option
42 - Network Time Protocol Servers Option
43 - Vendor Specific Information
44 - NetBIOS over TCP/IP Name Server Option
45 - NetBIOS over TCP/IP Datagram Distribution Server Option
46 - NetBIOS over TCP/IP Node Type Option
47 - NetBIOS over TCP/IP Scope Option
48 - X Window System Font Server Option
49 - X Window System Display Manager Option
50 - Requested IP Address
51 - IP Address Lease Time
52 - Option Overload
53 - DHCP Message Type
54 - Server Identifier
55 - Parameter Request List
56 - Message
57 - Maximum DHCP Message Size
58 - Renewal (T1) Time Value
59 - Rebinding (T2) Time Value
60 - Vendor class identifier
61 - Client-identifier
64 - Network Information Service+ Domain Option
65 - Network Information Service+ Servers Option
66 - TFTP server name
67 - Bootfile name
68 - Mobile IP Home Agent option
69 - Simple Mail Transport Protocol (SMTP) Server Option
70 - Post Office Protocol (POP3) Server Option
71 - Network News Transport Protocol (NNTP) Server Option
72 - Default World Wide Web (WWW) Server Option
73 - Default Finger Server Option
74 - Default Internet Relay Chat (IRC) Server Option
75 - StreetTalk Server Option
76 - StreetTalk Directory Assistance (STDA) Server Option

RFC3495:
122 - CableLabs Client Configuration Option

RFC3925:
The Dynamic Host Configuration Protocol (DHCP) options for Vendor
Class and Vendor-Specific Information can be limiting or ambiguous
when a DHCP client represents multiple vendors. This document
defines two new options, modeled on the IPv6 options for vendor class
and vendor-specific information, that contain Enterprise Numbers to
remove ambiguity.

124 - Vendor-Identifying Vendor Class Option
125 - Vendor-Identifying Vendor-Specific Information Option

RFC3046:
82 - Relay Agent Information Option

没有评论:

World Clocks

Endless Space Headline Animator

Mobile Ads