--- 1/draft-ietf-dhc-relay-port-02.txt 2017-04-11 15:13:11.673675563 -0700 +++ 2/draft-ietf-dhc-relay-port-03.txt 2017-04-11 15:13:11.697676139 -0700 @@ -1,41 +1,41 @@ Networking Working Group N. Shen Internet-Draft E. Chen Intended status: Standards Track Cisco Systems -Expires: September 1, 2017 February 28, 2017 +Expires: October 13, 2017 April 11, 2017 Generalized UDP Source Port for DHCP Relay - draft-ietf-dhc-relay-port-02 + draft-ietf-dhc-relay-port-03 Abstract This document proposes an extension to the DHCP and DHCPv6 protocols - that allows any valid number to be used as the relay agent UDP source - port for DHCP packets. + that allows any valid number to be used as the relay agent's UDP + source port for DHCP packets. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on September 1, 2017. + This Internet-Draft will expire on October 13, 2017. Copyright Notice Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -44,36 +44,40 @@ 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Changes to DHCP and DHCPv6 Specifications . . . . . . . . . . 3 - 3.1. Changes to DHCP in RFC 2131 . . . . . . . . . . . . . . . 3 + 3.1. Changes to DHCP in RFC 2131 . . . . . . . . . . . . . . . 4 3.2. Changes to DHCPv6 in RFC 3315 . . . . . . . . . . . . . . 4 4. Relay Source Port Sub-option and Option . . . . . . . . . . . 4 - 4.1. Source Port Sub-option for DHCPv4 . . . . . . . . . . . . 4 + 4.1. Source Port Sub-option for DHCP . . . . . . . . . . . . . 5 4.2. Relay Source Port Option for DHCPv6 . . . . . . . . . . . 5 - 5. A DHCPv6 Cascaded Relay Example . . . . . . . . . . . . . . . 6 - 6. Compatibility . . . . . . . . . . . . . . . . . . . . . . . . 7 + 5. Relay Agent and Server Behavior . . . . . . . . . . . . . . . 6 + 5.1. DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . 6 + 5.2. DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . 6 + 5.3. Compatibility . . . . . . . . . . . . . . . . . . . . . . 7 + 6. A DHCPv6 Cascaded Relay Example . . . . . . . . . . . . . . . 7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8 - 10. Document Change Log . . . . . . . . . . . . . . . . . . . . . 8 - 10.1. Changes to draft-ietf-dhc-relay-port-02 . . . . . . . . 8 - 10.2. Changes to draft-ietf-dhc-relay-port-01 . . . . . . . . 9 - 10.3. Changes to draft-ietf-dhc-relay-port-00 . . . . . . . . 9 + 10. Document Change Log . . . . . . . . . . . . . . . . . . . . . 9 + 10.1. Changes to draft-ietf-dhc-relay-port-03 . . . . . . . . 9 + 10.2. Changes to draft-ietf-dhc-relay-port-02 . . . . . . . . 9 + 10.3. Changes to draft-ietf-dhc-relay-port-01 . . . . . . . . 9 + 10.4. Changes to draft-ietf-dhc-relay-port-00 . . . . . . . . 9 11. Normative References . . . . . . . . . . . . . . . . . . . . 9 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 1. Introduction RFC 2131 [RFC2131] and RFC 3315 [RFC3315] specify the use of UDP as the transport protocol for DHCP and DHCPv6. They also define both the server side and client side port numbers. The DHCP server port is UDP number (67) and the client port is UDP number (68); for DHCPv6 the server port is (546) and the client port is (547). This fixed UDP port of DHCP protocol scheme creates challenges in @@ -158,60 +161,53 @@ Clients listen for DHCP messages on UDP port 546. Servers and relay agents listen for DHCP messages on UDP port 547. This specification adds the following extension to the above paragraph. A DHCP relay agent can listen for DHCP messages from a server or another upstream relay agent device on any valid UDP port available in the relay system including the DHCP UDP port 547. - The default is port 547 if there is no explicit configuration for - the generalized UDP source port extension for DHCP relay. + The default UDP port is 547 if there is no explicit configuration + for the generalized UDP source port extension for DHCP relay. 4. Relay Source Port Sub-option and Option - Although a DHCP or DHCPv6 server can implicitly determine a UDP - source port when it receives an inbound message from a relay agent, - this sub-option makes the request explicit for the server to use a - non-DHCP UDP port in the reply message. When DHCPv6 cascaded relay - agents are involved, the downstream non-DHCP UDP port needs to be - recorded using the option. + Although a DHCP or DHCPv6 server can implicitly determine the UDP + source port when it receives a message from a relay agent, this sub- + option makes the request explicit for the server to use a non-DHCP + UDP port in the reply message. When DHCPv6 cascaded relay agents are + involved, the downstream non-DHCP UDP port needs to be recorded using + the option. -4.1. Source Port Sub-option for DHCPv4 +4.1. Source Port Sub-option for DHCP The Relay Agent "Source Port Sub-option" is a new option, and it is - part of the relay-agent-information option for DHCPv4 [RFC3046]. It - SHOULD be used by a relay agent that uses a non-DHCP UDP port - communicating with the DHCP server. + part of the relay-agent-information option for DHCP [RFC3046]. The format of the "Source Port Sub-option" is shown below: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SubOpt Code | Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Where: SubOpt Code: SUBOPT_RELAY_PORT. 8 bits value, to be assigned by IANA. Len: 8 bits value to be set to 0. - When a DHCP 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. - 4.2. Relay Source Port Option for DHCPv6 - The "Relay Source Port Option" is a new DHCPv6 option. It SHOULD be + The "Relay Source Port Option" is a new DHCPv6 option. It MUST be used either by a DHCPv6 relay agent that uses a non-DHCP UDP port communicating with the DHCP server and the upstream relay agent, or by a DHCPv6 relay agent that detects the use of a non-DHCP UDP port by a downstream relay agent. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -225,59 +221,84 @@ Option-Code: OPTION_RELAY_RELAY_PORT. 16 bits value, to be assigned by IANA. Option-Len: 16 bits value to be set to 2. Downstream Source Port: 16 bits value. To be set by the DHCPv6 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. - The DHCPv6 relay agent SHOULD include the "Relay Source Port Option" +5. Relay Agent and Server Behavior + +5.1. DHCP + + When a relay agent uses a non-DHCP UDP port communicating with the + DHCP server, it MUST include the "Source Port Sub-option" in Relay- + forward messages to indicate that. + + When a DHCP 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. + +5.2. DHCPv6 + + The DHCPv6 relay agent MUST include the "Relay Source Port Option" when it uses a non-DHCP UDP port to communicate to a DHCPv6 server or an upstream DHCPv6 relay agent. Also when a DHCPv6 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 there is no downstream relay agent's non-DHCP UDP port usage, the field Downstream Source Port field MUST be set to zero. - The DHCPv6 relay agent SHOULD include this option in the following + The DHCPv6 relay agent MUST include this option in the following three cases: 1) The local relay agent uses a non-DHCP UDP port. 2) the downstream relay agent uses a non-DHCP UDP port. 3) the local relay agent and the downstream relay agent both use non-DHCP UDP ports. - In the first case, the value of the field in "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. + 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. When a DHCPv6 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 DHCPv6 server MUST check and use the UDP source port from the UDP packet of the Relay-forward message in replying to the relay agent. 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. -5. A DHCPv6 Cascaded Relay Example +5.3. Compatibility + + With this source port generalization, the DHCP and DHCPv6 server MUST + be upgraded to support the extension specified in this document + before the extension is used by a relay agent. + + The implementation is advised to allow configuration for relay agent + specifying a DHCP relay port number. It can be used to allow the + relay agent either using a normal DHCP UDP port or non-DHCP UDP port. + +6. A DHCPv6 Cascaded Relay Example An example of DHCPv6 cascaded relay agents with the "Relay Source Port Option" is shown below. (forward) (forward) (forward) Relay1 ----------> Relay2 ----------> Relay3 ----------> Server (1000) (547) (547) (reply) (reply) (reply) <---------- <---------- <---------- @@ -300,37 +321,24 @@ Port Option", it finds 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. 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 DHCP port 547 in the packet sending the Relay-reply message to its downstream relay agent or uses UDP port 546 to a DHCPv6 client. -6. Compatibility - - With this source port generalization for DHCP and DHCPv6, the server - behavior is compatible with the relay agent that uses the normal DHCP - UDP port. The DHCP server will use the well-known UDP port (67 or - 547) when sending Relay-reply message back to the relay agent. It is - recommended to upgrade the server side first before using a non-DHCP - UDP port for a relay agent. - - The implementation is advised to allow configuration for relay agent - specifying a DHCP relay port number. It can be used to allow the - relay agent either using a normal DHCP UDP port or non-DHCP UDP port. - 7. IANA Considerations A new sub-option, DHCP Relay Source Port, is defined in this document - within the DHCPv4 Relay Agent Information Option. It needs to be + within the DHCP Relay Agent Information Option. It needs to be assigned by IANA from the DHCP Relay Agent sub-options space [RFC3046]. A new option, DHCPv6 Relay Source Port, is defined in this document for DHCPv6 and it needs to be assigned by IANA for the DHCPv6 option code. 8. Security Considerations If the network uses firewall to block or allow DHCP packets with both @@ -339,47 +347,53 @@ firewall rules need to be modified only to match the DHCP server side of the UDP port number, and if necessary, IP addresses and other attributes. 9. Acknowledgments The authors would like to thank Peter Arberg, Bhanu Gopalasetty, Andre Kostur, Ted Lemon, and Kishore Seshadri for their review and comments of this document. - The authors would like to thank Bernie Volz for discussions that lead + 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. The RFC text was produced using Marshall Rose's xml2rfc tool. 10. Document Change Log -10.1. Changes to draft-ietf-dhc-relay-port-02 +10.1. Changes to draft-ietf-dhc-relay-port-03 + + o Posted the draft in April 2017. + + o Added the "Relay Agent and Server Behavior" section. + +10.2. Changes to draft-ietf-dhc-relay-port-02 o Posted the draft in February 2017. o Added the Terminology section. - o Defined the Sub-option and Option names for DHCPv4 and DHCPv6. + o Defined the Sub-option and Option names for DHCP and DHCPv6. o Added the DHCPv6 cascaded relay agents example. -10.2. Changes to draft-ietf-dhc-relay-port-01 +10.3. Changes to draft-ietf-dhc-relay-port-01 o Posted the draft in January 2017. o Change the DHCPv6 Relay Source Port Option, UDP Source Port field to Downstream Source Port. Add the option handling mechanism for DHCPv6 server and relay agents. -10.3. Changes to draft-ietf-dhc-relay-port-00 +10.4. Changes to draft-ietf-dhc-relay-port-00 o Posted first version of working group draft in October 2016. o This draft was renamed from draft-shen-dhc-client-port-03.txt. 11. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,