idnits 2.17.00 (12 Aug 2021) /tmp/idnits36302/draft-shore-nls-tl-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 16. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 1686. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1697. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1704. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1710. 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 : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year -- The exact meaning of the all-uppercase expression 'MAY NOT' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: Mandatory: 1 bit. If this bit is set, this TLV MAY NOT be ignored silently, even if the recipient does not understand the type code. If it is not set then the recipient MAY ignore the TLV. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Receipt of a NLS message with the TEARDOWN bit set indicates that matching path state must be deleted. Note that this is independent of directionality, and the teardown message may be sent in either direction. The applications which have reservations that were installed by a message containing a matching Flow ID must be notified, and they are responsible for managing (in this case, deleting) their own flow-related state. TEARDOWN and HOP-BY-HOP MUST not be set in the same message. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (June 13, 2007) is 5456 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. 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 3547 (Obsoleted by RFC 6407) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Shore 3 Internet-Draft D. McGrew 4 Intended status: Standards Track K. Biswas 5 Expires: December 15, 2007 Cisco Systems 6 June 13, 2007 8 Network-Layer Signaling: Transport Layer 9 draft-shore-nls-tl-05.txt 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that any 14 applicable patent or other IPR claims of which he or she is aware 15 have been or will be disclosed, and any of which he or she becomes 16 aware will be disclosed, in accordance with Section 6 of BCP 79. 18 Internet-Drafts are working documents of the Internet Engineering 19 Task Force (IETF), its areas, and its working groups. Note that 20 other groups may also distribute working documents as Internet- 21 Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire on December 15, 2007. 36 Copyright Notice 38 Copyright (C) The IETF Trust (2007). 40 Abstract 42 The RSVP model for communicating requests to network devices along a 43 datapath has proven useful for a variety of applications beyond what 44 the protocol designers envisioned, and while the architectural model 45 generalizes well the protocol itself has a number of features that 46 limit its applicability to applications other than IntServ. Network 47 Layer Signaling uses the RSVP on-path communication model to carry 48 requests to middleboxes and other network devices. It is based on a 49 "two-layer" architecture that divides protocol function into 50 transport and application. This document describes the transport 51 protocol. 53 Table of Contents 55 1. Requirements notation . . . . . . . . . . . . . . . . . . . . 4 56 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 57 2.1. Transport layer . . . . . . . . . . . . . . . . . . . . . 6 58 3. NLS-TL Messages . . . . . . . . . . . . . . . . . . . . . . . 7 59 3.1. Message Processing Overview . . . . . . . . . . . . . . . 7 60 3.1.1. Congestion Considerations . . . . . . . . . . . . . . 8 61 3.2. NAT Traversal Support . . . . . . . . . . . . . . . . . . 8 62 3.3. NLS-TL Message Format . . . . . . . . . . . . . . . . . . 8 63 3.3.1. The NLS-TL Message Header . . . . . . . . . . . . . . 9 64 3.3.2. NLS-TL TLVs . . . . . . . . . . . . . . . . . . . . . 10 65 3.4. Cryptographic Datatypes . . . . . . . . . . . . . . . . . 18 66 4. Sending NLS-TL Messages . . . . . . . . . . . . . . . . . . . 20 67 5. Messaging and state maintenance . . . . . . . . . . . . . . . 21 68 5.1. BUILD-ROUTE . . . . . . . . . . . . . . . . . . . . . . . 21 69 5.2. HOP-BY-HOP . . . . . . . . . . . . . . . . . . . . . . . . 21 70 5.3. BIDIRECTIONAL . . . . . . . . . . . . . . . . . . . . . . 22 71 5.4. Path Teardown Messages . . . . . . . . . . . . . . . . . . 22 72 5.5. Network Address Translation . . . . . . . . . . . . . . . 22 73 5.6. Authentication Exchange . . . . . . . . . . . . . . . . . 23 74 5.6.1. Authentication Exchange Messages . . . . . . . . . . . 23 75 5.6.2. Authentication TLV calculation . . . . . . . . . . . . 27 76 5.6.3. Security state transition table . . . . . . . . . . . 28 77 6. Application Interface . . . . . . . . . . . . . . . . . . . . 30 78 7. NAT Interactions . . . . . . . . . . . . . . . . . . . . . . . 31 79 8. Using NLS-TL as a stand-alone NAT traversal protocol . . . . . 32 80 9. Discovery of non-NLS NATs, and recovery . . . . . . . . . . . 33 81 10. Endpoints Processing . . . . . . . . . . . . . . . . . . . . . 35 82 10.1. Sending . . . . . . . . . . . . . . . . . . . . . . . . . 35 83 10.2. Receiving . . . . . . . . . . . . . . . . . . . . . . . . 36 84 11. Intermediate node processing . . . . . . . . . . . . . . . . . 37 85 12. Using NLS-TL to support bidirectional reservations . . . . . . 38 86 13. Security Considerations . . . . . . . . . . . . . . . . . . . 39 87 13.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 39 88 13.2. Security Model . . . . . . . . . . . . . . . . . . . . . . 39 89 13.3. Cryptography . . . . . . . . . . . . . . . . . . . . . . . 40 90 13.3.1. Keys . . . . . . . . . . . . . . . . . . . . . . . . . 40 91 13.3.2. Reflection Attacks . . . . . . . . . . . . . . . . . . 40 92 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 93 14.1. NLS Application Identifiers . . . . . . . . . . . . . . . 42 94 14.2. NLS TLVs . . . . . . . . . . . . . . . . . . . . . . . . . 43 95 15. References . . . . . . . . . . . . . . . . . . . . . . . . . . 44 96 15.1. Normative References . . . . . . . . . . . . . . . . . . . 44 97 15.2. Informative References . . . . . . . . . . . . . . . . . . 44 98 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 45 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 46 100 Intellectual Property and Copyright Statements . . . . . . . . . . 47 102 1. Requirements notation 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 106 document are to be interpreted as described in [RFC2119]. 108 2. Introduction 110 RSVP is based on a "path-coupled" signaling model, in which signaling 111 messages between two endpoints follow a path that is tied to the data 112 path between the same endpoints, and in which the signaling messages 113 are intercepted and interpreted by RSVP-capable routers along the 114 path. While RSVP was originally designed to support QoS signaling 115 for Integrated Services [RFC1633], this model has proven to 116 generalize to other problems extremely well. Some of these problems 117 include topology discover, communicating with firewalls and NATs, 118 discovery of IPSec tunnel endpoints, test applications, diagnostic 119 triggers, and so on. 121 This document describes the core protocol for a generalized on-path 122 request protocol that is being used today to carry topology discovery 123 and other requests -- one that is not tied directly to IntServ and in 124 which the protocol machinery itself is sufficiently generalized to be 125 able to support a variety of applications (this protocol is referred 126 to as "Network Layer Signaling", or "NLS"). What this means in 127 practice is that there will be different signaling applications, all 128 of which share a base NLS transport layer. This architecture is 129 based on work done by Bob Braden and Bob Lindell, and described in 130 [braden]. It is also similar to the concepts used in secsh, where 131 authentication and connection protocols run on top of a secsh 132 transport protocol (see [RFC4251] for details). 134 The protocol machinery was originally based somewhat on RSVP 135 [RFC2205] without refresh overhead reduction extensions [RFC2961], 136 but in the process of generalization has lost many of the features 137 that define RSVP, such as necessary receiver-oriented reservations 138 and processing requirements at each node. 140 NLS differs from RSVP in several important ways. One of the most 141 significant of these is that the transport protocol described in this 142 document (NLS-TL) does not itself trigger reservations in network 143 nodes. Reservations will be installed and managed by NLS 144 applications, however some NLS applcations may not carry reservation 145 requests at all (discovery protocols, for example). Because of this 146 NLS-TL does not support reservation styles (those would be also be 147 attributes of an application). Another significant difference is 148 that that reservations may be installed by a NLS application in 149 either a forward (from the sender toward the receiver) or backward 150 (from the receiver toward the sender) direction -- this is 151 application-specific. 153 Other possibly significant differences include that NAT traversal 154 support is integrated into the message transport, and that NLS allows 155 an application to install reservations for paths that are 156 bidirectional and asymmetric. 158 NLS also shares some basic design features with NSIS [RFC4080], which 159 is another path-coupled protocol. However, unlike NLS, the NSIS 160 transport provides reliable delivery of request messages (in NLS this 161 is left to the application rather than the transport layer), and NLS 162 was not designed with QoS signaling support in mind. 164 The NLS Transport Layer is being used by PacketCable and the ITU-T to 165 carry topology discovery requests, in a protocol called "Control 166 Point Discovery" (CPD). 168 2.1. Transport layer 170 This document describes the transport layer. The NLS transport layer 171 is as simple as we could make it, supporting two basic functions: 172 routing and NAT traversal. The sources of complexity in signaling 173 protocols tend to be the signaling applications themselves. Those 174 applications have varying performance and reliability requirements, 175 and consequently we feel that application-specific functions belong 176 in the application layer. 178 The NLS transport layer is also relatively stateless. By "stateless" 179 we mean that the transport layer does not itself create or manipulate 180 state in participating nodes. By "relatively" we take exception to 181 the previous assertion, in that the transport layer provides 182 facilities for route identification and route pinning. This is an 183 optimization, albeit a significant one, which allows NLS to be used 184 without a separate route discovery process. Another source of state 185 is in the case of NATs, where an NLS-TL request may trigger the 186 creation of a NAT table mapping. However, this latter case does not 187 create NLS-TL maintenance state. 189 An application may wish to support summary refreshes or other 190 performance enhancements; that type of function is application- 191 specific and requires no support from the transport layer. 193 3. NLS-TL Messages 195 3.1. Message Processing Overview 197 Unlike RSVP, NLS-TL has only one fundamental message type, and 198 directionality is significant to the NLS application only. Three new 199 attributes, HOP-BY-HOP, BUILD-ROUTE, and BIDIRECTIONAL, have been 200 added in support of greater flexibility in the NLS application. For 201 example, some applications which already know network topology or 202 which run a separate routing protocol may choose to route hop-by-hop 203 in a forward direction. Conversely, a topology discovery protocol 204 may choose to route end-to-end in the return direction. Both of 205 these would be departures from the Path/Resv message handling 206 specified in RSVP. 208 The BUILD-ROUTE flag has been added to allow route discovery to be 209 overloaded on top of basic messaging, much like the RSVP Path 210 message. If the BUILD-ROUTE flag is present, NLS nodes store routing 211 information carried in incoming HOP objects. They also overwrite 212 routing information into the HOP TLV in outgoing NLS messages. 214 The BIDIRECTIONAL flag may be used to indicate that the application 215 for which this NLS-TL message carries a payload must be executed in 216 each direction. It may be used in combination with the HOP-BY-HOP 217 flag in some circumstances, but typically it will be used with the 218 HOP-BY-HOP flag set to 0. 220 Even with these departures, the basic operation of the protocol may 221 made be similar to RSVP with the appropriate use of the new 222 attributes. For example, a message may be injected into a network by 223 the sender towards a receiver, routed end-to-end with the receiver's 224 address in the destination address in the IP header. If the BUILD- 225 ROUTE bit is set in the NLS header, entities along the path the 226 message traverses will intercept it, store path state, act on (or 227 not) the application payload data, and forward the message towards 228 its destination. In NLS-TL, "path state" refers specifically to the 229 unicast IP address of the previous hop node along with locally- 230 relevant path information (for example, interface identifier). 232 When the message arrives at the receiver (or its proxy), the receiver 233 may generate another NLS message in response, this time back towards 234 the original sender. As with the message in the forward direction, 235 this message may be routed either end-to-end or hop- by-hop, 236 depending on the requirements of the application. In order to 237 emulate an RSVP Resv message, the HOP-BY-HOP is set to 1 and the 238 BUILD-ROUTE bit is set to 0. 240 BUILD-ROUTE and HOP-BY-HOP must not be set in the same NLS-TL 241 message, and BUILD-ROUTE and TEARDOWN MUST NOT be set in the same 242 NLS-TL message. 244 3.1.1. Congestion Considerations 246 Transmission, loss response, and resend timings are out-of-scope for 247 this document. Different NLS applications will have different 248 transmission timing and resend characteristics and will need to be 249 specified in a manner appropriate to each application. For example, 250 a discovery application will need to behave differently from an 251 application which requests and maintains state in middleboxes. 253 However, each NLS application MUST specify how it will handle message 254 loss and MUST specify a backoff mechanism in the case where messages 255 are retransmitted as a response to message loss. 257 Loss response for stand-alone NAT traversal is described in section 258 Section 8. 260 3.2. NAT Traversal Support 262 NAT traversal poses a particular challenge to a layered protocol like 263 NLS. If we assume the use of discrete, opaque applications, one of 264 which is NAT, interactions between other applications that make use 265 of addresses (for example, firewall rules or QoS filter specs) and 266 the NAT application are complicated. Either every application will 267 need to be able to peek into NAT payloads and identify which address 268 mapping is the one they need, or NATs supporting NLS will need to be 269 able to parse and write into every application payload type. Neither 270 approach is particularly robust, reintroducing a type of stateful 271 inspection and constraining how applications can be secured. 273 Because of the desire to be able to have a variety of NLS 274 applications successfully interact with NATs and because of the 275 constraints described above, in NLS NAT is supported in the transport 276 layer rather than in a separate application. Each address that needs 277 translation is tagged, put into a NAT_ADDRESS TLV, and passed to the 278 appropriate application at each NLS node. Application identification 279 is based on tag contents. 281 3.3. NLS-TL Message Format 283 NLS messages consist of an NLS-TL header followed by optional TLV 284 fields followed by an optional application payload. 286 3.3.1. The NLS-TL Message Header 288 All NLS-TL messages (and by implication, all NLS messages) start with 289 an NLS header. The header is formatted as follows: 291 0 1 2 3 292 +-------------+-------------+-------------+-------------+ 293 | Version | (Reserved) | Message Length | 294 +-------------+-------------+-------------+-------------+ 295 | Flags | Checksum | 296 +-------------+-------------+-------------+-------------+ 297 | Flow ID | 298 +-------------+-------------+-------------+-------------+ 300 Figure 1 302 where the fields are as follows: 304 Version: 8 bits. The protocol version number; in this case 0x01. 306 Message Length: 16 bits. The total number of octets in the 307 message, including the NLS-TL header and complete payload. 309 Flags: 16 bits. Flag bits include 311 0x01 HOP-BY-HOP 312 0x02 BUILD-ROUTE 313 0X04 TEARDOWN 314 0x08 AX_CHALLENGE 315 0x10 AX_RESPONSE 316 0x20 BIDIRECTIONAL 318 Checksum: 16 bits. The one's complement of the one's complement 319 sum of the entire message. The checksum field is set to zero for 320 the purpose of computing the checksum. This may optionally be set 321 to all zeros. If a message is received in which this field is all 322 zeros, no checksum was sent. 324 Flow ID: 32 bits. This is a value which, combined with the source 325 IP address of the message, provides unique identification of a 326 message, which may be used for later reference for actions such as 327 quick teardowns, status queries, etc. The mechanism used for 328 generating the value is implementation-specific. 330 Throughout, we assume the use of 8-bit bytes, or octets. 332 3.3.2. NLS-TL TLVs 334 NLS-TL carries additional transport-layer information and requests as 335 type-length-value fields, which are inserted after the header and 336 before the application payload. The TLV format is as follows: 338 0 1 2 3 339 +-------------+-------------+-------------+-------------+ 340 |M|R| Type | Length | 341 +-------------+-------------+-------------+-------------+ 342 | | 343 // Value // 344 | | 345 +-------------+-------------+-------------+-------------+ 347 Figure 2 349 where the fields are as follows: 351 Mandatory: 1 bit. If this bit is set, this TLV MAY NOT be ignored 352 silently, even if the recipient does not understand the type code. 353 If it is not set then the recipient MAY ignore the TLV. 355 Reserved: 1 bit. This bit is reserved for future use. 357 Type: 14 bits. The type of information or request. Defined below. 359 Length: 16 bits. Total TLV length in octets, including the type 360 type and length fields. It must always be at least 4 and be a 361 multiple of 4. 363 Value: Variable length. At least 4 octets and a multiple of 4 364 octets). The TLV semantic content. The format of the Value field 365 is determined by the value of the Type field 367 3.3.2.1. NAT_ADDRESS, TYPE=1 369 +-------------+-------------+-------------+-------------+ 370 | Application ID | Flags | Proto | 371 +-------------+-------------+-------------+-------------+ 372 | Address ID Tag | 373 +-------------+-------------+-------------+-------------+ 374 | Original IPv4 Address | 375 +-------------+-------------+-------------+-------------+ 376 | Mapped IPv4 Address | 377 +-------------+-------------+-------------+-------------+ 378 | Original Port | Mapped Port | 379 +-------------+-------------+-------------+-------------+ 381 where the fields are as follows: 383 Application ID: 16 bits. This is the same as the value that's used 384 for identifying application payloads. The Application ID field is 385 set by the sender. 387 Flags: 16 bits. Flag bits include 389 0x01 = NO_TRANSLATE 390 0x02 = NO_REWRITE 392 NO_TRANSLATE indicates that a NAT device handling the packet 393 should not create a NAT table entry for the original address. If 394 the NO_TRANSLATE bit is set, the NAT does nothing. 396 NO_REWRITE indicates that when the reply message is being returned 397 towards the sender, any NATs along the path MUST NOT overwrite the 398 Mapped Address. 400 Proto: IP protocol for this translation (TCP, UDP, SCTP, etc.). 402 Address ID: 32 bits. An value that's unique within the set of 403 Address IDs used with a particular Application ID; used to 404 uniquely identify a particular address (i.e. provide a tag). 406 Original IPv4 Address: The original address for which a translation 407 is being requested. 409 Mapped IPv4 Address: The address created by the NAT -- i.e. the 410 "external" address. 412 Original Port: The original port for which a translation is being 413 requested 415 Mapped Port: The port number created by the NAT for this mapping. 417 The mandatory bit in the TLV header MUST always be set to 1 for this 418 TLV. 420 3.3.2.2. APPLICATION PAYLOAD, TYPE=2 422 +-------------+-------------+-------------+-------------+ 423 | Application ID | Payload | 424 +-------------+-------------+-------------+-------------+ 425 | | 426 // Payload // 427 | | 428 +-------------+-------------+-------------+-------------+ 430 The application payload TLV carries the NLS application data. It 431 MUST follow any NAT TLVs. It consists of a 16-bit Application ID, 432 which uniquely identifies the NLS application for which the TLV is 433 intended, and the application payload itself. The application 434 payload is transparent to the NLS Transport Layer. 436 3.3.2.3. TIMEOUT, TYPE=3 438 +-------------+-------------+-------------+-------------+ 439 | Timeout Value | 440 +-------------+-------------+-------------+-------------+ 442 The TIMEOUT TLV carries the number of milliseconds for which state 443 associated with a particular flow should be retained, with the 444 expectation that the state will be deleted when the timeout expires. 445 "State" in this case refers to routing state and to NAT state; NLS 446 application state will be managed by its application. 448 3.3.2.4. IPV4_HOP, TYPE=4 450 +-------------+-------------+-------------+-------------+ 451 | IPv4 Hop Address | 452 +-------------+-------------+-------------+-------------+ 454 The IPv4_HOP TLV carries the IPv4 address of the interface through 455 which the last NLS entity forwarded the message. 457 3.3.2.5. IPv6_HOP, TYPE=5 459 +-------------+-------------+-------------+-------------+ 460 | | 461 + + 462 | | 463 + IPv6 Next/Previous Hop Address + 464 | | 465 + + 466 | | 467 +-------------+-------------+-------------+-------------+ 469 The IPv6_HOP TLV carries the IPv6 address of the interface through 470 which the last NLS entity forwarded the message. 472 3.3.2.6. IPv4_ERROR_CODE, TYPE=6 474 +-------------+-------------+-------------+-------------+ 475 | IPv4 Error Node Address (4 octets) | 476 +-------------+-------------+-------------+-------------+ 477 | Flags | Error Code | Error Value | 478 +-------------+-------------+-------------+-------------+ 480 The IPv4_ERROR_CODE TLV carries the address of a node at which an 481 NLS-TL error occurred, along with an error code and error value. 482 When no Error Value is defined, the Error Value field MUST be set to 483 0 by its sender and ignored by its receiver. 485 If the high-order bit of the Error Code is not set, the TLV carries 486 an error message. If it is set, the TLV carries an informational 487 message. Therefore Error Codes with values between 0 and 127 contain 488 error messages and Error Codes with values between 128 and 255 489 contain informational messages. 491 IPv4 Error Node Address: 4 octets. The IPv4 address of the 492 interface on the node that generated the error message. 494 Flags: 8 bits. None currently defined. 496 Error Code: 8 bits. The type of error or informational message, 497 with values as follows: 499 Error Code = 0: No error 501 Error Code = 1: Bad parameters 503 Error Value = 1: HOP-BY-HOP and BUILD-ROUTE both present 505 Error Value = 2: BUILD-ROUTE present but no HOP TLV 507 Error Value = 3: HOP-BY-HOP present but no local stored 508 routing state 510 Error Value = 4: Message length not a multiple of 4 512 Error Code = 2: Unrecognized TLV 514 Error Value = TLV number 516 Error Code = 3: Unrecognized application 518 Error Value = Application ID 520 Error Code = 4: Non-NLS NAT detected in path 522 Error Code = 5: Security error 524 Error Value = 1: AGID not found 525 Error Value = 2: Insufficient authorization 527 Error Value = 3: Request/reply mismatch 529 Error Value = 4: Authentication Failure 531 Error Code = 128: No message 533 Error Code = 129: Sending node has detected a route change 535 3.3.2.7. IPv6_ERROR_CODE, TYPE=7 537 +-------------+-------------+-------------+-------------+ 538 | | 539 + + 540 | | 541 + IPv6 Error Node Address (16 octets) + 542 | | 543 + + 544 | | 545 +-------------+-------------+-------------+-------------+ 546 | Flags | Error Code | Error Value | 547 +-------------+-------------+-------------+-------------+ 549 The IPv6_ERROR_CODE TLV carries the address of a node at which an 550 NLS-TL error occurred, along with an error code and error value. 552 "IPv6 Error Node Address:" 16 octets. The IPv6 address of the 553 interface on the node that generated the error message. 555 Flags: 8 bits. None currently defined. 557 The Error Code and Error value fields are the same as those used in 558 the IPv4_ERROR_CODE. 560 3.3.2.8. AGID, TYPE=8 562 The AGID is the authentication group ID, used in the authentication 563 dialogue to identify the group key. 565 +-------------+-------------+-------------+-------------+ 566 | id | 567 +-------------+-------------+-------------+-------------+ 569 3.3.2.9. A_CHALLENGE, TYPE=9 571 The A_CHALLENGE TLV is used to carry a 16-octet random nonce to be 572 used as an authentication challenge. It MUST be generated using a 573 strong random or pseudorandom source. 575 For a description of why we need A_CHALLENGE and B_CHALLENGE (as 576 opposed to just a single CHALLENGE type), see Section 13.3.2. 578 +-------------+-------------+-------------+-------------+ 579 | | 580 + + 581 | | 582 + Nonce + 583 | | 584 + + 585 | | 586 +-------------+-------------+-------------+-------------+ 588 3.3.2.10. A_RESPONSE, TYPE=10 590 The A_RESPONSE TLV carries the response to the authentication 591 challenge. It is a variable length TLV with the length dependent on 592 the transform being used. 594 For a description of why we need A_RESPONSE and B_RESPONSE (as 595 opposed to just a single RESPONSE type), see Section 13.3.2. 597 +-------------+-------------+-------------+-------------+ 598 | | 599 // MAC // 600 | | 601 +-------------+-------------+-------------+-------------+ 603 3.3.2.11. B_CHALLENGE, TYPE=11 605 The B_CHALLENGE TLV is used to carry a 16-octet random nonce to be 606 used as an authentication challenge. It MUST be generated using a 607 strong random or pseudorandom source. 609 For a description of why we need A_CHALLENGE and B_CHALLENGE (as 610 opposed to just a single CHALLENGE type), see Section 13.3.2. 612 +-------------+-------------+-------------+-------------+ 613 | | 614 + + 615 | | 616 + Nonce + 617 | | 618 + + 619 | | 620 +-------------+-------------+-------------+-------------+ 622 3.3.2.12. B_RESPONSE, TYPE=12 624 The B_RESPONSE TLV carries the response to the authentication 625 challenge. It is a variable length TLV with the length dependent on 626 the transform being used. 628 For a description of why we need A_RESPONSE and B_RESPONSE (as 629 opposed to just a single RESPONSE type), see Section 13.3.2. 631 +-------------+-------------+-------------+-------------+ 632 | | 633 // MAC // 634 | | 635 +-------------+-------------+-------------+-------------+ 637 3.3.2.13. AUTHENTICATION, TYPE=13 639 The AUTHENTICATION TLV carries a cryptographic hash over the entire 640 packet, as well as a 32-bit sequence number. In order to use this 641 TLV, the peer must first have passed a challenge/response exchange to 642 negotiate the approprite agid to use. It is a variable length TLV 643 with the length of the MAC dependent on the transform being used (as 644 determined by the agid). Details of computing the MAC are described 645 in section Section 5.6. 647 +-------------+-------------+-------------+-------------+ 648 | Sequence Number | 649 +-------------+-------------+-------------+-------------+ 650 | | 651 // MAC // 652 | | 653 +-------------+-------------+-------------+-------------+ 655 3.3.2.14. ECHO, TYPE=14 657 A device can include an ECHO element in the messages that it sends. 658 A device receiving a message containing such a element must send the 659 element back, verbatim, in the following response. 661 +-------------+-------------+-------------+-------------+ 662 | | 663 | | 664 // ECHO data // 665 | | 666 | | 667 +-------------+-------------+-------------+-------------+ 669 An ECHO TLV SHOULD only appear during an Authentication Exchange, and 670 SHOULD NOT appear in any other message. 672 3.4. Cryptographic Datatypes 674 This section provides further detail on message formats for the 675 authentication exchange. 677 An NLS-TL message MSG has the following format: 679 MSG :== HDR OPT* APP* SEC* 681 where HDR, OPT, APP, and SEC are as follows: 683 HDR is the NLS header 685 OPT is an NLS optional TLV 687 APP is the optional Application Object 689 SEC is an AGID, A_CHALLENGE, A_RESPONSE, B_CHALLENGE, B_RESPONSE, 690 or AUTHENTICATION TLV's. These datatypes are defined below. 692 Note that though both OPT and APP are optional, one or the other MUST 693 exist (or both together). 695 The security TLVs are always last in order to avoid data-formatting 696 issues with the inputs to the message authentication codes, and to 697 minimize the amount of data movement needed during the Authentication 698 Exchange. 700 Authorization Group Identifier (AGID): The AGID TLV identifies a 701 particular group key. The Value field carries an identifier; 702 there is no defined format. The length of this field is variable, 703 and MUST be a multiple of four octets. If it is generated at 704 random, then it SHOULD be at least 16 octets. 706 A_CHALLENGE: The A_CHALLENGE contains a 16-octet random nonce. 707 This TLV is put into a message whenever outbound authentication is 708 desired. When this TLV is received, then the next message sent 709 MUST contain either an A_RESPONSE TLV or an error message 710 indicating that no authentication is possible. 712 B_CHALLENGE: The B_CHALLENGE contains a 16-octet random nonce. 713 This TLV is put into a message whenever inbound authentication is 714 desired. When this TLV is received, then the following message 715 MUST contain either a B_RESPONSE TLV or an error message 716 indicating that no authentication is possible. 718 A_RESPONSE: The A_RESPONSE TLV is sent in response to a message 719 containing an A_CHALLENGE TLV. It contains a message 720 authentication code (MAC) value computed over the complete NLS 721 message containing the A_CHALLENGE, including the NLS header. 723 B_RESPONSE: The B_RESPONSE is sent in response to a message 724 containing a B_CHALLENGE TLV. It contains a message 725 authentication code (MAC) value computed over the complete NLS 726 message containing the B_CHALLENGE, including the NLS header. 728 4. Sending NLS-TL Messages 730 When an endhost or its proxy wishes to initiate a NLS session, it 731 creates an NLS-TL message. If the message is being sent end-to-end 732 the destination address in the IP header is the address of the device 733 interface that is expected to terminate the path along which 734 signaling is expected to be sent. It may be a application peer host 735 or terminal, or it may be a proxy. If the message is being sent hop- 736 by-hop the destination address in the IP header is the address of the 737 device interface that is the next hop along the path. That address 738 will have been discovered either through a separate routing process 739 or through RSVP-style soft-state messaging. 741 NLS-TL messages are UDP-encapsulated and sent on UDP port 7549. They 742 MAY be sent with the router alert bit set in IPv4 headers or with the 743 IPv6 router alert option [RFC2711], but it is not required. If the 744 message is end-to-end and needs route discovery and pinning, the 745 BUILD-ROUTE bit in the NLS-TL flags header MUST be set to 1 and the 746 HOP-BY-HOP bit MUST be set to 0. If the message is being routed hop- 747 by-hop, the HOP-BY-HOP bit MUST be set to 1 and the BUILT-ROUTE bit 748 MUST be set to 0. (Note that there may be applications in which both 749 the HOP-BY-HOP and the BUILD- ROUTE bit will be set to 0.) 751 If the NLS application wishes to support bidirectional reservations, 752 the BIDIRECTIONAL flag must be set to 1, the BUILD-ROUTE flag should 753 be set to 1, and the HOP-BY-HOP flag should be set to 0, at least in 754 the initial message. If the application makes use of periodic 755 refreshes it may optionally choose to route some number of them hop- 756 by-hop along the discovered path before sending out another message 757 to refresh the route state; that is an application design issue. 759 In this version of the protocol, each NLS message must fit in one 760 datagram. An NLS-TL message originator should perform PMTU discovery 761 in order to avoid exceeding path MTU size. 763 5. Messaging and state maintenance 765 Message handling and state maintenance are determined by the presence 766 (or absence) of two flags in the NLS-TL header: the HOP-BY-HOP bit 767 and the BUILD-ROUTE bit. They also involve, and are involved by, NAT 768 processing. 770 5.1. BUILD-ROUTE 772 The BUILD-ROUTE bit in the flags field of the NLS-TL header allows 773 NLS-TL to function as a discovery and routing protocol, much like the 774 Path message described in RFC 2205. 776 If the BUILD-ROUTE flag is present in a NLS-TL message, upon receipt 777 a NLS node MUST check for the presence of an IPv4_HOP or IPv6_HOP TLV 778 in the NLS-TL payload. If one is not present, the message MUST be 779 discarded and an error returned to the sender. If both are present, 780 the message MUST be discarded and an error returned to the sender. 781 Otherwise, if there is no installed soft state associated with the 782 Flow ID_ID, the node stores the HOP information, Flow ID, and other 783 state information it chooses to retain, and forwards the message 784 towards the address in the destination field of its IP header. If 785 there is installed soft state associated with the Flow ID, the node 786 compares the contents of the HOP field with the installed state. If 787 they are identical nothing needs to be done; if they are different 788 the HOP information in the node is overwritten with the information 789 in the current message. This allows the protocol to be responsive to 790 route changes, endpoint mobility, and so on. 792 A NLS node MAY send notification of a routing change back to the 793 sender. 795 5.2. HOP-BY-HOP 797 If the HOP-BY-HOP bit is set in the flags field of the NLS-TL header, 798 a NLS node MUST forward the message to the address stored in 799 associated local soft state. That is to say, the node MUST write the 800 address in the local HOP information associated with the 801 MESSAGE_IDFlow ID into the destination field in the IP header on the 802 outbound message. This is like message processing in the Resv 803 message in RFC 2205. 805 The HOP information may have been acquired using a routing process 806 based on HOP-BY-HOP processing, but it may have been acquired using 807 an external routing mechanism. If there is no HOP information stored 808 locally, the node MUST drop the message and return an error to the 809 sender. 811 5.3. BIDIRECTIONAL 813 If the BIDIRECTIONAL flag is set, the receiver must send the 814 answering message to the sender (that is to say, the destination 815 address in the IP header must be set to the address of the sender) 816 with the BUILD_ROUTE flag set and the HOP_BY_HOP flag set to 0. As 817 with the message sent from the sender to the receiver, the HOP TLV 818 contains information used to install routing state. If the nodes are 819 already authenticated to one another (they were already traversed in 820 the forward direction) it is unnecessary for the authentication 821 dialogue to be performed again. If the nodes are not already 822 authenticated to one another then the route is asymmetric and the 823 authentication dialogue must be performed. 825 Note that the sender and receiver should retain knowledge that the 826 session is bidirectional, as it may affect subsequent messaging and 827 error processing. 829 Because a complete authentication dialogue may take place in each 830 direction, with each node being authenticated to its adjacent node 831 (i.e. the dialogue takes care of authenticating both A to B and B to 832 A), this proposal neither changes the authentication dialogue nor 833 should it undermine the security of the protocol. 835 5.4. Path Teardown Messages 837 Receipt of a NLS message with the TEARDOWN bit set indicates that 838 matching path state must be deleted. Note that this is independent 839 of directionality, and the teardown message may be sent in either 840 direction. The applications which have reservations that were 841 installed by a message containing a matching Flow ID must be 842 notified, and they are responsible for managing (in this case, 843 deleting) their own flow-related state. TEARDOWN and HOP-BY-HOP MUST 844 not be set in the same message. 846 Unlike RFC 2205, if there is no matching path state the teardown 847 message must be forwarded. There may be path state in support of an 848 NLS application that is not running on every node, and the teardown 849 message must not be lost. 851 5.5. Network Address Translation 853 If there is one or more NAT_ADDRESS TLVs present, an NLS- capable NAT 854 must process each one that has does not have the NO_TRANSLATE bit set 855 in the flags field. Processing takes place as follows: 857 o The originator (sender) of the message creates a NAT_ADDRESS TLV 858 for each address/port/protocol tuple requiring NAT mappings. It 859 also creates a random 32- bit tag, which is used to identify the 860 address in application payloads and to tag the mapping in the 861 NAT_ADDRESS TLV in the NLS-TL header. It also sets the TRANSLATE 862 bit in the flags field and zeros the Mapped Address field. 864 o When an NLS-capable NAT receives a request, for each NAT_ADDRESS 865 TLV in which the NO_TRANSLATE bit is not set and the Mapped 866 Address is all nulls, it creates a NAT table mapping for the 867 Original Address and Original Port and inserts the "external" 868 address and port into the Mapped Address and Mapped Port fields. 870 o When an NLS-capable NAT receives a request, for each NAT_ADDRESS 871 TLV in which the NO_TRANSLATE bit is not set and the Mapped 872 Address is not nulls, it creates a NAT table mapping for the 873 Mapped Address and Mapped port and overwrites those values with 874 the new external addresses and ports. 876 o When an NLS-capable node receives a request, for reach NAT_ADDRESS 877 TLV in which the Application ID matches an NLS application payload 878 ID and the application is supported by the node, the TLV is passed 879 to the application with the application payload, allowing the 880 application module on the node to correlate and use the address 881 based on the tag [and the Original Address?] 883 Note that this approach to NAT requires that participants be 884 sensitive to directional issues in cases where ordering matters, such 885 as the need to find the outermost NAT address. API support is 886 required in order to turn the NO_TRANSLATE bit on and off as needed 887 by a particular application. 889 Also note that in cases where the only function required is NAT table 890 mapping requests, there may be no application payloads, or it may be 891 desirable to create a rudimentary NAT NLS application that does 892 nothing other than allow the receiver, or other nodes, to turn the 893 NO_TRANSLATE bit on. 895 5.6. Authentication Exchange 897 NLS provides its own message authentication mechanism, based on a 898 dialogue between adjacent nodes. We refer to this as the 899 "Authentication Exchange," or AX. 901 5.6.1. Authentication Exchange Messages 903 In the following, we consider only the Security TLVs, and we use 904 REQUEST and REPLY to represent the body of the messages. 906 1. A -> B : HDR1, REQUEST, AGID*, A_CHALLENGE 908 2. B -> A : HDR2, REQUEST, AGID, B_CHALLENGE, A_RESPONSE 910 3. A -> B : HDR3, REQUEST, AGID, B_RESPONSE 912 /* at this point, B might forward the REQUEST onward */ 914 4. B -> A : HDR4, REPLY, AUTHENTICATION 916 Note that the Flow ID in each message in the Authentication Exchange 917 MUST be the Flow ID that appeared in the original request. 919 Note as well that the fields MUST be presented in the order 920 specified, or the MAC calculations will fail. 922 Message 1 (outbound). When device A sends a message, it constructs 923 the message as follows: 925 o It consults the policy associated with that interface to determine 926 which AGID values should be included in that message. For each 927 AGID in the policy that is associated with the Application ID in 928 the message, it includes in that message an AGID TLV containing 929 the AGID value. 931 o After the AGID TLVs have been included, an A_CHALLENGE TLV is 932 constructed and included in the message. 934 o In the NLS-TL header for message 1, the AX_CHALLENGE flag must be 935 set. 937 Message 1 (inbound). Device B receives (or intercepts) Message 1 and 938 processes it as follows: 940 o The local policy associated with the interface on which the 941 message arrived is checked to determine which AGIDs are associated 942 with the Application ID in the message. If the AGID set in the 943 message intersects with the locally derived AGID set, then one of 944 the AGID values is chosen to be 'active'; this choice is 945 arbitrary. Otherwise, the AX cannot be successfully completed, 946 and an "AGID not found" error message SHOULD be returned. 948 Message 2 (outbound). Device B constructs Message 2 as follows: 950 o The NLS header is identical to that of Message 1, except that the 951 AX_CHALLENGE and AX_RESPONSE flags are now set. The TLVs from 952 Message 1 are copied verbatim into Message 2, in order, except for 953 the AGID TLVs and the A_CHALLENGE TLV. A single AGID TLV 954 containing the active AGID is appended to Message 2, followed by a 955 B_CHALLENGE TLV and an A_RESPONSE TLV. The B_CHALLENGE TLV is 956 constructed by generating its Nonce field uniformly at random. 957 The A_RESPONSE TLV contains a message authentication code (MAC) 958 value computed over the complete Message 1, also containing the 959 A_CHALLENGE, the B_CHALLENGE, the A_RESPONSE (set to zero for the 960 purpose of the MAC calculation) and including the NLS header, 961 using the secret key associated with the AGID. Device B then 962 sends Message 2 to Device A. 964 o In the NLS-TL header in Message 2, the AX_CHALLENGE and 965 AX_RESPONSE flags must be set 967 o If the optional ECHO TLV is used, it must be placed after the AGID 968 (i.e. between the AGID and the A_CHALLENGE) 970 For the purpose of the MAC calculation for A_RESPONSE, the "entire 971 NLS message" is: 973 HDR1||REQUEST||AGID||A_CHALLENGE||A_RESPONSE||B_CHALLENGE 975 Message 2 (inbound). Device A processes Message 2 by performing the 976 following checks: 978 o Verifying that the AGID in the message is associated with the 979 Application ID in the NLS message. If it is not, then the 980 Authentication Exchange cannot be successfully completed, an error 981 message of "Insufficient authorization" SHOULD be returned, and 982 the connection MUST be abandoned. 984 o Verifying that the TLVs other than the security TLVs in Message 2 985 match the non-security TLVs in Message 1. The two messages should 986 be bitwise identical, besides the security TLVs (and the transport 987 headers below the NLS header). If the messages do not match, then 988 the Authentication Exchange cannot be successfully completed, an 989 error message of "Request/reply mismatch" SHOULD be returned, and 990 the connection MUST be abandoned. 992 o If the other checks pass, then Device A computes its own value of 993 the A_RESPONSE TLV, using as input the key associated with the 994 AGID in the message, and the locally cached copy of Message 2. 995 Note that it may be necessary to make a temporary copy of the 996 value of the A_RESPONSE MAC field before setting that field to 997 zero, in order to compare the locally computed value to the 998 received value. 1000 o If the locally constructed A_RESPONSE does not match the 1001 A_RESPONSE in Message 2, then the Authentication Exchange cannot 1002 be successfully completed, an error message of "Authentication 1003 failure" SHOULD be returned, and the connection MUST be abandoned. 1005 If all of those those steps are passed, then Message 3 is computed as 1006 described below. 1008 o Message 3 (outbound): Device A constructs Message 3 as follows. 1009 The NLS header is identical to that of Message 2, except that the 1010 AX_RESPONSE flag is set, and the AX_CHALLENGE flag is not set. 1011 The TLVs from Message 2 are copied verbatim into Message 3, in 1012 order, except for the A_RESPONSE TLV. An A_CHALLENGE and 1013 B_RESPONSE TLV are appended to Message 3. The B_RESPONSE TLV is 1014 constructed by computing the MAC over the entire NLS message from 1015 the header up to and including the B_RESPONSE TLV (with the MAC 1016 field set to zero), using the secret key associated with the AGID. 1017 Device A then sends Message 3 to Device B. 1019 o In the Message 3 NLS-TL header, the AX_RESPONSE flag must be set 1021 o If the optional ECHO TLV is used, it MUST follow the AGID (i.e. 1022 between the AGID and the B_RESPONSE). 1024 For the purpose of the MAC calculation for B_RESPONSE, the "entire 1025 NLS message" is: 1027 HDR2||REQUEST||AGID||B_RESPONSE||A_CHALLENGE||B_CHALLENGE 1029 Message 3 (inbound): Device B processes Message 3 by performing the 1030 following checks: 1032 o Verifying that the AGID in the message is associated with the 1033 Application ID in the NLS message. If it is not, then the 1034 Authentication Exchange cannot be successfully completed, an error 1035 message of "Insufficient authorization" SHOULD be returned, and 1036 the connection MUST be abandoned. 1038 o Computing its own value of B_RESPONSE, by computing the MAC over 1039 the entire NLS message from the header up to and including the 1040 B_RESPONSE TLV (with the MAC field set to zero), using the secret 1041 key associated with the AGID. If the locally constructed 1042 B_RESPONSE does not match the one received in Message 3, then the 1043 message is rejected, and an error message of "Authentication 1044 failure" SHOULD be returned. Note that it may be necessary to 1045 make a temporary copy of the value of the B_RESPONSE MAC field 1046 before setting that field to zero, in order to compare the locally 1047 computed value to the received value. 1049 After an authentication exchange has completed sucessfully and a 1050 single AGID has been negotiated, the nonces sent to and received from 1051 the peer MUST both be saved for use with the AUTHENTICATION TLV. 1052 Also, the sequence number associated with the nonces MUST be set to 0 1053 immediately after finishing the exchange successfully, and before 1054 using an AUTHENTICATION TLV. Should any previous state exist (i.e. 1055 previous nonces and sequence numbers), these MUST be replaced by the 1056 new nonces (and the sequence numbers reset to 0). 1058 After these checks pass, then the body of the NLS message, with the 1059 B_RESPONSE TLV removed, is proccessed by the NLS application, that 1060 is, it is processed in the manner determined by the Application ID. 1062 5.6.2. Authentication TLV calculation 1064 The AUTHENTICATION TLV is calculated over the entire packet (as 1065 described in the next paragraph) as well as the nonce from the last 1066 challenge received from (or sent to, in the case of the receiver) the 1067 peer (from either A_CHALLENGE or B_CHALLENGE). The nonce is 1068 associated with a sequence number, which helps guard against replay 1069 attacks. The AUTHENTICATION TLV MUST be at the end of the TLV 1070 stream. 1072 The appropriate MAC algorithm to be used is negotiated in a previous 1073 Challenge/Response exchange, where AGID TLV's were exchanged and one 1074 single AGID was agreed upon. 1076 The sender: 1078 o Add an empty AUTHENTICATION TLV to the end of the TLV stream (i.e. 1079 with the HMAC field set to all 0's). 1081 o Find the last nonce received from the peer in either an 1082 A_CHALLENGE or B_CHALLENGE. 1084 o Increment the sequence number associated with the nonce by one, 1085 and write it into the 'sequence number' field of the 1086 AUTHENTICATION TLV 1088 o Calculate the HMAC from the concatenation of the entire packet 1089 (with header and the incomplete AUTHENTICATION TLV) and the nonce. 1090 Write the resulting HMAC value into the HMAC field of the 1091 AUTHENTICATION TLV. 1093 o Send the packet. 1095 The receiver: 1097 o Copy the HMAC field from the AUTHENTICATION TLV into local 1098 storage, and overwrite the HMAC value in the packet with all 0's. 1099 Find the last nonce sent to the peer in either an A_CHALLENGE or 1100 B_CHALLENGE 1102 o Calculate the HMAC from the concatenation of the entire packet 1103 (with header and the incomplete AUTHENTICATION TLV) and the nonce. 1105 o Compare the calculated value to the value copied out int he first 1106 step. 1108 o If the values match, check to see if the sequence number falls 1109 into the range of valid sequence number (as determined by a 1110 sliding window), and if so, the sliding window is updated. 1112 o If the values do NOT match, the packet MUST be discarded and an 1113 error message SHOULD be returned to the sender (rate-limited to 1114 prevent DoS attacks). 1116 The sliding window SHALL be done according to [RFC4303] Appendix A2. 1118 5.6.3. Security state transition table 1120 The security state transitions are as follows: 1122 +---------------------+-----------------------+---------------------+ 1123 | State name | Event | Transition next | 1124 | | | state | 1125 +---------------------+-----------------------+---------------------+ 1126 | Closed | Send unprotected | Closed | 1127 | | message | | 1128 | | | | 1129 | Closed | Send Message 1 | Waiting for Message | 1130 | | | 2 | 1131 | | | | 1132 | Closed | Accept Message 1, | Waiting for Message | 1133 | | send Message 2 | 3 | 1134 | | | | 1135 | Waiting for Message | Timeout expired | Closed | 1136 | 2 | | | 1137 | | | | 1138 | Waiting for Message | Reject invalid | Closed | 1139 | 2 | message | | 1140 | | | | 1141 | Waiting for Message | Accept Message 2 | Secure connection | 1142 | 2 | | established | 1143 | | | | 1144 | Waiting for Message | Timeout expired | Closed | 1145 | 3 | | | 1146 | | | | 1147 | Waiting for Message | Reject invalid | Closed | 1148 | 3 | message | | 1149 | | | | 1150 | Waiting for Message | Accept Message 3 | Secure connection | 1151 | 3 | | established | 1152 | | | | 1153 | Secure connection | Send authenticated | Secure connection | 1154 | established | message | established | 1155 +---------------------+-----------------------+---------------------+ 1157 6. Application Interface 1159 Application payloads are encapsulated within NLS-TL TLVs, and MUST 1160 follow any NAT TLVs. 1162 The Application Payload TLV carries includes the Application ID 1163 field, which is used to vector the requests off to the correct 1164 application on the router upon receipt. It is also used to identify 1165 NAT_ADDRESS TLVs to be passed to the application. In a nutshell, if 1166 the Application ID in a NAT_ADDRESS TLV matches the Application ID in 1167 an Application TLV, the NAT_ADDRESS TLV must be passed to the 1168 application along with the application payload. 1170 The Length field carries the total application payload length, 1171 excluding the header, in octets. The length must be at least 4 and 1172 be a multiple of 4. It may be necessary for an application to pad 1173 its payload to accomplish that. 1175 Note that there is no identifier in the TLV other than the 1176 Application ID. If there is a need for an application-specific 1177 identifer for reservations or other applications requiring retained 1178 state, those must be added to the application payload. 1180 7. NAT Interactions 1182 NLS uses IP addresses for routing, both end-to-end and hop-by-hop. 1183 Given the applications which NLS-TL will be transporting, it is 1184 highly likely that those applications will be using payload-embedded 1185 addresses and there will be some interactions. The use of a NAT 1186 application together with other applications can mitigate this, but 1187 there will be problems transiting non-NLS-capable NATs. 1189 When an NLS entity receives an TL message travelling in the forward 1190 direction, it writes the address in the IPv4_HOP or IPv6_HOP, as 1191 appropriate, from the packet into local per-session state and 1192 replaces the HOP data in the message with the address of the outgoing 1193 interface. When the entity is a NAT, it will write the translated-to 1194 address. Note that while it is usually the case that payload 1195 integrity protection breaks in the presence of NATs if embedded 1196 addresses are being rewritten, this is not substantially different 1197 from the rewriting of the HOP field which occurs within NLS anyway. 1199 However, if an NLS message crosses a non-NLS-capable NAT, several 1200 problems may occur. The first is that if the message is being 1201 dropped in a raw IP packet, the NAT may simply drop the packet 1202 because it doesn't know how to treat it. Another is that the address 1203 in the HOP field will be incorrect. NLS and the applications it 1204 carries cannot be expected to function properly across non- 1205 participating NATs. Discovery of a non-NLS-capable NAT is described 1206 in section Section 9 1208 8. Using NLS-TL as a stand-alone NAT traversal protocol 1210 Using the NLS Transport Layer as a stand-alone NAT traversal protocol 1211 is straightforward -- simply use the TL without application payloads, 1212 but set the NO_REWRITE flag in the NAT_ADDRESS TLV to 1. This 1213 provides two functions: 1) installation of new NAT table mappings, 1214 and 2) allowing the sender to learn what the "external" mappings are. 1215 The Application ID field in the NAT_ADDRESS TLV must be set to 0. 1217 The TL header flags in the forward direction must be 1219 HOP-BY-HOP = 0 1221 BUILD-ROUTE = 1 1223 TEARDOWN = 0 1225 The TL header flags in the reverse direction (i.e. in the response 1226 message) must be 1228 HOP-BY-HOP = 1 1230 BUILD-ROUTE = 0 1232 TEARDOWN = 0 1234 The NAT table mappings are kept fresh through the retransmission of 1235 the request every refresh period. The refresh messages are identical 1236 to the original request message. 1238 If a response message is not received, the retransmission and backoff 1239 procedures described in Section 6 of [RFC2961] MUST be used. 1241 When the NAT table mappings are no longer required, the sender must 1242 send a teardown message containing the Flow ID of the installed 1243 mappings and with the TL flags set to 1245 HOP-BY-HOP = 0 1247 BUILD-ROUTE = 0 1249 TEARDOWN = 1 1251 An acknowledgement response message is not required. If there has 1252 been no refresh message received prior to the expiration of the 1253 timeout period, the NAT table mappings must be deleted when the 1254 timeout period ends. 1256 9. Discovery of non-NLS NATs, and recovery 1258 This section describes a method of discovering non-NLS NATs in the 1259 path, and a recovery-mechanism if one is discovered. 1261 When there are non-NLS-capable NATs in the path, they will only be 1262 able to process or modify the IP/UDP header of the NLS-TL message and 1263 will not be able to understand or modify the NLS-TL message itself 1264 (including the NAT_ADDRESS_TLV inside). 1266 If there are non-NLS NATs in the path the sender needs to be made 1267 aware of this, and it should be able to fall back to processing 1268 without NLS, using any other mechanisms that may be available. Also, 1269 the NLS_ NATs in the path which have allocated the NAT mappings based 1270 on NLS NAT_ADDRESS_TLV processing, need to be able to release these 1271 mappings. 1273 The following algorithm can be applied for non-NLS NAT detection by 1274 NLS nodes : 1276 if (NAT_TL NAT_ADDRESS_TLV's mapped_addr == 0) { 1277 This NLS_TL NAT is first NLS_TL NAT in path 1278 if (NLS_TL packet's source IP address != NAT_ADDRESS_TLV's 1279 original_address) { 1280 This NLS_TL NAT is not the first in the path, and 1281 some non-NLS_TL NAT has touched this packet; 1282 send NLS_TL error message back to the sender 1283 with NLS_TL error-code = 4 (non-nls-nat in path) 1284 } else { 1285 This NLS_TL NAT is the first in the path, and no non- 1286 NLS_TL NAT has touched this packet; 1287 proceed with NLS_TL processing. 1288 } 1289 } else { 1290 This NLS_TL NAT is not the first NLS_TL NAT in path. 1291 if (NLS_TL packet's source IP address != NAT_ADDRESS_TLV's 1292 mapped_address) { 1293 Some non-NLS_TL NAT has touched this packet, send 1294 NLS_TL error message back to the sender with NLS_TL 1295 error-code = 4 (non-nls-nat in path) 1296 } else { 1297 No non-NLS_TL NAT has touched this packet; proceed 1298 with regular NLS_TL processing. 1299 } 1300 } 1302 The NLS_TL error message will be relayed back to the sender. 1303 Intermediate NLS nodes should not be processing the NLS error 1304 message, but let this NLS packet be routed back to the sender. 1306 Once the sender sees an NLS_TL error-message with Error-Code = 4 1307 (non-nls-nat in path), it should resend the same NLS_TL message as 1308 earlier with the NAT_ADDRESS_TLV's Original IPv4 Address/Port/ 1309 Protocol as earlier and the Mapped IPv4 Address/Port as NULL, but 1310 should set the TEARDOWN flag in the NLS-TL header. 1312 The intermediate NLS NATs in the path, upon seeing an NLS_TL message 1313 with the TEARDOWN bit set, should delete its local NAT mapping 1314 corresponding to the Flow ID and send the message on towards the 1315 receiver, traversing other NLS-capable NATs along the path which will 1316 also process the TEARDOWN message. 1318 10. Endpoints Processing 1320 This section describes the procedures used in the endpoints (that is 1321 to say, the sender and the receiver) for processing NLS packets. 1322 Note that these are the endpoints for the purposes of describing an 1323 end-to-end NLS path; they may actually be network entities or 1324 proxies. 1326 10.1. Sending 1328 When a host or its proxy wishes to send an NLS application request, 1329 it puts together the application payload and encapsulates it in a 1330 transport layer packet. 1332 If the application needs to request NAT service because of its use of 1333 addresses for reservations, etc., it must create a random 32-bit tag 1334 for use as an address token in the application payload, and it must 1335 create a NAT_ADDRESS TLV in which it inserts the address and port for 1336 which it is requesting NAT service, as well as the 32-bit tag. 1338 For example, in a hypothetical QoS application that needed NAT 1339 services for the address 192.0.2.110, TCP port 6603 in the flow 1340 description, it would generate the random tag 0x24924924, use that in 1341 the application payload instead of an address, and create a 1342 NAT_ADDRESS TLV with the following values: 1344 Application ID = QoS 1346 Flags = TRANSLATE 1348 Proto = TCP 1350 Address ID = 0x24924924 1352 Original IPv4 Address = 192.0.2.110 1354 Original Port = 6603 1356 The endpoint also needs to set the flags that determine how path 1357 establishment and routing are to be handled on intermediate nodes. 1358 In some cases the application requires no stored state in NLS nodes 1359 or it simply requires a single NLS pass. Examples of this kind of 1360 application include topology discovery, tunnel endpoint discovery, or 1361 diagnostic triggers. In this case, in the NLS-TL header both the 1362 HOP-BY-HOP flag and the BUILD-ROUTE flag are set to 0. 1364 If an application is establishing per-node state and wants the NLS 1365 transport layer to establish and pin NLS routing for it, as might be 1366 the case with a QoS application or a firewall pinholing application, 1367 the sending endpoint must set the BUILD-ROUTE flag to 1 and the HOP- 1368 BY-HOP flag to 0. 1370 The endhost then UDP encapsulates the NLS-TL packet, and transmits it 1371 on UDP port 7549. 1373 10.2. Receiving 1375 An NLS node "knows" that it's an endpoint or proxy when the following 1376 conditions are satisfied: 1378 if (IP destination address == my address) { 1379 if (HOP_BY_HOP) 1380 if (next hop data available) 1381 forward it on; 1382 else 1383 it's mine; 1384 } 1386 When an endpoint receives a packet and identifies it as terminating 1387 there, it demultiplexes the payload and passes the payload and 1388 associated NAT_ADDRESS data to the appropriate application. 1390 If an application in the payload is not supported by the endpoint, 1391 the endpoint must return a message to the sender with an ERROR_CODE 1392 TLV with the error value set to 3 (Unrecognized application). 1394 11. Intermediate node processing 1396 The processing of NLS-TL packets at intermediate nodes is 1397 substantially the same as processing at endpoints. Upon the arrival 1398 of a request, the node demultiplexes the packet contents and vectors 1399 the application payloads off to their respective applications. 1401 One major difference from endpoint processing is the handling of NAT 1402 requests by NAT intermediate nodes. When an NLS-capable NAT receives 1403 an NLS request, it checks for the presence of NAT_ADDRESS TLVs. For 1404 each NAT_TLV, it executes the process described in Section 5.5. 1406 For state maintenance and forwarding, the node must follow the 1407 processes described in Section 5.1, Section 5.2, and Section 5.4. 1409 12. Using NLS-TL to support bidirectional reservations 1411 When an application that uses NLS-TL to transport reservation 1412 requests (for example, QoS reservations or firewall pinholes) and it 1413 wishes to make the request for a bidirectional data stream, the 1414 reservations should be made when the message is received in the 1415 "forward" direction. Note that this is a significant departure from 1416 the model used in RSVP and assumed in previous versions of NLS-TL. 1417 The reason for this should be apparent -- if the route between the 1418 sender and receiver is asymmetric, it is possible that a device 1419 traversed by a PATH message may not be traversed by a RESV message, 1420 and vice-versa. 1422 It may be desirable to have different characteristics for the 1423 reservation in one direction than for the other. In this case the 1424 NLS application designer should make provision for identifying 1425 reservation specifications to be used in each direction. 1427 It should also not be assumed, as is done in RSVP, that error 1428 messages will traverse all affected nodes unless care is taken by the 1429 sender, or the "owner" of the reservation, to ensure that error 1430 messages are propagated correctly. So, for example, if a reservation 1431 fails at a particular node, it may not be sufficient to return the 1432 error message towards the sender. 1434 An application that manages reservations may wish to refresh 1435 application state more frequently than it wishes to refresh route 1436 state. In that case it should send the message with the 1437 BIDIRECTIONAL and HOP_BY_HOP flags set, and the BUILD_ROUTE flag set 1438 to 0. 1440 13. Security Considerations 1442 13.1. Overview 1444 This section describes a method for providing cryptographic 1445 authentication to the Network Layer Signaling (NLS) transport layer 1446 protocol. The method incorporates a peer discovery mechanism. 1447 Importantly, there is no provision for confidentiality. This fact 1448 simplifies the protocol, and removes the need for export control on 1449 products implementing it. NLS applications which require 1450 confidentiality may provide it themselves. 1452 This mechanism provides both entity and message authentication along 1453 a single hop. In other words, the device on each end of the hop is 1454 assured that the identity of the other device, and the content of the 1455 message from that device, are correct. These security services are 1456 provided only on a hop-by-hop basis. That is, there are no 1457 cryptogrpahic services provided across multiple hops, and each hop 1458 can independently use or not use authentication. In the following, 1459 we restrict our discussion to a single hop along an NLS path. 1461 In order to support authentication, we introduce an optional two- 1462 message exchange into NLS called the Authentication Exchange, or AX. 1463 This exchange is needed in order to carry the challenge-response 1464 information, and is described in detail in section Section 5.6. 1466 13.2. Security Model 1468 Authenticated NLS-TL provides both authorization and entity 1469 authentication using a group model. Authorizations correspond to 1470 particular applications. An Authorization Group (AG) is a set of 1471 network interfaces that share the following information: 1473 o a list of NLS Application IDs; these correspond to applications 1474 which the group is authorized to use, 1476 o a group authentication key, 1478 o a Message Authentication Code (MAC) algorithm type 1480 Note that AGs are associated with interfaces and not devices since in 1481 many situations there are different trust levels associated with 1482 different interfaces. 1484 For each device implementing Authenticated NLS-TL, each interface is 1485 associated with a list of Application IDs, each of which is 1486 associated with: 1488 o a list of AGIDs that authorize the corresponding application, or 1490 o the symbol ALLOW, which indicates that the application has been 1491 explictly allowed on the associated interface, or 1493 o the symbol DROP, which indicates that the application has been 1494 explicitly disallowed on the associated interface. 1496 In this model, finer grained authorizations are impossible. For 1497 example, it is impossible to authorize VoIP traversal of a firewall 1498 while still disallowing telnet across the firewall. The model can be 1499 expanded to accomodate finer grained authorizations, but this issue 1500 is not considered further in this draft. Sensitive applications, 1501 such as firewall pinholing, must provide their own authentication and 1502 authorization. 1504 13.3. Cryptography 1506 Authenticated NLS-TL uses a single cryptographic function: a 1507 pseudorandom function that accepts arbitrary-length inputs and 1508 produces fixed-length outputs. This function is used as a message 1509 authentication code (MAC). 1511 The default MAC algorithm is HMAC SHA1, with a length truncated to 96 1512 bits. No other message authentication code is defined. Other MACs 1513 MAY be implemented. Each key used in NLS is associated with a single 1514 MAC algorithm; thus crypto algorithm agility is supported by the same 1515 protocol mechanisms that support key agility. In particular, an NLS 1516 device can determine the MAC algorithm used by referencing the Value 1517 field of the Authorization Group ID, or AGID, (defined below). 1519 13.3.1. Keys 1521 Authenticated NLS-TL uses group keys, in order to reduce the amount 1522 of protocol state and to mitigate the peer-discovery problem. 1524 Implementations MUST provide a way to set and delete keys manually. 1525 However, they SHOULD also provide an automated group key management 1526 system such as GDOI [RFC3547], so that efficient revocation is 1527 possible. 1529 13.3.2. Reflection Attacks 1531 NLS is designed to resist reflection attacks. That family of attacks 1532 works against poorly designed mutual authentication systems by 1533 tricking one party into providing the response for its own challenge. 1534 In order to resist reflection attacks, distinct TLV types are defined 1535 for the first and second challenges, the A_CHALLENGE and B_CHALLENGE. 1537 This fact ensures that the two invocations of the MAC during a single 1538 challenge/response exchange will necessarily have different inputs, 1539 thus thwarting reflection attacks. 1541 14. IANA Considerations 1543 There are several parameters for which NLS-TL will need registry 1544 services. These include 1546 o a registry for NLS Application IDs (NLS Application Identifiers) 1547 and for 1549 o NLS-TL TLV identifiers (NLS TLVs). 1551 Initial values are given below. Future assignments are to be made 1552 through expert review. 1554 NLS-TL also uses UDP port number 7549. 1556 14.1. NLS Application Identifiers 1558 NAME VALUE DEFINITION 1560 Control Point Discovery 1 PacketCable CDP 1561 Firewall Traversal 2 1563 14.2. NLS TLVs 1565 +---------------------+-------+----------------------+ 1566 | NAME | VALUE | DEFINITION | 1567 +---------------------+-------+----------------------+ 1568 | NAT_ADDRESS | 1 | See Section 3.3.2.1 | 1569 | | | | 1570 | APPLICATION_PAYLOAD | 2 | See Section 3.3.2.2 | 1571 | | | | 1572 | TIMEOUT | 3 | See Section 3.3.2.3 | 1573 | | | | 1574 | IPV4_HOP | 4 | See Section 3.3.2.4 | 1575 | | | | 1576 | IPV6_HOP | 5 | See Section 3.3.2.5 | 1577 | | | | 1578 | IPV4_ERROR_CODE | 6 | See Section 3.3.2.6 | 1579 | | | | 1580 | IPV6_ERROR_CODE | 7 | See Section 3.3.2.7 | 1581 | | | | 1582 | AGID | 8 | See Section 3.3.2.8 | 1583 | | | | 1584 | A_CHALLENGE | 9 | See Section 3.3.2.9 | 1585 | | | | 1586 | A_RESPONSE | 10 | See Section 3.3.2.10 | 1587 | | | | 1588 | B_CHALLENGE | 11 | See Section 3.3.2.11 | 1589 | | | | 1590 | B_RESPONSE | 12 | See Section 3.3.2.12 | 1591 | | | | 1592 | AUTHENTICATION | 13 | See Section 3.3.2.13 | 1593 | | | | 1594 | ECHO | 14 | See Section 3.3.2.14 | 1595 +---------------------+-------+----------------------+ 1597 15. References 1599 15.1. Normative References 1601 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1602 Requirement Levels", BCP 14, RFC 2119, March 1997. 1604 [RFC2205] Braden, B., Zhang, L., Berson, S., Herzog, S., and S. 1605 Jamin, "Resource ReSerVation Protocol (RSVP) -- Version 1 1606 Functional Specification", RFC 2205, September 1997. 1608 [RFC2961] Berger, L., Gan, D., Swallow, G., Pan, P., Tommasi, F., 1609 and S. Molendini, "RSVP Refresh Overhead Reduction 1610 Extensions", RFC 2961, April 2001. 1612 [RFC3547] Baugher, M., Weis, B., Hardjono, T., and H. Harney, "The 1613 Group Domain of Interpretation", RFC 3547, July 2003. 1615 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", 1616 RFC 4303, December 2005. 1618 15.2. Informative References 1620 [RFC1633] Braden, B., Clark, D., and S. Shenker, "Integrated 1621 Services in the Internet Architecture: an Overview", 1622 RFC 1633, June 1994. 1624 [RFC2711] Partridge, C. and A. Jackson, "IPv6 Router Alert Option", 1625 RFC 2711, October 1999. 1627 [RFC4080] Hancock, R., Karagiannis, G., Loughney, J., and S. Van den 1628 Bosch, "Next Steps in Signaling (NSIS): Framework", 1629 RFC 4080, June 2005. 1631 [RFC4251] Ylonen, T. and C. Lonvick, "The Secure Shell (SSH) 1632 Protocol Architecture", RFC 4251, January 2006. 1634 [braden] Braden, R. and R. Lindell, "A Two-Level Architecture for 1635 Internet Signaling", draft-braden-2level-signaling-01.txt 1636 (work in progress), November 2002. 1638 Appendix A. Acknowledgements 1640 The authors would like to express their gratitude to Jan Vilhuber, 1641 Senthil Sivakumar, Bill Foster, and Dan Wing for their careful review 1642 and feedback. Special thanks to Jan for his text on challenge/ 1643 response calculations, and to Rajesh Karnik and Lisa Fang for their 1644 help in clarifying the text describing the authentication exchange. 1646 Authors' Addresses 1648 Melinda Shore 1649 Cisco Systems 1650 809 Hayts Road 1651 Ithaca, New York 14850 1652 USA 1654 Email: mshore@cisco.com 1656 David A. McGrew 1657 Cisco Systems 1658 510 McCarthy Blvd 1659 Milpitas, California 95035 1660 USA 1662 Email: mcgrew@cisco.com 1664 Kaushik Biswas 1665 Cisco Systems 1666 510 McCarthy Blvd 1667 Milpitas, California 95035 1668 USA 1670 Email: kbiswas@cisco.com 1672 Full Copyright Statement 1674 Copyright (C) The IETF Trust (2007). 1676 This document is subject to the rights, licenses and restrictions 1677 contained in BCP 78, and except as set forth therein, the authors 1678 retain all their rights. 1680 This document and the information contained herein are provided on an 1681 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1682 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 1683 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 1684 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1685 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1686 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1688 Intellectual Property 1690 The IETF takes no position regarding the validity or scope of any 1691 Intellectual Property Rights or other rights that might be claimed to 1692 pertain to the implementation or use of the technology described in 1693 this document or the extent to which any license under such rights 1694 might or might not be available; nor does it represent that it has 1695 made any independent effort to identify any such rights. Information 1696 on the procedures with respect to rights in RFC documents can be 1697 found in BCP 78 and BCP 79. 1699 Copies of IPR disclosures made to the IETF Secretariat and any 1700 assurances of licenses to be made available, or the result of an 1701 attempt made to obtain a general license or permission for the use of 1702 such proprietary rights by implementers or users of this 1703 specification can be obtained from the IETF on-line IPR repository at 1704 http://www.ietf.org/ipr. 1706 The IETF invites any interested party to bring to its attention any 1707 copyrights, patents or patent applications, or other proprietary 1708 rights that may cover technology that may be required to implement 1709 this standard. Please address the information to the IETF at 1710 ietf-ipr@ietf.org. 1712 Acknowledgment 1714 Funding for the RFC Editor function is provided by the IETF 1715 Administrative Support Activity (IASA).