Internet Engineering Task Force (IETF)                           N. Shen
Request for Comments: 8357                                       E. Chen
Category: Standards Track                                  Cisco Systems
ISSN: 2070-1721                                               March 2018
        
Internet Engineering Task Force (IETF)                           N. Shen
Request for Comments: 8357                                       E. Chen
Category: Standards Track                                  Cisco Systems
ISSN: 2070-1721                                               March 2018
        

Generalized UDP Source Port for DHCP Relay

DHCP中继的通用UDP源端口

Abstract

摘要

This document defines an extension to the DHCP protocols that allows a relay agent to use any available source port for upstream communications. The extension also allows inclusion of a DHCP option that can be used to statelessly route responses back to the appropriate source port on downstream communications.

本文档定义了DHCP协议的扩展,允许中继代理使用任何可用的源端口进行上游通信。该扩展还允许包含DHCP选项,该选项可用于在下游通信中将响应无状态路由回相应的源端口。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8357.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问https://www.rfc-editor.org/info/rfc8357.

Copyright Notice

版权公告

Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2018 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(https://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
     2.2.  Definitions . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Changes to DHCP Specifications  . . . . . . . . . . . . . . .   4
     3.1.  Additions to DHCPv4 in RFC 2131 . . . . . . . . . . . . .   4
     3.2.  Additions to DHCPv6 in RFC 3315 . . . . . . . . . . . . .   4
   4.  Relay Source Port Sub-option and Option . . . . . . . . . . .   4
     4.1.  Source Port Sub-option for DHCPv4 . . . . . . . . . . . .   5
     4.2.  Relay Source Port Option for DHCPv6 . . . . . . . . . . .   5
   5.  Relay Agent and Server Behavior . . . . . . . . . . . . . . .   6
     5.1.  DHCPv4  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     5.2.  DHCPv6  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     5.3.  Compatibility . . . . . . . . . . . . . . . . . . . . . .   7
     5.4.  Deployment Considerations . . . . . . . . . . . . . . . .   7
   6.  Example of an IPv6-Cascaded Relay . . . . . . . . . . . . . .   7
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   9
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .   9
   9.  Normative References  . . . . . . . . . . . . . . . . . . . .   9
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  10
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  10
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
     2.2.  Definitions . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Changes to DHCP Specifications  . . . . . . . . . . . . . . .   4
     3.1.  Additions to DHCPv4 in RFC 2131 . . . . . . . . . . . . .   4
     3.2.  Additions to DHCPv6 in RFC 3315 . . . . . . . . . . . . .   4
   4.  Relay Source Port Sub-option and Option . . . . . . . . . . .   4
     4.1.  Source Port Sub-option for DHCPv4 . . . . . . . . . . . .   5
     4.2.  Relay Source Port Option for DHCPv6 . . . . . . . . . . .   5
   5.  Relay Agent and Server Behavior . . . . . . . . . . . . . . .   6
     5.1.  DHCPv4  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     5.2.  DHCPv6  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     5.3.  Compatibility . . . . . . . . . . . . . . . . . . . . . .   7
     5.4.  Deployment Considerations . . . . . . . . . . . . . . . .   7
   6.  Example of an IPv6-Cascaded Relay . . . . . . . . . . . . . .   7
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   9
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .   9
   9.  Normative References  . . . . . . . . . . . . . . . . . . . .   9
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  10
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  10
        
1. Introduction
1. 介绍

RFC 2131 [RFC2131] and RFC 3315 [RFC3315] specify the use of UDP as the transport protocol for DHCP. They also define both the server-and client-side port numbers. The IPv4 server port is UDP number (67) and the client port is UDP number (68); for IPv6, the server port is (547) and the client port is (546).

RFC 2131[RFC2131]和RFC 3315[RFC3315]指定使用UDP作为DHCP的传输协议。它们还定义了服务器端和客户端端口号。IPv4服务器端口为UDP号(67),客户端端口为UDP号(68);对于IPv6,服务器端口为(547),客户端端口为(546)。

The fixed UDP port combinations for the DHCP protocol scheme creates challenges in certain DHCP relay operations. For instance, in a large-scale DHCP relay implementation on a single-switch node, the DHCP relay functionality may be partitioned among multiple relay processes. All of these DHCP relay processes may share the same IP address of the switch node. If the UDP source port has to be a fixed number as currently specified, the transport socket operation of DHCP packets would need to go through a central entity or process, which would defeat the purpose of distributing DHCP relay functionality.

DHCP协议方案的固定UDP端口组合在某些DHCP中继操作中产生了挑战。例如,在单个交换机节点上的大规模DHCP中继实现中,DHCP中继功能可以在多个中继进程之间划分。所有这些DHCP中继进程都可以共享交换机节点的相同IP地址。如果UDP源端口必须是当前指定的固定数字,则DHCP数据包的传输套接字操作将需要经过一个中心实体或进程,这将破坏分发DHCP中继功能的目的。

In some large-scale deployments, the decision to split the DHCP functionality into multiple processes on a node may not be purely based on DHCP relay computational load. Rather, DHCP relay could just be one of the functions in a multi-process implementation.

在某些大规模部署中,将DHCP功能拆分为节点上的多个进程的决定可能不完全基于DHCP中继计算负载。相反,DHCP中继可能只是多进程实现中的功能之一。

Although assigning a different IPv4/IPv6 source address for each DHCP relay process can be a solution, this would introduce operational and network management complexities, especially given the scarceness of IPv4 addresses.

虽然为每个DHCP中继进程分配不同的IPv4/IPv6源地址可能是一个解决方案,但这将带来操作和网络管理的复杂性,特别是考虑到IPv4地址的稀缺性。

This document defines an extension to relax the fixed UDP source port requirement for the DHCP relay agents. This extension requires a DHCP server to remember the inbound packet's UDP port number along with the IPv4/IPv6 address. When sending back replies, the DHCP server MUST use the UDP port number that the incoming relay agent uses instead of the fixed DHCP port number. In the case of IPv6-cascaded relay agents [RFC3315], the upstream relay agent needs to use the "Relay Source Port Option" to record the downstream source port, and it MUST use this recorded port number instead of the fixed DHCP port number when replaying the reply messages.

本文档定义了一个扩展,以放宽DHCP中继代理的固定UDP源端口要求。此扩展需要DHCP服务器记住入站数据包的UDP端口号以及IPv4/IPv6地址。发送回复时,DHCP服务器必须使用传入中继代理使用的UDP端口号,而不是固定的DHCP端口号。在IPv6级联中继代理[RFC3315]的情况下,上游中继代理需要使用“中继源端口选项”来记录下游源端口,并且在重放应答消息时必须使用此记录的端口号,而不是固定的DHCP端口号。

2. Terminology
2. 术语
2.1. Requirements Language
2.1. 需求语言

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”在所有大写字母出现时(如图所示)应按照BCP 14[RFC2119][RFC8174]所述进行解释。

2.2. Definitions
2.2. 定义

Downstream Device: In the DHCP relay context, this refers to the next relay agent that forwards Relay-reply messages.

下游设备:在DHCP中继上下文中,这是指转发中继应答消息的下一个中继代理。

Upstream Device: In the DHCP relay context, this refers to the next relay agent or DHCP server that forwards Relay-forward messages.

上游设备:在DHCP中继上下文中,指转发中继消息的下一个中继代理或DHCP服务器。

Relay Source Port: This is the UDP port that a relay agent uses to receive Relay-forward messages from an upstream device.

中继源端口:这是中继代理用于从上游设备接收中继转发消息的UDP端口。

Downstream Source Port: This is the UDP port that the downstream device uses when forwarding Relay-forward messages to this relay agent device. This UDP port is to be used by this relay agent device when forwarding the Relay-reply messages to that downstream device.

下游源端口:这是下游设备将中继转发消息转发到此中继代理设备时使用的UDP端口。此中继代理设备在将中继回复消息转发到该下游设备时将使用此UDP端口。

Non-DHCP UDP Port: Any valid and non-zero UDP port other than port 67 for DHCPv4 and port 547 for DHCPv6.

非DHCP UDP端口:除DHCPv4的端口67和DHCPv6的端口547之外的任何有效且非零的UDP端口。

3. Changes to DHCP Specifications
3. 对DHCP规范的更改
3.1. Additions to DHCPv4 in RFC 2131
3.1. RFC 2131中对DHCPv4的补充

Section 4.1 of RFC 2131 [RFC2131] specifies that:

RFC 2131[RFC2131]第4.1节规定:

DHCP uses UDP as its transport protocol. DHCP messages from a client to a server are sent to the 'DHCP server' port (67), and DHCP messages from a server to a client are sent to the 'DHCP client' port (68).

DHCP使用UDP作为其传输协议。从客户端到服务器的DHCP消息被发送到“DHCP服务器”端口(67),从服务器到客户端的DHCP消息被发送到“DHCP客户端”端口(68)。

Relay agents implementing this specification may be configured instead to 1) use a source port number other than 67 when relaying messages toward servers and 2) receive responses toward clients on that same port. This will only work when the DHCP server or relay agent to which such a relay agent is forwarding messages is upgraded to support this extension.

