Networking Working Group N. Shen Internet-Draft E. Chen Intended status: Standards Track Cisco Systems Expires:July 9,September 1, 2017January 5,February 28, 2017 GeneralizedSourceUDP Source Portoffor DHCP Relaydraft-ietf-dhc-relay-port-01draft-ietf-dhc-relay-port-02 Abstract This documentextendsproposes an extension to the DHCP and DHCPv6 protocolsfor the UDP transport from relay agent to server andthat allowsthe port to beany valid numberonto be used as theDHCPrelaysystem.agent 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 onJuly 9,September 1, 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 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Changes to DHCP and DHCPv6 Specifications . . . . . . . . . . 32.1.3.1. Changes to DHCP in RFC 2131 . . . . . . . . . . . . . . . 32.2.3.2. Changes to DHCPv6 in RFC 3315 . . . . . . . . . . . . . .3 3.4 4. RelayAgentSource Port Sub-option and Option . . . . . . . . . . . 43.1. DHCP Relay Agent4.1. Source Port Sub-option for DHCPv4 . . . . . . . . . . . . 43.2. DHCPv64.2. RelayAgentSource Port Option for DHCPv6 . . . . . . . . . .4 4.. 5 5. A DHCPv6 Cascaded Relay Example . . . . . . . . . . . . . . . 6 6. Compatibility . . . . . . . . . . . . . . . . . . . . . . . .6 5.7 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . .6 6.8 8. Security Considerations . . . . . . . . . . . . . . . . . . .6 7.8 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .6 8.8 10. Document Change Log . . . . . . . . . . . . . . . . . . . . .7 8.1.8 10.1. Changes todraft-ietf-dhc-relay-port-01draft-ietf-dhc-relay-port-02 . . . . . . . . 8 10.2. Changes to draft-ietf-dhc-relay-port-01 .7 8.2.. . . . . . . 9 10.3. Changes to draft-ietf-dhc-relay-port-00 . . . . . . . .. 7 9.9 11. Normative References . . . . . . . . . . . . . . . . . . . .79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .79 1. Introduction RFC 2131 [RFC2131] and RFC 3315 [RFC3315] specify theDHCPuse of UDP as the transport protocolas UDP.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 portnumberof DHCP protocol scheme createsproblemschallenges in certain DHCP relayoperations and environments.operations. For instance, in a large scale DHCP relay implementation on a single switch node, the DHCP relay functionality may be partitioned among multiple relayprocesses running under different CPUs.processes. Allthosethese DHCP relay processes may share the same IP address of the switch node. If the UDP source port has to be a fixednumber,number as currently specified, the transport socket operation of DHCP packetsneedswould need to go through a centrallocationentity or process whichdefeatswould defeat the purpose ofdistributeddistributing DHCP relay functionality. In someof the scalable operational environment,large-scale deployment, the decision to split the DHCP functionality into multiple processes on a node may not be purely based on DHCP relay computational load. But rather DHCP relayiscould just be one of the functions inthe multiple processa multi-process implementation. Although assigningthea differentsourceIP/IPv6 source address for each DHCP relay process can be a solution, itrequireswould introduce operational and network managementinvolvement. It needs to be sure, at least for DHCP,complexities, especially given theaddress space amongscarceness of therelay and server is in privateIPv4address domain.addresses. This document proposesthe optionan extension to relax the fixed UDP source port requirement for the DHCP relay agents. This extension requiresthea DHCP server or relay agent, in the case of cascaded relaychainingagents [RFC3315], to remember the inbound packet's UDP port number along with theIP/ IPv6IP/IPv6 address. The DHCP server when sending back replies MUST use the UDP port number that the incoming relay agent uses instead ofblindly settingtheDHCPfixed DHCP port number. 1.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 2.Changes toTerminology Downstream Device: In the DHCPand DHCPv6 Specifications 2.1. Changesrelay context, it refers to the next relay agent for forwarding Relay-reply Messages. Upstream Device: In the DHCPin RFC 2131 Section 4.1 of RFC 2131 [RFC2131] asserts that:relay context, it refers to the next relay agent or DHCPuses UDP asserver for forwarding Relay-forward Messages. Relay Source Port: This is the UDP port that a relay agent uses to receive Relay-forward Messages from an upstream device. 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. Non-DHCP UDP Port: Any valid UDP port other than port 67 for DHCP and port 547 for DHCPv6. 3. Changes to DHCP and DHCPv6 Specifications 3.1. Changes to DHCP in RFC 2131 Section 4.1 of RFC 2131 [RFC2131] specifies that: 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). This specification adds the following extension to the aboveparagraph in the paragraph below.paragraph. DHCP messages from a relay agent to a server are sent to the 'DHCP server' port (67), and the UDP source port it uses can be any valid UDP port availableonin the relay system, including the DHCP port 67. The defaultisport number is 67 if there is no explicit configuration for the generalized source UDP port extensionoffor DHCP relay.2.2.3.2. Changes to DHCPv6 in RFC 3315 Section 5.2 of RFC 3315 [RFC3315]assertsspecifies that: 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 aboveparagraph in the paragraph below.paragraph. A DHCP relayagentsagent can listen for DHCP messages from a server or another upstream relay agent device on any valid UDP port availableonin the relay system including the DHCP UDP port 547. The default is port 547 if there is no explicit configuration for the generalizedsourceUDP source port extensionoffor DHCP relay.3.4. RelayAgentSource Port Sub-option and Option Althoughthea DHCP or DHCPv6 server can implicitlydetectdetermine asourceUDP source portthat is different from the standard DHCP port numberwhen it receives an inbound message from a relayagents,agent, this sub-option makes the request explicit for the server to use a non-DHCP UDP port in the reply message.3.1. DHCP Relay AgentWhen 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 The Relay AgentSource"Source Portsub-optionSub-option" is a new option, and it is part of therelay-agent- informationrelay-agent-information option for DHCPv4 [RFC3046]. It SHOULD be used bythea relay agent that uses a non-DHCP UDP port communicating with the DHCP server. The format of theDHCPv4 Relay Agent Source"Source PortSub-optionSub-option" is shown below: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SubOpt Code | Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Where: SubOpt Code:TBD.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 withthis Relay Sourcethe "Source Portsub-option,Sub-option", it MUST remember theinbound messageUDP source portfromof therelay agentmessage and usethe samethat port numberforas the UDP destination portthat sendswhen sending the reply message to the same relay agent.3.2. DHCPv64.2. RelayAgentSource Port Option for DHCPv6 TheRelay Agent"Relay Source PortOptionOption" is a new DHCPv6 option. It SHOULD 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 theDHCPv6 Relay Agent"Relay Source PortOptionOption" 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-CodeOPTION_RELAY_RELAY_PORT | Option-Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DownstreamUDPSource Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Where: Option-Code:TBD.OPTION_RELAY_RELAY_PORT. 16 bits value, to be assigned by IANA. Option-Len: 16 bits value to be set to 2. DownstreamUDPSource Port: 16 bits value. To be set by the DHCPv6 relay either to the downstream relay agent's UDP source port used for the UDPpacketpacket, or tobe set to zero.zero if only the local relay agent uses the non-DHCP UDP port. The DHCPv6 relay agent SHOULD includethis Relaythe "Relay Source PortOptionOption" when it uses a non-DHCP UDP port to communicate tothea DHCPv6 server or an upstream DHCPv6 relay agent. Also when a DHCPv6 relay agent detects thatthea downstream relay agent uses a non-DHCP UDP port in the packet, it MUST record the port number in theDownstream UDP"Downstream SourcePortPort" 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 DownstreamUDPSource Port field MUST be set to zero.When a DHCPv6 server receives the relayedThe DHCPv6packet withrelay agent SHOULD include thisRelay Sourceoption 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. When a DHCPv6 server receives a Relay-forward message with the "Relay Source PortOption,Option", it MUST copyand addthe option when constructing theRelay-ReplyRelay-reply chain in response to theRelay-Forward messages.Relay-forward message. This option MUST NOT appear in any messageexceptother than aRelay- ForwardRelay-forward orRelay-ReplyRelay-reply message.With this Relay Source Port Option inAdditionally, themessage, when aDHCPv6 serverreplies the Relay-Reply message towards a relay agent, itMUST check and use the UDP source port from the UDP packet of theRelay- ForwardRelay-forward messagebyin replying to the relay agent. When a relay agent receivesthis Relay-Replya Relay-reply message withthis option fromthe "Relay Source Port Option" from a server or from an upstream relay agent,andif theDownstream UDP"Downstream SourcePort valuePort" field in the option is non-zero, it MUST use this UDP port number torelayforward theRelay-ReplyRelay-reply message to the downstream relay agent.4. Compatibility With5. 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) <---------- <---------- <---------- In the above diagram, all the DHCPv6 devices support this generalized UDP source port extension except for Relay3. Relay1 is the only relay agent device uses a non-DHCP UDP port. Relay2 is the upstream device ofDHCPRelay1. Both Relay1 and Relay2 include the "Relay Source Port Option" in Relay-forward message. Relay1 sets the "Downstream Source Port" field in the option to zero. Relay2 notices 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 DHCPv6 server copies the "Relay Source Port Option" when replying with the Relay-reply message. When Relay2 receives the Relay-reply message with the "Relay Source 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 portgeneralization,generalization for DHCP and DHCPv6, the server behavior is compatible with the relay agent that uses the normal DHCPfixedUDP port. The DHCP server willreflect backuse the well-known UDPwell- knownportnumber (67/547) that the client uses(67 or 547) whenrelayingsending Relay-reply message back to the relay agent. It is recommended to upgrade the server sidefirst.first before using a non-DHCP UDP port for a relay agent. The implementation is advised to allowthe relay agentconfiguration for relay agent specifying afixedDHCP relay port number.This is for the case whereIt can be used to allow theDHCPrelay agentis upgraded with this extension before the server side upgrade. 5.either using a normal DHCP UDP port or non-DHCP UDP port. 7. IANA Considerations A new sub-option, DHCP RelayAgentSource Port, is defined in this document within the DHCPv4 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.6.8. Security Considerations If the network uses 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. The 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.7.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 to the definition of The RelayAgentSource Port sub-option and DHCPv6 RelayAgentSource Port Option. The RFC text was produced using Marshall Rose's xml2rfc tool.8.10. Document Change Log8.1.10.1. 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 Added the DHCPv6 cascaded relay agents example. 10.2. Changes to draft-ietf-dhc-relay-port-01 o Posted the draft in January 2017. o Change the DHCPv6 RelayAgentSource Port Option, UDP Source Port field to DownstreamUDPSource Port. Add the option handling mechanism for DHCPv6 server and relay agents.8.2.10.3. 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.9.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, <http://www.rfc-editor.org/info/rfc2119>. [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, DOI 10.17487/RFC2131, March 1997, <http://www.rfc-editor.org/info/rfc2131>. [RFC3046] Patrick, M., "DHCP Relay Agent Information Option", RFC 3046, DOI 10.17487/RFC3046, January 2001, <http://www.rfc-editor.org/info/rfc3046>. [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, <http://www.rfc-editor.org/info/rfc3315>. Authors' Addresses Naiming Shen Cisco Systems 560 McCarthy Blvd. Milpitas, CA 95035 US Email: naiming@cisco.com Enke Chen Cisco Systems 560 McCarthy Blvd. Milpitas, CA 95035 US Email: enkechen@cisco.com