idnits 2.17.1 draft-ietf-dhc-relay-port-07.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 (October 27, 2017) is 2374 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: April 30, 2018 October 27, 2017 7 Generalized UDP Source Port for DHCP Relay 8 draft-ietf-dhc-relay-port-07 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 April 30, 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. Changes to DHCPv4 in RFC 2131 . . . . . . . . . . . . . . 3 57 3.2. Changes 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 . . . . . . . . . . . . . . . 6 62 5.1. DHCPv4 . . . . . . . . . . . . . . . . . . . . . . . . . 6 63 5.2. DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . 6 64 5.3. Compatibility . . . . . . . . . . . . . . . . . . . . . . 7 65 5.4. Deployment Considerations . . . . . . . . . . . . . . . . 7 66 6. An IPv6 Cascaded Relay Example . . . . . . . . . . . . . . . 7 67 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 68 8. Security Considerations . . . . . . . . . . . . . . . . . . . 9 69 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 70 10. Normative References . . . . . . . . . . . . . . . . . . . . 9 71 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 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 (546) and the client port is (547). 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 UDP port other than port 67 for DHCPv4 137 and port 547 for DHCPv6. 139 3. Changes to DHCP Specifications 141 3.1. Changes 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 This specification adds the following extension to the above 151 paragraph. 153 DHCP messages from a relay agent to a server are sent to the 'DHCP 154 server' port (67), and the UDP source port it uses can be any 155 valid UDP port available in the relay system, including the DHCP 156 port 67. The default port number is 67 if there is no explicit 157 configuration for the generalized source UDP port extension for 158 DHCP relay. 160 3.2. Changes to DHCPv6 in RFC 3315 162 Section 5.2 of RFC 3315 [RFC3315] specifies that: 164 Clients listen for DHCP messages on UDP port 546. Servers and 165 relay agents listen for DHCP messages on UDP port 547. 167 This specification adds the following extension to the above 168 paragraph. 170 A DHCP relay agent can listen for DHCP messages from a server or 171 another upstream relay agent device on any valid UDP port 172 available in the relay system including the DHCP UDP port 547. 173 The default UDP port is 547 if there is no explicit configuration 174 for the generalized UDP source port extension for DHCP relay. 176 4. Relay Source Port Sub-option and Option 178 Relay agents do not maintain state. To return a message to its 179 source, the relay agent must include all the required information in 180 the Relay-Forward message. When a relay in a sequence of cascaded 181 relays does not use the standard source port, that source port must 182 be included along with the source address. This option allows the 183 relay agent to do so. 185 4.1. Source Port Sub-option for DHCPv4 187 The Relay Agent "Source Port Sub-option" is a new option, and it is 188 part of the relay-agent-information option for DHCPv4 [RFC3046]. 190 The format of the "Source Port Sub-option" is shown below: 192 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 193 | SubOpt Code | Len | 194 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 196 Where: 198 SubOpt Code: SUBOPT_RELAY_PORT. 8 bits value, to be assigned by 199 IANA. 201 Len: 8 bits value to be set to 0. 203 4.2. Relay Source Port Option for DHCPv6 205 The "Relay Source Port Option" is a new DHCPv6 option. It MUST be 206 used either by a DHCPv6 relay agent that uses a non-DHCP UDP port 207 (not 547) communicating with the IPv6 server and the upstream relay 208 agent, or by a IPv6 relay agent that detects the use of a non-DHCP 209 UDP port (not 547) by a downstream relay agent. 211 The format of the "Relay Source Port Option" is shown below: 213 0 1 2 3 214 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 215 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 216 | OPTION_RELAY_RELAY_PORT | Option-Len | 217 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 218 | Downstream Source Port | 219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 221 Where: 223 Option-Code: OPTION_RELAY_RELAY_PORT. 16 bits value, to be 224 assigned by IANA. 226 Option-Len: 16 bits value to be set to 2. 228 Downstream Source Port: 16 bits value. To be set by the IPv6 229 relay either to the downstream relay agent's UDP source 230 port used for the UDP packet, or to zero if only the 231 local relay agent uses the non-DHCP UDP port (not 547). 233 5. Relay Agent and Server Behavior 235 5.1. DHCPv4 237 When a relay agent uses a non-DHCP UDP port (not 67) communicating 238 with the DHCP server, it MUST include the "Source Port Sub-option" in 239 Relay-forward messages to indicate that. 241 When an IPv4 server receives a message from a relay agent with the 242 "Source Port Sub-option", it MUST remember the UDP source port of the 243 message and use that port number as the UDP destination port when 244 sending the reply message to the same relay agent. 246 5.2. DHCPv6 248 The IPv6 relay agent MUST include the "Relay Source Port Option" when 249 it uses a non-DHCP UDP port (not 547) to communicate to a DHCPv6 250 server or an upstream IPv6 relay agent. Also when an IPv6 relay 251 agent detects that a downstream relay agent uses a non-DHCP UDP port 252 in the packet, it MUST record the port number in the "Downstream 253 Source Port" field of this option. If this option is included to 254 indicate only the local non-DHCP UDP port usage and there is no 255 downstream relay agent's non-DHCP UDP port usage, the field 256 Downstream Source Port field MUST be set to zero. 258 The IPv6 relay agent MUST include this option in the following three 259 cases: 261 1) The local relay agent uses a non-DHCP UDP port (not 547). 263 2) the downstream relay agent uses a non-DHCP UDP port (not 547). 265 3) the local relay agent and the downstream relay agent both use 266 non-DHCP UDP ports (not 547). 268 In the first case, the value of the "Downstream Source Port" field is 269 set to zero. In the other two cases, the value of the field is set 270 to the UDP port number that the downstream relay agent uses. 272 When an IPv6 server receives a Relay-forward message with the "Relay 273 Source Port Option", it MUST copy the option when constructing the 274 Relay-reply chain in response to the Relay-forward message. This 275 option MUST NOT appear in any message other than a Relay-forward or 276 Relay-reply message. Additionally, the IPv6 server MUST check and 277 use the UDP source port from the UDP packet of the Relay-forward 278 message in replying to the relay agent. 280 When a relay agent receives a Relay-reply message with the "Relay 281 Source Port Option" from a server or from an upstream relay agent, if 282 the "Downstream Source Port" field in the option is non-zero, it MUST 283 use this UDP port number to forward the Relay-reply message to the 284 downstream relay agent. 286 5.3. Compatibility 288 Sites that need for relay agents to specify a source port will need 289 to install new DHCP server and DHCP relay agent software with this 290 feature. If a site installs only DHCP relay agent software with this 291 feature, there is no possibility that the DHCP server will be able to 292 communicate to the relay agent. 294 5.4. Deployment Considerations 296 During deployment, it may be advisable the operator and/or user of 297 the new DHCP relay port implementation upgrade the DHCP server first 298 when possible, before the relay implementations are deployed. This 299 would ensure that the erroneous case noted in Section 5.3 is not 300 encountered. 302 When the DHCP relay port implementation is deployed, it is 303 recommended that the configuration is setup to allow for the mode of 304 operation where a non-DHCP port can be used for the DHCP relay 305 agents. The recommended configuration then permits the relay agent 306 to utilize the default DHCP UDP port, or a non-DHCP UDP port as 307 desired. 309 Although if the network uses firewall to block or allow DHCP packets 310 with both static UDP source and destination port numbers, this may no 311 longer match the packets from new DHCP relay agent and server 312 software with this extension. The firewall rules need to be modified 313 only to match the DHCP server side of the UDP port number, and if 314 necessary, IP addresses and other attributes. 316 6. An IPv6 Cascaded Relay Example 318 An example of IPv6 cascaded relay agents with the "Relay Source Port 319 Option" is shown below. 321 (forward) (forward) (forward) 322 Relay1 ----------> Relay2 ----------> Relay3 ----------> Server 323 (1000) (547) (547) 324 (reply) (reply) (reply) 325 <---------- <---------- <---------- 327 In the above diagram, all the IPv6 devices support this generalized 328 UDP source port extension except for Relay3. Relay1 is the only 329 relay agent device uses a non-DHCP UDP port (not 547). Relay2 is the 330 upstream device of Relay1. 332 Both Relay1 and Relay2 include the "Relay Source Port Option" in 333 Relay-forward message. Relay1 sets the "Downstream Source Port" 334 field in the option to zero. Relay2 notices the "Relay Source Port 335 Option" is included in the message from Relay1, and it determines 336 that the UDP source port used by Relay1 is 1000. Relay2 will include 337 the "Relay Source Port Option" and it sets the "Downstream Source 338 Port" field in the option to 1000. The IPv6 server copies the "Relay 339 Source Port Option" when replying with the Relay-reply message. 341 When Relay2 receives the Relay-reply message with the "Relay Source 342 Port Option", it finds the "Downstream Source Port" field has the 343 value of 1000. Relay2 then uses this port number in the UDP packet 344 when sending the Relay-reply message to Relay1. 346 When Relay1 receives the Relay-reply message with the "Relay Source 347 Port Option", it finds that the "Downstream Source Port" field has 348 the value of zero. Relay1 then uses the normal IPv6 port 547 in the 349 packet sending the Relay-reply message to its downstream relay agent 350 or uses UDP port 546 to an IPv6 client. 352 This DHCP extension works with any combination of IPv6 cascaded relay 353 agents, as long as the relay agent which uses a non-DHCP UDP port 354 (not 547) and its upstream relay device support this generalized UDP 355 source port extension. 357 Similar to the above example, now assume that Relay2 uses the UDP 358 source port of 2000 instead of 547 as in the diagram. The Relay3 359 device needs to support this DHCP extension and it will set 2000 in 360 its "Downstream Source Port" field of the option in the Relay-forward 361 message. When DHCP server sends the DHCP Relay-reply to Relay3, 362 Relay3 finds its own relay option has this "Downstream Source Port" 363 with the value of 2000. Relay3 will use this UDP port when sending 364 the Relay-reply message to Relay2. 366 7. IANA Considerations 368 A new sub-option, DHCPv4 Relay Source Port, is defined in this 369 document within the IPv4 Relay Agent Information Option. It needs to 370 be assigned by IANA in the "DHCP Relay Agent Sub-Option Codes" 371 registry, http://www.iana.org/assignments/bootp-dhcp-parameters as 372 specified in [RFC3046]. 374 A new option, DHCPv6 Relay Source Port, is defined in this document 375 for DHCPv6 and it needs to be assigned by IANA for the DHCPv6 option 376 code, in the "Option Codes" registry for DHCPv6, 377 http://www.iana.org/assignments/dhcpv6-parameters as specified in 378 [RFC3315]. 380 8. Security Considerations 382 [RFC3118] and [RFC3315] described many of the threats in using DHCP. 383 This extension does not raise addition security issues. 385 9. Acknowledgments 387 The authors would like to thank Peter Arberg, Luyuan Fang, Bhanu 388 Gopalasetty, Scott Kelly, Andre Kostur, Victor Kuarsingh, Ted Lemon, 389 Kishore Seshadri and Jackelyn Shen for their review and comments of 390 this document. 392 The authors would like to thank Bernie Volz for discussions that led 393 to the definition of The Relay Source Port sub-option and DHCPv6 394 Relay Source Port Option. 396 The RFC text was produced using Marshall Rose's xml2rfc tool. 398 10. Normative References 400 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 401 Requirement Levels", BCP 14, RFC 2119, 402 DOI 10.17487/RFC2119, March 1997, . 405 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", 406 RFC 2131, DOI 10.17487/RFC2131, March 1997, 407 . 409 [RFC3046] Patrick, M., "DHCP Relay Agent Information Option", 410 RFC 3046, DOI 10.17487/RFC3046, January 2001, 411 . 413 [RFC3118] Droms, R., Ed. and W. Arbaugh, Ed., "Authentication for 414 DHCP Messages", RFC 3118, DOI 10.17487/RFC3118, June 2001, 415 . 417 [RFC3315] Droms, R., Ed., Bound, J., Volz, B., Lemon, T., Perkins, 418 C., and M. Carney, "Dynamic Host Configuration Protocol 419 for IPv6 (DHCPv6)", RFC 3315, DOI 10.17487/RFC3315, July 420 2003, . 422 Authors' Addresses 424 Naiming Shen 425 Cisco Systems 426 560 McCarthy Blvd. 427 Milpitas, CA 95035 428 US 430 Email: naiming@cisco.com 432 Enke Chen 433 Cisco Systems 434 560 McCarthy Blvd. 435 Milpitas, CA 95035 436 US 438 Email: enkechen@cisco.com