实现此规范的中继代理可以配置为1)在向服务器中继消息时使用67以外的源端口号,2)在同一端口上向客户端接收响应。只有当DHCP服务器或中继代理向其转发消息的中继代理升级以支持此扩展时,此功能才起作用。

3.2. Additions to DHCPv6 in RFC 3315
3.2. RFC 3315中对DHCPv6的补充

Section 5.2 of RFC 3315 [RFC3315] specifies that:

RFC 3315[RFC3315]第5.2节规定:

Clients listen for DHCP messages on UDP port 546. Servers and relay agents listen for DHCP messages on UDP port 547.

客户端在UDP端口546上侦听DHCP消息。服务器和中继代理在UDP端口547上侦听DHCP消息。

Relay agents implementing this specification may be configured instead to 1) use a source port number other than 547 when relaying messages toward servers and 2) receive responses toward clients on that same port. This will only work when the DHCP server or relay agent to which such a relay agent is forwarding messages is upgraded to support this extension.

可以将实现此规范的中继代理配置为1)在向服务器中继消息时使用547以外的源端口号,2)在同一端口上向客户端接收响应。只有当DHCP服务器或中继代理向其转发消息的中继代理升级以支持此扩展时,此功能才起作用。

4. Relay Source Port Sub-option and Option
4. 中继源端口子选项和选项

