idnits 2.17.1 draft-ietf-dhc-relay-port-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 29, 2017) is 2333 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Networking Working Group N. Shen 3 Internet-Draft E. Chen 4 Intended status: Standards Track Cisco Systems 5 Expires: June 2, 2018 November 29, 2017 7 Generalized UDP Source Port for DHCP Relay 8 draft-ietf-dhc-relay-port-09 10 Abstract 12 This document proposes an extension to the DHCP protocols that allows 13 a relay agent to use any available source port for upstream 14 communications, and to include a DHCP option that can be used to 15 statelessly route responses back to the appropriate source port on 16 downstream communications. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on June 2, 2018. 35 Copyright Notice 37 Copyright (c) 2017 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 54 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 3. Changes to DHCP Specifications . . . . . . . . . . . . . . . 3 56 3.1. Additions to DHCPv4 in RFC 2131 . . . . . . . . . . . . . 3 57 3.2. Additions to DHCPv6 in RFC 3315 . . . . . . . . . . . . . 4 58 4. Relay Source Port Sub-option and Option . . . . . . . . . . . 4 59 4.1. Source Port Sub-option for DHCPv4 . . . . . . . . . . . . 4 60 4.2. Relay Source Port Option for DHCPv6 . . . . . . . . . . . 5 61 5. Relay Agent and Server Behavior . . . . . . . . . . . . . . . 5 62 5.1. DHCPv4 . . . . . . . . . . . . . . . . . . . . . . . . . 5 63 5.2. DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . 6 64 5.3. Compatibility . . . . . . . . . . . . . . . . . . . . . . 6 65 5.4. Deployment Considerations . . . . . . . . . . . . . . . . 7 66 6. An IPv6 Cascaded Relay Example . . . . . . . . . . . . . . . 7 67 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 68 8. Security Considerations . . . . . . . . . . . . . . . . . . . 9 69 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 70 10. Normative References . . . . . . . . . . . . . . . . . . . . 9 71 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 73 1. Introduction 75 RFC 2131 [RFC2131] and RFC 3315 [RFC3315] specify the use of UDP as 76 the transport protocol for DHCP. They also define both the server 77 side and client side port numbers. The IPv4 server port is UDP 78 number (67) and the client port is UDP number (68); for IPv6 the 79 server port is (547) and the client port is (546). 81 The fixed UDP port combinations for the DHCP protocol scheme creates 82 challenges in certain DHCP relay operations. For instance, in a 83 large scale DHCP relay implementation on a single switch node, the 84 DHCP relay functionality may be partitioned among multiple relay 85 processes. All these DHCP relay processes may share the same IP 86 address of the switch node. If the UDP source port has to be a fixed 87 number as currently specified, the transport socket operation of DHCP 88 packets would need to go through a central entity or process which 89 would defeat the purpose of distributing DHCP relay functionality. 91 In some large-scale deployment, the decision to split the DHCP 92 functionality into multiple processes on a node may not be purely 93 based on DHCP relay computational load. But rather DHCP relay could 94 just be one of the functions in a multi-process implementation. 96 Although assigning a different IPv4/IPv6 source address for each DHCP 97 relay process can be a solution, it would introduce operational and 98 network management complexities, especially given the scarceness of 99 the IPv4 addresses. 101 This document proposes an extension to relax the fixed UDP source 102 port requirement for the DHCP relay agents. This extension requires 103 a DHCP server to remember the inbound packet's UDP port number along 104 with the IPv4/IPv6 address. The DHCP server when sending back 105 replies MUST use the UDP port number that the incoming relay agent 106 uses instead of the fixed DHCP port number. In the case of IPv6 107 cascaded relay agents [RFC3315], the upstream relay agent needs to 108 use the "Relay Source Port Option" to record the downstream source 109 port and it MUST use this recorded port number instead of the fixed 110 DHCP port number when replaying the reply messages. 112 1.1. Requirements Language 114 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 115 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 116 document are to be interpreted as described in RFC 2119 [RFC2119]. 118 2. Terminology 120 Downstream Device: In the DHCP relay context, it refers to the next 121 relay agent for forwarding Relay-reply Messages. 123 Upstream Device: In the DHCP relay context, it refers to the next 124 relay agent or DHCP server for forwarding Relay-forward 125 Messages. 127 Relay Source Port: This is the UDP port that a relay agent uses to 128 receive Relay-forward Messages from an upstream device. 130 Downstream Source Port: This is the UDP port that the downstream 131 device uses when forwarding Relay-forward Messages to this 132 relay agent device. This UDP port is to be used by this 133 relay agent device when forwarding the Relay-reply Messages 134 to that downstream device. 136 Non-DHCP UDP Port: Any valid and non-zero UDP port other than port 137 67 for DHCPv4 and port 547 for DHCPv6. 139 3. Changes to DHCP Specifications 141 3.1. Additions to DHCPv4 in RFC 2131 143 Section 4.1 of RFC 2131 [RFC2131] specifies that: 145 DHCP uses UDP as its transport protocol. DHCP messages from a 146 client to a server are sent to the 'DHCP server' port (67), and 147 DHCP messages from a server to a client are sent to the 'DHCP 148 client' port (68). 150 Relay agents implementing this specification may be configured 151 instead to use a source port number other than 67, and to receive 152 responses on that same port. This will only work when the DHCP 153 server or relay agent to which such a relay agent is forwarding 154 messages is upgraded to support this extension. 156 3.2. Additions to DHCPv6 in RFC 3315 158 Section 5.2 of RFC 3315 [RFC3315] specifies that: 160 Clients listen for DHCP messages on UDP port 546. Servers and 161 relay agents listen for DHCP messages on UDP port 547. 163 Relay agents implementing this specification may be configured 164 instead to use a source port number other than 547, and to receive 165 responses on that same port. This will only work when the DHCP 166 server or relay agent to which such a relay agent is forwarding 167 messages is upgraded to support this extension. 169 4. Relay Source Port Sub-option and Option 171 Relay agents do not maintain state. To return a message to its 172 source, the relay agent must include all the required information in 173 the Relay-Forward message. When a relay in a sequence of cascaded 174 relays does not use the standard source port, that source port must 175 be included along with the source address. This option allows the 176 relay agent to do so. 178 4.1. Source Port Sub-option for DHCPv4 180 The Relay Agent "Source Port Sub-option" is a new option, and it is 181 part of the relay-agent-information option for DHCPv4 [RFC3046]. 183 The format of the "Source Port Sub-option" is shown below: 185 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 186 | SubOpt Code | Len | 187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 189 Where: 191 SubOpt Code: SUBOPT_RELAY_PORT. 8 bit value, to be assigned by 192 IANA. 194 Len: 8 bit value to be set to 0. 196 4.2. Relay Source Port Option for DHCPv6 198 The "Relay Source Port Option" is a new DHCPv6 option. It MUST be 199 used either by a DHCPv6 relay agent that uses a non-DHCP UDP port 200 (not 547) communicating with the IPv6 server and the upstream relay 201 agent, or by a IPv6 relay agent that detects the use of a non-DHCP 202 UDP port (not 547) by a downstream relay agent. 204 The format of the "Relay Source Port Option" is shown below: 206 0 1 2 3 207 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 208 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 209 | OPTION_RELAY_RELAY_PORT | Option-Len | 210 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 211 | Downstream Source Port | 212 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 214 Where: 216 Option-Code: OPTION_RELAY_RELAY_PORT. 16 bit value, to be 217 assigned by IANA. 219 Option-Len: 16 bit value to be set to 2. 221 Downstream Source Port: 16 bit value. To be set by the IPv6 222 relay either to the downstream relay agent's UDP source 223 port used for the UDP packet, or to zero if only the 224 local relay agent uses the non-DHCP UDP port (not 547). 226 5. Relay Agent and Server Behavior 228 5.1. DHCPv4 230 When a relay agent uses a non-DHCP UDP port (not 67) communicating 231 with the DHCP server, it MUST include the "Source Port Sub-option" in 232 Relay-forward messages to indicate that. 234 When an IPv4 server receives a message from a relay agent with the 235 "Source Port Sub-option", it MUST remember the UDP source port of the 236 message and use that port number as the UDP destination port when 237 sending the reply message to the same relay agent. 239 5.2. DHCPv6 241 The IPv6 relay agent MUST include the "Relay Source Port Option" when 242 it uses a non-DHCP UDP port (not 547) to communicate to a DHCPv6 243 server or an upstream IPv6 relay agent. Also when an IPv6 relay 244 agent detects that a downstream relay agent uses a non-DHCP UDP port 245 in the packet, it MUST record the port number in the "Downstream 246 Source Port" field of this option. If this option is included to 247 indicate only the local non-DHCP UDP port usage and there is no 248 downstream relay agent's non-DHCP UDP port usage, the field 249 Downstream Source Port field MUST be set to zero. 251 The IPv6 relay agent MUST include this option in the following three 252 cases: 254 1) The local relay agent uses a non-DHCP UDP port (not 547). 256 2) the downstream relay agent uses a non-DHCP UDP port (not 547). 258 3) the local relay agent and the downstream relay agent both use 259 non-DHCP UDP ports (not 547). 261 In the first case, the value of the "Downstream Source Port" field is 262 set to zero. In the other two cases, the value of the field is set 263 to the UDP port number that the downstream relay agent uses. 265 When an IPv6 server receives a Relay-forward message with the "Relay 266 Source Port Option", it MUST copy the option when constructing the 267 Relay-reply chain in response to the Relay-forward message. This 268 option MUST NOT appear in any message other than a Relay-forward or 269 Relay-reply message. Additionally, the IPv6 server MUST check and 270 use the UDP source port from the UDP packet of the Relay-forward 271 message in replying to the relay agent. 273 When a relay agent receives a Relay-reply message with the "Relay 274 Source Port Option" from a server or from an upstream relay agent, if 275 the "Downstream Source Port" field in the option is non-zero, it MUST 276 use this UDP port number to forward the Relay-reply message to the 277 downstream relay agent. 279 5.3. Compatibility 281 Sites that need for relay agents to specify a source port will need 282 to install new DHCP server and DHCP relay agent software with this 283 feature. If a site installs only DHCP relay agent software with this 284 feature, there is no possibility that the DHCP server will be able to 285 communicate to the relay agent. 287 5.4. Deployment Considerations 289 During deployment, it is advisable the operator and/or user of the 290 new DHCP relay port implementation upgrade the DHCP server first when 291 possible, before the relay implementations are deployed. This would 292 ensure that the erroneous case noted in Section 5.3 is not 293 encountered. If the upstream relay agent or server does not support 294 this extension, this DHCP relay port feature needs to be disabled. 296 When the DHCP relay port implementation is deployed, the default 297 relay agent behavior should use the DHCP UDP port, it is recommended 298 that the configuration is setup to allow for the mode of operation 299 where a non-DHCP port can be used for the DHCP relay agents. 301 Although if the network uses firewall to block or allow DHCP packets 302 with both static UDP source and destination port numbers, this may no 303 longer match the packets from new DHCP relay agent and server 304 software with this extension. The firewall rules need to be modified 305 only to match the DHCP server side of the UDP port number, and if 306 necessary, IP addresses and other attributes. 308 6. An IPv6 Cascaded Relay Example 310 An example of IPv6 cascaded relay agents with the "Relay Source Port 311 Option" is shown below. 313 (forward) (forward) (forward) 314 Relay1 ----------> Relay2 ----------> Relay3 ----------> Server 315 (1000) (547) (547) 316 (reply) (reply) (reply) 317 <---------- <---------- <---------- 319 In the above diagram, all the IPv6 devices support this generalized 320 UDP source port extension except for Relay3. Relay1 is the only 321 relay agent device uses a non-DHCP UDP port (not 547). Relay2 is the 322 upstream device of Relay1. 324 Both Relay1 and Relay2 include the "Relay Source Port Option" in 325 Relay-forward message. Relay1 sets the "Downstream Source Port" 326 field in the option to zero. Relay2 notices the "Relay Source Port 327 Option" is included in the message from Relay1, and it determines 328 that the UDP source port used by Relay1 is 1000. Relay2 will include 329 the "Relay Source Port Option" and it sets the "Downstream Source 330 Port" field in the option to 1000. The IPv6 server copies the "Relay 331 Source Port Option" when replying with the Relay-reply message. 333 When Relay2 receives the Relay-reply message with the "Relay Source 334 Port Option", it finds the "Downstream Source Port" field has the 335 value of 1000. Relay2 then uses this port number in the UDP packet 336 when sending the Relay-reply message to Relay1. 338 When Relay1 receives the Relay-reply message with the "Relay Source 339 Port Option", it finds that the "Downstream Source Port" field has 340 the value of zero. Relay1 then uses the normal IPv6 port 547 in the 341 packet sending the Relay-reply message to its downstream relay agent 342 or uses UDP port 546 to an IPv6 client. 344 This DHCP extension works with any combination of IPv6 cascaded relay 345 agents, as long as the relay agent which uses a non-DHCP UDP port 346 (not 547) and its upstream relay device support this generalized UDP 347 source port extension. 349 Similar to the above example, now assume that Relay2 uses the UDP 350 source port of 2000 instead of 547 as in the diagram. The Relay3 351 device needs to support this DHCP extension and it will set 2000 in 352 its "Downstream Source Port" field of the option in the Relay-forward 353 message. When DHCP server sends the DHCP Relay-reply to Relay3, 354 Relay3 finds its own relay option has this "Downstream Source Port" 355 with the value of 2000. Relay3 will use this UDP port when sending 356 the Relay-reply message to Relay2. Relay2 finds its own relay option 357 also has this "Downstream Source Port" with the value of 1000. 358 Relay2 will use this UDP port when sending the Relay-reply message to 359 Relay1. 361 7. IANA Considerations 363 A new sub-option, DHCPv4 Relay Source Port, is defined in this 364 document within the IPv4 Relay Agent Information Option. It needs to 365 be assigned by IANA in the "DHCP Relay Agent Sub-Option Codes" 366 registry, http://www.iana.org/assignments/bootp-dhcp-parameters as 367 specified in [RFC3046]. 369 A new option, DHCPv6 Relay Source Port, is defined in this document 370 for DHCPv6 and it needs to be assigned by IANA for the DHCPv6 option 371 code, in the "Option Codes" registry for DHCPv6, 372 http://www.iana.org/assignments/dhcpv6-parameters as specified in 373 [RFC3315]. 375 8. Security Considerations 377 [RFC3118] and [RFC3315] described many of the threats in using DHCP. 378 This extension does not raise addition security issues. 380 9. Acknowledgments 382 The authors would like to thank Peter Arberg, Luyuan Fang, Bhanu 383 Gopalasetty, Scott Kelly, Andre Kostur, Victor Kuarsingh, Ted Lemon, 384 Adam Roach, Kishore Seshadri and Jackelyn Shen for their review and 385 comments of this document. 387 The authors would like to thank Bernie Volz for discussions that led 388 to the definition of The Relay Source Port sub-option and DHCPv6 389 Relay Source Port Option. 391 The RFC text was produced using Marshall Rose's xml2rfc tool. 393 10. Normative References 395 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 396 Requirement Levels", BCP 14, RFC 2119, 397 DOI 10.17487/RFC2119, March 1997, . 400 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", 401 RFC 2131, DOI 10.17487/RFC2131, March 1997, 402 . 404 [RFC3046] Patrick, M., "DHCP Relay Agent Information Option", 405 RFC 3046, DOI 10.17487/RFC3046, January 2001, 406 . 408 [RFC3118] Droms, R., Ed. and W. Arbaugh, Ed., "Authentication for 409 DHCP Messages", RFC 3118, DOI 10.17487/RFC3118, June 2001, 410 . 412 [RFC3315] Droms, R., Ed., Bound, J., Volz, B., Lemon, T., Perkins, 413 C., and M. Carney, "Dynamic Host Configuration Protocol 414 for IPv6 (DHCPv6)", RFC 3315, DOI 10.17487/RFC3315, July 415 2003, . 417 Authors' Addresses 418 Naiming Shen 419 Cisco Systems 420 560 McCarthy Blvd. 421 Milpitas, CA 95035 422 US 424 Email: naiming@cisco.com 426 Enke Chen 427 Cisco Systems 428 560 McCarthy Blvd. 429 Milpitas, CA 95035 430 US 432 Email: enkechen@cisco.com