Relay agents do not maintain state. To return a message to its source, the relay agent must include all the required information in the Relay-forward message. When a relay in a sequence of cascaded relays does not use the standard source port, that source port must be included along with the source address. This option allows the relay agent to do so.

中继代理不保持状态。要将消息返回到其源,中继代理必须在中继转发消息中包含所有必需的信息。当级联继电器序列中的继电器不使用标准源端口时,该源端口必须与源地址一起包含。此选项允许中继代理执行此操作。

4.1. Source Port Sub-option for DHCPv4
4.1. DHCPv4的源端口子选项

The relay agent "Source Port Sub-option" is a new option, and it is part of the "Relay Agent Information" option for DHCPv4 [RFC3046].

中继代理“源端口子选项”是一个新选项,它是DHCPv4[RFC3046]的“中继代理信息”选项的一部分。

The format of the "Source Port Sub-option" is shown below:

“源端口子选项”的格式如下所示:

            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            | SubOpt Code   |      Len      |
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            | SubOpt Code   |      Len      |
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Where:

哪里:

SubOpt Code: SUBOPT_RELAY_PORT. 8-bit value, 19.

子端口代码:子端口中继端口。8位值,19。

Len: 8-bit value to be set to 0.

Len:将8位值设置为0。

4.2. Relay Source Port Option for DHCPv6
4.2. DHCPv6的中继源端口选项

The "Relay Source Port Option" is a new DHCPv6 option. It MUST be used by either 1) a DHCPv6 relay agent that uses a non-DHCP UDP port (not 547) communicating with the IPv6 server and the upstream relay agent or 2) an IPv6 relay agent that detects the use of a non-DHCP UDP port (not 547) by a downstream relay agent.

“中继源端口选项”是一个新的DHCPv6选项。它必须由1)使用与IPv6服务器和上游中继代理通信的非DHCP UDP端口(非547)的DHCPv6中继代理使用,或2)检测下游中继代理使用非DHCP UDP端口(非547)的IPv6中继代理使用。

The format of the "Relay Source Port Option" is shown below:

“中继源端口选项”的格式如下所示:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    OPTION_RELAY_PORT    |         Option-Len                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Downstream Source Port     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    OPTION_RELAY_PORT    |         Option-Len                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Downstream Source Port     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Where:

哪里:

Option-Code: OPTION_RELAY_PORT. 16-bit value, 135.

选项代码:选项\中继\端口。16位值,135。

Option-Len: 16-bit value to be set to 2.

选项Len:16位值设置为2。

Downstream Source Port: 16-bit value. To be set by the IPv6 relay either to the downstream relay agent's UDP source port used for the UDP packet, or to zero if only the local relay agent uses the non-DHCP UDP port (not 547).

下游源端口:16位值。将由IPv6中继设置为用于UDP数据包的下游中继代理的UDP源端口,或者如果只有本地中继代理使用非DHCP UDP端口(不是547),则设置为零。

5. Relay Agent and Server Behavior
5. 中继代理和服务器行为
5.1. DHCPv4
5.1. DHCPv4

When a relay agent uses a non-DHCP UDP port (not 67) to communicate with the DHCP server, it MUST include the "Source Port Sub-option" in Relay-forward messages to indicate that.

当中继代理使用非DHCP UDP端口(不是67)与DHCP服务器通信时,它必须在中继转发消息中包含“源端口子选项”,以指示该选项。

When an IPv4 server receives a message from a relay agent with the "Source Port Sub-option", it MUST remember the UDP source port of the message and use that port number as the UDP destination port when sending the reply message to the same relay agent.

当IPv4服务器从具有“源端口子选项”的中继代理接收到消息时,它必须记住消息的UDP源端口,并在向同一中继代理发送回复消息时将该端口号用作UDP目标端口。

5.2. DHCPv6
5.2. 动态主机配置协议版本六

The IPv6 relay agent MUST include the "Relay Source Port Option" when it uses a non-DHCP UDP port (not 547) to communicate to a DHCPv6 server or an upstream IPv6 relay agent. Also, when an IPv6 relay agent detects that a downstream relay agent uses a non-DHCP UDP port in the packet, it MUST record the port number in the "Downstream Source Port" field of this option. If this option is included to indicate only the local non-DHCP UDP port usage and the port is not being used by a downstream relay agent, the Downstream Source Port field MUST be set to zero.

当IPv6中继代理使用非DHCP UDP端口(不是547)与DHCPv6服务器或上游IPv6中继代理通信时,它必须包含“中继源端口选项”。此外,当IPv6中继代理检测到下游中继代理在数据包中使用非DHCP UDP端口时,它必须在该选项的“下游源端口”字段中记录端口号。如果包含此选项以仅指示本地非DHCP UDP端口使用情况,且该端口未被下游中继代理使用,则下游源端口字段必须设置为零。

The IPv6 relay agent MUST include this option in the following three cases:

在以下三种情况下,IPv6中继代理必须包括此选项:

1. The local relay agent uses a non-DHCP UDP port (not 547).

1. 本地中继代理使用非DHCP UDP端口(不是547)。

2. The downstream relay agent uses a non-DHCP UDP port (not 547).

2. 下游中继代理使用非DHCP UDP端口(不是547)。

3. The local relay agent and the downstream relay agent both use non-DHCP UDP ports (not 547).

3. 本地中继代理和下游中继代理都使用非DHCP UDP端口(不是547)。

In the first case, the value of the "Downstream Source Port" field is set to zero. In the other two cases, the value of the field is set to the UDP port number that the downstream relay agent uses.

在第一种情况下,“下游源端口”字段的值设置为零。在其他两种情况下,该字段的值设置为下游中继代理使用的UDP端口号。

When an IPv6 server receives a Relay-forward message with the "Relay Source Port Option", it MUST copy the option when constructing the Relay-reply chain in response to the Relay-forward message. This option MUST NOT appear in any message other than a Relay-forward or Relay-reply message. Additionally, the IPv6 server MUST check and use the UDP source port from the UDP packet of the Relay-forward message in replying to the relay agent.

当IPv6服务器接收到带有“中继源端口选项”的中继转发消息时,它必须在构造中继回复链以响应中继转发消息时复制该选项。此选项不得出现在中继转发或中继回复消息以外的任何消息中。此外,IPv6服务器在答复中继代理时,必须检查并使用中继转发消息的UDP数据包中的UDP源端口。

When a relay agent receives a Relay-reply message with the "Relay Source Port Option" from a server or from an upstream relay agent, if the "Downstream Source Port" field in the option is non-zero, it MUST use this UDP port number to forward the Relay-reply message to the downstream relay agent.

当中继代理从服务器或上游中继代理接收到带有“中继源端口选项”的中继回复消息时,如果选项中的“下游源端口”字段为非零,则必须使用此UDP端口号将中继回复消息转发给下游中继代理。

5.3. Compatibility
5.3. 兼容性

Sites that need relay agents to specify a source port need to install new DHCP server and DHCP relay agent software with this feature. If a site installs only DHCP relay agent software with this feature, there is no possibility that the DHCP server will be able to communicate to the relay agent.

需要中继代理指定源端口的站点需要安装具有此功能的新DHCP服务器和DHCP中继代理软件。如果站点仅安装具有此功能的DHCP中继代理软件,则DHCP服务器不可能与中继代理通信。

5.4. Deployment Considerations
5.4. 部署注意事项

During deployment, the operator and/or user of the new DHCP play port implementation should upgrade the DHCP server before the relay implementations are deployed. This would ensure that the erroneous case noted in Section 5.3 is not encountered. If the upstream relay agent or server does not support this extension, this DHCP relay port feature needs to be disabled.

在部署期间,新DHCP播放端口实现的操作员和/或用户应在部署中继实现之前升级DHCP服务器。这将确保不会遇到第5.3节所述的错误情况。如果上游中继代理或服务器不支持此扩展,则需要禁用此DHCP中继端口功能。

When the DHCP relay port implementation is deployed, the default relay agent behavior should use the DHCP UDP port, and it is recommended that the configuration be set up to allow for the mode of operation where a non-DHCP port can be used for the DHCP relay agents.

部署DHCP中继端口实现时,默认中继代理行为应使用DHCP UDP端口,建议将配置设置为允许非DHCP端口可用于DHCP中继代理的操作模式。

If the network uses a firewall to block or allow DHCP packets with both static UDP source and destination port numbers, this may no longer match the packets from new DHCP relay agent and server software with this extension. The firewall rules need to be modified to match only the DHCP server side of the UDP port number and, if necessary, IP addresses and other attributes.

如果网络使用防火墙阻止或允许包含静态UDP源端口号和目标端口号的DHCP数据包,则这可能不再与来自具有此扩展的新DHCP中继代理和服务器软件的数据包匹配。需要修改防火墙规则,以仅匹配UDP端口号的DHCP服务器端,如有必要,还匹配IP地址和其他属性。

6. Example of an IPv6-Cascaded Relay
6. IPv6级联中继的示例

An example of IPv6-cascaded relay agents with the "Relay Source Port Option" is shown below.

具有“中继源端口选项”的IPv6级联中继代理的示例如下所示。

              (forward)          (forward)          (forward)
      Relay1 ----------> Relay2 ----------> Relay3 ----------> Server
          (1000)              (547)              (547)
               (reply)            (reply)            (reply)
             <----------        <----------        <----------
        
              (forward)          (forward)          (forward)
      Relay1 ----------> Relay2 ----------> Relay3 ----------> Server
          (1000)              (547)              (547)
               (reply)            (reply)            (reply)
             <----------        <----------        <----------
        

In the above diagram, all the IPv6 devices support this generalized UDP source port extension except for Relay3. Relay1 is the only relay agent device that uses a non-DHCP UDP port (not 547). Relay2 is the upstream device of Relay1.

在上图中,除Relay3外,所有IPv6设备都支持此通用UDP源端口扩展。Relay1是唯一使用非DHCP UDP端口(不是547)的中继代理设备。继电器2是继电器1的上游装置。

Both Relay1 and Relay2 include the "Relay Source Port Option" in the Relay-forward message. Relay1 sets the "Downstream Source Port" field in the option to zero. Relay2 notices that the "Relay Source Port Option" is included in the message from Relay1, and it determines that the UDP source port used by Relay1 is 1000. Relay2 will include the "Relay Source Port Option", and it sets the "Downstream Source Port" field in the option to 1000. The IPv6 server copies the "Relay Source Port Option" when replying with the Relay-reply message.

中继1和中继2都在中继转发消息中包含“中继源端口选项”。Relay1将选项中的“下游源端口”字段设置为零。Relay2注意到“中继源端口选项”包含在来自Relay1的消息中,它确定Relay1使用的UDP源端口为1000。Relay2将包括“中继源端口选项”,并将选项中的“下游源端口”字段设置为1000。IPv6服务器在回复中继回复消息时复制“中继源端口选项”。

When Relay2 receives the Relay-reply message with the "Relay Source Port Option", it finds that the "Downstream Source Port" field has the value of 1000. Relay2 then uses this port number in the UDP packet when sending the Relay-reply message to Relay1.

当Relay2接收到带有“中继源端口选项”的中继回复消息时,它发现“下游源端口”字段的值为1000。然后,当向中继1发送中继回复消息时,中继2在UDP数据包中使用此端口号。

When Relay1 receives the Relay-reply message with the "Relay Source Port Option", it finds that the "Downstream Source Port" field has the value of zero. Relay1 then uses the normal IPv6 port 547 in the packet sending the Relay-reply message to its downstream relay agent or uses UDP port 546 to an IPv6 client.

当中继1接收到带有“中继源端口选项”的中继回复消息时,它发现“下游源端口”字段的值为零。然后,中继1使用数据包中的正常IPv6端口547将中继回复消息发送到其下游中继代理,或使用UDP端口546发送到IPv6客户端。

This DHCP extension works with any combination of IPv6-cascaded relay agents, as long as the relay agent that uses a non-DHCP UDP port (not 547) and its upstream relay device support this generalized UDP source port extension.

只要使用非DHCP UDP端口(不是547)的中继代理及其上游中继设备支持此通用UDP源端口扩展,此DHCP扩展就可以与IPv6级联中继代理的任何组合一起工作。

Similar to the above example, but now assume that Relay2 uses the UDP source port of 2000 instead of 547 as in the diagram. The Relay3 device needs to support this DHCP extension and it will set 2000 in its "Downstream Source Port" field of the option in the Relay-forward message. When the DHCP server sends the DHCP Relay-reply to Relay3, Relay3 finds that its own relay option has this "Downstream Source Port" with the value of 2000. Relay3 will use this UDP port when sending the Relay-reply message to Relay2. Relay2 finds its own relay option also has this "Downstream Source Port" with the value of 1000. Relay2 will use this UDP port when sending the Relay-reply message to Relay1.

与上面的示例类似,但现在假设Relay2使用UDP源端口2000,而不是图中的547。Relay3设备需要支持此DHCP扩展,它将在中继转发消息选项的“下游源端口”字段中设置2000。当DHCP服务器向Relay3发送DHCP中继应答时,Relay3发现其自己的中继选项具有此值为2000的“下游源端口”。中继3将在向中继2发送中继回复消息时使用此UDP端口。Relay2发现自己的中继选项也有这个值为1000的“下游源端口”。中继2将在向中继1发送中继回复消息时使用此UDP端口。

7. IANA Considerations
7. IANA考虑

IANA has registered "DHCPv4 Relay Source Port Sub-option" (19) for the IPv4 "Relay Agent Information" option within the "DHCP Relay Agent Sub-Option Codes" registry <https://www.iana.org/assignments/ bootp-dhcp-parameters> [RFC3046].

IANA已在“DHCP中继代理子选项代码”注册表中为IPv4“中继代理信息”选项注册了“DHCPv4中继源端口子选项”(19)<https://www.iana.org/assignments/ bootp dhcp参数>[RFC3046]。

IANA has registered "OPTION_RELAY_PORT" (135) for the DHCPv6 "Relay Source Port Option" within the DHCPv6 "Option Codes" registry <http://www.iana.org/assignments/dhcpv6-parameters"> [RFC3315].

IANA已在DHCPv6“选项代码”注册表中为DHCPv6“中继源端口选项”注册了“选项中继端口”(135)<http://www.iana.org/assignments/dhcpv6-parameters“>[RFC3315]。

8. Security Considerations
8. 安全考虑

[RFC3118] and [RFC3315] described many of the threats in using DHCP. This extension does not raise additional security issues.

[RFC3118]和[RFC3315]描述了使用DHCP时的许多威胁。此扩展不会引发其他安全问题。

9. Normative References
9. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<https://www.rfc-editor.org/info/rfc2119>.

[RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, DOI 10.17487/RFC2131, March 1997, <https://www.rfc-editor.org/info/rfc2131>.

[RFC2131]Droms,R.,“动态主机配置协议”,RFC 2131,DOI 10.17487/RFC2131,1997年3月<https://www.rfc-editor.org/info/rfc2131>.

[RFC3046] Patrick, M., "DHCP Relay Agent Information Option", RFC 3046, DOI 10.17487/RFC3046, January 2001, <https://www.rfc-editor.org/info/rfc3046>.

[RFC3046]Patrick,M.,“DHCP中继代理信息选项”,RFC 3046,DOI 10.17487/RFC3046,2001年1月<https://www.rfc-editor.org/info/rfc3046>.

[RFC3118] Droms, R., Ed. and W. Arbaugh, Ed., "Authentication for DHCP Messages", RFC 3118, DOI 10.17487/RFC3118, June 2001, <https://www.rfc-editor.org/info/rfc3118>.

[RFC3118]Droms,R.,Ed.和W.Arbaugh,Ed.,“DHCP消息的身份验证”,RFC 3118,DOI 10.17487/RFC3118,2001年6月<https://www.rfc-editor.org/info/rfc3118>.

[RFC3315] Droms, R., Ed., Bound, J., Volz, B., Lemon, T., Perkins, C., and M. Carney, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3315, DOI 10.17487/RFC3315, July 2003, <https://www.rfc-editor.org/info/rfc3315>.

[RFC3315]Droms,R.,Ed.,Bound,J.,Volz,B.,Lemon,T.,Perkins,C.,和M.Carney,“IPv6的动态主机配置协议(DHCPv6)”,RFC 3315,DOI 10.17487/RFC3315,2003年7月<https://www.rfc-editor.org/info/rfc3315>.

[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8174]Leiba,B.,“RFC 2119关键词中大写与小写的歧义”,BCP 14,RFC 8174,DOI 10.17487/RFC8174,2017年5月<https://www.rfc-editor.org/info/rfc8174>.

Acknowledgments

致谢

The authors would like to thank Peter Arberg, Luyuan Fang, Bhanu Gopalasetty, Scott Kelly, Andre Kostur, Victor Kuarsingh, Ted Lemon, Adam Roach, Kishore Seshadri, and Jackelyn Shen for their review and comments of this document.

作者感谢Peter Arberg、方卢元、Bhanu Gopalasetty、Scott Kelly、Andre Kostur、Victor Kuarsingh、Ted Lemon、Adam Roach、Kishore Seshadri和Jackelyn Shen对本文件的审查和评论。

The authors would like to thank Bernie Volz for discussions that led to the definition of the "Relay Source Port Sub-option" and DHCPv6 "Relay Source Port Option".

作者要感谢Bernie Volz的讨论,讨论得出了“中继源端口子选项”和DHCPv6“中继源端口选项”的定义。

Authors' Addresses

作者地址

Naiming Shen Cisco Systems 560 McCarthy Blvd. Milpitas, CA 95035 United States of America

沈乃明思科系统公司麦卡锡大道560号。美国加利福尼亚州米尔皮塔斯95035

   Email: naiming@cisco.com
        
   Email: naiming@cisco.com
        

Enke Chen Cisco Systems 560 McCarthy Blvd. Milpitas, CA 95035 United States of America

陈恩科思科系统公司麦卡锡大道560号。美国加利福尼亚州米尔皮塔斯95035

   Email: enkechen@cisco.com
        
   Email: enkechen@cisco.com