idnits 2.17.1 draft-ietf-nsis-ntlp-16.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 6732. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 6743. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 6750. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 6756. 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 Copyright Line does not match the current year -- 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 (July 14, 2008) is 5757 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) -- Looks like a reference, but probably isn't: 'Data' on line 239 -- Looks like a reference, but probably isn't: 'Flow' on line 254 -- Looks like a reference, but probably isn't: 'Adjacent' on line 264 -- Looks like a reference, but probably isn't: 'Message' on line 295 -- Looks like a reference, but probably isn't: 'Initialisation' on line 3699 ** Obsolete normative reference: RFC 4307 (ref. '4') (Obsoleted by RFC 8247) ** Obsolete normative reference: RFC 5226 (ref. '5') (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 2460 (ref. '6') (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 2765 (ref. '8') (Obsoleted by RFC 6145) ** Obsolete normative reference: RFC 4346 (ref. '11') (Obsoleted by RFC 5246) == Outdated reference: A later version (-02) exists of draft-nsis-ext-00 ** Downref: Normative reference to an Informational draft: draft-nsis-ext (ref. '13') -- Obsolete informational reference (is this intentional?): RFC 2246 (ref. '16') (Obsoleted by RFC 4346) -- Obsolete informational reference (is this intentional?): RFC 3068 (ref. '21') (Obsoleted by RFC 7526) -- Obsolete informational reference (is this intentional?): RFC 3489 (ref. '27') (Obsoleted by RFC 5389) == Outdated reference: A later version (-16) exists of draft-ietf-behave-turn-09 -- Obsolete informational reference (is this intentional?): RFC 3852 (ref. '29') (Obsoleted by RFC 5652) == Outdated reference: A later version (-25) exists of draft-ietf-nsis-nslp-natfw-18 -- Obsolete informational reference (is this intentional?): RFC 4960 (ref. '40') (Obsoleted by RFC 9260) == Outdated reference: A later version (-10) exists of draft-ietf-nsis-ntlp-statemachine-05 == Outdated reference: A later version (-13) exists of draft-ietf-tcpm-tcpsecure-10 Summary: 7 errors (**), 0 flaws (~~), 6 warnings (==), 17 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Next Steps in Signaling H. Schulzrinne 3 Internet-Draft Columbia U. 4 Intended status: Standards Track R. Hancock 5 Expires: January 15, 2009 RMR 6 July 14, 2008 8 GIST: General Internet Signalling Transport 9 draft-ietf-nsis-ntlp-16 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 January 15, 2009. 36 Abstract 38 This document specifies protocol stacks for the routing and transport 39 of per-flow signalling messages along the path taken by that flow 40 through the network. The design uses existing transport and security 41 protocols under a common messaging layer, the General Internet 42 Signalling Transport (GIST), which provides a common service for 43 diverse signalling applications. GIST does not handle signalling 44 application state itself, but manages its own internal state and the 45 configuration of the underlying transport and security protocols to 46 enable the transfer of messages in both directions along the flow 47 path. The combination of GIST and the lower layer transport and 48 security protocols provides a solution for the base protocol 49 component of the "Next Steps in Signalling" framework. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 54 2. Requirements Notation and Terminology . . . . . . . . . . . . 6 55 3. Design Overview . . . . . . . . . . . . . . . . . . . . . . . 9 56 3.1. Overall Design Approach . . . . . . . . . . . . . . . . . 9 57 3.2. Modes and Messaging Associations . . . . . . . . . . . . 10 58 3.3. Message Routing Methods . . . . . . . . . . . . . . . . . 12 59 3.4. GIST Messages . . . . . . . . . . . . . . . . . . . . . . 14 60 3.5. GIST Peering Relationships . . . . . . . . . . . . . . . 15 61 3.6. Effect on Internet Transparency . . . . . . . . . . . . . 15 62 3.7. Signalling Sessions . . . . . . . . . . . . . . . . . . . 16 63 3.8. Signalling Applications and NSLPIDs . . . . . . . . . . . 17 64 3.9. GIST Security Services . . . . . . . . . . . . . . . . . 17 65 3.10. Example of Operation . . . . . . . . . . . . . . . . . . 18 66 4. GIST Processing Overview . . . . . . . . . . . . . . . . . . 22 67 4.1. GIST Service Interface . . . . . . . . . . . . . . . . . 22 68 4.2. GIST State . . . . . . . . . . . . . . . . . . . . . . . 24 69 4.3. Basic GIST Message Processing . . . . . . . . . . . . . . 26 70 4.4. Routing State and Messaging Association Maintenance . . . 33 71 5. Message Formats and Transport . . . . . . . . . . . . . . . . 46 72 5.1. GIST Messages . . . . . . . . . . . . . . . . . . . . . . 46 73 5.2. Information Elements . . . . . . . . . . . . . . . . . . 48 74 5.3. D-mode Transport . . . . . . . . . . . . . . . . . . . . 52 75 5.4. C-mode Transport . . . . . . . . . . . . . . . . . . . . 58 76 5.5. Message Type/Encapsulation Relationships . . . . . . . . 59 77 5.6. Error Message Processing . . . . . . . . . . . . . . . . 60 78 5.7. Messaging Association Setup . . . . . . . . . . . . . . . 61 79 5.8. Specific Message Routing Methods . . . . . . . . . . . . 65 80 6. Formal Protocol Specification . . . . . . . . . . . . . . . . 71 81 6.1. Node Processing . . . . . . . . . . . . . . . . . . . . . 73 82 6.2. Query Node Processing . . . . . . . . . . . . . . . . . . 74 83 6.3. Responder Node Processing . . . . . . . . . . . . . . . . 77 84 6.4. Messaging Association Processing . . . . . . . . . . . . 80 85 7. Additional Protocol Features . . . . . . . . . . . . . . . . 84 86 7.1. Route Changes and Local Repair . . . . . . . . . . . . . 84 87 7.2. NAT Traversal . . . . . . . . . . . . . . . . . . . . . . 91 88 7.3. Interaction with IP Tunnelling . . . . . . . . . . . . . 97 89 7.4. IPv4-IPv6 Transition and Interworking . . . . . . . . . . 97 90 8. Security Considerations . . . . . . . . . . . . . . . . . . . 99 91 8.1. Message Confidentiality and Integrity . . . . . . . . . . 99 92 8.2. Peer Node Authentication . . . . . . . . . . . . . . . . 100 93 8.3. Routing State Integrity . . . . . . . . . . . . . . . . . 100 94 8.4. Denial of Service Prevention and Overload Protection . . 102 95 8.5. Requirements on Cookie Mechanisms . . . . . . . . . . . . 104 96 8.6. Security Protocol Selection Policy . . . . . . . . . . . 106 97 8.7. Residual Threats . . . . . . . . . . . . . . . . . . . . 107 98 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 109 99 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 114 100 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 115 101 11.1. Normative References . . . . . . . . . . . . . . . . . . 115 102 11.2. Informative References . . . . . . . . . . . . . . . . . 116 103 Appendix A. Bit-Level Formats and Error Messages . . . . . . . . 119 104 A.1. The GIST Common Header . . . . . . . . . . . . . . . . . 119 105 A.2. General Object Format . . . . . . . . . . . . . . . . . . 120 106 A.3. GIST TLV Objects . . . . . . . . . . . . . . . . . . . . 121 107 A.4. Errors . . . . . . . . . . . . . . . . . . . . . . . . . 130 108 Appendix B. API between GIST and Signalling Applications . . . . 139 109 B.1. SendMessage . . . . . . . . . . . . . . . . . . . . . . . 139 110 B.2. RecvMessage . . . . . . . . . . . . . . . . . . . . . . . 141 111 B.3. MessageStatus . . . . . . . . . . . . . . . . . . . . . . 142 112 B.4. NetworkNotification . . . . . . . . . . . . . . . . . . . 143 113 B.5. SetStateLifetime . . . . . . . . . . . . . . . . . . . . 144 114 B.6. InvalidateRoutingState . . . . . . . . . . . . . . . . . 144 115 Appendix C. Example Routing State Table and Handshake . . . . . 146 116 Appendix D. Change History . . . . . . . . . . . . . . . . . . . 148 117 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 149 118 Intellectual Property and Copyright Statements . . . . . . . . . 150 120 1. Introduction 122 Signalling involves the manipulation of state held in network 123 elements. 'Manipulation' could mean setting up, modifying and 124 tearing down state; or it could simply mean the monitoring of state 125 which is managed by other mechanisms. 127 This specification concentrates mainly on path-coupled signalling, 128 controlling resources on network elements which are located on the 129 path taken by a particular data flow, possibly including but not 130 limited to the flow endpoints. Indeed, there are almost always more 131 than two participants in a path-coupled signalling session, although 132 there is no need for every node on the path to participate. Path- 133 coupled signalling thus excludes end-to-end higher-layer signalling. 134 In the context of path-coupled signalling, examples of state 135 management include network resource reservation, firewall 136 configuration, and state used in active networking; examples of state 137 monitoring are the discovery of instantaneous path properties, such 138 as available bandwidth or cumulative queuing delay. Each of these 139 different uses of signalling is referred to as a signalling 140 application. GIST assumes other mechanisms are responsible for 141 controlling routing within the network, and is not designed to set up 142 or modify paths itself; therefore it is complementary to protocols 143 like RSVP-TE [23] or LDP [24] rather than an alternative. GIST path- 144 coupled signalling does not directly support multicast flows, but the 145 current GIST design could be extended to do so, especially in 146 environments where the multicast replication points can be made GIST- 147 capable. GIST can also be extended to cover other types of 148 signalling pattern, not related to any end-to-end flow in the 149 network, in which case the distinction between GIST and end-to-end 150 higher-layer signalling will be drawn differently or not at all. 152 Every signalling application requires a set of state management 153 rules, as well as protocol support to exchange messages along the 154 data path. Several aspects of this protocol support are common to 155 all or a large number of signalling applications, and hence can be 156 developed as a common protocol. The NSIS framework given in [30] 157 provides a rationale for a function split between the common and 158 application specific protocols, and gives outline requirements for 159 the former, the 'NSIS Transport Layer Protocol' (NTLP). Several 160 concepts in the framework are derived from RSVP [15], as are several 161 aspects of the GIST protocol design. The application specific 162 protocols are referred to as 'NSIS Signalling Layer Protocols' 163 (NSLPs), and are defined in separate documents. The NSIS framework 164 [30], and the accompanying threats document [31], provide important 165 background information to this specification, including information 166 on how GIST is expected to be used in various network types and what 167 role it is expected to perform. 169 This specification provides a concrete solution for the NTLP. It is 170 based on the use of existing transport and security protocols under a 171 common messaging layer, the General Internet Signalling Transport 172 (GIST). GIST does not handle signalling application state itself; in 173 that crucial respect, it differs from higher layer signalling 174 protocols such as SIP, RTSP, and the control component of FTP. 175 Instead, GIST manages its own internal state and the configuration of 176 the underlying transport and security protocols to ensure the 177 transfer of signalling messages on behalf of signalling applications 178 in both directions along the flow path. The purpose of GIST is thus 179 to provide the common functionality of node discovery, message 180 routing and message transport in a way which is simple for multiple 181 signalling applications to re-use. 183 The structure of this specification is as follows. Section 2 defines 184 terminology, and Section 3 gives an informal overview of the protocol 185 design principles and operation. The normative specification is 186 contained mainly in Section 4 to Section 8. Section 4 describes the 187 message sequences and Section 5 their format and contents. Note that 188 the detailed bit formats are given in Appendix A. The protocol 189 operation is captured in the form of state machines in Section 6. 190 Section 7 describes some more advanced protocol features and security 191 considerations are contained in Section 8. In addition, Appendix B 192 describes an abstract API for the service which GIST provides to 193 signalling applications, and Appendix C provides an example message 194 flow. 196 Because of the layered structure of the NSIS protocol suite, protocol 197 extensions to cover a new signalling requirement could be carried out 198 either within GIST, or within the signalling application layer, or 199 both. General guidelines on how to extend different layers of the 200 protocol suite, and in particular when and how it is appropriate to 201 extend GIST, are contained in a separate document [13]. In this 202 document, Section 9 gives the formal IANA considerations for the 203 registries defined by the GIST specification. 205 2. Requirements Notation and Terminology 207 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 208 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 209 document are to be interpreted as described in RFC 2119 [3]. In 210 addition, the security specifications in Section 5.7.3 use the 211 terminology MUST- and SHOULD+ from [4]. 213 The terminology used in this specification is defined in this 214 section. The basic entities relevant at the GIST level are shown in 215 Figure 1. In particular, this diagram distinguishes the different 216 address types as being associated with a flow (end-to-end addresses) 217 or signalling (addresses of adjacent signalling peers). 219 Source GIST (adjacent) peer nodes Destination 221 IP address IP addresses = Signalling IP address 222 = Flow Source/Destination Addresses = Flow 223 Source (depending on signalling direction) Destination 224 Address | | Address 225 V V 226 +--------+ +------+ Data Flow +------+ +--------+ 227 | Flow |-----------|------|-------------|------|-------->| Flow | 228 | Sender | | | | | |Receiver| 229 +--------+ | GIST |============>| GIST | +--------+ 230 | Node |<============| Node | 231 +------+ Signalling +------+ 232 GN1 Flow GN2 234 >>>>>>>>>>>>>>>>> = Downstream direction 235 <<<<<<<<<<<<<<<<< = Upstream direction 237 Figure 1: Basic Terminology 239 [Data] Flow: A set of packets identified by some fixed combination 240 of header fields. Flows are unidirectional; a bidirectional 241 communication is considered a pair of unidirectional flows. 243 Session: A single application layer exchange of information for 244 which some state information is to be manipulated or monitored. 245 See Section 3.7 for further detailed discussion. 247 Session Identifier (SID): An identifier for a session; the syntax is 248 a 128 bit value which is opaque to GIST. 250 [Flow] Sender: The node in the network which is the source of the 251 packets in a flow. A sender could be a host, or a router if for 252 example the flow is actually an aggregate. 254 [Flow] Receiver: The node in the network which is the sink for the 255 packets in a flow. 257 Downstream: In the same direction as the data flow. 259 Upstream: In the opposite direction to the data flow. 261 GIST Node: Any node supporting the GIST protocol, regardless of what 262 signalling applications it supports. 264 [Adjacent] Peer: The next node along the signalling path, in the 265 upstream or downstream direction, with which a GIST node 266 explicitly interacts. 268 Querying Node: The GIST node that initiates the handshake process to 269 discover the adjacent peer. 271 Responding Node: The GIST node that responds to the handshake, 272 becoming the adjacent peer to the Querying node. 274 Datagram Mode (D-mode): A mode of sending GIST messages between 275 nodes without using any transport layer state or security 276 protection. Datagram mode uses UDP encapsulation, with source and 277 destination IP addresses derived either from the flow definition 278 or previously discovered adjacency information. 280 Connection Mode (C-mode): A mode of sending GIST messages directly 281 between nodes using point-to-point messaging associations (see 282 below). Connection mode allows the re-use of existing transport 283 and security protocols where such functionality is required. 285 Messaging Association (MA): A single connection between two 286 explicitly identified GIST adjacent peers, i.e. between a given 287 signalling source and destination address. A messaging 288 association may use a transport protocol; if security protection 289 is required, it may use a network layer security association, or 290 use a transport layer security association internally. A 291 messaging association is bidirectional: signalling messages can be 292 sent over it in either direction, referring to flows of either 293 direction. 295 [Message] Routing: Message routing describes the process of 296 determining which is the next GIST peer along the signalling path. 297 For signalling along a flow path, the message routing carried out 298 by GIST is built on top of normal IP routing, that is, forwarding 299 packets within the network layer based on their destination IP 300 address. In this document, the term 'routing' generally refers to 301 GIST message routing unless particularly specified. 303 Message Routing Method (MRM): There can be different algorithms for 304 discovering the route that signalling messages should take. These 305 are referred to as message routing methods, and GIST supports 306 alternatives within a common protocol framework. See Section 3.3. 308 Message Routing Information (MRI): The set of data item values which 309 is used to route a signalling message according to a particular 310 MRM; for example, for routing along a flow path, the MRI includes 311 flow source and destination addresses, protocol and port numbers. 312 See Section 3.3. 314 Transfer Attributes: A description of the requirements which a 315 signalling application has for the delivery of a particular 316 message; for example, whether the message should be delivered 317 reliably. See Section 4.1.2. 319 3. Design Overview 321 3.1. Overall Design Approach 323 The generic requirements identified in the NSIS framework [30] for 324 transport of signalling messages are essentially two-fold: 326 Routing: Determine how to reach the adjacent signalling node along 327 each direction of the data path (the GIST peer), and if necessary 328 explicitly establish addressing and identity information about 329 that peer; 331 Transport: Deliver the signalling information to that peer. 333 To meet the routing requirement, one possibility is for the node to 334 use local routing state information to determine the identity of the 335 GIST peer explicitly. GIST defines a three-way handshake which 336 probes the network to set up the necessary routing state between 337 adjacent peers, during which signalling applications can also 338 exchange data. Once the routing decision has been made, the node has 339 to select a mechanism for transport of the message to the peer. GIST 340 divides the transport functionality into two parts, a minimal 341 capability provided by GIST itself, with the use of well-understood 342 transport protocols for the harder cases. Here, with details 343 discussed later, the minimal capability is restricted to messages 344 that are sized well below the lowest maximum transmission unit (MTU) 345 along a path, are infrequent enough not to cause concerns about 346 congestion and flow control, and do not need security protection or 347 guaranteed delivery. 349 In [30] all of these routing and transport requirements are assigned 350 to a single notional protocol, the NSIS Transport Layer Protocol 351 (NTLP). The strategy of splitting the transport problem leads to a 352 layered structure for the NTLP, with a specialised GIST messaging 353 layer running over standard transport and security protocols. The 354 basic concept is shown in Figure 2. Note that not every combination 355 of transport and security protocols implied by the figure is actually 356 possible for use in GIST; the actual combinations allowed by this 357 specification are defined in Section 5.7. The figure also shows GIST 358 offering its services to upper layers at an abstract interface, the 359 GIST API, further discussed in Section 4.1. 361 ^^ +-------------+ 362 || | Signalling | 363 NSIS +------------|Application 2| 364 Signalling | Signalling +-------------+ 365 Application |Application 1| | 366 Level +-------------+ | 367 || | | 368 VV | | 369 ========|===================|===== <-- GIST API 370 | | 371 ^^ +------------------------------------------------+ 372 || |+-----------------------+ +--------------+ | 373 || || GIST | | GIST State | | 374 || || Encapsulation |<<<>>>| Maintenance | | 375 || |+-----------------------+ +--------------+ | 376 || | GIST: Messaging Layer | 377 || +------------------------------------------------+ 378 NSIS | | | | 379 Transport .......................................... 380 Level . Transport Layer Security (TLS or DTLS) . 381 (NTLP) .......................................... 382 || | | | | 383 || +----+ +----+ +----+ +----+ 384 || |UDP | |TCP | |SCTP| |DCCP| ... other 385 || +----+ +----+ +----+ +----+ protocols 386 || | | | | 387 || ............................. 388 || . IP Layer Security . 389 || ............................. 390 VV | | | | 391 ===========================|=======|=======|=======|============ 392 | | | | 393 +----------------------------------------------+ 394 | IP | 395 +----------------------------------------------+ 397 Figure 2: Protocol Stack Architecture for Signalling Transport 399 3.2. Modes and Messaging Associations 401 Internally, GIST has two modes of operation: 403 Datagram mode (D-mode): used for small, infrequent messages with 404 modest delay constraints and no security requirements. A special 405 case of D-mode called Query-mode (Q-mode) is used when no routing 406 state exists. 408 Connection mode (C-mode): is used for all other signalling traffic. 409 In particular, it can support large messages and channel security, 410 and provides congestion control for signalling traffic. 412 C-mode can in principle use any stream or message-oriented transport 413 protocol; this specification defines TCP as the initial choice. It 414 can in principle employ specific network layer security associations, 415 or an internal transport layer security association; this 416 specification defines TLS as the initial choice. When GIST messages 417 are carried in C-mode, they are treated just like any other traffic 418 by intermediate routers between the GIST peers. Indeed, it would be 419 impossible for intermediate routers to carry out any processing on 420 the messages without terminating the transport and security protocols 421 used. 423 D-mode uses UDP, as a suitable NAT-friendly encapsulation which does 424 not require per-message shared state to be maintained between the 425 peers. Long-term evolution of GIST is assumed to preserve the 426 simplicity of the current D-mode design. Any extension to the 427 security or transport capabilities of D-mode can be viewed as the 428 selection of a different protocol stack under the GIST messaging 429 layer; this is then equivalent to defining another option within the 430 overall C-mode framework. This includes both the case of using 431 existing protocols, and specific development of a message exchange 432 and payload encapsulation to support GIST requirements. 433 Alternatively, if any necessary parameters (e.g. a shared secret for 434 use in integrity or confidentiality protection) can be negotiated 435 out-of-band, then the additional functions can be added directly to 436 D-mode by adding an optional object to the message (see 437 Appendix A.2.1). Note that in such an approach, downgrade attacks as 438 discussed in Section 8.6 would need to be prevented by policy at the 439 destination node. 441 It is possible to mix these two modes along a path. This allows, for 442 example, the use of D-mode at the edges of the network and C-mode in 443 the core of the network. Such combinations may make operation more 444 efficient for mobile endpoints, while allowing shared security 445 associations and transport connections between core routers to be 446 used for messages for multiple flows and signalling applications. 447 The setup for these protocols imposes an initialisation cost for the 448 use of C-mode, but in the long term this cost can be shared over all 449 signalling sessions between peers; once the transport layer state 450 exists, retransmission algorithms can operate much more aggressively 451 than would be possible in a pure D-mode design. 453 It must be understood that the routing and transport functions within 454 by GIST are not independent. If the message transfer has 455 requirements that require C-mode, for example if the message is so 456 large that fragmentation is required, this can only be used between 457 explicitly identified nodes. In such cases, GIST carries out the 458 three-way handshake initially in D-mode to identify the peer and then 459 sets up the necessary connections if they do not already exist. It 460 must also be understood that the signalling application does not make 461 the D-mode/C-mode selection directly; rather, this decision is made 462 by GIST on the basis of the message characteristics and the transfer 463 attributes stated by the application. The distinction is not visible 464 at the GIST service interface. 466 In general, the state associated with C-mode messaging to a 467 particular peer (signalling destination address, protocol and port 468 numbers, internal protocol configuration and state information) is 469 referred to as a messaging association (MA). MAs are totally 470 internal to GIST (they are not visible to signalling applications). 471 Although GIST may be using an MA to deliver messages about a 472 particular flow, there is no direct correspondence between them: the 473 GIST message routing algorithms consider each message in turn and 474 select an appropriate MA to transport it. There may be any number of 475 MAs between two GIST peers although the usual case is zero or one, 476 and they are set up and torn down by management actions within GIST 477 itself. 479 3.3. Message Routing Methods 481 The baseline message routing functionality in GIST is that signalling 482 messages follow a route defined by an existing flow in the network, 483 visiting a subset of the nodes through which it passes. This is the 484 appropriate behaviour for application scenarios where the purpose of 485 the signalling is to manipulate resources for that flow. However, 486 there are scenarios for which other behaviours are applicable. Two 487 examples are: 489 Predictive Routing: Here, the intent is to signal along a path that 490 the data flow may follow in the future. Possible cases are pre- 491 installation of state on the backup path that would be used in the 492 event of a link failure, and predictive installation of state on 493 the path that will be used after a mobile node handover. 495 NAT Address Reservations: This applies to the case where a node 496 behind a NAT wishes to reserve an address at which it can be 497 reached by a sender on the other side. This requires a message to 498 be sent outbound from what will be the flow receiver although no 499 reverse routing state for the flow yet exists. 501 Most of the details of GIST operation are independent of the routing 502 behaviour being used. Therefore, the GIST design encapsulates the 503 routing-dependent details as a message routing method (MRM), and 504 allows multiple MRMs to be defined. This specification defines the 505 path-coupled MRM, corresponding to the baseline functionality 506 described above, and a second ("Loose End") MRM for the NAT Address 507 Reservation case. The detailed specifications are given in 508 Section 5.8. 510 The content of an MRM definition is as follows, using the path- 511 coupled MRM as an example: 513 o The format of the information that describes the path that the 514 signalling should take, the Message Routing Information (MRI). 515 For the path-coupled MRM, this is just the Flow Identifier (see 516 Section 5.8.1.1) and some additional control information. 517 Specifically, the MRI always includes a flag to distinguish 518 between the two directions that signalling messages can take, 519 denoted 'upstream' and 'downstream'. 521 o A specification of the IP-level encapsulation of the messages 522 which probe the network to discover the adjacent peers. A 523 downstream encapsulation must be defined; an upstream 524 encapsulation is optional. For the path-coupled MRM, this 525 information is given in Section 5.8.1.2 and Section 5.8.1.3. 526 Current MRMs rely on the interception of probe messages in the 527 data plane, but other mechanisms are also possible within the 528 overall GIST design and would be appropriate for other types of 529 signalling pattern. 531 o A specification of what validation checks GIST should apply to the 532 probe messages, for example to protect against IP address spoofing 533 attacks. The checks may be dependent on the direction (upstream 534 or downstream) of the message. For the path-coupled MRM, the 535 downstream validity check is basically a form of ingress 536 filtering, also discussed in Section 5.8.1.2. 538 o The mechanism(s) available for route change detection, i.e. any 539 change in the neighbour relationships that the MRM discovers. The 540 default case for any MRM is soft-state refresh, but additional 541 supporting techniques may be possible; see Section 7.1.2. 543 In addition, it should be noted that NAT traversal may require 544 translation of fields in the MRI object carried in GIST messages (see 545 Section 7.2.2). The generic MRI format includes a flag that must be 546 given as part of the MRM definition, to indicate if some kind of 547 translation is necessary. Development of a new MRM therefore 548 includes updates to the GIST specification, and may include updates 549 to specifications of NAT behaviour. These updates may be done in 550 separate documents as is the case for NAT traversal for the MRMs of 551 the base GIST specification, as described in Section 7.2.3 and [46]. 553 The MRI is passed explicitly between signalling applications and 554 GIST; therefore, signalling application specifications must define 555 which MRMs they require. Signalling applications may use fields in 556 the MRI in their packet classifiers; if they use additional 557 information for packet classification, this would be carried at the 558 NSLP level and so would be invisible to GIST. Any node hosting a 559 particular signalling application needs to use a GIST implementation 560 that supports the corresponding MRMs. The GIST processing rules 561 allow nodes not hosting the signalling application to ignore messages 562 for it at the GIST level, so it does not matter if these nodes 563 support the MRM or not. 565 3.4. GIST Messages 567 GIST has six message types: Query, Response, Confirm, Data, Error, 568 and MA-Hello. Apart from the invocation of the messaging association 569 protocols used by C-mode, all GIST communication consists of these 570 messages. In addition, all signalling application data is carried as 571 additional payloads in these messages, alongside the GIST 572 information. 574 The Query, Response and Confirm messages implement the handshake that 575 GIST uses to set up routing state and messaging associations. The 576 handshake is initiated from the Querying node towards the Responding 577 node. The first message is the Query, which is encapsulated in a 578 specific way depending on the message routing method, in order to 579 probe the network infrastructure so that the correct peer will 580 intercept it and become the Responding node. A Query always triggers 581 a Response in the reverse direction as the second message of the 582 handshake. The content of the Response controls whether a Confirm 583 message is sent: as part of the defence against denial of service 584 attacks, the Responding node can delay state installation until a 585 return routability check has been performed, and require the Querying 586 node to complete the handshake with the Confirm message. In 587 addition, if the handshake is being used to set up a new MA, the 588 Response is required to request a Confirm. All of these three 589 messages can optionally carry signalling application data. The 590 handshake is fully described in Section 4.4.1. 592 The Data message is used purely to encapsulate and deliver signalling 593 application data. Usually it is sent using pre-established routing 594 state. However, if there are no security or transport requirements 595 and no need for persistent reverse routing state, it can also be sent 596 in the same way as the Query. Finally, Error messages are used to 597 indicate error conditions at the GIST level, and the MA-Hello message 598 can be used as a diagnostic and keepalive for the messaging 599 association protocols. 601 3.5. GIST Peering Relationships 603 Peering is the process whereby two GIST nodes create message routing 604 states which point to each other. 606 A peering relationship can only be created by a GIST handshake. 607 Nodes become peers when one issues a Query and gets a Response from 608 another. Issuing the initial Query is a result of an NSLP request on 609 that node, and the Query itself is formatted according to the rules 610 of the message routing method. For current MRMs, the identity of the 611 Responding node is not known explicitly at the time the Query is 612 sent; instead, the message is examined by nodes along the path until 613 one decides to send a Response, thereby becoming the peer. If the 614 node hosts the NSLP, local GIST and signalling application policy 615 determine whether to peer; the details are given in Section 4.3.2. 616 Nodes not hosting the NSLP forward the Query transparently 617 (Section 4.3.4). 619 An existing peering relationship can only be changed by a new GIST 620 handshake; in other words, it can only change when routing state is 621 refreshed. On a refresh, if any of the factors in the original 622 peering process have changed, the peering relationship can also 623 change. As well as network level rerouting, changes could include 624 modifications to NSIS signalling functions deployed at a node, or 625 alterations to signalling application policy. A change could cause 626 an existing node to drop out of the signalling path, or a new node to 627 become part of it. All these possibilities are handled as rerouting 628 events by GIST; further details of the process are described in 629 Section 7.1. 631 3.6. Effect on Internet Transparency 633 GIST relies on routers inside the network to intercept and process 634 packets which would normally be transmitted end-to-end. This 635 processing may be non-transparent: messages may be forwarded with 636 modifications, or not forwarded at all. This interception applies 637 only to the encapsulation used for the Query messages which probe the 638 network, for example along a flow path; all other GIST messages are 639 handled only by the nodes to which they are directly addressed, i.e. 640 as normal Internet traffic. 642 Because this interception potentially breaks Internet transparency 643 for packets which have nothing to do with GIST, the encapsulation 644 used by GIST in this case (called Query-mode or Q-mode) has several 645 features to avoid accidental collisions with other traffic: 647 o Q-mode messages are always sent as UDP traffic, and to a specific 648 well-known port allocated by IANA. 650 o All GIST messages sent as UDP have a magic number as the first 32- 651 bit word of the datagram payload. 653 Even if a node intercepts a packet as potentially a GIST message, 654 unless it passes both these checks it will be ignored at the GIST 655 level and forwarded transparently. Further discussion of the 656 reception process is in Section 4.3.1 and the encapsulation in 657 Section 5.3. 659 3.7. Signalling Sessions 661 GIST requires signalling applications to associate each of their 662 messages with a signalling session. Informally, given an application 663 layer exchange of information for which some network control state 664 information is to be manipulated or monitored, the corresponding 665 signalling messages should be associated with the same session. 666 Signalling applications provide the session identifier (SID) whenever 667 they wish to send a message, and GIST reports the SID when a message 668 is received; on messages forwarded at the GIST level, the SID is 669 preserved unchanged. Usually, NSLPs will preserve the SID value 670 along the entire signalling path, but this is not enforced by or even 671 visible to GIST, which only sees the scope of the SID as the single 672 hop between adjacent NSLP peers. 674 Most GIST processing and state information is related to the flow 675 (defined by the MRI, see above) and signalling application (given by 676 the NSLP identifier, see below). There are several possible 677 relationships between flows and sessions, for example: 679 o The simplest case is that all signalling messages for the same 680 flow have the same SID. 682 o Messages for more than one flow may use the same SID, for example 683 because one flow is replacing another in a mobility or multihoming 684 scenario. 686 o A single flow may have messages for different SIDs, for example 687 from independently operating signalling applications. 689 Because of this range of options, GIST does not perform any 690 validation on how signalling applications map between flows and 691 sessions, nor does it perform any direct validation on the properties 692 of the SID itself, such as any enforcement of uniqueness. GIST only 693 defines the syntax of the SID as an opaque 128-bit identifier. 695 The SID assignment has the following impact on GIST processing: 697 o Messages with the same SID that are to be delivered reliably 698 between the same GIST peers are delivered in order. 700 o All other messages are handled independently. 702 o GIST identifies routing state (upstream and downstream peer) by 703 the triplet (MRI, NSLP, SID). 705 Strictly speaking, the routing state should not depend on the SID. 706 However, if the routing state is keyed only by (MRI, NSLP), there is 707 a trivial denial of service attack (see Section 8.3) where a 708 malicious off-path node asserts that it is the peer for a particular 709 flow. Such an attack would not redirect the traffic but would 710 reroute the signalling. Instead, the routing state is also 711 segregated between different SIDs, which means that the attacking 712 node can only disrupt a signalling session if it can guess the 713 corresponding SID. Normative rules on the selection of SIDs are 714 given in Section 4.1.3. 716 3.8. Signalling Applications and NSLPIDs 718 The functionality for signalling applications is supported by NSIS 719 signalling layer protocols (NSLPs). Each NSLP is identified by a 16 720 bit NSLP identifier (NSLPID), assigned by IANA (Section 9). A single 721 signalling application, such as resource reservation, may define a 722 family of NSLPs to implement its functionality, for example to carry 723 out signalling operations at different levels in a hierarchy (cf. 724 [22]). However, the interactions between the different NSLPs (for 725 example, to relate aggregation levels or aggregation region 726 boundaries in the resource management case) are handled at the 727 signalling application level; the NSLPID is the only information 728 visible to GIST about the signalling application being used. 730 3.9. GIST Security Services 732 GIST has two distinct security goals: 734 o to protect GIST state from corruption, and to protect the nodes on 735 which it runs from resource exhaustion attacks; and 737 o to provide secure transport for NSLP messages to the signalling 738 applications. 740 The protocol mechanisms to achieve the first goal are mainly internal 741 to GIST. They include a cookie exchange and return routability check 742 to protect the handshake which sets up routing state, and a random 743 SID is also used to prevent off-path session hijacking by SID 744 guessing. Further details are given in Section 4.1.3 and 745 Section 4.4.1, and the overall security aspects are discussed in 746 Section 8. 748 A second level of protection is provided by the use of a channel 749 security protocol in messaging associations (i.e. within C-mode). 750 This mechanism serves two purposes: to protect against on-path 751 attacks on GIST, and to provide a secure channel for NSLP messages. 752 For the mechanism to be effective, it must be able to provide the 753 following functions: 755 o mutual authentication of the GIST peer nodes; 757 o ability to verify the authenticated identity against a database of 758 nodes authorised to take part in GIST signalling; 760 o confidentiality and integrity protection for NSLP data, and 761 provision of the authenticated identities used to the signalling 762 application. 764 The authorised peer database is described in more detail in 765 Section 4.4.2, including the types of entries that it can contain and 766 the authorisation checking algorithm that is used. The only channel 767 security protocol defined by this specification is a basic use of 768 TLS, and Section 5.7.3 defines the TLS-specific aspects of how these 769 functions (for example, authentication and identity comparison) are 770 integrated with the rest of GIST operation. At a high level, there 771 are several alternative protocols with similar functionality, and the 772 handshake (Section 4.4.1) provides a mechanism within GIST to select 773 between them. However, they differ in their identity schemes and 774 authentication methods and dependencies on infrastructure support for 775 the authentication process, and any GIST extension to incorporate 776 them would need to define the details of the corresponding 777 interactions with GIST operation. 779 3.10. Example of Operation 781 This section presents an example of GIST usage in a relatively simple 782 (in particular, NAT-free) signalling scenario, to illustrate its main 783 features. 785 GN1 GN2 786 +------------+ +------------+ 787 NSLP | | | | 788 Level | >>>>>>>>>1 | | 5>>>>>>>>5 | 789 | ^ V | Intermediate | ^ V | 790 |-^--------2-| Routers |-^--------V-| 791 | ^ V | | ^ V | 792 | ^ V | +-----+ +-----+ | ^ V | 793 >>>>>>>>>>^ >3>>>>>>>>4>>>>>>>>>>>4>>>>>>>>>5 5>>>>>>>>> 794 | | | | | | | | 795 GIST | 6<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<6 | 796 Level +------------+ +-----+ +-----+ +------------+ 798 >>>>>, <<<<< = Signalling messages 799 1 - 6 = Stages in the example 800 (stages 7 and 8 are not shown) 802 Figure 3: Example of Operation 804 Consider the case of an RSVP-like signalling application which makes 805 receiver-based resource reservations for a single unicast flow. In 806 general, signalling can take place along the entire end-to-end path 807 (between flow source and destination), but the role of GIST is only 808 to transfer signalling messages over a single segment of the path, 809 between neighbouring resource-capable nodes. Basic GIST operation is 810 the same, whether it involves the endpoints or only interior nodes: 811 in either case, GIST is triggered by a request from a local 812 signalling application. The example here describes how GIST 813 transfers messages between two adjacent peers some distance along the 814 path, GN1 and GN2 (see Figure 3). We take up the story at the point 815 where a message is being processed above the GIST layer by the 816 signalling application in GN1. 818 1. The signalling application in GN1 determines that this message is 819 a simple description of resources that would be appropriate for 820 the flow. It determines that it has no special security or 821 transport requirements for the message, but simply that it should 822 be transferred to the next downstream signalling application peer 823 on the path that the flow will take. 825 2. The message payload is passed to the GIST layer in GN1, along 826 with a definition of the flow and description of the message 827 transfer attributes (in this case, requesting no reliable 828 transmission or channel security protection). GIST determines 829 that this particular message does not require fragmentation and 830 that it has no knowledge of the next peer for this flow and 831 signalling application; however, it also determines that this 832 application is likely to require secured upstream and downstream 833 transport of large messages in the future. This determination is 834 a function of node-internal policy interactions between GIST and 835 the signalling application. 837 3. GN1 therefore constructs a GIST Query carrying the NSLP payload, 838 and additional payloads at the GIST level which will be used to 839 initiate a messaging association. The Query is encapsulated in a 840 UDP datagram and injected into the network. At the IP level, the 841 destination address is the flow receiver. 843 4. The Query passes through the network towards the flow receiver, 844 and is seen by each router in turn. GIST-unaware routers will 845 not intercept the message and will forward it unchanged; GIST- 846 aware routers which do not support the NSLP in question will also 847 forward the message basically unchanged, although they may need 848 to process more of the message to decide this after initial 849 interception. 851 5. The message is intercepted at GN2. The GIST layer identifies the 852 message as relevant to a local signalling application, and passes 853 the NSLP payload and flow description upwards to it. This 854 signalling application in GN2 indicates to GIST that it will peer 855 with GN1 and so GIST should proceed to set up any routing state. 856 In addition, the signalling application continues to process the 857 message as in GN1 (compare step 1), passing the message back down 858 to GIST so that it is sent further downstream, and this will 859 eventually result in the message reaching the flow receiver. 860 GIST itself operates hop-by-hop, and the signalling application 861 joins these hops together to manage the end-to-end signalling 862 operations. 864 6. In parallel, the GIST instance in GN2 now knows that it should 865 maintain routing state and a messaging association for future 866 signalling with GN1. This is recognised because the message is a 867 Query, and because the local signalling application has indicated 868 that it will peer with GN1. There are two possible cases for 869 sending back the necessary GIST Response: 871 6.A - Association Exists: GN1 and GN2 already have an 872 appropriate MA. GN2 simply records the identity of GN1 as its 873 upstream peer for that flow and NSLP, and sends a Response 874 back to GN1 over the MA identifying itself as the peer for 875 this flow. 877 6.B - No Association: GN2 sends the Response in D-mode directly 878 to GN1, identifying itself and agreeing to the messaging 879 association setup. The protocol exchanges needed to complete 880 this will proceed in parallel with the following stages. 882 In each case, the result is that GN1 and GN2 are now in a peering 883 relationship for the flow. 885 7. Eventually, another NSLP message works its way upstream from the 886 receiver to GN2. This message contains a description of the 887 actual resources requested, along with authorisation and other 888 security information. The signalling application in GN2 passes 889 this payload to the GIST level, along with the flow definition 890 and transfer attributes; in this case, it could request reliable 891 transmission and use of a secure channel for integrity 892 protection. (Other combinations of attributes are possible). 894 8. The GIST layer in GN2 identifies the upstream peer for this flow 895 and NSLP as GN1, and determines that it has an MA with the 896 appropriate properties. The message is queued on the MA for 897 transmission; this may incur some delay if the procedures begun 898 in step 6.B have not yet completed. 900 Further messages can be passed in each direction in the same way. 901 The GIST layer in each node can in parallel carry out maintenance 902 operations such as route change detection (see Section 7.1). 904 It should be understood that several of these details of GIST 905 operations can be varied, either by local policy or according to 906 signalling application requirements. The authoritative details are 907 contained in the remainder of this document. 909 4. GIST Processing Overview 911 This section defines the basic structure and operation of GIST. 912 Section 4.1 describes the way in which GIST interacts with local 913 signalling applications in the form of an abstract service interface. 914 Section 4.2 describes the per-flow and per-peer state that GIST 915 maintains for the purpose of transferring messages. Section 4.3 916 describes how messages are processed in the case where any necessary 917 messaging associations and routing state already exist; this includes 918 the simple scenario of pure D-mode operation, where no messaging 919 associations are necessary. Finally, Section 4.4 describes how 920 routing state and messaging associations are created and managed. 922 4.1. GIST Service Interface 924 This section describes the interaction between GIST and signalling 925 applications in terms of an abstract service interface, including a 926 definition of the attributes of the message transfer that GIST can 927 offer. The service interface presented here is non-normative and 928 does not constrain actual implementations of any interface between 929 GIST and signalling applications; the interface is provided to aid 930 understanding of how GIST can be used. However, requirements on SID 931 selection and internal GIST behaviour to support message transfer 932 semantics (such as in-order delivery) are stated normatively here. 934 The same service interface is presented at every GIST node; however, 935 applications may invoke it differently at different nodes, depending 936 for example on local policy. In addition, the service interface is 937 defined independently of any specific transport protocol, or even the 938 distinction between D-mode and C-mode. The initial version of this 939 specification defines how to support the service interface using a 940 C-mode based on TCP; if additional protocol support is added, this 941 will support the same interface and so the change will be invisible 942 to applications, except as a possible performance improvement. A 943 more detailed description of this service interface is given in 944 Appendix B. 946 4.1.1. Message Handling 948 Fundamentally, GIST provides a simple message-by-message transfer 949 service for use by signalling applications: individual messages are 950 sent, and individual messages are received. At the service 951 interface, the NSLP payload, which is opaque to GIST, is accompanied 952 by control information expressing the application's requirements 953 about how the message should be routed (the MRI), and the application 954 also provides the session identifier (SID), see Section 4.1.3. 955 Additional message transfer attributes control the specific transport 956 and security properties that the signalling application desires. 958 The distinction between GIST D- and C-mode is not visible at the 959 service interface. In addition, the functionality to handle 960 fragmentation and reassembly, bundling together of small messages for 961 efficiency, and congestion control are not visible at the service 962 interface; GIST will take whatever action is necessary based on the 963 properties of the messages and local node state. 965 A signalling application is free to choose the rate at which it 966 processes inbound messages; an implementation MAY allow the 967 application to block accepting messages from GIST. In these 968 circumstances, GIST MAY discard unreliably delivered messages, but 969 for reliable messages MUST propagate flow-control condition back to 970 the sender. Therefore, applications must be aware that they may in 971 turn be blocked from sending outbound messages themselves. 973 4.1.2. Message Transfer Attributes 975 Message transfer attributes are used by NSLPs to define minimum 976 required levels of message processing. The attributes available are 977 as follows: 979 Reliability: This attribute may be 'true' or 'false'. When 'true', 980 the following rules apply: 982 * messages MUST be delivered to the signalling application in the 983 peer exactly once or not at all; 985 * for messages with the same SID, the delivery MUST be in order; 987 * if there is a chance that the message was not delivered (e.g. 988 in the case of a transport layer error), an error MUST be 989 indicated to the local signalling application identifying the 990 routing information for the message in question. 992 GIST implements reliability by using an appropriate transport 993 protocol within a messaging association, so mechanisms for the 994 detection of message loss depend on the protocol in question; for 995 the current specification, the case of TCP is considered in 996 Section 5.7.2. When 'false', a message may be delivered, once, 997 several times or not at all, with no error indications in any 998 case. 1000 Security: This attribute defines the set of security properties that 1001 the signalling application requires for the message, including the 1002 type of protection required, and what authenticated identities 1003 should be used for the signalling source and destination. This 1004 information maps onto the corresponding properties of the security 1005 associations established between the peers in C-mode. Keying 1006 material for the security associations is established by the 1007 authentication mechanisms within the messaging association 1008 protocols themselves; see Section 8.2. The attribute can be 1009 specified explicitly by the signalling application, or reported by 1010 GIST to the signalling application. The latter can take place 1011 either on receiving a message, or just before sending a message 1012 but after configuring or selecting the messaging association to be 1013 used for it. 1015 This attribute can also be used to convey information about any 1016 address validation carried out by GIST, such as whether a return 1017 routability check has been carried out. Further details are 1018 discussed in Appendix B. 1020 Local Processing: An NSLP may provide hints to GIST to enable more 1021 efficient or appropriate processing. For example, the NSLP may 1022 select a priority from a range of locally defined values to 1023 influence the sequence in which messages leave a node. Any 1024 priority mechanism MUST respect the ordering requirements for 1025 reliable messages within a session, and priority values are not 1026 carried in the protocol or available at the signalling peer or 1027 intermediate nodes. An NSLP may also indicate that upstream path 1028 routing state will not be needed for this flow, to inhibit the 1029 node requesting its downstream peer to create it; conversely, even 1030 if routing state exists, the NSLP may request that it is not used, 1031 which will lead to GIST Data messages being sent Q-mode 1032 encapsulated instead. 1034 A GIST implementation MAY deliver messages with stronger attribute 1035 values than those explicitly requested by the application. 1037 4.1.3. SID Selection 1039 The fact that SIDs index routing state (see Section 4.2.1 below) 1040 means that there are requirements for how they are selected. 1041 Specifically, signalling applications MUST choose SIDs so that they 1042 are cryptographically random, and SHOULD NOT use several SIDs for the 1043 same flow, to avoid additional load from routing state maintenance. 1044 Guidance on secure randomness generation can be found in [32]. 1046 4.2. GIST State 1048 4.2.1. Message Routing State 1050 For each flow, the GIST layer can maintain message routing state to 1051 manage the processing of outgoing messages. This state is 1052 conceptually organised into a table with the following structure. 1053 Each row in the table corresponds to a unique combination of the 1054 following three items: 1056 Message Routing Information (MRI): This defines the method to be 1057 used to route the message, the direction in which to send the 1058 message, and any associated addressing information; see 1059 Section 3.3. 1061 Session Identification (SID): The signalling session with which this 1062 message should be associated; see Section 3.7. 1064 NSLP Identification (NSLPID): This is an IANA-assigned identifier 1065 associated with the NSLP which is generating messages for this 1066 flow; see Section 3.8. The inclusion of this identifier allows 1067 the routing state to be different for different NSLPs. 1069 The information associated with a given {MRI,SID,NSLPID} triplet 1070 consists of the routing state to reach the peer in the direction 1071 given by the MRI. For any flow there will usually be two entries in 1072 the table, one each for the upstream and downstream MRI. The routing 1073 state includes information about the peer identity (see 1074 Section 4.4.3), and a UDP port number for D-mode, or a reference to 1075 one or more MAs for C-mode. Entries in the routing state table are 1076 created by the GIST handshake, which is described in more detail in 1077 Section 4.4. 1079 It is also possible for the state information for either direction to 1080 be empty. There are several possible cases: 1082 o The signalling application has indicated that no messages will 1083 actually be sent in that direction. 1085 o The node is the endpoint of the signalling path, for example 1086 because it is acting as a proxy, or because it has determined that 1087 there are no further signalling nodes in that direction. 1089 o The node is using other techniques to route the message. For 1090 example, it can send it in Q-mode and rely on the peer to 1091 intercept it. 1093 In particular, if the node is a flow endpoint, GIST will refuse to 1094 create routing state for the direction beyond the end of the flow 1095 (see Section 4.3.3). Each entry in the routing state table has an 1096 associated validity timer indicating for how long it can be 1097 considered accurate. When this timer expires, the entry MUST be 1098 purged if it has not been refreshed. Installation and maintenance of 1099 routing state is described in more detail in Section 4.4. 1101 4.2.2. Peer-Peer Messaging Association State 1103 The per-flow message routing state is not the only state stored by 1104 GIST. There is also the state required to manage the MAs. Since 1105 these are not per-flow, they are stored separately from the routing 1106 state, including the following per-MA information: 1108 o a queue of any messages that require the use of an MA, pending 1109 transmission while the MA is being established; 1111 o the time since the peer re-stated its desire to keep the MA open 1112 (see Section 4.4.5). 1114 In addition, per-MA state, such as TCP port numbers or timer 1115 information, is held in the messaging association protocols 1116 themselves. However, the details of this state are not directly 1117 visible to GIST, and they do not affect the rest of the protocol 1118 description. 1120 4.3. Basic GIST Message Processing 1122 This section describes how signalling application messages are 1123 processed in the case where any necessary messaging associations and 1124 routing state are already in place. The description is divided into 1125 several parts. Firstly, message reception, local processing and 1126 message transmission are described for the case where the node hosts 1127 the NSLPID identified in the message. Secondly, in Section 4.3.4, 1128 the case where the message is handled directly in the IP or GIST 1129 layer (because there is no matching signalling application on the 1130 node) is given. An overview is given in Figure 4. This section 1131 concentrates on the GIST level processing, with full details of IP 1132 and transport layer encapsulation in Section 5.3 and Section 5.4. 1134 +---------------------------------------------------------+ 1135 | >> Signalling Application Processing >> | 1136 | | 1137 +--------^---------------------------------------V--------+ 1138 ^ NSLP NSLP V 1139 ^ Payloads Payloads V 1140 +--------^---------------------------------------V--------+ 1141 | >> GIST >> | 1142 | ^ ^ ^ Processing V V V | 1143 +--x-----------N--Q---------------------Q--N-----------x--+ 1144 x N Q Q N x 1145 x N Q>>>>>>>>>>>>>>>>>>>>>Q N x 1146 x N Q Bypass at Q N x 1147 +--x-----+ +--N--Q--+ GIST level +--Q--N--+ +-----x--+ 1148 | C-mode | | D-mode | | D-mode | | C-mode | 1149 |Handling| |Handling| |Handling| |Handling| 1150 +--x-----+ +--N--Q--+ +--Q--N--+ +-----x--+ 1151 x N Q Q N x 1152 x NNNNNN Q>>>>>>>>>>>>>>>>>>>>>Q NNNNNN x 1153 x N Q Bypass at Q N x 1154 +--x--N--+ +-----Q--+ IP level +--Q-----+ +--N--x--+ 1155 |IP Host | | Q-mode | | Q-mode | |IP Host | 1156 |Handling| |Handling| |Handling| |Handling| 1157 +--x--N--+ +-----Q--+ +--Q-----+ +--N--x--+ 1158 x N Q Q N x 1159 +--x--N-----------Q--+ +--Q-----------N--x--+ 1160 | IP Layer | | IP Layer | 1161 | (Receive Side) | | (Transmit Side) | 1162 +--x--N-----------Q--+ +--Q-----------N--x--+ 1163 x N Q Q N x 1164 x N Q Q N x 1166 NNNNNNNNNNNNNN = Normal D-mode messages 1167 QQQQQQQQQQQQQQ = D-mode messages which are Q-mode encapsulated 1168 xxxxxxxxxxxxxx = C-mode messages 1170 Figure 4: Message Paths through a GIST Node 1172 4.3.1. Message Reception 1174 Messages can be received in C-mode or D-mode. 1176 Reception in C-mode is simple: incoming packets undergo the security 1177 and transport treatment associated with the MA, and the MA provides 1178 complete messages to the GIST layer for further processing. 1180 Reception in D-mode depends on the message type. 1182 Normal encapsulation: Normal messages arrive UDP-encapsulated and 1183 addressed directly to the receiving signalling node, at an address 1184 and port learned previously. Each datagram contains a single 1185 message which is passed to the GIST layer for further processing, 1186 just as in the C-mode case. 1188 Q-mode encapsulation: Where GIST is sending messages to be 1189 intercepted by the appropriate peer rather than directly addressed 1190 to it (in particular, Query messages), these are UDP encapsulated 1191 wth a fixed well-known destination port. Every GIST node MUST 1192 intercept packets based on this UDP destination port, but unless 1193 the message exactly matches the Q-mode encapsulation rules 1194 (Section 5.3.2) it MUST be forwarded transparently at the IP 1195 level. If it does match, GIST MUST check the NSLPID in the common 1196 header. The case where the NSLPID does not match a local 1197 signalling application at all is considered below in 1198 Section 4.3.4; otherwise, the message MUST be passed up to the 1199 GIST layer for further processing. 1201 Immediately after reception, the GIST hop count is checked. Any 1202 message with a GIST hop count of zero MUST be rejected with a "Hop 1203 Limit Exceeded" error message (Appendix A.4.4.2). Note that a 1204 correct GIST implementation will never send a message with a GIST hop 1205 count of zero. Otherwise, the GIST hop count MUST be decremented by 1206 one before the next stage. 1208 4.3.2. Local Processing and Validation 1210 Once a message has been received, it is processed locally within the 1211 GIST layer. Further processing depends on the message type and 1212 payloads carried; most of the GIST payloads are associated with 1213 internal state maintenance, and details are covered in Section 4.4. 1214 This section concentrates on the interaction with the signalling 1215 application, in particular the decision to peer and how data is 1216 delivered to the NSLP. 1218 In the case of a Query, there is an interaction with the signalling 1219 application to determine which of two courses to follow. The first 1220 option (peering) MUST be chosen if the node is the final destination 1221 of the Query message. 1223 1. The receiving signalling application wishes to become a 1224 signalling peer with the Querying node. GIST MUST continue with 1225 the handshake process to set up message routing state, as 1226 described in Section 4.4.1. The application MAY provide an NSLP 1227 payload for the same NSLPID, which GIST will transfer in the 1228 Response. 1230 2. The signalling application does not wish to set up state with the 1231 Querying node and become its peer. This includes the case where 1232 a node wishes to avoid taking part in the signalling for overload 1233 protection reasons. GIST MUST propagate the Query, similar to 1234 the case described in Section 4.3.4. No message is sent back to 1235 the Querying node. The application MAY provide an updated NSLP 1236 payload for the same NSLPID, which will be used in the Query 1237 forwarded by GIST. Note that if the node which finally processes 1238 the Query returns an Error message, this will be sent directly 1239 back to the originating node, bypassing any forwarders. For 1240 these diagnostics to be meaningful, any GIST node forwarding a 1241 Query, or relaying it with modified NSLP payload, MUST NOT modify 1242 it except in the GIST hop count; in particular, it MUST NOT 1243 modify any other GIST payloads or their order. An implementation 1244 MAY choose to achieve this by retaining the original message, 1245 rather than reconstructing it from some parsed internal 1246 representation. 1248 This interaction with the signalling application, including the 1249 generation or update of an NSLP payload, SHOULD take place 1250 synchronously as part of the Query processing. In terms of the GIST 1251 service interface, this can be implemented by providing appropriate 1252 return values for the primitive that is triggered when such a message 1253 is received; see Appendix B.2 for further discussion. 1255 For all GIST message types other than Queries, if the message 1256 includes an NSLP payload, this MUST be delivered locally to the 1257 signalling application identified by the NSLPID. The format of the 1258 payload is not constrained by GIST, and the content is not 1259 interpreted. Delivery is subject to the following validation checks 1260 which MUST be applied in the sequence given: 1262 1. if the message was explicitly routed (see Section 7.1.5) or is a 1263 Data message delivered without routing state (see Section 5.3.2), 1264 the payload is delivered but flagged to the receiving NSLP to 1265 indicate that routing state was not validated; 1267 2. else, if the message arrived on an association which is not 1268 associated with the MRI/NSLPID/SID combination given in the 1269 message, the message MUST be rejected with an "Incorrectly 1270 Delivered Message" error message (Appendix A.4.4.4); 1272 3. else, if there is no routing state for this MRI/SID/NSLPID the 1273 message MUST either be dropped or be rejected with a error 1274 message (see Section 4.4.6 for further details); 1276 4. else, the payload is delivered as normal. 1278 4.3.3. Message Transmission 1280 Signalling applications can generate their messages for transmission, 1281 either asynchronously, or in reply to an input message delivered by 1282 GIST, and GIST can also generate messages autonomously. GIST MUST 1283 verify that it is not the direct destination of an outgoing message, 1284 and MUST reject such messages with an error indication to the 1285 signalling application. When the message is generated by a 1286 signalling application, it may be carried in a Query if local policy 1287 and the message transfer attributes allow it; otherwise this may 1288 trigger setup of an MA over which the NSLP payload is sent in a Data 1289 message. 1291 Signalling applications may specify a value to be used for the GIST 1292 hop count; otherwise, GIST selects a value itself. GIST MUST reject 1293 messages for which the signalling application has specified a value 1294 of zero. Although the GIST hop count is only intended to control 1295 message looping at the GIST level, the GIST API (Appendix B) provides 1296 the incoming hop count to the NSLPs, which can preserve it on 1297 outgoing messages as they are forwarded further along the path. This 1298 provides a lightweight loop-control mechanism for NSLPs which do not 1299 define anything more sophisticated. Note that the count will be 1300 decremented on forwarding through every GIST-aware node. Initial 1301 values for the GIST hop count are an implementation matter; one 1302 suitable approach is to use the same algorithm as for IP TTL setting 1303 [1]. 1305 When a message is available for transmission, GIST uses internal 1306 policy and the stored routing state to determine how to handle it. 1307 The following processing applies equally to locally generated 1308 messages and messages forwarded from within the GIST or signalling 1309 application levels. However, see Section 5.6 for special rules 1310 applying to the transmission of error messages by GIST. 1312 The main decision is whether the message must be sent in C-mode or 1313 D-mode. Reasons for using C-mode are: 1315 o message transfer attributes: for example, the signalling 1316 application has specified security attributes that require 1317 channel-secured delivery, or reliable delivery. 1319 o message size: a message whose size (including the GIST header, 1320 GIST objects and any NSLP payload, and an allowance for the IP and 1321 transport layer encapsulation required by D-mode) exceeds a 1322 fragmentation-related threshold MUST be sent over C-mode, using a 1323 messaging association that supports fragmentation and reassembly 1324 internally. The allowance for IP and transport layer 1325 encapsulation is 64 bytes. The message size MUST NOT exceed the 1326 Path MTU to the next peer, if this is known. If this is not 1327 known, the message size MUST NOT exceed the least of the first-hop 1328 MTU, and 576 bytes. The same limit applies to IPv4 and IPv6. 1330 o congestion control: D-mode SHOULD NOT be used for signalling where 1331 it is possible to set up routing state and use C-mode, unless the 1332 network can be engineered to guarantee capacity for D-mode traffic 1333 within the rate control limits imposed by GIST (see 1334 Section 5.3.3). 1336 In principle, as well as determining that some messaging association 1337 must be used, GIST MAY select between a set of alternatives, e.g. for 1338 load sharing or because different messaging associations provide 1339 different transport or security attributes. For the case of reliable 1340 delivery, GIST MUST NOT distribute messages for the same session over 1341 multiple messaging associations in parallel, but MUST use a single 1342 association at any given time. The case of moving over to a new 1343 association is covered in Section 4.4.5. 1345 If the use of a messaging association (i.e. C-mode) is selected, the 1346 message is queued on the association found from the routing state 1347 table, and further output processing is carried out according to the 1348 details of the protocol stacks used. If no appropriate association 1349 exists, the message is queued while one is created (see 1350 Section 4.4.1), which will trigger the exchange of additional GIST 1351 messages. If no association can be created, this is an error 1352 condition, and should be indicated back to the local signalling 1353 application. 1355 If a messaging association is not appropriate, the message is sent in 1356 D-mode. The processing in this case depends on the message type, 1357 local policy, and whether routing state exists or not. 1359 o If the message is not a Query, and local policy does not request 1360 the use of Q-mode for this message, and routing state exists, it 1361 is sent with the normal D-mode encapsulation directly to the 1362 address from the routing state table. 1364 o If the message is a Query, or the message is Data and local policy 1365 as given by the message transfer attributes request the use of 1366 Q-mode, then it is sent in Q-mode as defined in Section 5.3.2; the 1367 details depend on the message routing method. 1369 o If no routing state exists, GIST can attempt to use Q-mode as in 1370 the Query case: either sending a Data message with the Q-mode 1371 encapsulation, or using the event as a trigger for routing state 1372 setup (see Section 4.4). If this is not possible, e.g. because 1373 the encapsulation for the MRM is only defined for one message 1374 direction, then this is an error condition which is reported back 1375 to the local signalling application. 1377 4.3.4. Nodes not Hosting the NSLP 1379 A node may receive messages where it has no signalling application 1380 corresponding to the message NSLPID. There are several possible 1381 cases depending mainly on the encapsulation: 1383 1. A message is intercepted in the IP layer as potentially being a 1384 GIST message, but it does not exactly match the Q-mode 1385 encapsulation rules of Section 5.3.2. The message MUST be 1386 transparently forwarded at the IP layer. See Section 3.6. 1388 2. A properly Q-mode encapsulated message is intercepted in the IP 1389 layer, but the signalling application does not process the NSLPID 1390 in the message. (This includes the case where a signalling 1391 application uses a set of NSLPIDs.) 1393 3. A directly addressed message (in D-mode or C-mode) is delivered 1394 to a node for which there is no corresponding signalling 1395 application. With the current specification, this should not 1396 happen in normal operation. While future versions might find a 1397 use for such a feature, currently this MUST cause an "Unknown 1398 NSLPID" error message, Appendix A.4.4.6. 1400 4. A Q-mode encapsulated message arrives at the end-system which 1401 does not handle the signalling application. This is possible in 1402 normal operation, and MUST be indicated to the sender with an 1403 "Endpoint Found" informational message (Appendix A.4.4.7). The 1404 end-system includes the MRI and SID from the original message in 1405 the error message without interpreting them. 1407 5. The node is GIST-aware NAT. See Section 7.2. 1409 In case (2), the role of GIST is to forward the message essentially 1410 as though it were a normal IP datagram, and it will not become a peer 1411 to the node sending the message. Forwarding with modified NSLP 1412 payloads is covered above in Section 4.3.2. However, a GIST 1413 implementation MUST ensure that the IP-layer TTL field and GIST hop 1414 count are managed correctly to prevent message looping, and this 1415 should be done consistently independently of where in the packet 1416 processing path the decision is mode. The rules are that in case 1417 (2), the IP-layer TTL MUST be decremented just as if the message was 1418 a normal IP forwarded packet. In cases (2), (3) and (4), the GIST 1419 hop count MUST be decremented as in the case of normal input 1420 processing. 1422 A GIST node processing Q-mode encapsulated messages in this way 1423 SHOULD make the routing decision based on the full contents of the 1424 MRI and not only the IP destination address. It MAY also apply a 1425 restricted set of sanity checks and under certain conditions return 1426 an error message rather than forward the message. These conditions 1427 are: 1429 1. The message is so large that it would be fragmented on downstream 1430 links, for example because the downstream MTU is abnormally small 1431 (less than 576 bytes). The error "Message Too Large" 1432 (Appendix A.4.4.8) SHOULD be returned to the sender, which SHOULD 1433 begin messaging association setup. 1435 2. The GIST hop count has reached zero. The error "Hop Limit 1436 Exceeded" (Appendix A.4.4.2) SHOULD be returned to the sender, 1437 which MAY retry with a larger initial hop count. 1439 3. The MRI represents a flow definition which is too general to be 1440 forwarded along a unique path (e.g. the destination address 1441 prefix is too short). The error "MRI Validation Failure" 1442 (Appendix A.4.4.12) with subcode 0 ("MRI Too Wild") SHOULD be 1443 returned to the sender, which MAY retry with restricted MRIs, 1444 possibly starting additional signalling sessions to do so. If 1445 the GIST node does not understand the MRM in question it MUST NOT 1446 apply this check, instead forwarding the message transparently. 1448 In the first two cases, only the common header of the GIST message is 1449 examined; in the third case, the MRI is also examined. The rest of 1450 the message MUST NOT be inspected in any case. Similar to the case 1451 of Section 4.3.2, the GIST payloads MUST NOT be modified or re- 1452 ordered; an implementation MAY choose to achieve this by retaining 1453 the original message, rather than reconstructing it from some parsed 1454 internal representation. 1456 4.4. Routing State and Messaging Association Maintenance 1458 The main responsibility of GIST is to manage the routing state and 1459 messaging associations which are used in the message processing 1460 described above. Routing state is installed and refreshed by GIST 1461 handshake messages. Messaging associations are set up by the normal 1462 procedures of the transport and security protocols that comprise 1463 them, using peer IP addresses from the routing state. Once a 1464 messaging association has been created, its refresh and expiration 1465 can be managed independently from the routing state. 1467 There are two different cases for state installation and refresh: 1469 1. Where routing state is being discovered or a new association is 1470 to be established; and 1472 2. Where a suitable association already exists, including the case 1473 where routing state for the flow is being refreshed. 1475 These cases are now considered in turn, followed by the case of 1476 background general management procedures. 1478 4.4.1. Routing State and Messaging Association Creation 1480 The message sequence for GIST state setup between peers is shown in 1481 Figure 5 and described in detail below. The figure informally 1482 summarises the contents of each message, including optional elements 1483 in square brackets. An example is given in Appendix C. 1485 The first message in any routing state maintenance operation is a 1486 Query, sent from the querying node and intercepted at the responding 1487 node. This message has addressing and other identifiers appropriate 1488 for the flow and signalling application that state maintenance is 1489 being done for, addressing information about the node that generated 1490 the Query itself, and MAY contain an NSLP payload. It also includes 1491 a Query Cookie, and optionally capability information about messaging 1492 association protocol stacks. The role of the cookies in this and 1493 later messages is to protect against certain denial of service 1494 attacks and to correlate the events in the message sequence (see 1495 Section 8.5 for further details). 1497 +----------+ +----------+ 1498 | Querying | |Responding| 1499 | Node(Q-N)| | Node(R-N)| 1500 +----------+ +----------+ 1501 Query ............. 1502 ----------------------> . Routing . 1503 MRI/SID/NSLPID . state . 1504 Q-N Network Layer Info . installed . 1505 Query Cookie . at . 1506 [Q-N Stack-Proposal . Responding. 1507 Q-N Stack-Config-Data] . node . 1508 [NSLP Payload] . (case 1) . 1509 ............. 1510 ...................................... 1511 . The responder can use an existing . 1512 . messaging association if available . 1513 . from here onwards to short-circuit . 1514 . messaging association setup . 1515 ...................................... 1517 Response 1518 ............. <---------------------- 1519 . Routing . MRI/SID/NSLPID 1520 . state . R-N Network Layer Info 1521 . installed . Query cookie 1522 . at . [Responder Cookie 1523 . Querying . [R-N Stack-Proposal 1524 . node . R-N Stack-Config-Data]] 1525 ............. [NSLP Payload] 1527 .................................... 1528 . If a messaging association needs . 1529 . to be created, it is set up here . 1530 . and the Confirm uses it . 1531 .................................... 1533 Confirm ............. 1534 ----------------------> . Routing . 1535 MRI/SID/NSLPID . state . 1536 Q-N Network Layer Info . installed . 1537 [Responder Cookie . at . 1538 [R-N Stack-Proposal . Responding. 1539 [Q-N Stack-Config-Data]]] . node . 1540 [NSLP Payload] . (case 2) . 1541 ............. 1543 Figure 5: Message Sequence at State Setup 1545 Provided that the signalling application has indicated that message 1546 routing state should be set up (see Section 4.3.2), reception of a 1547 Query MUST elicit a Response. This is a normally encapsulated D-mode 1548 message with additional GIST payloads. It contains network layer 1549 information about the responding node, echoes the Query Cookie, and 1550 MAY contain an NSLP payload, possibly a reply to the NSLP payload in 1551 the initial message. In case a messaging association was requested, 1552 it MUST also contain a Responder Cookie and its own capability 1553 information about messaging association protocol stacks. Even if a 1554 messaging association is not requested, the Response MAY still 1555 include a Responder Cookie if the node's routing state setup policy 1556 requires it (see below). 1558 Setup of a new messaging association begins when peer addressing 1559 information is available and a new messaging association is actually 1560 needed. Any setup MUST take place immediately after the specific 1561 Query/Response exchange, because the addressing information used may 1562 have a limited lifetime, either because it depends on limited 1563 lifetime NAT bindings or because it refers to agile destination ports 1564 for the transport protocols. The Stack-Proposal and Stack- 1565 Configuration-Data objects carried in the exchange carry capability 1566 information about what messaging association protocols can be used, 1567 and the processing of these objects is described in more detail in 1568 Section 5.7. With the protocol options currently defined, setup of 1569 the messaging association always starts from the Querying node, 1570 although more flexible configurations are possible within the overall 1571 GIST design. If the messaging association includes a channel 1572 security protocol, each GIST node MUST verify the authenticated 1573 identity of the peer against its authorised peer database, and if 1574 there is no match the messaging association MUST be torn down. The 1575 database and authorisation check are described in more detail in 1576 Section 4.4.2 below. Note that the verification can depend on what 1577 the MA is to be used for (e.g. for which MRI or session), so this 1578 step may not be possible immediately after authentication has 1579 completed but some time later. 1581 Finally, after any necessary messaging association setup has 1582 completed, a Confirm MUST be sent if the Response requested it. Once 1583 the Confirm has been sent, the Querying node assumes that routing 1584 state has been installed at the responder, and can send normal Data 1585 messages for the flow in question; recovery from a lost Confirm is 1586 discussed in Section 5.3.3. If a messaging association is being 1587 used, the Confirm MUST be sent over it before any other messages for 1588 the same flow, and it echoes the Responder Cookie and Stack-Proposal 1589 from the Response. The former is used to allow the receiver to 1590 validate the contents of the message (see Section 8.5), and the 1591 latter is to prevent certain bidding-down attacks on messaging 1592 association security (see Section 8.6). This first Confirm on a new 1593 association MUST also contain a Stack-Configuration-Data object 1594 carrying an MA-Hold-Time value, which supersedes the value given in 1595 the original Query. The association can be used in the upstream 1596 direction for the MRI and NSLPID carried in the Confirm, after the 1597 Confirm has been received. 1599 The querying node MUST install the responder address, derived from 1600 the R-Node Network Layer info, as routing state information after 1601 verifying the Query Cookie in the Response. The responding node MAY 1602 install the querying address as peer state information at two points 1603 in time: 1605 Case 1: after the receipt of the initial Query, or 1607 Case 2: after a Confirm containing the Responder Cookie. 1609 The responding node SHOULD derive the peer address from the Q-Node 1610 Network Layer Info if this was decoded successfully. Otherwise, it 1611 MAY be derived from the IP source address of the message if the 1612 common header flags this as being the signalling source address. The 1613 precise constraints on when state information is installed are a 1614 matter of security policy considerations on prevention of denial-of- 1615 service attacks and state poisoning attacks, which are discussed 1616 further in Section 8. Because the responding node MAY choose to 1617 delay state installation as in case (2), the Confirm must contain 1618 sufficient information to allow it to be processed in the same way as 1619 the original Query. This places some special requirements on NAT 1620 traversal and cookie functionality, which are discussed in 1621 Section 7.2 and Section 8 respectively. 1623 4.4.2. GIST Peer Authorisation 1625 When two GIST nodes authenticate using a messaging association, both 1626 ends have to decide whether to accept the creation of the MA and 1627 whether to trust the information sent over it. This can be seen as 1628 an authorisation decision: 1630 o Authorised peers are trusted to install correct routing state 1631 about themselves and not, for example, to claim that they are on- 1632 path for a flow when they are not. 1634 o Authorised peers are trusted to obey transport and application 1635 level flow control rules, and not to attempt to create overload 1636 situations. 1638 o Authorised peers are trusted not to send erroneous or malicious 1639 error messages, for example asserting that routing state has been 1640 lost when it has not. 1642 This specification models the decision as verification by the 1643 authorising node of the peer's identity against a local list of 1644 peers, the authorised peer database (APD). The APD is an abstract 1645 construct, similar to the security policy database of IPsec [37]. 1646 Implementations MAY provide the associated functionality in any way 1647 they choose. This section defines only the requirements for APD 1648 administration and the consequences of successfully validating a 1649 peer's identity against it. 1651 The APD consists of a list of entries. Each entry includes an 1652 identity, the namespace from which the identity comes (e.g. DNS 1653 domains), the scope within which the entry is applicable, and whether 1654 authorisation is allowed or denied. The following are example 1655 scopes: 1657 Peer Address Ownership: The scope is the IP address at which the 1658 peer for this MRI should be; the APD entry denotes the identity as 1659 the owner of address. If the authorising node can determine this 1660 address from local information (such as its own routing tables), 1661 matching this entry shows that the peer is the correct on-path 1662 node and so should be authorised. The determination is simple if 1663 the peer is one IP hop downstream, since the IP address can be 1664 derived from the router's forwarding tables. If the peer is more 1665 than one hop away or is upstream, the determination is harder but 1666 may still be possible in some circumstances. The authorising node 1667 may be able to determine a (small) set of possible peer addresses, 1668 and accept that any of these could be the correct peer. 1670 End-System Subnet: The scope is an address range within which the 1671 MRI source or destination lie; the APD entry denotes the identity 1672 as potentially being on-path between the authorising node and that 1673 address range. There may be different source and destination 1674 scopes, to account for asymmetric routing. 1676 The same identity may appear in multiple entries, and the order of 1677 entries in the APD is significant. When a messaging association is 1678 authenticated and associated with an MRI, the authorising node scans 1679 the APD to find the first entry where the identity matches that 1680 presented by the peer, and where the scope information matches the 1681 circumstances for which the MA is being set up. The identity 1682 matching process itself depends on the messaging association protocol 1683 that carries out the authentication, and details for TLS are given in 1684 Section 5.7.3. Whenever the full set of possible peers for a 1685 specific scope is known, deny entries SHOULD be added for the 1686 wildcard identity to reject signalling associations from unknown 1687 nodes. The ability of the authorising node to reject inappropriate 1688 MAs depends directly on the granularity of the APD and the precision 1689 of the scope matching process. 1691 If authorisation is allowed, the MA can be used as normal; otherwise 1692 it MUST be torn down without further GIST exchanges, and any routing 1693 state associated with the MA MUST also be deleted. An error 1694 condition MAY be logged locally. When an APD entry is modified or 1695 deleted, the node MUST re-validate existing MAs and the routing state 1696 table against the revised contents of the APD. This may result in 1697 MAs being torn down or routing state entries being deleted. These 1698 changes SHOULD be indicated to local signalling applications via the 1699 NetworkNotification API call (Appendix B.4). 1701 This specification does not define how the APD is populated. As a 1702 minimum, an implementation MUST provide an administrative interface 1703 through which entries can be added, modified, or deleted. More 1704 sophisticated mechanisms are possible in some scenarios. For 1705 example, the fact that a node is legitimately associated with a 1706 specific IP address could be established by direct embedding of the 1707 IP address as a particular identity type in a certificate, or by a 1708 mapping that address to another identifier type via an additional 1709 database lookup (such as relating IP addresses in in-addr.arpa to 1710 domain names). An enterprise network operator could generate a list 1711 of all the identities of its border nodes as authorised to be on the 1712 signalling path to external destinations, and this could be 1713 distributed to all hosts inside the network. Regardless of the 1714 technique, it MUST be ensured that the source data justify the 1715 authorisation decisions listed at the start of this section, and that 1716 the security of the chain of operations on which the APD entry 1717 depends cannot be compromised. 1719 4.4.3. Messaging Association Multiplexing 1721 It is a design goal of GIST that, as far as possible, a single 1722 messaging association should be used for multiple flows and sessions 1723 between two peers, rather than setting up a new MA for each. This 1724 re-use of existing MAs is referred to as messaging association 1725 multiplexing. Multiplexing ensures that the MA cost scales only with 1726 the number of peers, and avoids the latency of new MA setup where 1727 possible. 1729 However, multiplexing requires the identification of an existing MA 1730 which matches the same routing state and desired properties that 1731 would be the result of a normal handshake in D-mode, and this 1732 identification must be done as reliably and securely as continuing 1733 with this procedure. Note that this requirement is complicated by 1734 the fact that NATs may remap the node addresses in D-mode messages, 1735 and also interacts with the fact that some nodes may peer over 1736 multiple interfaces (and thus with different addresses). 1738 MA multiplexing is controlled by the Network-Layer-Information (NLI) 1739 object, which is carried in Query, Response and Confirm messages. 1740 The NLI object includes (among other elements): 1742 Peer-Identity: For a given node, this is an interface independent 1743 value with opaque syntax. It MUST be chosen so as to have a high 1744 probability of uniqueness across the set of all potential peers, 1745 and SHOULD be stable at least until the next node restart. Note 1746 that there is no cryptographic protection of this identity; 1747 attempting to provide this would essentially duplicate the 1748 functionality in the messaging association security protocols. 1749 For routers, the Router-ID [2], which is one of the router's IP 1750 addresses, MAY be used as one possible value for the Peer- 1751 Identity. In scenarios with nested NATs, the Router-ID alone may 1752 not satisfy the uniqueness requirements, in which case it MAY be 1753 extended with additional tokens, either chosen randomly or 1754 administratively coordinated. 1756 Interface-Address: This is an IP address through which the 1757 signalling node can be reached. There may be several choices 1758 available for the Interface-Address, and further discussion of 1759 this is contained in Section 5.2.2. 1761 A messaging association is associated with the NLI object that was 1762 provided by the peer in the Query/Response/Confirm at the time the 1763 association was first set up. There may be more than one MA for a 1764 given NLI object, for example with different security or transport 1765 properties. 1767 MA multiplexing is achieved by matching these two elements from the 1768 NLI provided in a new GIST message with one associated with an 1769 existing MA. The message can be either a Query or Response, although 1770 the former is more likely: 1772 o If there is a perfect match to an existing association, that 1773 association SHOULD be re-used, provided it meets the criteria on 1774 security and transport properties given at the end of 1775 Section 5.7.1. This is indicated by sending the remaining 1776 messages in the handshake over that association. This will lead 1777 to multiplexing on an association to the wrong node if signalling 1778 nodes have colliding Peer-Identities and one is reachable at the 1779 same Interface-Address as another. This could be caused by an on- 1780 path attacker; on-path attacks are discussed further in 1781 Section 8.7. When multiplexing is done, and the original MA 1782 authorisation was MRI-dependent, the verification steps of 1783 Section 4.4.2 MUST be repeated for the new flow. 1785 o In all other cases, the handshake MUST be executed in D-mode as 1786 usual. There are in fact four possibilities: 1788 1. Nothing matches: this is clearly a new peer. 1790 2. Only the Peer-Identity matches: this may be either a new 1791 interface on an existing peer, or a changed address mapping 1792 behind a NAT. These should be rare events, so the expense of 1793 a new association setup is acceptable. Another possibility is 1794 one node using another node's Peer-Identity, for example as 1795 some kind of attack. Because the Peer-Identity is used only 1796 for this multiplexing process, the only consequence this has 1797 is to require a new association setup, and this is considered 1798 in Section 8.4. 1800 3. Only the Interface-Address matches: this is probably a new 1801 peer behind the same NAT as an existing one. A new 1802 association setup is required. 1804 4. Both elements of the NLI object match: this is a degenerate 1805 case, where one node recognises an existing peer, but wishes 1806 to allow the option to set up a new association in any case, 1807 for example to create an association with different 1808 properties. 1810 4.4.4. Routing State Maintenance 1812 Each item of routing state expires after a lifetime which is 1813 negotiated during the Query/Response/Confirm handshake. The Network 1814 Layer Info (NLI) object in the Query contains a proposal for the 1815 lifetime value, and the NLI in the Response contains the value the 1816 Responding node requires. A default timer value of 30 seconds is 1817 RECOMMENDED. Nodes which can exploit alternative, more powerful, 1818 route change detection methods such as those described in 1819 Section 7.1.2 MAY choose to use much longer times. Nodes MAY use 1820 shorter times to provide more rapid change detection. If the number 1821 of active routing state items corresponds to a rate of Queries that 1822 will stress the rate limits applied to D-mode traffic 1823 (Section 5.3.3), nodes MUST increase the timer for new items and on 1824 the refresh of existing ones. A suitable value is 1825 2 * (number of routing states) / (rate limit in pkts/second) 1827 which leaves a factor of two headroom for new routing state creation 1828 and Query retransmissions. 1830 The Querying node MUST ensure that a Query is received before this 1831 timer expires, if it believes that the signalling session is still 1832 active; otherwise, the Responding node MAY delete the state. Receipt 1833 of the message at the Responding node will refresh peer addressing 1834 state for one direction, and receipt of a Response at the querying 1835 node will refresh it for the other. There is no mechanism at the 1836 GIST level for explicit teardown of routing state. However, GIST 1837 MUST NOT refresh routing state if a signalling session is known to be 1838 inactive, either because upstream state has expired, or because the 1839 signalling application has indicated via the GIST API (Appendix B.5) 1840 that the state is no longer required, because this would prevent 1841 correct state repair in the case of network rerouting at the IP 1842 layer. 1844 This specification defines precisely only the time at which routing 1845 state expires; it does not define when refresh handshakes should be 1846 initiated. Implementations MUST select timer settings which take at 1847 least the following into account: 1849 o The transmission latency between source and destination; 1851 o The need for retransmissions of Query messages; 1853 o The need to avoid network synchronisation of control traffic (cf. 1854 [43]). 1856 In most cases, a reasonable policy is to initiate the routing state 1857 refresh when between 1/2 and 3/4 of the validity time has elapsed 1858 since the last successful refresh. The actual moment MUST be chosen 1859 randomly within this interval to avoid synchronisation effects. 1861 4.4.5. Messaging Association Maintenance 1863 Unneeded MAs are torn down by GIST, using the teardown mechanisms of 1864 the underlying transport or security protocols if available, for 1865 example by simply closing a TCP connection. The teardown can be 1866 initiated by either end. Whether an MA is needed is a combination of 1867 two factors: 1869 o local policy, which could take into account the cost of keeping 1870 the messaging association open, the level of past activity on the 1871 association, and the likelihood of future activity, e.g. if there 1872 is routing state still in place which might generate messages to 1873 use it. 1875 o whether the peer still wants the MA to remain in place. During MA 1876 setup, as part of the Stack-Configuration-Data, each node 1877 advertises its own MA-Hold-Time, which is the time for which it 1878 will retain an MA which is not carrying signalling traffic. A 1879 node MUST NOT tear down an MA if it has received traffic from its 1880 peer over that period. A peer which has generated no traffic but 1881 still wants the MA retained can use a special null message (MA- 1882 Hello) to indicate the fact. A default value for MA-Hold-Time of 1883 30 seconds is RECOMMENDED. Nodes MAY use shorter times to achieve 1884 more rapid peer failure detection, but need to take into account 1885 the load on the network created by the MA-Hello messages. Nodes 1886 MAY use longer times, but need to take into account the cost of 1887 retaining idle MAs for extended periods. Nodes MAY take 1888 signalling application behaviour (e.g. NSLP refresh times) into 1889 account in choosing an appropriate value. 1891 Because the Responding node can choose not to create state until a 1892 Confirm, an abbreviated Stack-Configuration-Data object containing 1893 just this information from the initial Query MUST be repeated by 1894 the Querying node in the first Confirm sent on a new MA. If the 1895 object is missing in the Confirm, an "Object Type Error" message 1896 (Appendix A.4.4.9) with subcode 2 ("Missing Object") MUST be 1897 returned. 1899 Messaging associations can always be set up on demand, and messaging 1900 association status is not made directly visible outside the GIST 1901 layer. Therefore, even if GIST tears down and later re-establishes a 1902 messaging association, signalling applications cannot distinguish 1903 this from the case where the MA is kept permanently open. To 1904 maintain the transport semantics described in Section 4.1, GIST MUST 1905 close transport connections carrying reliable messages gracefully or 1906 report an error condition, and MUST NOT open a new association to be 1907 used for given session and peer while messages on a previous 1908 association could still be outstanding. GIST MAY use an MA-Hello 1909 request/reply exchange on an existing association to verify that 1910 messages sent on it have reached the peer. GIST MAY use the same 1911 technique to test the liveness of the underlying MA protocols 1912 themselves at arbitrary times. 1914 This specification defines precisely only the time at which messaging 1915 associations expires; it does not define when keepalives should be 1916 initiated. Implementations MUST select timer settings which take at 1917 least the following into account: 1919 o The transmission latency between source and destination; 1921 o The need for retransmissions within the messaging association 1922 protocols; 1924 o The need to avoid network synchronisation of control traffic (cf. 1925 [43]). 1927 In most cases, a reasonable policy is to initiate the MA refresh when 1928 between 1/2 and 3/4 of the validity time has elapsed since the last 1929 successful refresh. The actual moment MUST be chosen randomly within 1930 this interval to avoid synchronisation effects. 1932 4.4.6. Routing State Failures 1934 A GIST node can receive a message from a GIST peer, which can only be 1935 correctly processed in the context of some routing state, but where 1936 no corresponding routing state exists. Cases where this can arise 1937 include: 1939 o Where the message is random traffic from an attacker, or 1940 backscatter (replies to such traffic). 1942 o Where routing state has been correctly installed but the peer has 1943 since lost it, for example because of aggressive timeout settings 1944 at the peer, or because the node has crashed and restarted. 1946 o Where the routing state has never been correctly installed in the 1947 first place, but the sending node does not know this. This can 1948 happen if the Confirm message of the handshake is lost. 1950 It is important for GIST to recover from such situations promptly 1951 where they represent genuine errors (node restarts, or lost messages 1952 which would not otherwise be retransmitted). Note that only 1953 Response, Confirm, Error and Data messages ever require routing state 1954 to exist, and these are considered in turn: 1956 Response: A Response can be received at a node which never sent (or 1957 has forgotten) the corresponding Query. If the node wants routing 1958 state to exist, it will initiate it itself; a diagnostic error 1959 would not allow the sender of the Response to take any corrective 1960 action, and the diagnostic could itself be a form of backscatter. 1961 Therefore, an error message MUST NOT be generated, but the 1962 condition MAY be logged locally. 1964 Confirm: For a Responding node which implements delayed state 1965 installation, this is normal behaviour, and routing state will be 1966 created provided the Confirm is validated. Otherwise, this is a 1967 case of a non-existent or forgotten Response, and the node may not 1968 have sufficient information in the Confirm to create the correct 1969 state. The requirement is to notify the Querying node so that it 1970 can recover the routing state. 1972 Data: This arises when a node receives Data where routing state is 1973 required, but either it does not exist at all, or it has not been 1974 finalised (no Confirm message). To avoid Data being black-holed, 1975 a notification must be sent to the peer. 1977 Error: Some error messages can only be interpreted in the context of 1978 routing state. However, the only error messages which require a 1979 reply within the protocol are routing state error messages 1980 themselves. Therefore, this case should be treated the same as a 1981 Response: an error message MUST NOT be generated, but the 1982 condition MAY be logged locally. 1984 For the case of Confirm or Data messages, if the state is required 1985 but does not exist, the node MUST reject the incoming message with a 1986 "No Routing State" error message (Appendix A.4.4.5). There are then 1987 three cases at the receiver of the error message: 1989 No routing state: The condition MAY be logged but a reply MUST NOT 1990 be sent (see above). 1992 Querying node: The node MUST restart the GIST handshake from the 1993 beginning, with a new Query. 1995 Responding node: The node MUST delete its own routing state and 1996 SHOULD report an error condition to the local signalling 1997 application. 1999 The rules at the Querying or Responding node make GIST open to 2000 disruption by randomly injected error messages, similar to blind 2001 reset attacks on TCP (cf. [48]), although because routing state 2002 matching includes the SID this is mainly limited to on-path 2003 attackers. If a GIST node detects a significant rate of such 2004 attacks, it MAY adopt a policy of using secured messaging 2005 associations to communicate for the affected MRIs, and only accepting 2006 "No Routing State" error messages over such associations. 2008 5. Message Formats and Transport 2010 5.1. GIST Messages 2012 All GIST messages begin with a common header, followed by a sequence 2013 of type-length-value (TLV) objects. This subsection describes the 2014 various GIST messages and their contents at a high level in ABNF 2015 [12]; a more detailed description of the header and each object is 2016 given in Section 5.2 and bit formats in Appendix A. Note that the 2017 NAT traversal mechanism for GIST involves the insertion of an 2018 additional NAT-Traversal-Object in Query, Response, and some Data and 2019 Error messages; the rules for this are given in Section 7.2. 2021 GIST-Message: The primary messages are either part of the three-way 2022 handshake, or a simple message carrying NSLP data. Additional types 2023 are defined for errors and keeping messaging associations alive. 2024 GIST-Message = Query / Response / Confirm / 2025 Data / Error / MA-Hello 2027 The common header includes a version number, message type and size, 2028 and NSLPID. It also carries a hop count to prevent infinite message 2029 looping and various control flags, including one (the R flag) to 2030 indicate if a reply of some sort is requested. The objects following 2031 the common header MUST be carried in a fixed order, depending on 2032 message type. Messages with missing, duplicate or invalid objects 2033 for the message type MUST be rejected with an "Object Type Error" 2034 message with the appropriate subcode (Appendix A.4.4.9). 2036 Query: A Query MUST be sent in D-mode using the special Q-mode 2037 encapsulation. In addition to the common header, it contains certain 2038 mandatory control objects, and MAY contain a signalling application 2039 payload. A stack proposal and configuration data MUST be included if 2040 the message exchange relates to setup of a messaging association, and 2041 this is the case even if the Query is intended only for refresh 2042 (since a routing change might have taken place in the meantime). The 2043 R flag MUST always be set (R=1) in a Query, since this message always 2044 elicits a Response. 2045 Query = Common-Header 2046 [ NAT-Traversal-Object ] 2047 Message-Routing-Information 2048 Session-Identification 2049 Network-Layer-Information 2050 Query-Cookie 2051 [ Stack-Proposal Stack-Configuration-Data ] 2052 [ NSLP-Data ] 2054 Response: A Response MUST be sent in D-mode if no existing messaging 2055 association can be re-used. If one is being re-used, the Response 2056 MUST be sent in C-mode. It MUST echo the MRI, SID and Query-Cookie 2057 of the Query, and carries its own Network-Layer-Information. If the 2058 message exchange relates to setup of a new messaging association, 2059 which MUST involve a D-mode Response, a Responder cookie MUST be 2060 included, as well as the Responder's own stack proposal and 2061 configuration data. The R flag MUST be set (R=1) if a Responder 2062 cookie is present but otherwise is optional; if the R flag is set, a 2063 Confirm MUST be sent as a reply. Therefore, in particular, a Confirm 2064 will always be required if a new MA is being set up. Note that the 2065 direction of this MRI will be inverted compared to that in the Query, 2066 that is, an upstream MRI becomes downstream and vice versa (see 2067 Section 3.3). 2068 Response = Common-Header 2069 [ NAT-Traversal-Object ] 2070 Message-Routing-Information 2071 Session-Identification 2072 Network-Layer-Information 2073 Query-Cookie 2074 [ Responder-Cookie 2075 [ Stack-Proposal Stack-Configuration-Data ] ] 2076 [ NSLP-Data ] 2078 Confirm: A Confirm MUST be sent in C-mode if a messaging association 2079 is being used for this routing state, and MUST be sent before other 2080 messages for this routing state if an association is being set up. 2081 If no messaging association is being used, the Confirm MUST be sent 2082 in D-mode. The Confirm MUST include the MRI (with inverted 2083 direction) and SID, and echo the Responder-Cookie if the Response 2084 carried one. In C-mode, the Confirm MUST also echo the Stack- 2085 Proposal from the Response (if present) so it can be verified that 2086 this has not been tampered with. The first Confirm on a new 2087 association MUST also repeat the Stack-Configuration-Data from the 2088 original Query in an abbreviated form, just containing the MA-Hold- 2089 Time. 2090 Confirm = Common-Header 2091 Message-Routing-Information 2092 Session-Identification 2093 Network-Layer-Information 2094 [ Responder-Cookie 2095 [ Stack-Proposal 2096 [ Stack-Configuration-Data ] ] ] 2097 [ NSLP-Data ] 2099 Data: The Data message is used to transport NSLP data without 2100 modifying GIST state. It contains no control objects, but only the 2101 MRI and SID associated with the NSLP data being transferred. 2102 Network-Layer-Information (NLI) MUST be carried in the D-mode case, 2103 but MUST NOT be included otherwise. 2105 Data = Common-Header 2106 [ NAT-Traversal-Object ] 2107 Message-Routing-Information 2108 Session-Identification 2109 [ Network-Layer-Information ] 2110 NSLP-Data 2112 Error: An Error message reports a problem determined at the GIST 2113 level. (Errors generated by signalling applications are reported in 2114 NSLP-Data payloads and are not treated specially by GIST.) If the 2115 message is being sent in D-mode, the originator of the error message 2116 MUST include its own Network-Layer-Information object. All other 2117 information related to the error is carried in a GIST-Error-Data 2118 object. 2119 Error = Common-Header 2120 [ NAT-Traversal-Object ] 2121 [ Network-Layer-Information ] 2122 GIST-Error-Data 2124 MA-Hello: This message MUST be sent only in C-mode. It contains the 2125 common header, with a NSLPID of zero, and a message identifier, the 2126 Hello-ID. It always indicates that a node wishes to keep a messaging 2127 association open, and if sent with R=0 and zero Hello-ID this is its 2128 only function. A node MAY also invoke a diagnostic request/reply 2129 exchange by setting R=1 and providing a non-zero Hello-ID; if this 2130 case, the peer MUST send another MA-Hello back along the messaging 2131 association echoing the same Hello-ID and with R=0. Use of this 2132 diagnostic is entirely at the discretion of the initiating node. 2133 MA-Hello = Common-Header 2134 Hello-ID 2136 5.2. Information Elements 2138 This section describes the content of the various objects that can be 2139 present in each GIST message, both the common header, and the 2140 individual TLVs. The bit formats are provided in Appendix A. 2142 5.2.1. The Common Header 2144 Each message begins with a fixed format common header, which contains 2145 the following information: 2147 Version: The version number of the GIST protocol. This 2148 specification defines GIST version 1. 2150 GIST hop count: A hop count to prevent a message from looping 2151 indefinitely. 2153 Length: The number of 32 bit words in the message following the 2154 common header. 2156 Upper layer identifier (NSLPID): This gives the specific NSLP that 2157 this message is used for. 2159 Message type: The message type (Query, Response, etc.) 2161 Source addressing mode: If set (S=1), this indicates that the IP 2162 source address of the message is the same as the IP address of the 2163 signalling peer, so replies to this message can be sent safely to 2164 this address. S is always set in C-mode. It is cleared (S=0) if 2165 the IP source address was derived from the message routing 2166 information in the payload and this is different from the 2167 signalling source address. 2169 Response requested: A flag which if set (R=1) indicates that a GIST 2170 message should be sent in reply to this message. The appropriate 2171 message type for the reply depends on the type of the initial 2172 message. 2174 Explicit routing: A flag which if set (E=1) indicates that the 2175 message was explicitly routed (see Section 7.1.5). 2177 Note that in D-mode, Section 5.3, there is a 32-bit magic number 2178 before the header. However, this is regarded as part of the 2179 encapsulation rather than part of the message itself. 2181 5.2.2. TLV Objects 2183 All data following the common header is encoded as a sequence of 2184 type-length-value objects. Currently, each object can occur at most 2185 once; the set of required and permitted objects is determined by the 2186 message type and encapsulation (D-mode or C-mode). 2188 Message-Routing-Information (MRI): Information sufficient to define 2189 how the signalling message should be routed through the network. 2191 Message-Routing-Information = message-routing-method 2192 method-specific-information 2194 The format of the method-specific-information depends on the 2195 message-routing-method requested by the signalling application. 2196 Note that it always includes a flag defining the direction as 2197 either 'upstream' or 'downstream' (see Section 3.3). It is 2198 provided by the NSLP in the message sender and used by GIST to 2199 select the message routing. 2201 Session-Identification (SID): The GIST session identifier is a 128 2202 bit, cryptographically random identifier chosen by the node which 2203 originates the signalling exchange. See Section 3.7. 2205 Network-Layer-Information (NLI): This object carries information 2206 about the network layer attributes of the node sending the 2207 message, including data related to the management of routing 2208 state. This includes a peer identity and IP address for the 2209 sending node. It also includes IP-TTL information to allow the IP 2210 hop count between GIST peers to be measured and reported, and a 2211 validity time (RS-validity-time) for the routing state. 2213 Network-Layer-Information = peer-identity 2214 interface-address 2215 RS-validity-time 2216 IP-TTL 2218 The use of the RS-validity-time field is described in 2219 Section 4.4.4. The peer-identity and interface-address are used 2220 for matching existing associations, as discussed in Section 4.4.3. 2222 The interface-address must be routable, i.e. it MUST be usable as 2223 a destination IP address for packets to be sent back to the node 2224 generating the signalling message, whether in D-mode or C-mode. 2225 If this object is carried in a message with the source addressing 2226 mode flag S=1, the interface-address MUST match the source address 2227 used in the IP encapsulation, to assist in legacy NAT detection 2228 (Section 7.2.1). If this object is carried in a Query or Confirm, 2229 the interface-address MUST specifically be set to an address bound 2230 to an interface associated with the MRI, to allow its use in route 2231 change handling as discussed in Section 7.1. A suitable choice is 2232 the interface that is carrying the outbound flow. A node may have 2233 several choices for which of its addresses to use as the 2234 interface-address. For example, there may be a choice of IP 2235 versions, or addresses of limited scope (e.g. link-local), or 2236 addresses bound to different interfaces in the case of a router or 2237 multi-homed host. However, some of these interface addresses may 2238 not be usable by the peer. A node MUST follow a policy of using a 2239 global address of the same IP version as in the MRI, unless it can 2240 establish that an alternative address would also be usable. 2242 The setting and interpretation of the IP-TTL field depends on the 2243 message direction (upstream/downstream as determined from the MRI 2244 as described above) and encapsulation. 2246 * If the message is sent downstream, if the TTL that will be set 2247 in the IP header for the message can be determined, the IP-TTL 2248 value MUST be set to this value, or else set to 0. 2250 * On receiving a downstream message in D-mode, a non-zero IP-TTL 2251 is compared to the TTL in the IP header, and the difference is 2252 stored as the IP-hop-count-to-peer for the upstream peer in the 2253 routing state table for that flow. Otherwise, the field is 2254 ignored. 2256 * If the message is sent upstream, the IP-TTL MUST be set to the 2257 value of the IP-hop-count-to-peer stored in the routing state 2258 table, or 0 if there is no value yet stored. 2260 * On receiving an upstream message, the IP-TTL is stored as the 2261 IP-hop-count-to-peer for the downstream peer. 2263 In all cases, the IP-TTL value reported to signalling applications 2264 is the one stored with the routing state for that flow, after it 2265 has been updated if necessary from processing the message in 2266 question. 2268 Stack-Proposal: This field contains information about which 2269 combinations of transport and security protocols are available for 2270 use in messaging associations, and is also discussed further in 2271 Section 5.7. 2273 Stack-Proposal = 1*stack-profile 2275 stack-profile = 1*protocol-layer 2277 Each protocol-layer field identifies a protocol with a unique tag; 2278 any additional data, such as higher-layer addressing or other 2279 options data associated with the protocol, will be carried in a 2280 MA-protocol-options field in the Stack-Configuration-Data TLV (see 2281 below). 2283 Stack-Configuration-Data (SCD): This object carries information 2284 about the overall configuration of a messaging association. 2286 Stack-Configuration-Data = MA-Hold-Time 2287 0*MA-protocol-options 2289 The MA-Hold-Time field indicates how long a node will hold open an 2290 inactive association; see Section 4.4.5 for more discussion. The 2291 MA-protocol-options fields give the configuration of the protocols 2292 (e.g. TCP, TLS) to be used for new messaging associations, and 2293 they are described in more detail in Section 5.7. 2295 Query-Cookie/Responder-Cookie: A Query-Cookie is contained in a 2296 Query and MUST be echoed in a Response; a Responder-Cookie MAY be 2297 sent in a Response, and if present MUST be echoed in the following 2298 Confirm. Cookies are variable length bit strings, chosen by the 2299 cookie generator. See Section 8.5 for further details on 2300 requirements and mechanisms for cookie generation. 2302 Hello-ID: The Hello-ID is a 32-bit quantity that is used to 2303 correlate messages in an MA-Hello request/reply exchange. A non- 2304 zero value MUST be used in a request (messages sent with R=1) and 2305 the same value must be returned in the reply (which has R=0). The 2306 value zero MUST be used for all other messages; if a message is 2307 received with R=1 and Hello-ID=0, an "Object Value Error" message 2308 (Appendix A.4.4.10) with subcode 1 ("Value Not Supported") MUST be 2309 returned and the message dropped. Nodes MAY use any algorithm to 2310 generate the Hello-ID; a suitable approach is a local sequence 2311 number with a random starting point. 2313 NSLP-Data: The NSLP payload to be delivered to the signalling 2314 application. GIST does not interpret the payload content. 2316 GIST-Error-Data: This contains the information to report the cause 2317 and context of an error. 2319 GIST-Error-Data = error-class error-code error-subcode 2320 common-error-header 2321 [ Message-Routing-Information-content ] 2322 [ Session-Identification-content ] 2323 0*additional-information 2324 [ comment ] 2326 The error-class indicates the severity level, and the error-code 2327 and error-subcode identify the specific error itself. A full list 2328 of GIST errors and their severity levels is given in Appendix A.4. 2329 The common-error-header carries the Common-Header from the 2330 original message, and contents of the Message-Routing-Information 2331 (MRI) and Session-Identification (SID) objects are also included 2332 if they were successfully decoded. For some errors, additional 2333 information fields can be included, and these fields themselves 2334 have a simple TLV format. Finally, an optional free-text comment 2335 may be added. 2337 5.3. D-mode Transport 2339 This section describes the various encapsulation options for D-mode 2340 messages. Although there are several possibilities, depending on 2341 message type, MRM, and local policy, the general design principle is 2342 that the sole purpose of the encapsulation is to ensure that the 2343 message is delivered to or intercepted at the correct peer. Beyond 2344 that, minimal significance is attached to the type of encapsulation 2345 or the values of addresses or ports used for it. This allows new 2346 options to be developed in the future to handle particular deployment 2347 requirements without modifying the overall protocol specification. 2349 5.3.1. Normal Encapsulation 2351 Normal encapsulation MUST be used for all D-mode messages where the 2352 signalling peer is already known from previous signalling. This 2353 includes Response and Confirm messages, and Data messages except if 2354 these are being sent without using local routing state. Normal 2355 encapsulation is simple: the message is carried in a single UDP 2356 datagram. UDP checksums MUST be enabled. The UDP payload MUST 2357 always begin with a 32 bit magic number with value 0x4e04 bda5 in 2358 network byte order; this is followed by the GIST common header and 2359 the complete set of payloads. If the magic number is not present, 2360 the message MUST be silently dropped. The normal encapsulation is 2361 shown in outline in Figure 6. 2363 0 1 2 3 2364 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 2365 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2366 // IP Header // 2367 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2368 // UDP Header // 2369 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2370 | GIST Magic Number (0x4e04bda5) | 2371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2372 // GIST Common Header // 2373 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2374 // GIST Payloads // 2375 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2377 Figure 6: Normal Encapsulation Packet Format 2379 The message is IP addressed directly to the adjacent peer as given by 2380 the routing state table. Where the message is a direct reply to a 2381 Query and no routing state exists, the destination address is derived 2382 from the input message using the same rules as in Section 4.4.1. The 2383 UDP port numbering MUST be compatible with that used on Query 2384 messages (see below), that is, the same for messages in the same 2385 direction and with source and destination port numbers swapped for 2386 messages in the opposite direction. Normally encapsulated messages 2387 MUST be sent with source addressing mode flag S=1 unless the message 2388 is a reply to a message which is known to have passed through a NAT, 2389 and the receiver MUST check the IP source address with the interface- 2390 address given in the NLI as part of legacy NAT detection. Both these 2391 aspects of message processing are discussed further in Section 7.2.1. 2393 5.3.2. Q-mode Encapsulation 2395 Q-mode encapsulation MUST be used for messages where no routing state 2396 is available or where the routing state is being refreshed, in 2397 particular for Query messages. Q-mode can also be used when 2398 requested by local policy. Q-mode encapsulation is similar to normal 2399 encapsulation, with changes in IP address selection, rules about IP 2400 options, and a defined method for selecting UDP ports. 2402 It is an essential property of the Q-mode encapsulation that it is 2403 possible for a GIST node to intercept these messages efficiently even 2404 when they are not directly addressed to it; and conversely that it is 2405 possible for a non-GIST node to ignore these messages without 2406 overloading the slow path packet processing. This document specifies 2407 that interception is done on the basis of n-tuple (IP and transport 2408 header) analysis, in particular the use of a well-known UDP 2409 destination port.; extensibility to other mechanisms is discussed in 2410 Section 5.3.2.5. 2412 5.3.2.1. Encapsulation and Interception in IPv4 2414 In general, the IP addresses are derived from information in the MRI; 2415 the exact rules depend on the MRM. For the case of messages with 2416 source addressing mode flag S=1, the receiver MUST check the IP 2417 source address with the interface-address given in the NLI as part of 2418 legacy NAT detection, see Section 7.2.1. 2420 It is likely that fragmented datagrams will not be correctly 2421 intercepted in the network, since the checks that a datagram is a 2422 Q-mode packet depend on data beyond the IP header. Therefore the 2423 sender MUST set the Don't Fragment (DF) bit in the IPv4 header. Note 2424 that ICMP "packet too large" messages will be sent to the source 2425 address of the original IP datagram, and since all MRM definitions 2426 recommend S=1 for at least some retransmissions, ICMP errors related 2427 to fragmentation will be seen at the Querying node. 2429 The upper layer protocol, identified by the IP-Protocol field in the 2430 IP header, MUST be UDP. 2432 5.3.2.2. Encapsulation and Interception in IPv6 2434 As for IPv4, the IP addresses are derived from information in the 2435 MRI; the exact rules depend on the MRM. For the case of messages 2436 with source addressing mode flag S=1, the receiver MUST check the IP 2437 source address with the interface-address given in the NLI as part of 2438 legacy NAT detection, see Section 7.2.1. 2440 The upper layer protocol MUST be UDP without intervening 2441 encapsulation layers. Following any hop-by-hop option header, the IP 2442 header MUST NOT include any extension headers other than routing or 2443 destination options [6], and for the last extension header MUST have 2444 a next-header field of UDP. 2446 5.3.2.3. Upper Layer Encapsulation and Overall Interception 2447 Requirements 2449 For both IP versions, the above rules require that the upper layer 2450 protocol identified by the IP header MUST be UDP. Other packets MUST 2451 NOT be identified as GIST Q-mode packets; this includes IP-in-IP 2452 tunnelled packets, other tunnelled packets (tunnel mode AH/ESP), or 2453 packets which have undergone some additional transport layer 2454 processing (transport mode AH/ESP). If IP output processing at the 2455 originating node or an intermediate router causes such additional 2456 encapsulations to be added to a GIST Q-mode packet, this packet will 2457 not be identified as GIST until the encapsulation is terminated. If 2458 the node wishes to signal for data over the network region where the 2459 encapsulation applies, it MUST generate additional signalling with an 2460 MRI matching the encapsulated traffic, and the outbound GIST Q-mode 2461 messages for it MUST bypass the encapsulation processing. 2463 Therefore, the final stage of the interception process and the final 2464 part of encapsulation is at the UDP level. The source UDP port is 2465 selected by the message sender as the port at which it is prepared to 2466 receive UDP messages in reply, and the sender MUST use the 2467 destination UDP port allocated for GIST by IANA (see Section 9). 2468 Note that for some MRMs, GIST nodes anywhere along the path can 2469 generate GIST packets with source addresses that spoof the source 2470 address of the data flow. Therefore, destinations cannot distinguish 2471 these packets from genuine end-to-end data purely on address 2472 analysis. Instead, it must be possible to distinguish such GIST 2473 packets by port analysis; furthermore, the mechanism to do so must 2474 remain valid even if the destination is GIST-unaware. GIST solves 2475 this problem by using a fixed destination UDP port from the "well 2476 known" space for the Q-mode encapsulation. This port should never be 2477 allocated on a GIST-unaware host, and therefore Q-mode encapsulated 2478 messages should always be rejected with an ICMP error. 2480 Within the network, there may be packets using the GIST UDP port but 2481 which are not in fact GIST traffic. Q-mode packets carry the same 2482 magic number as other D-mode packets (see Section 5.3.1). A Q-mode 2483 packet intercepted within the network which does not match both the 2484 UDP destination port and the magic number MUST be forwarded 2485 transparently at the IP layer. Regardless of the IP level 2486 encapsulation, if either the destination port is not the GIST port, 2487 or the payload start does not match the magic number, the packet MUST 2488 NOT be identified as a GIST Q-mode packet and MUST be processed as a 2489 normal IP datagram. If a Q-mode packet is received at an end system 2490 (i.e. the at the destination address of the IP datagram), if it does 2491 not start with the correct magic number it MUST be silently dropped 2492 as in the D-mode case. 2494 5.3.2.4. IP Option Processing 2496 For both IPv4 and IPv6, for Q-mode packets with IP options allowed by 2497 the above requirements, IP options processing is intended to be 2498 carried out independently of GIST processing. Note that for the 2499 options allowed by the above rules, the option semantics are 2500 independent of the payload: UDP payload modifications are not 2501 prevented by the options and do not affect the option content, and 2502 conversely the presence of the options does not affect the UDP 2503 payload. 2505 On packets originated by GIST, IP options MAY be added according to 2506 node-local policies on outgoing IP data. On packets forwarded by 2507 GIST without NSLP processing, IP options MUST be processed as for a 2508 normally forwarded IP packet. On packets locally delivered to the 2509 NSLP, the IP options MAY be passed to the NSLP and equivalent options 2510 used on subsequently generated outgoing Q-mode packets. In this 2511 case, routing related options SHOULD be processed identically as they 2512 would be for a normally forwarded IP packet. 2514 5.3.2.5. Q-Mode Interception Extensibility 2516 In this specification, the basic GIST mechanism for Q-mode 2517 interception is independent of signalling application; the NSLPID 2518 itself is only checked after IP/UDP header processing. The 2519 interception load on a GIST-aware node is therefore a function of 2520 data plane load, independent of the number of Q-mode messages or 2521 signalling application mix. There are potentially more efficient 2522 packet interception mechanisms, for example using the router alert 2523 option ([14] and [18]); details for this case are described in a 2524 separate document [44] as an experimental extension. Such extensions 2525 would initially be deployed in specific network regions rather than 2526 the Internet at large. 2528 To support this type of extension, signalling applications associate 2529 all messages for a given NSLPID with a single interception class, 2530 which is a parameter provided through the GIST API (Appendix B.1). 2531 The NSLPID to interception class mapping is defined as part of the 2532 signalling application specification; multiple NSLPIDs can be mapped 2533 to the same class. Packet interception extensions are allowed to use 2534 this additional parameter to enable Q-mode interception for specific 2535 interception classes rather than for all signalling messages. This 2536 definition of interception classes allows such extensions to be 2537 designed and implemented purely at the GIST level, without changing 2538 signalling application specifications. Guidelines on defining 2539 interception classes are given in [13]. 2541 5.3.3. Retransmission and Rate Control 2543 D-mode uses UDP, and hence has no automatic reliability or congestion 2544 control capabilities. Signalling applications requiring reliability 2545 should be serviced using C-mode, which should also carry the bulk of 2546 signalling traffic. However, some form of messaging reliability is 2547 required for the GIST control messages themselves, as is rate control 2548 to handle retransmissions and also bursts of unreliable signalling or 2549 state setup requests from the signalling applications. 2551 Query messages which do not receive Responses MAY be retransmitted; 2552 retransmissions MUST use a binary exponential backoff. The initial 2553 timer value is T1, which the backoff process can increase up to a 2554 maximum value of T2 seconds. The default value for T1 is 500 ms. T1 2555 is an estimate of the round-trip time between the querying and 2556 responding nodes. Nodes MAY use smaller values of T1 if it is known 2557 that the Query should be answered within the local network. T1 MAY 2558 be chosen larger, and this is RECOMMENDED if it is known in advance 2559 (such as on high latency access links) that the round-trip time is 2560 larger. The default value of T2 is 64*T1. Note that Queries may go 2561 unanswered either because of message loss (in either direction), or 2562 because there is no reachable GIST peer. Therefore, implementations 2563 MAY trade off reliability (large T2) against promptness of error 2564 feedback to applications (small T2). If the NSLP has indicated a 2565 timeout on the validity of this payload (see Appendix B.1), T2 MUST 2566 be chosen so that the process terminates within this timeout. 2567 Retransmitted Queries MUST use different Query-Cookie values. If the 2568 Query carries NSLP data, it may be delivered multiple times to the 2569 signalling application. These rules apply equally to the message 2570 that first creates routing state, and those that refresh it. In all 2571 cases, Responses MUST be sent promptly to avoid spurious 2572 retransmissions. Nodes generating any type of retransmission MUST be 2573 prepared to receive and match a reply to any of them, not just the 2574 one most recently sent. Although a node SHOULD terminate its 2575 retransmission process when any reply is received, it MUST continue 2576 to process further replies as normal. 2578 This algorithm is sufficient to handle lost Queries and Responses. 2579 The case of a lost Confirm is more subtle. The Responding node MAY 2580 run a retransmission timer to resend the Response until a Confirm is 2581 received; the timer MUST use the same backoff mechanism and 2582 parameters as for Responses. The problem of an amplification attack 2583 stimulated by a malicious Query is handled by requiring the cookie 2584 mechanism to enable the node receiving the Response to discard it 2585 efficiently if it does not match a previously sent Query. This 2586 approach is only appropriate if the Responding node is prepared to 2587 store per-flow state after receiving a single (Query) message, which 2588 includes the case where the node has queued NSLP data. If the 2589 Responding node has delayed state installation, the error condition 2590 will only be detected when a Data message arrives. This is handled 2591 as a routing state error (see Section 4.4.6) which causes the 2592 Querying node to restart the handshake. 2594 The basic rate-control requirements for D-mode traffic are 2595 deliberately minimal. A single rate limiter applies to all traffic, 2596 for all interfaces and message types. It applies to retransmissions 2597 as well as new messages, although an implementation MAY choose to 2598 prioritise one over the other. Rate-control applies only to locally 2599 generated D-mode messages, not to messages which are being forwarded. 2600 When the rate limiter is in effect, D-mode messages MUST be queued 2601 until transmission is re-enabled, or they MAY be dropped with an 2602 error condition indicated back to local signalling applications. In 2603 either case, the effect of this will be to reduce the rate at which 2604 new transactions can be initiated by signalling applications, thereby 2605 reducing the load on the network. 2607 The rate limiting mechanism is implementation-defined, but it is 2608 RECOMMENDED that a token bucket limiter as described in [34] be used. 2609 The token bucket MUST be sized to ensure that a node cannot saturate 2610 the network with D-mode traffic, for example when re-probing the 2611 network for multiple flows after a route change. A suitable approach 2612 is to restrict the token bucket parameters so that the mean output 2613 rate is a small fraction of the node's lowest-speed interface. It is 2614 RECOMMENDED that this fraction is no more than 5%. Note that, 2615 according to the rules of Section 4.3.3, in general D-mode SHOULD 2616 only be used for Queries and Responses rather than normal signalling 2617 traffic unless capacity for normal signalling traffic can be 2618 engineered. 2620 5.4. C-mode Transport 2622 It is a requirement of the NTLP defined in [30] that it should be 2623 able to support bundling of small messages, fragmentation of large 2624 messages, and message boundary delineation. TCP provides both 2625 bundling and fragmentation, but not message boundaries. However, the 2626 length information in the GIST common header allows the message 2627 boundary to be discovered during parsing. The bundling together of 2628 small messages can either be done within the transport protocol or 2629 can be carried out by GIST during message construction. Either way, 2630 two approaches can be distinguished: 2632 1. As messages arrive for transmission they are gathered into a 2633 bundle until a size limit is reached or a timeout expires (cf. 2634 the Nagle algorithm of TCP). This provides maximal efficiency at 2635 the cost of some latency. 2637 2. Messages awaiting transmission are gathered together while the 2638 node is not allowed to send them, for example because it is 2639 congestion controlled. 2641 The second type of bundling is always appropriate. For GIST, the 2642 first type MUST NOT be used for trigger messages (i.e. messages that 2643 update GIST or signalling application state), but may be appropriate 2644 for refresh messages (i.e. messages that just extend timers). These 2645 distinctions are known only to the signalling applications, but MAY 2646 be indicated (as an implementation issue) by setting the priority 2647 transfer attribute (Section 4.1.2). 2649 It can be seen that all of these transport protocol options can be 2650 supported by the basic GIST message format already presented. The 2651 GIST message, consisting of common header and TLVs, is carried 2652 directly in the transport protocol, possibly incorporating transport 2653 layer security protection. Further messages can be carried in a 2654 continuous stream. This specification defines only the use of TCP, 2655 but other possibilities could be included without additional work on 2656 message formatting. 2658 5.5. Message Type/Encapsulation Relationships 2660 GIST has four primary message types (Query, Response, Confirm, and 2661 Data) and three possible encapsulation methods (normal D-mode, 2662 Q-mode, and C-mode). The combinations of message type and 2663 encapsulation which are allowed for message transmission are given in 2664 the table below. In some cases there are several possible choices, 2665 depending on the existence of routing state or messaging 2666 associations. The rules governing GIST policy, including whether or 2667 not to create such state to handle a message, are described 2668 normatively in the other sections of this specification. If a 2669 message which can only be sent in Q/D-mode arrives in C-mode or vice 2670 versa, this MUST be rejected with an "Incorrect Encapsulation" error 2671 message (Appendix A.4.4.3). However, it should be noted that the 2672 processing of the message at the receiver is not otherwise affected 2673 by the encapsulation method used, except that the decapsulation 2674 process may provide additional information, such as translated 2675 addresses or IP hop count to be used in the subsequent message 2676 processing. 2678 +----------+---------------+-------------------------+--------------+ 2679 | Message | Normal D-mode | Query D-mode (Q-mode) | C-mode | 2680 +----------+---------------+-------------------------+--------------+ 2681 | Query | Never | Always | Never | 2682 | | | | | 2683 | Response | Unless a | Never | If a | 2684 | | messaging | | messaging | 2685 | | association | | association | 2686 | | is being | | is being | 2687 | | re-used | | re-used | 2688 | | | | | 2689 | Confirm | Only if no | Never | If a | 2690 | | messaging | | messaging | 2691 | | association | | association | 2692 | | has been set | | has been set | 2693 | | up or is | | up or is | 2694 | | being re-used | | being | 2695 | | | | re-used | 2696 | | | | | 2697 | Data | If routing | If the MRI can be used | If a | 2698 | | state exists | to derive the Q-mode | messaging | 2699 | | for the flow | encapsulation, and | association | 2700 | | but no | either no routing state | exists | 2701 | | messaging | exists or local policy | | 2702 | | association | requires Q-mode | | 2703 +----------+---------------+-------------------------+--------------+ 2705 5.6. Error Message Processing 2707 Special rules apply to the encapsulation and transmission of error 2708 messages. 2710 GIST only generates error messages in reaction to incoming messages. 2711 Error messages MUST NOT be generated in reaction to incoming error 2712 messages. The routing and encapsulation of the error message is 2713 derived from that of the message that caused the error; in 2714 particular, local routing state is not consulted. Routing state and 2715 messaging association state MUST NOT be created to handle the error, 2716 and error messages MUST NOT be retransmitted explicitly by GIST, 2717 although they are subject to the same rate control as other messages. 2719 o If the incoming message was received in D-mode, the error MUST be 2720 sent in D-mode using the normal encapsulation, using the 2721 addressing information from the NLI object in the incoming 2722 message. If the NLI could not be determined, the error MUST be 2723 sent to the IP source of the incoming message if the S flag was 2724 set in it. The NLI object in the Error message reports 2725 information about the originator of the error. 2727 o If the incoming message was received over a messaging association, 2728 the error MUST be sent back over the same messaging association. 2730 The NSLPID in the common header of the Error message has the value 2731 zero. If for any reason the message cannot be sent (for example, 2732 because it is too large to send in D-mode, or because the MA over 2733 which the original message arrived has since been closed) an error 2734 SHOULD be logged locally. The receiver of the Error message can 2735 infer the NSLPID for the message that caused the error from the 2736 Common Header that is embedded in the Error object. 2738 5.7. Messaging Association Setup 2740 5.7.1. Overview 2742 A key attribute of GIST is that it is flexible in its ability to use 2743 existing transport and security protocols. Different transport 2744 protocols may have performance attributes appropriate to different 2745 environments; different security protocols may fit appropriately with 2746 different authentication infrastructures. Even given an initial 2747 default mandatory protocol set for GIST, the need to support new 2748 protocols in the future cannot be ruled out, and secure feature 2749 negotiation cannot be added to an existing protocol in a backwards- 2750 compatible way. Therefore, some sort of capability discovery is 2751 required. 2753 Capability discovery is carried out in Query and Response messages, 2754 using Stack-Proposal and Stack-Configuration-Data (SCD) objects. If 2755 a new messaging association is required it is then set up, followed 2756 by a Confirm. Messaging association multiplexing is achieved by 2757 short-circuiting this exchange by sending the Response or Confirm 2758 messages on an existing association (Section 4.4.3); whether to do 2759 this is a matter of local policy. The end result of this process is 2760 a messaging association which is a stack of protocols. If multiple 2761 associations exist, it is a matter of local policy how to distribute 2762 messages over them, subject to respecting the transfer attributes 2763 requested for each message. 2765 Every possible protocol for a messaging association has the following 2766 attributes: 2768 o MA-Protocol-ID, a 1-byte IANA assigned value (see Section 9). 2770 o A specification of the (non-negotiable) policies about how the 2771 protocol should be used; for example, in which direction a 2772 connection should be opened. 2774 o [Depending on the specific protocol:] Formats for an MA-protocol- 2775 options field to carry the protocol addressing and other 2776 configuration information in the SCD object. The format may 2777 differ depending on whether the field is present in the Query or 2778 Response. Some protocols do not require the definition of such 2779 additional data, in which case no corresponding MA-protocol- 2780 options field will occur in the SCD object. 2782 A Stack-Proposal object is simply a list of profiles; each profile is 2783 a sequence of MA-Protocol-IDs. A profile lists the protocols in 'top 2784 to bottom' order (e.g. TLS over TCP). A Stack-Proposal is generally 2785 accompanied by a SCD object which carries an MA-protocol-options 2786 field for any protocol listed in the Stack-Proposal which needs it. 2787 An MA-protocol-options field may apply globally, to all instances of 2788 the protocol in the Stack-Proposal; or it can be tagged as applying 2789 to a specific instance. The latter approach can for example be used 2790 to carry different port numbers for TCP depending on whether it is to 2791 be used with or without TLS. An message flow which shows several of 2792 the features of Stack-Proposal and Stack-Configuration-Data formats 2793 can be found in Appendix C. 2795 An MA-protocol-options field may also be flagged as not usable; for 2796 example, a NAT which could not handle SCTP would set this in an MA- 2797 protocol-options field about SCTP. A protocol flagged this way MUST 2798 NOT be used for a messaging association. If the Stack-Proposal and 2799 SCD are both present but not consistent, for example, if they refer 2800 to different protocols, or an MA-protocol-options field refers to a 2801 non-existent profile, an "Object Value Error" message 2802 (Appendix A.4.4.10) with subcode 5 ("Stack-Proposal - Stack- 2803 Configuration-Data Mismatch") MUST be returned and the message 2804 dropped. 2806 A node generating a SCD object MUST honour the implied protocol 2807 configurations for the period during which a messaging association 2808 might be set up; in particular, it MUST be immediately prepared to 2809 accept incoming datagrams or connections at the protocol/port 2810 combinations advertised. This MAY require the creation of listening 2811 endpoints for the transport and security protocols in question, or a 2812 node MAY keep a pool of such endpoints open for extended periods. 2813 However, the received object contents MUST be retained only for the 2814 duration of the Query/Response exchange and to allow any necessary 2815 association setup to complete. They may become invalid because of 2816 expired bindings at intermediate NATs, or because the advertising 2817 node is using agile ports. Once the setup is complete, or if it is 2818 not necessary, or fails for some reason, the object contents MUST be 2819 discarded. A default time of 30 seconds to keep the contents is 2820 RECOMMENDED. 2822 A Query requesting messaging association setup always contains a 2823 Stack-Proposal and SCD object. The Stack-Proposal MUST only include 2824 protocol configurations that are suitable for the transfer attributes 2825 of the messages that the Querying node wishes to use the messaging 2826 association for. For example, it should not simply include all 2827 configurations that the Querying node is capable of supporting. 2829 The Response always contains a Stack-Proposal and SCD object, unless 2830 multiplexing (where the Responder decides to use an existing 2831 association) occurs. For such a Response, the security protocols 2832 listed in the Stack-Proposal MUST NOT depend on the Query. A node 2833 MAY make different proposals depending on the combination of 2834 interface and NSLPID. If multiplexing does occur, which is indicated 2835 by sending the Response over an existing messaging association, the 2836 following rules apply: 2838 o The re-used messaging association MUST NOT have weaker security 2839 properties than all of the options that would have been offered in 2840 the full Response that would have been sent without re-use. 2842 o The re-used messaging association MUST have equivalent or better 2843 transport and security characteristics as at least one of the 2844 protocol configurations that was offered in the Query. 2846 Once the messaging association is set up, the Querying node repeats 2847 the responder's Stack-Proposal over it in the Confirm. The 2848 responding node MUST verify that this has not been changed as part of 2849 bidding-down attack prevention, as well as verifying the Responder 2850 cookie (Section 8.5). If either check fails, the responding node 2851 MUST NOT NOT create the message routing state (or MUST delete it if 2852 it already exists) and SHOULD log an error condition locally. If 2853 this is the first message on a new MA, the MA MUST be torn down. See 2854 Section 8.6 for further discussion. 2856 5.7.2. Protocol Definition: Forwards-TCP 2858 This MA-Protocol-ID denotes a basic use of TCP between peers. 2859 Support for this protocol is REQUIRED. If this protocol is offered, 2860 MA-protocol-options data MUST also be carried in the SCD object. The 2861 MA-protocol-options field formats are: 2863 o in a Query: no additional options data (the MA-protocol-options 2864 length field is zero). 2866 o in a Response: 2 byte port number at which the connection will be 2867 accepted, followed by 2 pad bytes. 2869 The connection is opened in the forwards direction, from the Querying 2870 node towards the responder. The Querying node MAY use any source 2871 address and source port. The destination information MUST be derived 2872 from information in the Response: the address from the interface- 2873 address from the Network-Layer-Information object and the port from 2874 the SCD object as described above. 2876 Associations using Forwards-TCP can carry messages with the transfer 2877 attribute Reliable=True. If an error occurs on the TCP connection 2878 such as a reset, as can be detected for example by a socket exception 2879 condition, GIST MUST report this to NSLPs as discussed in 2880 Section 4.1.2. 2882 5.7.3. Protocol Definition: Transport Layer Security 2884 This MA-Protocol-ID denotes a basic use of transport layer channel 2885 security, initially in conjunction with TCP. Support for this 2886 protocol in conjunction with TCP is REQUIRED; associations using it 2887 can carry messages with transfer attributes requesting 2888 confidentiality or integrity protection. The specific TLS version 2889 will be negotiated within the TLS layer itself, but implementations 2890 MUST NOT negotiate to protocol versions prior to TLS1.0 [16] and MUST 2891 use the highest protocol version supported by both peers. 2892 Implementation of TLS1.1 [11] is RECOMMENDED. GIST nodes supporting 2893 TLS1.0 or TLS1.1 MUST- be able to negotiate the TLS ciphersuite 2894 TLS_RSA_WITH_3DES_EDE_CBC_SHA and SHOULD+ be able to negotiate the 2895 TLS ciphersuite TLS_RSA_WITH_AES_128_CBC_SHA. They MAY negotiate any 2896 mutually acceptable ciphersuite that provides authentication, 2897 integrity, and confidentiality. 2899 The default mode of TLS authentication, which applies in particular 2900 to the above ciphersuites, uses a client/server X.509 certificate 2901 exchange. The Querying node acts as a TLS client, and the Responding 2902 node acts as a TLS server. Where one of the above ciphersuites is 2903 negotiated, the GIST node acting as a server MUST provide a 2904 certificate, and MUST request one from the GIST node acting as a TLS 2905 client. This allows either server-only or mutual authentication, 2906 depending on the certificates available to the client and the policy 2907 applied at the server. 2909 GIST nodes MAY negotiate other TLS ciphersuites. In some cases, the 2910 negotiation of alternative ciphersuites is used to trigger 2911 alternative authentication procedures, such as the use of pre-shared 2912 keys [33]. The use of other authentication procedures may require 2913 additional specification work to define how they can be used as part 2914 of TLS within the GIST framework, and may or may not require the 2915 definition of additional MA-Protocol-IDs. 2917 No MA-protocol-options field is required for this TLS protocol 2918 definition. The configuration information for the transport protocol 2919 over which TLS is running (e.g. TCP port number) is provided by the 2920 MA-protocol-options for that protocol. 2922 5.7.3.1. Identity Checking in TLS 2924 After TLS authentication, a node MUST check the identity presented by 2925 the peer in order to avoid man-in-the-middle attacks, and verify that 2926 the peer is authorised to take part in signalling at the GIST layer. 2927 The authorisation check is carried out by comparing the presented 2928 identity with each Authorised Peer Database (APD) entry in turn, as 2929 discussed in Section 4.4.2. This section defines the identity 2930 comparison algorithm for a single APD entry. 2932 For TLS authentication with X.509 certificates, an identity from the 2933 DNS namespace MUST be checked against each subjectAltName extension 2934 of type dNSName present in the certificate. If no such extension is 2935 present, then the identity MUST be compared to the (most specific) 2936 Common Name in the Subject field of the certificate. When matching 2937 DNS names against dNSName or Common Name fields, matching is case- 2938 insensitive. Also, a "*" wildcard character MAY be used as the left- 2939 most name component in the certificate or identity in the APD. For 2940 example, *.example.com in the APD would match certificates for 2941 a.example.com, foo.example.com, *.example.com, etc., but would not 2942 match example.com. Similarly, a certificate for *.example.com would 2943 be valid for APD identities of a.example.com, foo.example.com, 2944 *.example.com, etc., but not example.com. 2946 Additionally, a node MUST verify the binding between the identity of 2947 the peer to which it connects and the public key presented by that 2948 peer. Nodes SHOULD implement the algorithm in Section 6 of [9] for 2949 general certificate validation, but MAY supplement that algorithm 2950 with other validation methods that achieve equivalent levels of 2951 verification (such as comparing the server certificate against a 2952 local store of already-verified certificates and identity bindings). 2954 For TLS authentication with pre-shared keys, the identity in the 2955 psk_identity_hint (for the server identity, i.e. the Responding node) 2956 or psk_identity (for the client identity, i.e. the Querying node) 2957 MUST be compared to the identities in the APD. 2959 5.8. Specific Message Routing Methods 2961 Each message routing method (see Section 3.3) requires the definition 2962 of the format of the message routing information (MRI) and Q-mode 2963 encapsulation rules. These are given in the following subsections 2964 for the MRMs currently defined. A GIST implementation on a node MUST 2965 support whatever MRMs are required by the NSLPs on that node; GIST 2966 implementations SHOULD provide support for both the MRMs defined 2967 here, in order to minimise deployment barriers for new signalling 2968 applications that need them. 2970 5.8.1. The Path-Coupled MRM 2972 5.8.1.1. Message Routing Information 2974 For the path-coupled MRM, this is conceptually the Flow Identifier as 2975 in the NSIS Framework [30]. Minimally, this could just be the flow 2976 destination address; however, to account for policy based forwarding 2977 and other issues a more complete set of header fields SHOULD be 2978 specified if possible (see Section 4.3.4 and Section 7.2 for further 2979 discussion). 2981 MRI = network-layer-version 2982 source-address prefix-length 2983 destination-address prefix-length 2984 IP-protocol 2985 diffserv-codepoint 2986 [ flow-label ] 2987 [ ipsec-SPI / L4-ports] 2989 Additional control information defines whether the flow-label, IPsec 2990 Security Parameters Index (SPI), and port information are present, 2991 and whether the IP-protocol and diffserv-codepoint fields should be 2992 interpreted as significant. The source and destination addresses 2993 MUST be real node addresses, but prefix lengths other than 32/128 2994 (for IPv4/6) MAY be used to implement address wildcarding, allowing 2995 the MRI to refer to traffic to or from a wider address range. An 2996 additional flag defines the message direction relative to the MRI 2997 (upstream vs. downstream). 2999 The MRI format allows a potentially very large number of different 3000 flag and field combinations. A GIST implementation that cannot 3001 interpret the MRI in a message MUST return an "Object Value Error" 3002 message (Appendix A.4.4.10) with subcodes 1 ("Value Not Supported") 3003 or 2 ("Invalid Flag-Field Combination") and drop the message. 3005 5.8.1.2. Downstream Q-mode Encapsulation 3007 Where the signalling message is travelling in the same ('downstream') 3008 direction as the flow defined by the MRI, the IP addressing for 3009 Q-mode encapsulated messages is as follows. Support for this 3010 encapsulation is REQUIRED. 3012 o The destination IP address MUST be the flow destination address as 3013 given in the MRI of the message payload. 3015 o By default, the source address is the flow source address, again 3016 from the MRI; therefore, the source addressing mode flag in the 3017 common header S=0. This provides the best likelihood that the 3018 message will be correctly routed through any region performing 3019 per-packet policy-based forwarding or load balancing which takes 3020 the source address into account. However, there may be 3021 circumstances where the use of the signalling source address (S=1) 3022 is preferable, such as: 3024 * In order to receive ICMP error messages about the signalling 3025 message, such as unreachable port or address. If these are 3026 delivered to the flow source rather than the signalling source, 3027 it will be very difficult for the querying node to detect that 3028 it is the last GIST node on the path. Another case is where 3029 there is an abnormally low MTU along the path, in which case 3030 the querying node needs to see the ICMP error (recall that 3031 Q-mode packets are sent with DF set). 3033 * In order to receive GIST Error messages where the error message 3034 sender could not interpret the NLI in the original message. 3036 * In order to attempt to run GIST through an unmodified NAT, 3037 which will only process and translate IP addresses in the IP 3038 header (see Section 7.2.1). 3040 Because of these considerations, use of the signalling source 3041 address is allowed as an option, with use based on local policy. 3042 A node SHOULD use the flow source address for initial Query 3043 messages, but SHOULD transition to the signalling source address 3044 for some retransmissions or as a matter of static configuration, 3045 for example if a NAT is known to be in the path out of a certain 3046 interface. The S-flag in the common header tells the message 3047 receiver which option was used. 3049 It is essential that the Query mimics the actual data flow as closely 3050 as possible, since this is the basis of how the signalling message is 3051 attached to the data path. To this end, GIST SHOULD set the DiffServ 3052 codepoint and (for IPv6) flow label to match the values in the MRI. 3054 A GIST implementation SHOULD apply validation checks to the MRI, to 3055 reject Query messages that are being injected by nodes with no 3056 legitimate interest in the flow being signalled for. In general, if 3057 the GIST node can detect that no flow could arrive over the same 3058 interface as the Query, it MUST be rejected with an appropriate error 3059 message. Such checks apply only to messages with the Q-mode 3060 encapsulation, since only those messages are required to track the 3061 flow path. The main checks are that the IP version used in the 3062 encapsulation should match that of the MRI and the version(s) used on 3063 that interface, and that the full range of source addresses (the 3064 source-address masked with its prefix-length) would pass ingress 3065 filtering checks. For these cases, the error message is "MRI 3066 Validation Failure" (Appendix A.4.4.12) with subcodes 1 or 2 ("IP 3067 Version Mismatch" or "Ingress Filter Failure") respectively. 3069 5.8.1.3. Upstream Q-mode Encapsulation 3071 In some deployment scenarios it is desirable to set up routing state 3072 in the upstream direction, (i.e. from flow receiver towards the 3073 sender). This could be used to support firewall signalling to 3074 control traffic from an un-cooperative sender, or signalling in 3075 general where the flow sender was not NSIS-capable. This capability 3076 is incorporated into GIST by defining an encapsulation and processing 3077 rules for sending Query messages upstream. 3079 In general, it is not possible to determine the hop-by-hop route 3080 upstream because of asymmetric IP routing. However, in particular 3081 cases, the upstream peer can be discovered with a high degree of 3082 confidence, for example: 3084 o The upstream GIST peer is 1 IP hop away, and can be reached by 3085 tracing back through the interface on which the flow arrives. 3087 o The upstream peer is a border router of a single-homed (stub) 3088 network. 3090 This section defines an upstream Q-mode encapsulation and validation 3091 checks for when it can be used. The functionality to generate 3092 upstream Queries is OPTIONAL, but if received they MUST be processed 3093 in the normal way with some additional IP TTL checks. No special 3094 functionality is needed for this. 3096 It is possible for routing state at a given node, for a specific MRI 3097 and NSLPID, to be created by both an upstream Query exchange 3098 (initiated by the node itself), and a downstream Query exchange 3099 (where the node is the responder). If the SIDs are different, these 3100 items of routing state MUST be considered as independent; if the SIDs 3101 match, the routing state installed by the downstream exchange MUST 3102 take precedence, provided that the downstream Query passed ingress 3103 filtering checks. The rationale for this is that the downstream 3104 Query is in general a more reliable way to install state, since it 3105 directly probes the IP routing infrastructure along the flow path, 3106 whereas use of the upstream Query depends on the correctness of the 3107 Querying node's understanding of the topology. 3109 The details of the encapsulation are as follows: 3111 o The destination address SHOULD be the flow source address as given 3112 in the MRI of the message payload. An implementation with more 3113 detailed knowledge of local IP routing MAY use an alternative 3114 destination address (e.g. the address of its default router). 3116 o The source address SHOULD be the signalling node address, so in 3117 the common header S=1. 3119 o The DiffServ codepoint and (for IPv6) flow label MAY be set to 3120 match the values from the MRI as in the downstream case, and the 3121 UDP port selection is also the same. 3123 o The IP layer TTL of the message MUST be set to 255. 3125 The sending GIST implementation SHOULD attempt to send the Query via 3126 the same interface and to the same link layer neighbour from which 3127 the data packets of the flow are arriving. 3129 The receiving GIST node MAY apply validation checks to the message 3130 and MRI, to reject Query messages which have reached a node at which 3131 they can no longer be trusted. In particular, a node SHOULD reject a 3132 message which has been propagated more than one IP hop, with an 3133 "Invalid IP layer TTL" error message (Appendix A.4.4.11). This can 3134 be determined by examining the received IP layer TTL, similar to the 3135 generalised IP TTL security mechanism described in [42]. 3136 Alternatively, receipt of an upstream Query at the flow source MAY be 3137 used to trigger setup of GIST state in the downstream direction. 3138 These restrictions may be relaxed in a future version. 3140 5.8.2. The Loose-End MRM 3142 The Loose-End MRM is used to discover GIST nodes with particular 3143 properties in the direction of a given address, for example to 3144 discover a NAT along the upstream data path as in [35]. 3146 5.8.2.1. Message Routing Information 3148 For the loose-end MRM, only a simplified version of the Flow 3149 Identifier is needed. 3151 MRI = network-layer-version 3152 source-address 3153 destination-address 3155 The source address is the address of the node initiating the 3156 discovery process, for example the node that will be the data 3157 receiver in the NAT discovery case. The destination address is the 3158 address of a node which is expected to be the other side of the node 3159 to be discovered. Additional control information defines the 3160 direction of the message relative to this flow as in the path-coupled 3161 case. 3163 5.8.2.2. Downstream Q-mode Encapsulation 3165 Only one encapsulation is defined for the loose-end MRM; by 3166 convention, this is referred to as the downstream encapsulation, and 3167 is defined as follows: 3169 o The IP destination address MUST be the destination address as 3170 given in the MRI of the message payload. 3172 o By default, the IP source address is the source address from the 3173 MRI (S=0). However, the use of the signalling source address 3174 (S=1) is allowed as in the case of the path-coupled MRM. 3176 There are no special requirements on the setting of the DiffServ 3177 codepoint, IP layer TTL, or (for IPv6) the flow label. Nor are any 3178 special validation checks applied. 3180 6. Formal Protocol Specification 3182 This section provides a more formal specification of the operation of 3183 GIST processing, in terms of rules for transitions between states of 3184 a set of communicating state machines within a node. The following 3185 description captures only the basic protocol specification; 3186 additional mechanisms can be used by an implementation to accelerate 3187 route change processing, and these are captured in Section 7.1. A 3188 more detailed description of the GIST protocol operation in state 3189 machine syntax can be found in [47]. 3191 Conceptually, GIST processing at a node may be seen in terms of four 3192 types of cooperating state machine: 3194 1. There is a top-level state machine which represents the node 3195 itself (Node-SM). It is responsible for the processing of events 3196 which cannot be directed towards a more specific state machine, 3197 for example, inbound messages for which no routing state 3198 currently exists. This machine exists permanently, and is 3199 responsible for creating per-MRI state machines to manage the 3200 GIST handshake and routing state maintenance procedures. 3202 2. For each flow and signalling direction where the node is 3203 responsible for the creation of routing state, there is an 3204 instance of a Query-Node state machine (Querying-SM). This 3205 machine sends Query and Confirm messages and waits for Responses, 3206 according to the requirements from local API commands or timer 3207 processing, such as message repetition or routing state refresh. 3209 3. For each flow and signalling direction where the node has 3210 accepted the creation of routing state by a peer, there is an 3211 instance of a Responding-Node state machine (Responding-SM). 3212 This machine is responsible for managing the status of the 3213 routing state for that flow. Depending on policy, it MAY be 3214 responsible for [re]transmission of Response messages, or this 3215 MAY be handled by the Node-SM, and a Responding-SM is not even 3216 created for a flow until a properly formatted Confirm has been 3217 accepted. 3219 4. Messaging associations have their own lifecycle, represented by 3220 an MA-SM, from when they are first created (in an incomplete 3221 state, listening for an inbound connection or waiting for 3222 outbound connections to complete), to when they are active and 3223 available for use. 3225 Apart from the fact that the various machines can be created and 3226 destroyed by each other, there is almost no interaction between them. 3227 The machines for different flows do not interact; the Querying-SM and 3228 Responding-SM for a single flow and signalling direction do not 3229 interact. That is, the Responding-SM which accepts the creation of 3230 routing state for a flow on one interface has no direct interaction 3231 with the Querying-SM which sets up routing state on the next 3232 interface along the path. This interaction is mediated instead 3233 through the NSLP. 3235 The state machine descriptions use the terminology rx_MMMM, tg_TTTT 3236 and er_EEEE for incoming messages, API/lower layer triggers and error 3237 conditions respectively. The possible events of these types are 3238 given in the table below. In addition, timeout events denoted 3239 to_TTTT may also occur; the various timers are listed independently 3240 for each type of state machine in the following subsections. 3242 +---------------------+---------------------------------------------+ 3243 | Name | Meaning | 3244 +---------------------+---------------------------------------------+ 3245 | rx_Query | A Query has been received. | 3246 | | | 3247 | rx_Response | A Response has been received. | 3248 | | | 3249 | rx_Confirm | A Confirm has been received. | 3250 | | | 3251 | rx_Data | A Data message has been received. | 3252 | | | 3253 | rx_Message | rx_Query||rx_Response||rx_Confirm||rx_Data. | 3254 | | | 3255 | rx_MA-Hello | A MA-Hello message has been received. | 3256 | | | 3257 | tg_NSLPData | A signalling application has requested data | 3258 | | transfer (via API SendMessage). | 3259 | | | 3260 | tg_Connected | The protocol stack for a messaging | 3261 | | association has completed connecting. | 3262 | | | 3263 | tg_RawData | GIST wishes to transfer data over a | 3264 | | particular messaging association. | 3265 | | | 3266 | tg_MAIdle | GIST decides that it is no longer necessary | 3267 | | to keep an MA open for itself. | 3268 | | | 3269 | er_NoRSM | A "No Routing State" error was received. | 3270 | | | 3271 | er_MAConnect | A messaging association protocol failed to | 3272 | | complete a connection. | 3273 | | | 3274 | er_MAFailure | A messaging association failed. | 3275 +---------------------+---------------------------------------------+ 3276 Incoming Events 3278 6.1. Node Processing 3280 The Node level state machine is responsible for processing events for 3281 which no more appropriate messaging association state or routing 3282 state exists. Its structure is trivial: there is a single state 3283 ('Idle'); all events cause a transition back to Idle. Some events 3284 cause the creation of other state machines. The only events that are 3285 processed by this state machine are incoming GIST messages (Query/ 3286 Response/Confirm/Data) and API requests to send data; no other events 3287 are possible. In addition to this event processing, the Node level 3288 machine is responsible for managing listening endpoints for messaging 3289 associations. Although these relate to Responding node operation, 3290 they cannot be handled by the Responder state machine since they are 3291 not created per flow. The processing rules for each event are as 3292 follows: 3294 Rule 1 (rx_Query): 3295 use the GIST service interface to determine the signalling 3296 application policy relating to this peer 3297 // note that this interaction delivers any NSLP-Data to 3298 // the NSLP as a side effect 3299 if (the signalling application indicates that routing state should 3300 be created) then 3301 if (routing state can be created without a 3-way handshake) then 3302 create Responding-SM and transfer control to it 3303 else 3304 send Response with R=1 3305 else 3306 propagate the Query with any updated NSLP payload provided 3308 Rule 2 (rx_Response): 3309 // a routing state error 3310 discard message 3312 Rule 3 (rx_Confirm): 3313 if (routing state can be created before receiving a Confirm) then 3314 // we should already have Responding-SM for it, 3315 // which would handle this message 3316 discard message 3317 send "No Routing State" error message 3318 else 3319 create Responding-SM and pass message to it 3321 Rule 4 (rx_Data): 3322 if (node policy will only process Data messages with matching 3323 routing state) then 3324 send "No Routing State" error message 3325 else 3326 pass directly to NSLP 3328 Rule 4 (er_NoRSM): 3329 discard the message 3331 Rule 5 (tg_NSLPData): 3332 if Q-mode encapsulation is not possible for this MRI 3333 reject message with an error 3334 else 3335 if (local policy & transfer attributes say routing 3336 state is not needed) then 3337 send message statelessly 3338 else 3339 create Querying-SM and pass message to it 3341 6.2. Query Node Processing 3343 The Querying-Node state machine (Querying-SM) has three states: 3345 o Awaiting Response 3347 o Established 3349 o Awaiting Refresh 3351 The Querying-SM is created by the Node-SM machine as a result of a 3352 request to send a message for a flow in a signalling direction where 3353 the appropriate state does not exist. The Query is generated 3354 immediately and the No_Response timer is started. The NSLP data MAY 3355 be carried in the Query if local policy and the transfer attributes 3356 allow it, otherwise it MUST be queued locally pending MA 3357 establishment. Then the machine transitions to the Awaiting Response 3358 state, in which timeout-based retransmissions are handled. Data 3359 messages (rx_Data events) should not occur in this state; if they do, 3360 this may indicate a lost Response and a node MAY retransmit a Query 3361 for this reason. 3363 Once a Response has been successfully received and routing state 3364 created, the machine transitions to Established, during which NSLP 3365 data can be sent and received normally. Further Responses received 3366 in this state (which may be the result of a lost Confirm) MUST be 3367 treated the same way. The Awaiting Refresh state can be considered 3368 as a substate of Established, where a new Query has been generated to 3369 refresh the routing state (as in Awaiting Response) but NSLP data can 3370 be handled normally. 3372 The timers relevant to this state machine are as follows: 3374 Refresh_QNode: Indicates when the routing state stored by this state 3375 machine must be refreshed. It is reset whenever a Response is 3376 received indicating that the routing state is still valid. 3377 Implementations MUST set the period of this timer based on the 3378 value in the RS-validity-time field of a Response to ensure that a 3379 Query is generated before the peer's routing state expires (see 3380 Section 4.4.4). 3382 No_Response: Indicates that a Response has not been received in 3383 answer to a Query. This is started whenever a Query is sent and 3384 stopped when a Response is received. 3386 Inactive_QNode: Indicates that no NSLP traffic is currently being 3387 handled by this state machine. This is reset whenever the state 3388 machine handles NSLP data, in either direction. When it expires, 3389 the state machine MAY be deleted. The period of the timer can be 3390 set at any time via the API (SetStateLifetime), and if the period 3391 is reset in this way the timer itself MUST be restarted. 3393 The main events (including all those that cause state transitions) 3394 are shown in the figure below, tagged with the number of the 3395 processing rule that is used to handle the event. These rules are 3396 listed after the diagram. All events not shown or described in the 3397 text above are assumed to be impossible in a correct implementation 3398 and MUST be ignored. 3400 [Initialisation] +-----+ 3401 -------------------------|Birth| 3402 | +-----+ 3403 | er_NoRSM[3](from all states) rx_Response[4] 3404 | || tg_NSLPData[5] 3405 | tg_NSLPData[1] || rx_Data[7] 3406 | -------- ------- 3407 | | V | V 3408 | | V | V 3409 | +----------+ +-----------+ 3410 ---->>| Awaiting | |Established| 3411 ------| Response |---------------------------->> | | 3412 | +----------+ rx_Response[4] +-----------+ 3413 | ^ | ^ | 3414 | ^ | ^ | 3415 | -------- | | 3416 | to_No_Response[2] | | 3417 | [!nResp_reached] tg_NSLPData[5] | | 3418 | || rx_Data[7] | | 3419 | -------- | | 3420 | | V | | 3421 | to_No_Response[2] | V | | 3422 | [nResp_reached] +-----------+ rx_Response[4] | | 3423 ---------- -----------| Awaiting |----------------- | 3424 | | | Refresh |<<------------------- 3425 | | +-----------+ to_Refresh_QNode[8] 3426 | | ^ | 3427 V V ^ | to_No_Response[2] 3428 V V -------- [!nResp_reached] 3429 +-----+ 3430 |Death|<<--------------- 3431 +-----+ to_Inactive_QNode[6] 3432 (from all states) 3434 Figure 7: Query Node State Machine 3436 The processing rules are as follows: 3438 Rule 1: Store the message for later transmission 3440 Rule 2: 3441 if number of Queries sent has reached the threshold 3442 // nQuery_isMax is true 3443 indicate No Response error to NSLP 3444 destroy self 3445 else 3446 send Query 3447 start No_Response timer with new value 3449 Rule 3: 3450 // Assume the Confirm was lost in transit or the peer has reset; 3451 // restart the handshake 3452 send Query 3453 (re)start No_Response timer 3455 Rule 4: 3456 if a new MA-SM is needed create one 3457 if the R flag was set send a Confirm 3458 send any stored Data messages 3459 stop No_Response timer 3460 start Refresh_QNode timer 3461 start Inactive_QNode timer if it was not running 3462 if there was piggybacked NSLP-Data 3463 pass it to the NSLP 3464 restart Inactive_QNOde timer 3466 Rule 5: 3467 send Data message 3468 restart Inactive_QNode timer 3470 Rule 6: Terminate 3472 Rule 7: 3473 pass any data to the NSLP 3474 restart Inactive_QNode timer 3476 Rule 8: 3477 send Query 3478 start No_Response timer 3479 stop Refresh_QNode timer 3481 6.3. Responder Node Processing 3483 The Responding-Node state machine (Responding-SM) has three states: 3485 o Awaiting Confirm 3487 o Established 3489 o Awaiting Refresh 3491 The policy governing the handling of Query messages and the creation 3492 of the Responding-SM has three cases: 3494 1. No Confirm is required for a Query, and the state machine can be 3495 created immediately. 3497 2. A Confirm is required for a Query, but the state machine can 3498 still be created immediately. A timer is used to retransmit 3499 Response messages and the Responding-SM is destroyed if no valid 3500 Confirm is received. 3502 3. A Confirm is required for a Query, and the state machine can only 3503 be created when it is received; the initial Query will have been 3504 handled by the Node level machine. 3506 In case 2 the Responding-SM is created in the Awaiting Confirm state, 3507 and remains there until a Confirm is received, at which point it 3508 transitions to Established. In cases 1 and 3 the Responding-SM is 3509 created directly in the Established state. Note that if the machine 3510 is created on receiving a Query, some of the message processing will 3511 already have been performed in the Node state machine. In principle, 3512 an implementation MAY change its policy on handling a Query message 3513 at any time; however, the state machine descriptions here cover only 3514 the case where the policy is fixed while waiting for a Confirm 3515 message. 3517 In the Established state the NSLP can send and receive data normally, 3518 and any additional rx_Confirm events MUST be silently ignored. The 3519 Awaiting Refresh state can be considered a substate of Established, 3520 where a Query has been received to begin the routing state refresh. 3521 In the Awaiting Refresh state the Responding-SM behaves as in the 3522 Awaiting Confirm state, except that the NSLP can still send and 3523 receive data. In particular, in both states there is timer-based 3524 retransmission of Response messages until a Confirm is received; 3525 additional rx_Query events in these states MUST also generate a reply 3526 and restart the no_Confirm timer. 3528 The timers relevant to the operation of this state machine are as 3529 follows: 3531 Expire_RNode: Indicates when the routing state stored by this state 3532 machine needs to be expired. It is reset whenever a Query or 3533 Confirm (depending on local policy) is received indicating that 3534 the routing state is still valid. Note that state cannot be 3535 refreshed from the R-Node. If this timer fires, the routing state 3536 machine is deleted, regardless of whether a No_Confirm timer is 3537 running. 3539 No_Confirm: Indicates that a Confirm has not been received in answer 3540 to a Response. This is started/reset whenever a Response is sent 3541 and stopped when a Confirm is received. 3543 The detailed state transitions and processing rules are described 3544 below as in the Query node case. 3546 rx_Query[1] rx_Query[5] 3547 [confirmRequired] +-----+ [!confirmRequired] 3548 -------------------------|Birth|---------------------------- 3549 | +-----+ | 3550 | | rx_Confirm[2] | 3551 | ---------------------------- | 3552 | | | 3553 | rx_Query[5] | | 3554 | tg_NSLPData[7] || rx_Confirm[10] | | 3555 | || rx_Query[1] || rx_Data[4] | | 3556 | || rx_Data[6] || tg_NSLPData[3] | | 3557 | -------- -------------- | | 3558 | | V | V V V 3559 | | V | V V V 3560 | +----------+ | +-----------+ 3561 ---->>| Awaiting | rx_Confirm[8] -----------|Established| 3562 ------| Confirm |------------------------------>> | | 3563 | +----------+ +-----------+ 3564 | ^ | ^ | 3565 | ^ | tg_NSLPData[3] ^ | 3566 | -------- || rx_Query[1] | | 3567 | to_No_Confirm[9] || rx_Data[4] | | 3568 | [!nConf_reached] -------- | | 3569 | | V | | 3570 | to_No_Confirm[9] | V | | 3571 | [nConf_reached] +-----------+ rx_Confirm[8] | | 3572 ---------- ------------| Awaiting |----------------- | 3573 | | | Refresh |<<------------------- 3574 | | +-----------+ rx_Query[1] 3575 | | ^ | [confirmRequired] 3576 | | ^ | 3577 | | -------- 3578 V V to_No_Confirm[9] 3579 V V [!nConf_reached] 3580 +-----+ 3581 |Death|<<--------------------- 3582 +-----+ er_NoRSM[11] 3583 to_Expire_RNode[11] 3584 (from Established/Awaiting Refresh) 3586 Figure 8: Responder Node State Machine 3588 The processing rules are as follows: 3590 Rule 1: 3591 // a Confirm is required 3592 send Response with R=1 3593 (re)start No_Confirm timer with the initial timer value 3594 Rule 2: 3595 pass any NSLP-Data object to the NSLP 3596 start Expire_RNode timer 3598 Rule 3: send the Data message 3600 Rule 4: pass data to NSLP 3602 Rule 5: 3603 // no Confirm is required 3604 send Response with R=0 3605 start Expire_RNode timer 3607 Rule 6: 3608 drop incoming data 3609 send "No Routing State" error message 3611 Rule 7: store Data message 3613 Rule 8: 3614 pass any NSLP-Data object to the NSLP 3615 send any stored Data messages 3616 stop No_Confirm timer 3617 start Expire_RNode timer 3619 Rule 9: 3620 if number of Responses sent has reached threshold 3621 // nResp_isMax is true 3622 destroy self 3623 else 3624 send Response 3625 start No_Response timer 3627 Rule 10: 3628 // can happen e.g. a retransmitted Response causes a duplicate Confirm 3629 silently ignore 3631 Rule 11: destroy self 3633 6.4. Messaging Association Processing 3635 Messaging associations (MAs) are modelled for use within GIST with a 3636 simple three-state process. The Awaiting Connection state indicates 3637 that the MA is waiting for the connection process(es) for every 3638 protocol in the messaging association to complete; this might involve 3639 creating listening endpoints or attempting active connects. Timers 3640 may also be necessary to detect connection failure (e.g. no incoming 3641 connection within a certain period), but these are not modelled 3642 explicitly. 3644 The Connected state indicates that the MA is open and ready to use, 3645 and that the node wishes it to remain open. In this state, the node 3646 operates a timer (SendHello) to ensure that messages are regularly 3647 sent to the peer, to ensure that the peer does not tear the MA down. 3648 The node transitions from Connected to Idle (indicating that it no 3649 longer needs the association) as a matter of local policy; one way to 3650 manage the policy is to use an activity timer but this is not 3651 specified explicitly by the state machine (see also Section 4.4.5). 3653 In the Idle state, the node no longer requires the messaging 3654 association but the peer still requires it and is indicating this by 3655 sending periodic MA-Hello messages. A different timer (NoHello) 3656 operates to purge the MA when these messages stop arriving. If real 3657 data is transferred over the MA, the state machine transitions back 3658 to Connected. 3660 At any time in the Connected or Idle states, a node MAY test the 3661 connectivity to its peer and the liveness of the GIST instance at 3662 that peer by sending a MA-Hello request with R=1. Failure to receive 3663 a reply with a matching Hello-ID within a timeout MAY be taken as a 3664 reason to trigger er_MAFailure. Initiation of such a test and the 3665 timeout setting are left to the discretion of the implementaion. 3666 Note that er_MAFailure may also be signalled by indications from the 3667 underlying messaging association protocols. If a messaging 3668 association fails, this MUST be indicated back to the routing state 3669 machines which use it, and these MAY generate indications to 3670 signalling applications. In particular, if the messaging association 3671 was being used to deliver messages reliably, this MUST be reported as 3672 a NetworkNotification error (Appendix B.4). 3674 Clearly, many internal details of the messaging association protocols 3675 are hidden in this model, especially where the messaging association 3676 uses multiple protocol layers. Note also that although the existence 3677 of messaging associations is not directly visible to signalling 3678 applications, there is some interaction between the two because 3679 security-related information becomes available during the open 3680 process, and this may be indicated to signalling applications if they 3681 have requested it. 3683 The timers relevant to the operation of this state machine are as 3684 follows: 3686 SendHello: Indicates that an MA-Hello message should be sent to the 3687 remote node. The period of this timer is determined by the MA- 3688 Hold-Time sent by the remote node during the Query/Response/ 3689 Confirm exchange. 3691 NoHello: Indicates that no MA-Hello has been received from the 3692 remote node for a period of time. The period of this timer is 3693 sent to the remote node as the MA-Hold-Time during the Query/ 3694 Response exchange. 3696 The detailed state transitions and processing rules are described 3697 below as in the Query node case. 3699 [Initialisation] +-----+ 3700 ----------------------------|Birth| 3701 | +-----+ tg_RawData[1] 3702 | || rx_Message[2] 3703 | || rx_MA-Hello[3] 3704 | tg_RawData[5] || to_SendHello[4] 3705 | -------- -------- 3706 | | V | V 3707 | | V | V 3708 | +----------+ +-----------+ 3709 ---->>| Awaiting | tg_Connected[6] | Connected | 3710 ------|Connection|----------------------->>| | 3711 | +----------+ +-----------+ 3712 | ^ | 3713 | tg_RawData[1] ^ | 3714 | || rx_Message[2] | | tg_MAIdle[7] 3715 | | V 3716 | | V 3717 | er_MAConnect[8] +-----+ to_NoHello[8] +-----------+ 3718 ---------------->>|Death|<<----------------| Idle | 3719 +-----+ +-----------+ 3720 ^ ^ | 3721 ^ ^ | 3722 --------------- -------- 3723 er_MAFailure[8] rx_MA-Hello[9] 3724 (from Connected/Idle) 3726 Figure 9: Messaging Association State Machine 3728 The processing rules are as follows: 3730 Rule 1: 3731 pass message to transport layer 3732 if the NoHello timer was running, stop it 3733 (re)start SendHello 3735 Rule 2: 3736 pass message to Node-SM, or R-SM (for a Confirm), 3737 or Q-SM (for a Response) 3738 if the NoHello timer was running, stop it 3739 Rule 3: 3740 if reply requested 3741 send MA-Hello 3742 restart SendHello timer 3744 Rule 4: 3745 send MA-Hello message 3746 restart SendHello timer 3748 Rule 5: queue message for later transmission 3750 Rule 6: 3751 pass outstanding queued messages to transport layer 3752 stop any timers controlling connection establishment 3753 start SendHello timer 3755 Rule 7: 3756 stop SendHello timer 3757 start NoHello timer 3759 Rule 8: 3760 report failure to routing state machines and signalling applications 3761 destroy self 3763 Rule 9: 3764 if reply requested 3765 send MA-Hello 3766 restart NoHello timer 3768 7. Additional Protocol Features 3770 7.1. Route Changes and Local Repair 3772 7.1.1. Introduction 3774 When IP layer re-routing takes place in the network, GIST and 3775 signalling application state need to be updated for all flows whose 3776 paths have changed. The updates to signalling application state 3777 depend mainly on the signalling application: for example, if the path 3778 characteristics have actually changed, simply moving state from the 3779 old to the new path is not sufficient. Therefore, GIST cannot carry 3780 out the complete path update processing. Its responsibilities are to 3781 detect the route change, update its local routing state consistently, 3782 and inform interested signalling applications at affected nodes. 3784 xxxxxxxxxxxxxxxxxxxxxxxxxxxx 3785 x +--+ +--+ +--+ x Initial 3786 x .|C1|_.....|D1|_.....|E1| x Configuration 3787 x . +--+. .+--+. .+--+\. x 3788 >>xxxxxxxxxxxxx . . . . . . xxxxxx>> 3789 +-+ +-+ . .. .. . +-+ 3790 ...|A|_......|B|/ .. .. .|F|_.... 3791 +-+ +-+ . . . . . . +-+ 3792 . . . . . . 3793 . +--+ +--+ +--+ . 3794 .|C2|_.....|D2|_.....|E2|/ 3795 +--+ +--+ +--+ 3797 +--+ +--+ +--+ Configuration 3798 .|C1|......|D1|......|E1| after failure 3799 . +--+ .+--+ +--+ of E1-F link 3800 . \. . \. ./ 3801 +-+ +-+ . .. .. +-+ 3802 ...|A|_......|B|. .. .. .|F|_.... 3803 +-+ +-+\ . . . . . +-+ 3804 >>xxxxxxxxxxxxx . . . . . . xxxxxx>> 3805 x . +--+ +--+ +--+ . x 3806 x .|C2|_.....|D2|_.....|E2|/ x 3807 x +--+ +--+ +--+ x 3808 xxxxxxxxxxxxxxxxxxxxxxxxxxxx 3810 ........... = physical link topology 3811 >>xxxxxxx>> = flow direction 3812 _.......... = outgoing link for flow xxxxxx given 3813 by local forwarding table 3815 Figure 10: A Re-Routing Event 3817 Route change management is complicated by the distributed nature of 3818 the problem. Consider the re-routing event shown in Figure 10. An 3819 external observer can tell that the main responsibility for 3820 controlling the updates will probably lie with nodes B and F; 3821 however, E1 is best placed to detect the event quickly at the GIST 3822 level, and C1 and D1 could also attempt to initiate the repair. 3824 The NSIS framework [30] makes the assumption that signalling 3825 applications are soft-state based and operate end to end. In this 3826 case, because GIST also periodically updates its picture of routing 3827 state, route changes will eventually be repaired automatically. The 3828 specification as already given includes this functionality. However, 3829 especially if upper layer refresh times are extended to reduce 3830 signalling load, the duration of inconsistent state may be very long 3831 indeed. Therefore, GIST includes logic to exchange prompt 3832 notifications with signalling applications, to allow local repair if 3833 possible. The additional mechanisms to achieve this are described in 3834 the following subsections. To a large extent, these additions can be 3835 seen as implementation issues; the protocol messages and their 3836 significance are not changed, but there are extra interactions 3837 through the API between GIST and signalling applications, and 3838 additional triggers for transitions between the various GIST states. 3840 7.1.2. Route Change Detection Mechanisms 3842 There are two aspects to detecting a route change at a single node: 3844 o Detecting that the outgoing path, in the direction of the Query, 3845 has or may have changed. 3847 o Detecting that the incoming path, in the direction of the 3848 Response, has (or may have) changed, in which case the node may no 3849 longer be on the path at all. 3851 At a single node, these processes are largely independent, although 3852 clearly a change in one direction at a node corresponds to a change 3853 in the opposite direction at its peer. Note that there are two 3854 possible forms for a route change: the interface through which a flow 3855 leaves or enters a node may change, and the adjacent peer may change. 3856 In general, a route change can include one or the other or both (or 3857 indeed neither, although such changes are very hard to detect). 3859 The route change detection mechanisms available to a node depend on 3860 the MRM in use and the role the node played in setting up the routing 3861 state in the first place (i.e. as Querying or Responding node). The 3862 following discussion is specific to the case of the path-coupled MRM 3863 using downstream Queries only; other scenarios may require other 3864 methods. However, the repair logic described in the subsequent 3865 subsections is intended to be universal. 3867 There are five mechanisms for a node to detect that a route change 3868 has occurred, which are listed below. They apply differently 3869 depending on whether the change is in the Query or Response 3870 direction, and these differences are summarised in the following 3871 table. 3873 Local Trigger: In local trigger mode, GIST finds out from the local 3874 forwarding table that the next hop has changed. This only works 3875 if the routing change is local, not if it happens a few IP routing 3876 hops away, including the case that it happens at a GIST-unaware 3877 node. 3879 Extended Trigger: Here, GIST checks a link-state topology database 3880 to discover that the path has changed. This makes certain 3881 assumptions on consistency of IP route computation and only works 3882 within a single area for OSPF [17] and similar link-state 3883 protocols. Where available, this offers the most accurate and 3884 rapid indication of route changes, but requires more access to the 3885 routing internals than a typical operating system may provide. 3887 GIST C-mode Monitoring: GIST may find that C-mode packets are 3888 arriving (from either peer) with a different IP layer TTL or on a 3889 different interface. This provides no direct information about 3890 the new flow path, but indicates that routing has changed and that 3891 rediscovery may be required. 3893 Data Plane Monitoring: The signalling application on a node may 3894 detect a change in behaviour of the flow, such as IP layer TTL 3895 change, arrival on a different interface, or loss of the flow 3896 altogether. The signalling application on the node is allowed to 3897 notify this information locally to GIST (Appendix B.6). 3899 GIST Probing: According to the specification, each GIST node MUST 3900 periodically repeat the discovery (Query/Response) operation. 3901 Values for the probe frequency are discussed in Section 4.4.4. 3902 The period can be negotiated independently for each GIST hop, so 3903 nodes that have access to the other techniques listed above MAY 3904 use long periods between probes. The querying node will discover 3905 the route change by a modification in the Network-Layer- 3906 Information in the Response. The responding node can detect a 3907 change in the upstream peer similarly; further, if the responding 3908 node can store the interface on which Queries arrive, it can 3909 detect if this interface changes even when the peer does not. 3911 +-------------+--------------------------+--------------------------+ 3912 | Method | Query direction | Response direction | 3913 +-------------+--------------------------+--------------------------+ 3914 | Local | Discovers new interface | Not applicable | 3915 | Trigger | (and peer if local) | | 3916 | | | | 3917 | Extended | Discovers new interface | May determine that route | 3918 | Trigger | and may determine new | from peer will have | 3919 | | peer | changed | 3920 | | | | 3921 | C-mode | Provides hint that | Provides hint that | 3922 | Monitoring | change has occurred | change has occurred | 3923 | | | | 3924 | Data Plane | Not applicable | NSLP informs GIST that a | 3925 | Monitoring | | change may have occurred | 3926 | | | | 3927 | Probing | Discovers changed NLI in | Discovers changed NLI in | 3928 | | Response | Query | 3929 +-------------+--------------------------+--------------------------+ 3931 7.1.3. GIST Behaviour Supporting Re-Routing 3933 The basic GIST behaviour necessary to support re-routing can be 3934 modelled using a 3-level classification of the validity of each item 3935 of current routing state. (In addition to current routing state, 3936 NSIS can maintain past routing state, described in Section 7.1.4 3937 below.) This classification applies separately to the Querying and 3938 Responding node for each pair of GIST peers. The levels are: 3940 Bad: The routing state is either missing altogether, or not safe to 3941 use to send data. 3943 Tentative: The routing state may have changed, but it is still 3944 usable for sending NSLP data pending verification. 3946 Good: The routing state has been established and no events affecting 3947 it have since been detected. 3949 These classifications are not identical to the states described in 3950 Section 6, but there are dependencies between them. Specifically, 3951 routing state is considered Bad until the state machine first enters 3952 the Established state, at which point it becomes Good. Thereafter, 3953 the status may be invalidated for any of the reasons discussed above; 3954 it is an implementation issue to decide which techniques to implement 3955 in any given node, and how to reclassify routing state (as Bad or 3956 Tentative) for each. The status returns to Good, either when the 3957 state machine re-enters the Established state, or if GIST can 3958 determine from direct examination of the IP routing or forwarding 3959 tables that the peer has not changed. When the status returns to 3960 Good, GIST MUST if necessary update its routing state table so that 3961 the relationships between MRI/SID/NSLPID tuples and messaging 3962 associations are up to date. 3964 When classification of the routing state for the downstream direction 3965 changes to Bad/Tentative because of local IP routing indications, 3966 GIST MAY automatically change the classification in the upstream 3967 direction to Tentative unless local routing indicates that this is 3968 not necessary. This SHOULD NOT be done in the case where the initial 3969 change was indicated by the signalling application. This mechanism 3970 accounts for the fact that a routing change may affect several nodes, 3971 and so can be an indication that upstream routing may also have 3972 changed. In any case, whenever GIST updates the routing status, it 3973 informs the signalling application with the NetworkNotification API 3974 (Appendix B.4), unless the change was caused via the API in the first 3975 place. 3977 The GIST behaviour for state repair is different for the Querying and 3978 Responding node. At the Responding node, there is no additional 3979 behaviour, since the Responding node cannot initiate protocol 3980 transitions autonomously, it can only react to the Querying node. 3981 The Querying node has three options, depending on how the transition 3982 from 'Good' was initially caused: 3984 1. To inspect the IP routing/forwarding table and verifying that the 3985 next peer has not changed. This technique MUST NOT be used if 3986 the transition was caused by a signalling application, but SHOULD 3987 be used otherwise if available. 3989 2. To move to the 'Awaiting Refresh' state. This technique MUST NOT 3990 be used if the current status is 'Bad', since data is being 3991 incorrectly delivered. 3993 3. To move to the 'Awaiting Response' state. This technique may be 3994 used at any time, but has the effect of freezing NSLP 3995 communication while GIST state is being repaired. 3997 The second and third techniques trigger the execution of a GIST 3998 handshake to carry out the repair. It may be desirable to delay the 3999 start of the handshake process, either to wait for the network to 4000 stabilise, to avoid flooding the network with Query traffic for a 4001 large number of affected flows, or to wait for confirmation that the 4002 node is still on the path from the upstream peer. One approach is to 4003 delay the handshake until there is NSLP data to be transmitted. 4004 Implementation of such delays is a matter of local policy; however, 4005 GIST MUST begin the handshake immediately if the status change was 4006 caused by an InvalidateRoutingState API call marked as 'Urgent', and 4007 SHOULD begin it if the upstream routing state is still known to be 4008 Good. 4010 7.1.4. Load Splitting and Route Flapping 4012 The Q-mode encapsulation rules of Section 5.8 try to ensure that the 4013 Query messages discovering the path mimic the flow as accurately as 4014 possible. However, in environments where there is load balancing 4015 over multiple routes, and this is based on header fields differing 4016 between flow and Q-mode packets or done on a round-robin basis, the 4017 path discovered by the Query may vary from one handshake to the next 4018 even though the underlying network is stable. This will appear to 4019 GIST as a route flap; route flapping can also be caused by problems 4020 in the basic network connectivity or routing protocol operation. For 4021 example, a mobile node might be switching back and forth between two 4022 links, or might appear to have disappeared even though it is still 4023 attached to the network via a different route. 4025 This specification does not define mechanisms for GIST to manage 4026 multiple parallel routes or an unstable route; instead, GIST MAY 4027 expose this to the NSLP, which can then manage it according to 4028 signalling application requirements. The algorithms already 4029 described always maintain the concept of the current route, i.e. the 4030 latest peer discovered for a particular flow. Instead, GIST allows 4031 the use of prior signalling paths for some period while the 4032 signalling applications still need them. Since NSLP peers are a 4033 single GIST hop apart, the necessary information to represent a path 4034 can be just an entry in the node's routing state table for that flow 4035 (more generally, anything that uniquely identifies the peer, such as 4036 the NLI, could be used). Rather than requiring GIST to maintain 4037 multiple generations of this information, it is provided to the 4038 signalling application in the same node in an opaque form for each 4039 message that is received from the peer. The signalling application 4040 can store it if necessary and provide it back to the GIST layer in 4041 case it needs to be used. Because this is a reference to information 4042 about the source of a prior signalling message, it is denoted 'SII- 4043 Handle' (for Source Identification Information) in the abstract API 4044 of Appendix B. 4046 Note that GIST if possible SHOULD use the same SII-Handle for 4047 multiple sessions to the same peer, since this then allows signalling 4048 applications to aggregate some signalling, such as summary refreshes 4049 or bulk teardowns. Messages sent using the SII-Handle MUST bypass 4050 the routing state tables at the sender, and this MUST be indicated by 4051 setting the E flag in the common header (Appendix A.1). Messages 4052 other than Data messages MUST NOT be sent in this way. At the 4053 receiver, GIST MUST NOT validate the MRI/SID/NSLPID against local 4054 routing state and instead indicates the mode of reception to 4055 signalling applications through the API (Appendix B.2). Signalling 4056 applications should validate the source and effect of the message 4057 themselves, and if appropriate should in particular indicate to GIST 4058 (see Appendix B.5) that routing state is no longer required for this 4059 flow. This is necessary to prevent GIST in nodes on the old path 4060 initiating routing state refresh and thus causing state conflicts at 4061 the crossover router. 4063 GIST notifies signalling applications about route modifications as 4064 two types of event, additions and deletions. An addition is notified 4065 as a change of the current routing state according to the Bad/ 4066 Tentative/Good classification above, while deletion is expressed as a 4067 statement that an SII-Handle no longer lies on the path. Both can be 4068 reported through the NetworkNotification API call (Appendix B.4). A 4069 minimal implementation MAY notify a route change as a single (add, 4070 delete) operation; however, a more sophisticated implementation MAY 4071 delay the delete notification, for example if it knows that the old 4072 route continues to be used in parallel, or that the true route is 4073 flapping between the two. It is then a matter of signalling 4074 application design whether to tear down state on the old path, leave 4075 it unchanged, or modify it in some signalling application specific 4076 way to reflect the fact that multiple paths are operating in 4077 parallel. 4079 7.1.5. Signalling Application Operation 4081 Signalling applications can use these functions as provided by GIST 4082 to carry out rapid local repair following re-routing events. The 4083 signalling application instances carry out the multi-hop aspects of 4084 the procedure, including crossover node detection, and tear-down/ 4085 reinstallation of signalling application state; they also trigger 4086 GIST to carry out the local routing state maintenance operations over 4087 each individual hop. The local repair procedures depend heavily on 4088 the fact that stateful NSLP nodes are a single GIST hop apart; this 4089 is enforced by the details of the GIST peer discovery process. 4091 The following outline description of a possible set of NSLP actions 4092 takes the scenario of Figure 10 as an example. 4094 1. The signalling application at node E1 is notified by GIST of 4095 route changes affecting the downstream and upstream directions. 4096 The downstream status was updated to Bad because of a trigger 4097 from the local forwarding tables, and the upstream status changed 4098 automatically to Tentative as a consequence. The signalling 4099 application at E1 MAY begin local repair immediately, or MAY 4100 propagate a notification upstream to D1 that re-routing has 4101 occurred. 4103 2. The signalling application at node D1 is notified of the route 4104 change, either by signalling application notifications or from 4105 the GIST level (e.g. by a trigger from a link-state topology 4106 database). If the information propagates faster within the IP 4107 routing protocol, GIST will change the upstream/downstream 4108 routing state to Tentative/Bad automatically, and this will cause 4109 the signalling application to propagate the notification further 4110 upstream. 4112 3. This process continues until the notification reaches node A. 4113 Here, there is no downstream routing change, so GIST only learns 4114 of the update via the signalling application trigger. Since the 4115 upstream status is still Good, it therefore begins the repair 4116 handshake immediately. 4118 4. The handshake initiated by node A causes its downstream routing 4119 state to be confirmed as Good and unchanged there; it also 4120 confirms the (Tentative) upstream routing state at B as Good. 4121 This is enough to identify B as the crossover router, and the 4122 signalling application and GIST can begin the local repair 4123 process. 4125 An alternative way to reach step (4) is that node B is able to 4126 determine autonomously that there is no likelihood of an upstream 4127 route change. For example, it could be an area border router and the 4128 route change is only intra-area. In this case, the signalling 4129 application and GIST will see that the upstream state is Good and can 4130 begin the local repair directly. 4132 After a route deletion, a signalling application may wish to remove 4133 state at another node which is no longer on the path. However, since 4134 it is no longer on the path, in principle GIST can no longer send 4135 messages to it. In general, provided this state is soft, it will 4136 time out anyway; however, the timeouts involved may have been set to 4137 be very long to reduce signalling load. Instead, signalling 4138 applications MAY use the SII-Handle described above to route explicit 4139 teardown messages. 4141 7.2. NAT Traversal 4143 GIST messages, for example for the path-coupled MRM, must carry 4144 addressing and higher layer information as payload data in order to 4145 define the flow signalled for. (This applies to all GIST messages, 4146 regardless of how they are encapsulated or which direction they are 4147 travelling in.) At an addressing boundary the data flow packets will 4148 have their headers translated; if the signalling payloads are not 4149 translated consistently, the signalling messages will refer to 4150 incorrect (and probably meaningless) flows after passing through the 4151 boundary. In addition, GIST handshake messages carry additional 4152 addressing information about the GIST nodes themselves, and this must 4153 also be processed appropriately when traversing a NAT. 4155 There is a dual problem of whether the GIST peers either side of the 4156 boundary can work out how to address each other, and whether they can 4157 work out what translation to apply to the signalling packet payloads. 4158 Existing generic NAT traversal techniques such as STUN [27] or TURN 4159 [28] can operate only on the two addresses visible in the IP header. 4160 It is therefore intrinsically difficult to use these techniques to 4161 discover a consistent translation of the three or four interdependent 4162 addresses for the flow and signalling source and destination. 4164 For legacy NATs and MRMs that carry addressing information, the base 4165 GIST specification is therefore limited to detecting the situation 4166 and triggering the appropriate error conditions to terminate the 4167 signalling path. (MRMs that do not contain addressing information 4168 could traverse such NATs safely, with some modifications to the GIST 4169 processing rules. Such modifications could be described in the 4170 documents defining such MRMs.) Legacy NAT handling is covered in 4171 Section 7.2.1 below. A more general solution can be constructed 4172 using GIST-awareness in the NATs themselves; this solution is 4173 outlined in Section 7.2.2 with processing rules in Section 7.2.3. 4175 In all cases, GIST interaction with the NAT is determined by the way 4176 the NAT handles the Query/Response messages in the initial GIST 4177 handshake; these messages are UDP datagrams. Best current practice 4178 for NAT treatment of UDP traffic is defined in [39], and the legacy 4179 NAT handling defined in this specification is fully consistent with 4180 that document. The GIST-aware NAT traversal technique is equivalent 4181 to requiring an Application Layer Gateway in the NAT for a specific 4182 class of UDP transactions, namely those where the destination UDP 4183 port for the initial message is the GIST port (see Section 9). 4185 7.2.1. Legacy NAT Handling 4187 Legacy NAT detection during the GIST handshake depends on analysis of 4188 the IP header and S flag in the GIST common header, and the NLI 4189 object included in the handshake messages. The message sequence 4190 proceeds differently depending on whether the Querying node is on the 4191 internal or external side of the NAT. 4193 For the case of the Querying node on the internal side of the NAT, if 4194 the S flag is not set in the Query (S=0), a legacy NAT cannot be 4195 detected. The receiver will generate a normal Response to the 4196 interface-address given in the NLI in the Query, but the interface- 4197 address will not be routable and the Response will not be delivered. 4198 If retransmitted Queries keep S=0, this behaviour will persist until 4199 the Querying node times out. The signalling path will thus terminate 4200 at this point, not traversing the NAT. 4202 The situation changes once S=1 in a Query; note the Q-mode 4203 encapsulation rules recommend that S=1 is used at least for some 4204 retransmissions (see Section 5.8). If S=1, the receiver MUST check 4205 the source address in the IP header against the interface-address in 4206 the NLI, and if these addresses do not match this indicates that a 4207 legacy NAT has been found. For MRMs which contain addressing 4208 information that needs translation, legacy NAT traversal is not 4209 possible. The receiver MUST return an "Object Type Error" message 4210 (Appendix A.4.4.9) with subcode 4 ("Untranslated Object") indicating 4211 the MRI as the object in question. The error message MUST be 4212 addressed to the source address from the IP header of the incoming 4213 message. The Responding node SHOULD use the destination IP address 4214 of the original datagram as the source address for IP header of the 4215 Response; this makes it more likely that the NAT will accept the 4216 incoming message, since it looks like a normal UDP/IP request/reply 4217 exchange. If this message is able to traverse back through the NAT, 4218 the Querying node will terminate the handshake immediately; 4219 otherwise, this reduces to the previous case of a lost Response and 4220 the Querying node will give up on reaching its retransmission limit. 4222 When the Querying node is on the external side of the NAT, the Query 4223 will only traverse the NAT if some static configuration has been 4224 carried out on the NAT to forward GIST Q-mode traffic to a node on 4225 the internal network. Regardless of the S-flag in the Query, the 4226 Responding node cannot directly detect the presence of the NAT. It 4227 MUST send a normal Response with S=1 to an address derived from the 4228 Querying node's NLI which will traverse the NAT as normal UDP 4229 traffic. The Querying node MUST check the source address in the IP 4230 header with the NLI in the Response, and when it finds a mismatch it 4231 MUST terminate the handshake. 4233 Note that in either of the error cases (internal or external Querying 4234 node), an alternative to terminating the handshake could be to invoke 4235 some legacy NAT traversal procedure. This specification does not 4236 define any such procedure, although one possible approach is 4237 described in [45]. Any such traversal procedure MUST be incorporated 4238 into GIST using the existing GIST extensibility capabilities. Note 4239 also that this detection process only functions with the handshake 4240 exchange; it cannot operate on simple Data messages, whether they are 4241 Q-mode or normally encapsulated. Nodes SHOULD NOT send Data messages 4242 outside a messaging association if they cannot ensure that they are 4243 operating in an environment free of legacy NATs. 4245 7.2.2. GIST-aware NAT Traversal 4247 The most robust solution to the NAT traversal problem is to require 4248 that a NAT is GIST-aware, and to allow it to modify messages based on 4249 the contents of the MRI. This makes the assumption that NATs only 4250 rewrite the header fields included in the MRI, and not other higher 4251 layer identifiers. Provided this is done consistently with the data 4252 flow header translation, signalling messages will be valid each side 4253 of the boundary, without requiring the NAT to be signalling 4254 application aware. Note, however, that if the NAT does not 4255 understand the MRI, and the N-flag in the MRI is clear (see 4256 Appendix A.3.1), it should reject the message with an "Object Type 4257 Error" message (Appendix A.4.4.9) with subcode 4 ("Untranslated 4258 Object"). 4260 This specification defines an additional object that a NAT inserts 4261 into all Q-mode encapsulated messages and which is echoed back in any 4262 replies, i.e. Response or Error messages. NATs apply GIST-specific 4263 processing only to Q-mode encapsulated messages or replies carrying 4264 the NAT traversal object. All other GIST messages, either in C-mode, 4265 or D-mode messages with no NAT-Traversal object, should be treated as 4266 normal data traffic by the NAT, i.e. with IP and transport layer 4267 header translation but no GIST-specific processing. 4269 The new object, the NAT-Traversal object (Appendix A.3.9), carries 4270 the translation between the MRIs which are appropriate for the 4271 internal and external sides of the NAT. It also carries a list of 4272 which other objects in the message have been translated. This should 4273 always include the NLI, and the Stack-Configuration-Data if present; 4274 if GIST is extended with further objects that carry addressing data, 4275 this list allows a message receiver to know if the new objects were 4276 supported by the NAT. Finally, the NAT-Traversal object MAY be used 4277 to carry data to assist the NAT in back-translating D-mode responses; 4278 this could be the original NLI or SCD, or opaque equivalents in the 4279 case of topology hiding. 4281 A consequence of this approach is that the routing state tables at 4282 the signalling application peers each side of the NAT are no longer 4283 directly compatible. In particular, they use different MRI values to 4284 refer to the same flow. However, subsequent messages after the 4285 Query/Response (Data messages and the initial Confirm) need to use a 4286 common MRI, since the NAT does not rewrite these, and this is chosen 4287 to be the MRI of the Querying node. It is the responsibility of the 4288 Responding node to translate between the two MRIs on inbound and 4289 outbound messages, which is why the unmodified MRI is propagated in 4290 the NAT-Traversal object. 4292 7.2.3. Message Processing Rules 4294 This specification normatively defines the behaviour of a GIST node 4295 receiving a message containing a NAT-Traversal object. However, it 4296 does not define normative behaviour for a NAT translating GIST 4297 messages, since much of this will depend on NAT implementation and 4298 policy about allocating bindings. In addition, it is not necessary 4299 for a GIST implementation itself. Therefore, those aspects of the 4300 following description are informative; full details of NAT behaviour 4301 for handling GIST messages can be found in [46]. 4303 A possible set of operations for a NAT to process a Q-mode 4304 encapsulated message is as follows. Note that for a Data message, 4305 only a subset of the operations is applicable. 4307 1. Verify that bindings for any data flow are actually in place. 4309 2. Create a new Message-Routing-Information object with fields 4310 modified according to the data flow bindings. 4312 3. Create bindings for subsequent C-mode signalling based on the 4313 information in the Network-Layer-Information and Stack- 4314 Configuration-Data objects. 4316 4. Create new Network-Layer-Information and if necessary Stack- 4317 Configuration-Data objects with fields to force D-mode response 4318 messages through the NAT, and to allow C-mode exchanges using the 4319 C-mode signalling bindings. 4321 5. Add a NAT-Traversal object, listing the objects which have been 4322 modified and including the unmodified MRI and any other data 4323 needed to interpret the response. If a NAT-Traversal object is 4324 already present, in the case of a sequence of NATs, the list of 4325 modified objects may be updated and further opaque data added, 4326 but the MRI contained in it is left unchanged. 4328 6. Encapsulate the message according to the normal rules of this 4329 specification for the Q-mode encapsulation. If the S-flag was 4330 set in the original message, the same IP source address selection 4331 policy should be applied to the forwarded message. 4333 7. Forward the message with these new payloads. 4335 A GIST node receiving such a message MUST verify that all mandatory 4336 objects containing addressing have been translated correctly, or else 4337 reject the message with an "Object Type Error" message 4338 (Appendix A.4.4.9) with subcode 4 ("Untranslated Object"). The error 4339 message MUST include the NAT-Traversal object as the first TLV after 4340 the common header, and this is also true for any other error message 4341 generated as a reply. Otherwise, the message is processed 4342 essentially as normal. If no state needs to be updated for the 4343 message, the NAT-Traversal object can be effectively ignored. The 4344 other possibility is that a Response must be returned, either because 4345 the message is the beginning of a handshake for a new flow, or it is 4346 a refresh for existing state. In both cases, the GIST node MUST 4347 create the Response in the normal way using the local form of the 4348 MRI, and its own NLI and (if necessary) SCD. It MUST also include 4349 the NAT-Traversal object as the first object in the Response after 4350 the common header. 4352 A NAT will intercept D-mode messages with the normal encapsulation 4353 containing such echoed NAT-Traversal objects. The NAT processing is 4354 a subset of the processing for the Q-mode encapsulated case: 4356 1. Verify the existence of bindings for the data flow. 4358 2. Leave the Message-Routing-Information object unchanged. 4360 3. Modify the NLI and SCD objects for the Responding node if 4361 necessary, and create or update any bindings for C-mode 4362 signalling traffic. 4364 4. Forward the message. 4366 A GIST node receiving such a message (Response or Error) MUST use the 4367 MRI from the NAT-Traversal object as the key to index its internal 4368 routing state; it MAY also store the translated MRI for additional 4369 (e.g. diagnostic) information, but this is not used in the GIST 4370 processing. The remainder of GIST processing is unchanged. 4372 Note that Confirm messages are not given GIST-specific processing by 4373 the NAT. Thus, a Responding node which has delayed state 4374 installation until receiving the Confirm, only has available the 4375 untranslated MRI describing the flow, and the untranslated NLI as 4376 peer routing state. This would prevent the correct interpretation of 4377 the signalling messages; also, subsequent Query (refresh) messages 4378 would always be seen as route changes because of the NLI change. 4379 Therefore, a Responding node that wishes to delay state installation 4380 until receiving a Confirm must somehow reconstruct the translations 4381 when the Confirm arrives. How to do this is an implementation issue; 4382 one approach is to carry the translated objects as part of the 4383 Responder cookie which is echoed in the Confirm. Indeed, for one of 4384 the cookie constructions in Section 8.5 this is automatic. 4386 7.3. Interaction with IP Tunnelling 4388 The interaction between GIST and IP tunnelling is very simple. An IP 4389 packet carrying a GIST message is treated exactly the same as any 4390 other packet with the same source and destination addresses: in other 4391 words, it is given the tunnel encapsulation and forwarded with the 4392 other data packets. 4394 Tunnelled packets will not be identifiable as GIST messages until 4395 they leave the tunnel, since the GIST protocol encapsulation (e.g. 4396 port numbers) will be hidden within the standard tunnel 4397 encapsulation. If signalling is needed for the tunnel itself, this 4398 has to be initiated as a separate signalling session by one of the 4399 tunnel endpoints - that is, the tunnel counts as a new flow. Because 4400 the relationship between signalling for the microflow and signalling 4401 for the tunnel as a whole will depend on the signalling application 4402 in question, it is a signalling application responsibility to be 4403 aware of the fact that tunnelling is taking place and to carry out 4404 additional signalling if necessary; in other words, at least one 4405 tunnel endpoint must be signalling application aware. 4407 In some cases, it is the tunnel exit point (i.e. the node where 4408 tunnelled data and downstream signalling packets leave the tunnel) 4409 that will wish to carry out the tunnel signalling, but this node will 4410 not have knowledge or control of how the tunnel entry point is 4411 carrying out the data flow encapsulation. The information about how 4412 the inner MRI/SID relate to the tunnel MRI/SID needs to be carried in 4413 the signalling data from the tunnel entry point; this functionality 4414 is the equivalent to the RSVP SESSION_ASSOC object of [19]. In the 4415 NSIS protocol suite, these bindings are managed by the signalling 4416 applications, either implicitly (e.g. by SID re-use) or explicitly by 4417 carrying objects that bind the inner and outer SIDs as part of the 4418 NSLP payload. 4420 7.4. IPv4-IPv6 Transition and Interworking 4422 GIST itself is essentially IP version neutral: version dependencies 4423 are isolated in the formats of the Message-Routing-Information, 4424 Network-Layer-Information and Stack-Configuration-Data objects, and 4425 GIST also depends on the version independence of the protocols that 4426 support messaging associations. In mixed environments, GIST 4427 operation will be influenced by the IP transition mechanisms in use. 4428 This section provides a high level overview of how GIST is affected, 4429 considering only the currently predominant mechanisms. 4431 Dual Stack: (As described in [36].) In mixed environments, GIST 4432 MUST use the same IP version for Q-mode encapsulated messages as 4433 given by the MRI of the flow it is signalling for, and SHOULD do 4434 so for other signalling also (see Section 5.2.2). Messages with 4435 mismatching versions MUST be rejected with an "MRI Validation 4436 Failure" error message (Appendix A.4.4.12) with subcode 1 ("IP 4437 Version Mismatch"). The IP version used in D-mode is closely tied 4438 to the IP version used by the data flow, so it is intrinsically 4439 impossible for an IPv4-only or IPv6-only GIST node to support 4440 signalling for flows using the other IP version. Hosts which are 4441 dual stack for applications and routers which are dual stack for 4442 forwarding need GIST implementations which can support both IP 4443 versions. Applications with a choice of IP versions might select 4444 a version based on which could be supported in the network by 4445 GIST, which could be established by invoking parallel discovery 4446 procedures. 4448 Packet Translation: (Applicable to SIIT [8].) Some transition 4449 mechanisms allow IPv4 and IPv6 nodes to communicate by placing 4450 packet translators between them. From the GIST perspective, this 4451 should be treated essentially the same way as any other NAT 4452 operation (e.g. between internal and external addresses) as 4453 described in Section 7.2. The translating node needs to be GIST- 4454 aware; it will have to translate the addressing payloads between 4455 IPv4 and IPv6 formats for flows which cross between the two. The 4456 translation rules for the fields in the MRI payload (including 4457 e.g. DiffServ-codepoint and flow-label) are as defined in [8]. 4458 The same analysis applies to NAT-PT, although this technique is no 4459 longer proposed as a general purpose transition mechanism [41]. 4461 Tunnelling: (Applicable to 6to4 [20].) Many transition mechanisms 4462 handle the problem of how an end to end IPv6 (or IPv4) flow can be 4463 carried over intermediate IPv4 (or IPv6) regions by tunnelling; 4464 the methods tend to focus on minimising the tunnel administration 4465 overhead. For GIST, the treatment should be similar to any other 4466 IP tunnelling mechanism, as described in Section 7.3. In 4467 particular, the end to end flow signalling will pass transparently 4468 through the tunnel, and signalling for the tunnel itself will have 4469 to be managed by the tunnel endpoints. However, additional 4470 considerations may arise because of special features of the tunnel 4471 management procedures. In particular, [21] is based on using an 4472 anycast address as the destination tunnel endpoint. GIST MAY use 4473 anycast destination addresses in the Q-mode encapsulation of 4474 D-mode messages if necessary, but MUST NOT use them in the 4475 Network-Layer-Information addressing field; unicast addresses MUST 4476 be used instead. Note that the addresses from the IP header are 4477 not used by GIST in matching requests and replies, so there is no 4478 requirement to use anycast source addresses. 4480 8. Security Considerations 4482 The security requirement for GIST is to protect the signalling plane 4483 against identified security threats. For the signalling problem as a 4484 whole, these threats have been outlined in [31]; the NSIS framework 4485 [30] assigns a subset of the responsibilities to the NTLP. The main 4486 issues to be handled can be summarised as: 4488 Message Protection: Signalling message content can be protected 4489 against eavesdropping, modification, injection and replay while in 4490 transit. This applies both to GIST payloads, and GIST should also 4491 provide such protection as a service to signalling applications 4492 between adjacent peers. 4494 Routing State Integrity Protection: It is important that signalling 4495 messages are delivered to the correct nodes, and nowhere else. 4496 Here, 'correct' is defined as 'the appropriate nodes for the 4497 signalling given the Message-Routing-Information'. In the case 4498 where the MRI is based on the Flow Identification for path-coupled 4499 signalling, 'appropriate' means 'the same nodes that the 4500 infrastructure will route data flow packets through'. GIST has no 4501 role in deciding whether the data flow itself is being routed 4502 correctly; all it can do is ensure the signalling is routed 4503 consistently with it. GIST uses internal state to decide how to 4504 route signalling messages, and this state needs to be protected 4505 against corruption. 4507 Prevention of Denial of Service Attacks: GIST nodes and the network 4508 have finite resources (state storage, processing power, 4509 bandwidth). The protocol tries to minimise exhaustion attacks 4510 against these resources and not allow GIST nodes to be used to 4511 launch attacks on other network elements. 4513 The main additional issue is handling authorisation for executing 4514 signalling operations (e.g. allocating resources). This is assumed 4515 to be done in each signalling application. 4517 In many cases, GIST relies on the security mechanisms available in 4518 messaging associations to handle these issues, rather than 4519 introducing new security measures. Obviously, this requires the 4520 interaction of these mechanisms with the rest of the GIST protocol to 4521 be understood and verified, and some aspects of this are discussed in 4522 Section 5.7. 4524 8.1. Message Confidentiality and Integrity 4526 GIST can use messaging association functionality, specifically in 4527 this version TLS (Section 5.7.3), to ensure message confidentiality 4528 and integrity. Implementation of this functionality is REQUIRED but 4529 its use for any given flow or signalling application is OPTIONAL. In 4530 some cases, confidentiality of GIST information itself is not likely 4531 to be a prime concern, in particular since messages are often sent to 4532 parties which are unknown ahead of time, although the content visible 4533 even at the GIST level gives significant opportunities for traffic 4534 analysis. Signalling applications may have their own mechanism for 4535 securing content as necessary; however, they may find it convenient 4536 to rely on protection provided by messaging associations, since it 4537 runs unbroken between signalling application peers. 4539 8.2. Peer Node Authentication 4541 Cryptographic protection (of confidentiality or integrity) requires a 4542 security association with session keys. These can be established by 4543 an authentication and key exchange protocol based on shared secrets, 4544 public key techniques or a combination of both. Authentication and 4545 key agreement is possible using the protocols associated with the 4546 messaging association being secured. TLS incorporates this 4547 functionality directly. GIST nodes rely on the messaging association 4548 protocol to authenticate the identity of the next hop, and GIST has 4549 no authentication capability of its own. 4551 With routing state discovery, there are few effective ways to know 4552 what is the legitimate next or previous hop as opposed to an 4553 impostor. In other words, cryptographic authentication here only 4554 provides assurance that a node is 'who' it is (i.e. the legitimate 4555 owner of identity in some namespace), not 'what' it is (i.e. a node 4556 which is genuinely on the flow path and therefore can carry out 4557 signalling for a particular flow). Authentication provides only 4558 limited protection, in that a known peer is unlikely to lie about its 4559 role. Additional methods of protection against this type of attack 4560 are considered in Section 8.3 below. 4562 It is an implementation issue whether peer node authentication should 4563 be made signalling application dependent; for example, whether 4564 successful authentication could be made dependent on presenting 4565 credentials related to a particular signalling role (e.g. signalling 4566 for QoS). The abstract API of Appendix B leaves open such policy and 4567 authentication interactions between GIST and the NSLP it is serving. 4568 However, it does allow applications to inspect the authenticated 4569 identity of the peer to which a message will be sent before 4570 transmission. 4572 8.3. Routing State Integrity 4574 Internal state in a node (see Section 4.2) is used to route messages. 4575 If this state is corrupted, signalling messages may be misdirected. 4577 In the case where the MRM is path-coupled, the messages need to be 4578 routed identically to the data flow described by the MRI, and the 4579 routing state table is the GIST view of how these flows are being 4580 routed through the network in the immediate neighbourhood of the 4581 node. Routes are only weakly secured (e.g. there is no cryptographic 4582 binding of a flow to a route), and there is no authoritative 4583 information about flow routes other than the current state of the 4584 network itself. Therefore, consistency between GIST and network 4585 routing state has to be ensured by directly interacting with the IP 4586 routing mechanisms to ensure that the signalling peers are the 4587 appropriate ones for any given flow. An overview of security issues 4588 and techniques in this context is provided in [38]. 4590 In one direction, peer identification is installed and refreshed only 4591 on receiving a Response (compare Figure 5). This MUST echo the 4592 cookie from a previous Query, which will have been sent along the 4593 flow path with the Q-mode encapsulation, i.e. end-to-end addressed. 4594 Hence, only the true next peer or an on-path attacker will be able to 4595 generate such a message, provided freshness of the cookie can be 4596 checked at the querying node. 4598 In the other direction, peer identification MAY be installed directly 4599 on receiving a Query containing addressing information for the 4600 signalling source. However, any node in the network could generate 4601 such a message; indeed, many nodes in the network could be the 4602 genuine upstream peer for a given flow. To protect against this, 4603 four strategies are used: 4605 Filtering: the receiving node MAY reject signalling messages which 4606 claim to be for flows with flow source addresses which could be 4607 ruled out by ingress filtering. An extension of this technique 4608 would be for the receiving node to monitor the data plane and to 4609 check explicitly that the flow packets are arriving over the same 4610 interface and if possible from the same link layer neighbour as 4611 the D-mode signalling packets. If they are not, it is likely that 4612 at least one of the signalling or flow packets is being spoofed. 4614 Return routability checking: the receiving node MAY refuse to 4615 install upstream state until it has completed a Confirm handshake 4616 with the peer. This echoes the Response cookie of the Response, 4617 and discourages nodes from using forged source addresses. This 4618 also plays a role in denial of service prevention, see below. 4620 Authorisation: a stronger approach is to carry out a peer 4621 authorisation check (see Section 4.4.2) as part of messaging 4622 association setup. The ideal situation is that the receiving node 4623 can determine the correct upstream node address from routing table 4624 analysis or knowledge of local topology constraints, and then 4625 verify from the authorised peer database (APD) that the peer has 4626 this IP address. This is only technically feasible in a limited 4627 set of deployment environments. The APD can also be used to list 4628 the subsets of nodes which are feasible peers for particular 4629 source or destination subnets, or to blacklist nodes which have 4630 previously originated attacks or exist in untrustworthy networks, 4631 which provide weaker levels of authorisation checking. 4633 SID segregation: The routing state lookup for a given MRI and NSLPID 4634 MUST also take the SID into account. A malicious node can only 4635 overwrite existing GIST routing state if it can guess the 4636 corresponding SID; it can insert state with random SID values, but 4637 generally this will not be used to route signalling messages for 4638 which state has already been legitimately established. 4640 8.4. Denial of Service Prevention and Overload Protection 4642 GIST is designed so that in general each Query only generates at most 4643 one Response which is at most only slightly larger than the Query, so 4644 that a GIST node cannot become the source of a denial of service 4645 amplification attack. (There is a special case of retransmitted 4646 Response messages, see Section 5.3.3.) 4648 However, GIST can still be subjected to denial-of-service attacks 4649 where an attacker using forged source addresses forces a node to 4650 establish state without return routability, causing a problem similar 4651 to TCP SYN flood attacks. Furthermore, an adversary might use 4652 modified or replayed unprotected signalling messages as part of such 4653 an attack. There are two types of state attacks and one 4654 computational resource attack. In the first state attack, an 4655 attacker floods a node with messages that the node has to store until 4656 it can determine the next hop. If the destination address is chosen 4657 so that there is no GIST-capable next hop, the node would accumulate 4658 messages for several seconds until the discovery retransmission 4659 attempt times out. The second type of state-based attack causes GIST 4660 state to be established by bogus messages. A related computational/ 4661 network-resource attack uses unverified messages to cause a node 4662 query an authentication or authorisation infrastructure, or attempt 4663 to cryptographically verify a digital signature. 4665 We use a combination of two defences against these attacks: 4667 1. The responding node need not establish a session or discover its 4668 next hop on receiving the Query, but MAY wait for a Confirm, 4669 possibly on a secure channel. If the channel exists, the 4670 additional delay is one one-way delay and the total is no more 4671 than the minimal theoretically possible delay of a three-way 4672 handshake, i.e., 1.5 node-to-node round-trip times. The delay 4673 gets significantly larger if a new connection needs to be 4674 established first. 4676 2. The Response to the Query contains a cookie, which is repeated in 4677 the Confirm. State is only established for messages that contain 4678 a valid cookie. The setup delay is also 1.5 round-trip times. 4679 This mechanism is similar to that in SCTP [40] and other modern 4680 protocols. 4682 There is a potential overload condition if a node is flooded with 4683 Query or Confirm messages. One option is for the node to bypass 4684 these messages altogether as described in Section 4.3.2, effectively 4685 falling back to being a non-NSIS node. If this is not possible, a 4686 node MAY still choose to limit the rate at which it processes Query 4687 messages and discard the excess, although it SHOULD first adapt its 4688 policy to one of sending Responses statelessly if it is not already 4689 doing so. A conformant GIST node will automatically decrease the 4690 load by retransmitting Queries with an exponential backoff. A non- 4691 conformant node (launching a DoS attack) can generate uncorrelated 4692 Queries at an arbitrary rate, which makes it hard to apply rate- 4693 limiting without also affecting genuine handshake attempts. However, 4694 if Confirm messages are requested, the cookie binds the message to a 4695 Querying node address which has been validated by a return 4696 routability check and rate-limits can be applied per-source. 4698 Once a node has decided to establish routing state, there may still 4699 be transport and security state to be established between peers. 4700 This state setup is also vulnerable to denial of service attacks. 4701 GIST relies on the implementations of the lower layer protocols that 4702 make up messaging associations to mitigate such attacks. In the 4703 current specification, the querying node is always the one wishing to 4704 establish a messaging association, so it is the responding node that 4705 needs to be protected. It is possible for an attacking node to 4706 execute these protocols legally to set up large numbers of 4707 associations that were never used, and responding node 4708 implementations MAY use rate-limiting or other techniques to control 4709 the load in such cases. 4711 Signalling applications can use the services provided by GIST to 4712 defend against certain (e.g. flooding) denial of service attacks. In 4713 particular, they can elect to process only messages from peers that 4714 have passed a return routability check or been authenticated at the 4715 messaging association level (see Appendix B.2). Signalling 4716 applications that accept messages under other circumstances (in 4717 particular, before routing state has been fully established at the 4718 GIST level) need to take this into account when designing their 4719 denial of service prevention mechanisms, for example by not creating 4720 local state as a result of processing such messages. Signalling 4721 applications can also manage overload by invoking flow control, as 4722 described in Section 4.1.1. 4724 8.5. Requirements on Cookie Mechanisms 4726 The requirements on the Query cookie can be summarised as follows: 4728 Liveness: The cookie must be live, that is, it must change from one 4729 handshake to the next. To prevent replay attacks. 4731 Unpredictability: The cookie must not be guessable e.g. from a 4732 sequence or timestamp. To prevent direct forgery based on seeing 4733 a history of captured messages. 4735 Easily validated: It must be efficient for the Q-Node to validate 4736 that a particular cookie matches an in-progress handshake, for a 4737 routing state machine which already exists. To discard responses 4738 which have been randomly generated by an adversary, or to discard 4739 responses to queries which were generated with forged source 4740 addresses or an incorrect address in the included NLI object. 4742 Uniqueness: The cookie must be unique to a given handshake since it 4743 is actually used to match the Response to a handshake anyway, e.g. 4744 because of messaging association multiplexing. 4746 Likewise, the requirements on the Responder cookie can be summarised 4747 as follows: 4749 Liveness: The cookie must be live as above, to prevent replay 4750 attacks. 4752 Creation simplicity: The cookie must be lightweight to generatem, to 4753 avoid resource exhaustion at the responding node. 4755 Validation simplicity: It must be simple for the R-node to validate 4756 that an R-cookie was generated by itself and no-one else, without 4757 storing state about the handshake it was generated for. 4759 Binding: The cookie must be bound to the routing state that will be 4760 installed, to prevent use with different routing state e.g. in a 4761 modified Confirm. The routing state here includes the Peer- 4762 Identity and Interface-Address given in the NLI of the Query, and 4763 the MRI/NSLPID for the messaging. 4765 It can also include the interface on which the Query was received 4766 for use later in route change detection (Section 7.1.2). Since a 4767 Q-mode encapsulated message is the one that will best follow the 4768 data path, subsequent changes in this arrival interface indicate 4769 route changes between the peers. 4771 A suitable implementation for the Q-Cookie is a cryptographically 4772 strong random number which is unique for this routing state machine 4773 handshake. A node MUST implement this or an equivalently strong 4774 mechanism. Guidance on random number generation can be found in 4775 [32]. 4777 A suitable basic implementation for the R-Cookie is as follows: 4779 R-Cookie = liveness data + reception interface 4780 + hash (locally known secret, 4781 Q-Node NLI identity and address, MRI, NSLPID, 4782 liveness data) 4784 A node MUST implement this or an equivalently strong mechanism. 4785 There are several alternatives for the liveness data. One is to use 4786 a timestamp like SCTP. Another is to give the local secret a (rapid) 4787 rollover, with the liveness data as the generation number of the 4788 secret, like IKEv2. In both cases, the liveness data has to be 4789 carried outside the hash, to allow the hash to be verified at the 4790 Responder. Another approach is to replace the hash with encryption 4791 under a locally known secret, in which case the liveness data does 4792 not need to be carried in the clear. Any symmetric cipher immune to 4793 known plaintext attacks can be used. In the case of GIST-aware NAT 4794 traversal with delayed state installation it is necessary to carry 4795 additional data in the cookie; appropriate constructions are 4796 described in [46]. 4798 To support the validation simplicity requirement, the Responder can 4799 check the liveness data to filter out some blind (flooding) attacks 4800 before beginning any cryptographic cookie verification. To support 4801 this usage, the liveness data must be carried in the clear and not be 4802 easily guessable; this rules out the timestamp approach, and suggests 4803 the use of sequence of secrets with the liveness data identifying the 4804 position in the sequence. The secret strength and rollover frequency 4805 must be high enough that the secret cannot be brute-forced during its 4806 lifetime. Note that any node can use a Query to discover the current 4807 liveness data, so it remains hard to defend against sophisticated 4808 attacks which disguise such probes within a flood of Queries from 4809 forged source addresses. Therefore, it remains important to use an 4810 efficient hashing mechanism or equivalent. 4812 If a node receives a message for which cookie validation fails, it 4813 MAY return an "Object Value Error" message (Appendix A.4.4.10) with 4814 subcode 4 ("Invalid Cookie") to the sender and SHOULD log an error 4815 condition locally, as well as dropping the message. However, sending 4816 the error in general makes a node a source of backscatter. 4818 Therefore, this MUST only be enabled selectively, e.g. during initial 4819 deployment or debugging. 4821 8.6. Security Protocol Selection Policy 4823 This specification defines a single mandatory-to-implement security 4824 protocol (TLS, Section 5.7.3). However, it is possible to define 4825 additional security protocols in the future, for example to allow re- 4826 use with other types of credentials, or migrate towards protocols 4827 with stronger security properties. In addition, use of any security 4828 protocol for a messaging association is optional. Security protocol 4829 selection is carried out as part of the GIST handshake mechanism 4830 (Section 4.4.1). 4832 The selection process may be vulnerable to downgrade attacks, where a 4833 man in the middle modifies the capabilities offered in the Query or 4834 Response to mislead the peers into accepting a lower level of 4835 protection than is achievable. There is a two part defence against 4836 such attacks (the following is based the same concepts as [26]): 4838 1. The Response does not depend on the Stack-Proposal in the Query 4839 (see Section 5.7.1). Therefore, tampering with the Query has no 4840 effect on the resulting messaging association configuration. 4842 2. The Responding node's Stack-Proposal is echoed in the Confirm. 4843 The Responding node checks this to validate that the proposal it 4844 made in the Response is the same as the one received by the 4845 Querying node. Note that as a consequence of the previous point, 4846 the Responding node does not have to remember the proposal 4847 explicitly, since it is a static function of local policy. 4849 The validity of the second part depends on the strength of the 4850 security protection provided for the Confirm. If the Querying node 4851 is prepared to create messaging associations with null security 4852 properties (e.g. TCP only), the defence is ineffective, since the 4853 man in the middle can re-insert the original Responder's Stack- 4854 Proposal, and the Responding node will assume that the minimal 4855 protection is a consequence of Querying node limitations. However, 4856 if the messaging association provides at least integrity protection 4857 that cannot be broken in real-time, the Confirm cannot be modified in 4858 this way. Therefore, if the Querying node does not apply a security 4859 policy to the messaging association protocols to be created that 4860 ensures at least this minimal level of protection is met, it remains 4861 open to the threat that a downgrade has occurred. Applying such a 4862 policy ensures capability discovery process will result in the setup 4863 of a messaging association with the correct security properties as 4864 appropriate for the two peers involved. 4866 8.7. Residual Threats 4868 Taking the above security mechanisms into account, the main residual 4869 threats against NSIS are three types of on-path attack, 4870 vulnerabilities from particular limited modes of TLS usage, and 4871 implementation-related weaknesses. 4873 An on-path attacker who can intercept the initial Query can do most 4874 things it wants to the subsequent signalling. It is very hard to 4875 protect against this at the GIST level; the only defence is to use 4876 strong messaging association security to see whether the Responding 4877 node is authorised to take part in NSLP signalling exchanges. To 4878 some extent, this behaviour is logically indistinguishable from 4879 correct operation, so it is easy to see why defence is difficult. 4880 Note that an on-path attacker of this sort can do anything to the 4881 traffic as well as the signalling. Therefore, the additional threat 4882 induced by the signalling weakness seems tolerable. 4884 At the NSLP level, there is a concern about transitivity of trust of 4885 correctness of routing along the signalling chain. The NSLP at the 4886 querying node can have good assurance that it is communicating with 4887 an on-path peer or a node delegated by the on-path node by depending 4888 on the security protection provided by GIST. However, it has no 4889 assurance that the node beyond the responder is also on-path, or that 4890 the MRI (in particular) is not being modified by the responder to 4891 refer to a different flow. Therefore, if it sends signalling 4892 messages with payloads (e.g. authorisation tokens) which are valuable 4893 to nodes beyond the adjacent hop, it is up to the NSLP to ensure that 4894 the appropriate chain of trust exists. This could be achieved using 4895 higher layer security protection such as CMS [29]. 4897 There is a further residual attack by a node which is not on the path 4898 of the Query, but is on the path of the Response, or is able to use a 4899 Response from one handshake to interfere with another. The attacker 4900 modifies the Response to cause the Querying node to form an adjacency 4901 with it rather than the true peer. In principle, this attack could 4902 be prevented by including an additional cryptographic object in the 4903 Response which ties the Response to the initial Query and the routing 4904 state and can be verified by the Querying node. 4906 GIST depends on TLS for peer node authentication, and subsequent 4907 channel security. The analysis in [31] indicates the threats that 4908 arise when the peer node authentication is incomplete, specifically 4909 when unilateral authentication is performed (one node authenticates 4910 the other, but not vice versa). In this specification, mutual 4911 authentication can be supported either by certificate exchange or the 4912 use of pre-shared keys (see Section 5.7.3); if some other TLS 4913 authentication mechanism is negotiated, its properties would have to 4914 be analysed to determine acceptability for use with GIST. If mutual 4915 authentication is performed, the requirements for NTLP security are 4916 met. 4918 However, in the case of certificate exchange, this specification 4919 allows the possibility that only a server certificate is provided, 4920 which means that the Querying node authenticates the Responding node 4921 but not vice versa. Accepting such unilateral authentication allows 4922 for partial security in environments where client certificates are 4923 not widespread, and is better than no security at all; however, it 4924 does expose the Responding node to certain threats described in 4925 section 3.1 of [31]. For example, the Responding node cannot verify 4926 whether there is a man-in-the-middle between it and the Querying 4927 node, which could be manipulating the signalling messages, and it 4928 cannot verify the identity of the Querying node if it requests 4929 authorisation of resources. Note that in the case of host-network 4930 signalling, the Responding node could be either the host or the first 4931 hop router, depending on the signalling direction. Because of these 4932 vulnerabilities, modes or deployments of TLS which do not provide 4933 mutual authentication can be considered as at best transitional 4934 stages rather than providing a robust security solution. 4936 Certain security aspects of GIST operation depend on signalling 4937 application behaviour: a poorly implemented or compromised NSLP could 4938 degrade GIST security. However, the degradation would only affect 4939 GIST handling of the NSLP's own signalling traffic or overall 4940 resource usage at the node where the weakness occurred, and 4941 implementation weakness or compromise could have just as great an 4942 effect within the NSLP itself. GIST depends on NSLPs to choose SIDs 4943 appropriately (Section 4.1.3). If NSLPs choose non-random SIDs this 4944 makes off-path attacks based on SID guessing easier to carry out. 4945 NSLPs can also leak information in structured SIDs, but they could 4946 leak similar information in the NLSP payload data anyway. 4948 9. IANA Considerations 4950 This section defines the registries and initial codepoint assignments 4951 for GIST. It also defines the procedural requirements to be followed 4952 by IANA in allocating new codepoints. Note that the guidelines on 4953 the technical criteria to be followed in evaluating requests for new 4954 codepoint assignments are covered normatively in a separate document 4955 which considers the NSIS protocol suite in a unified way. That 4956 document discusses the general issue of NSIS extensibility, as well 4957 as the technical criteria for particular registries; see [13] for 4958 further details. 4960 The registry definitions that follow leave large blocks of codes 4961 marked "Reserved - not to be allocated". This is to allow a future 4962 revision of this specification or another Standards Track document to 4963 modify the relative space given to different allocation policies 4964 without having to change the initial rules retrospectively if they 4965 turn out to have been inappropriate, e.g. if the space for one 4966 particular policy is exhausted too quickly. 4968 The allocation policies used in this section follow the guidance 4969 given in [5]. In addition, for a number of the GIST registries, this 4970 specification also defines private/experimental ranges as discussed 4971 in [10]. Note that the only environment in which these codepoints 4972 can validly be used is a closed one in which the experimenter knows 4973 all the experiments in progress. 4975 This specification allocates the following codepoints in existing 4976 registries: 4978 Well-known UDP port XXX as the destination port for Q-mode 4979 encapsulated GIST messages (Section 5.3). 4981 This specification creates the following registries with the 4982 structures as defined below: 4984 NSLP Identifiers: Each signalling application requires the 4985 assignment of one or more NSLPIDs. The following NSLPID is 4986 allocated by this specification: 4988 +---------+---------------------------------------------------------+ 4989 | NSLPID | Application | 4990 +---------+---------------------------------------------------------+ 4991 | 0 | Used for GIST messages not related to any signalling | 4992 | | application. | 4993 +---------+---------------------------------------------------------+ 4995 The NSLPID is a 16 bit integer, and allocation policies for 4996 further values are as follows: 4998 1-32703: IESG Approval 5000 32704-32767: Private/Experimental Use 5002 32768-65536: Reserved - not to be allocated 5004 GIST Message Type: The GIST common header (Appendix A.1) contains a 5005 1 byte message type field. The following values are allocated by 5006 this specification: 5008 +---------+----------+ 5009 | MType | Message | 5010 +---------+----------+ 5011 | 0 | Query | 5012 | | | 5013 | 1 | Response | 5014 | | | 5015 | 2 | Confirm | 5016 | | | 5017 | 3 | Data | 5018 | | | 5019 | 4 | Error | 5020 | | | 5021 | 5 | MA-Hello | 5022 +---------+----------+ 5024 Allocation policies for further values are as follows: 5026 6-63: Standards Action 5028 64-119: Expert Review 5030 120-127: Private/Experimental Use 5032 128-255: Reserved - not to be allocated 5034 Object Types: There is a 12-bit field in the object header 5035 (Appendix A.2). The following values for object type are defined 5036 by this specification: 5038 +---------+-----------------------------+ 5039 | OType | Object Type | 5040 +---------+-----------------------------+ 5041 | 0 | Message Routing Information | 5042 | | | 5043 | 1 | Session ID | 5044 | | | 5045 | 2 | Network Layer Information | 5046 | | | 5047 | 3 | Stack Proposal | 5048 | | | 5049 | 4 | Stack Configuration Data | 5050 | | | 5051 | 5 | Query Cookie | 5052 | | | 5053 | 6 | Responder Cookie | 5054 | | | 5055 | 7 | NAT Traversal | 5056 | | | 5057 | 8 | NSLP Data | 5058 | | | 5059 | 9 | Error | 5060 | | | 5061 | 10 | Hello ID | 5062 +---------+-----------------------------+ 5064 Allocation policies for further values are as follows: 5066 10-1023: Standards Action 5068 1024-1999: Specification Required 5070 2000-2047: Private/Experimental Use 5072 2048-4095: Reserved - not to be allocated 5074 When a new object type is allocated according to one of the first 5075 two policies, the specification MUST provide the object format and 5076 define the setting of the extensibility bits (A/B, see 5077 Appendix A.2.1). 5079 Message Routing Methods: GIST allows multiple message routing 5080 methods (see Section 3.3). The MRM is indicated in the leading 5081 byte of the MRI object (Appendix A.3.1). This specification 5082 defines the following values: 5084 +------------+------------------------+ 5085 | MRM-ID | Message Routing Method | 5086 +------------+------------------------+ 5087 | 0 | Path Coupled MRM | 5088 | | | 5089 | 1 | Loose End MRM | 5090 +------------+------------------------+ 5092 Allocation policies for further values are as follows: 5094 2-63: Standards Action 5096 64-119: Expert Review 5098 120-127: Private/Experimental Use 5100 128-255: Reserved - not to be allocated 5102 When a new MRM is defined according to one of the first two 5103 policies, a specification document will be required. This MUST 5104 provide the information described in Section 3.3. 5106 MA-Protocol-IDs: Each protocol that can be used in a messaging 5107 association is identified by a 1-byte MA-Protocol-ID 5108 (Section 5.7). Note that the MA-Protocol-ID is not an IP Protocol 5109 number; indeed, some of the messaging association protocols - such 5110 as TLS - do not have an IP Protocol number. This is used as a tag 5111 in the Stack-Proposal and Stack-Configuration-Data objects 5112 (Appendix A.3.4 and Appendix A.3.5). The following values are 5113 defined by this specification: 5115 +---------------------+-----------------------------------------+ 5116 | MA-Protocol-ID | Protocol | 5117 +---------------------+-----------------------------------------+ 5118 | 0 | Reserved - not to be allocated | 5119 | | | 5120 | 1 | TCP opened in the forwards direction | 5121 | | | 5122 | 2 | TLS initiated in the forwards direction | 5123 +---------------------+-----------------------------------------+ 5125 Allocation policies for further values are as follows: 5127 3-63: Standards Action 5128 64-119: Expert Review 5130 120-127: Private/Experimental Use 5132 128-255: Reserved - not to be allocated 5134 When a new MA-Protocol-ID is allocated according to one of the 5135 first two policies, a specification document will be required. 5136 This MUST define the format for the MA-protocol-options field (if 5137 any) in the Stack-Configuration-Data object that is needed to 5138 define its configuration. If a protocol is to be used for 5139 reliable message transfer, it MUST be described how delivery 5140 errors are to be detected by GIST. Extensions to include new 5141 channel security protocols MUST include a description of how to 5142 integrate the functionality described in Section 3.9 with the rest 5143 of GIST operation. If the new MA-Protocol-ID can be used in 5144 conjunction with existing ones (for example, a new transport 5145 protocol which could be used with Transport Layer Security), the 5146 specification MUST define the interaction between the two. 5148 Error Codes/Subcodes: There is a 2 byte error code and 1 byte 5149 subcode in the Value field of the Error object (Appendix A.4.1). 5150 Error codes 1-12 are defined in Appendix A.4.4 together with 5151 subcodes 0-4 (code 1), 0-5 (code 9), 0-5 (code 10), and 0-2 (code 5152 12). Additional codes and subcodes are allocated on a first-come, 5153 first-served basis. When a new code/subcode combination is 5154 allocated, the following information MUST be provided: 5156 Error case: textual name of error 5158 Error class: from the categories given in Appendix A.4.3 5160 Error code: allocated by IANA, if a new code is required 5162 Error subcode: subcode point, also allocated by IANA 5164 Additional information: what additional information fields it is 5165 mandatory to include in the error message, from Appendix A.4.2 5167 Additional Information Types: An Error object (Appendix A.4.1) may 5168 contain Additional Information fields. Each possible field type 5169 is identified by a 16-bit AI-Type. AI-Types 1-4 are defined in 5170 Appendix A.4.2; additional AI-Types are allocated on a first-come, 5171 first-served basis. 5173 10. Acknowledgements 5175 This document is based on the discussions within the IETF NSIS 5176 working group. It has been informed by prior work and formal and 5177 informal inputs from: Cedric Aoun, Attila Bader, Vitor Bernado, 5178 Roland Bless, Bob Braden, Marcus Brunner, Benoit Campedel, Yoshiko 5179 Chong, Luis Cordeiro, Elwyn Davies, Michel Diaz, Christian Dickmann, 5180 Pasi Eronen, Alan Ford, Xiaoming Fu, Bo Gao, Ruediger Geib, Eleanor 5181 Hepworth, Thomas Herzog, Cheng Hong, Teemu Huovila, Jia Jia, Cornelia 5182 Kappler, Georgios Karagiannis, Ruud Klaver, Chris Lang, Lauri Liuhto, 5183 John Loughney, Allison Mankin, Jukka Manner, Pete McCann, Andrew 5184 McDonald, Glenn Morrow, Dave Oran, Andreas Pashalidis, Henning 5185 Peters, Tom Phelan, Akbar Rahman, Takako Sanda, Charles Shen, Melinda 5186 Shore, Martin Stiemerling, Martijn Swanink, Mike Thomas, Hannes 5187 Tschofenig, Sven van den Bosch, Nuutti Varis, Michael Welzl, Lars 5188 Westberg, and Mayi Zoumaro-djayoon. Parts of the TLS usage 5189 description (Section 5.7.3) were derived from the Diameter base 5190 protocol specification, RFC3588. In addition, Hannes Tschofenig 5191 provided a detailed set of review comments on the security section, 5192 and Andrew McDonald provided the formal description for the initial 5193 packet formats and the name matching algorithm for TLS. Chris Lang's 5194 implementation work provided objective feedback on the clarity and 5195 feasibility of the specification, and he also provided the state 5196 machine description and the initial error catalogue and formats. 5197 Magnus Westerlund carried out a detailed AD review which identified a 5198 number of issues and led to significant clarifications, which was 5199 followed by an even more detailed IESG review, with comments from 5200 Jari Arkko, Ross Callon, Brian Carpenter, Lisa Dusseault, Lars 5201 Eggert, Ted Hardie, Sam Hartman, Russ Housley, Cullen Jennings, Tim 5202 Polk, and a very detailed analysis by Adrian Farrel from the Routing 5203 Area directorate; Suresh Krishnan carried out a detailed review for 5204 the Gen-ART. 5206 11. References 5208 11.1. Normative References 5210 [1] Braden, R., "Requirements for Internet Hosts - Communication 5211 Layers", STD 3, RFC 1122, October 1989. 5213 [2] Baker, F., "Requirements for IP Version 4 Routers", RFC 1812, 5214 June 1995. 5216 [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement 5217 Levels", BCP 14, RFC 2119, March 1997. 5219 [4] Schiller, J., "Cryptographic Algorithms for Use in the Internet 5220 Key Exchange Version 2 (IKEv2)", RFC 4307, December 2005. 5222 [5] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 5223 Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. 5225 [6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) 5226 Specification", RFC 2460, December 1998. 5228 [7] Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of 5229 the Differentiated Services Field (DS Field) in the IPv4 and 5230 IPv6 Headers", RFC 2474, December 1998. 5232 [8] Nordmark, E., "Stateless IP/ICMP Translation Algorithm (SIIT)", 5233 RFC 2765, February 2000. 5235 [9] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, 5236 R., and W. Polk, "Internet X.509 Public Key Infrastructure 5237 Certificate and Certificate Revocation List (CRL) Profile", 5238 RFC 5280, May 2008. 5240 [10] Narten, T., "Assigning Experimental and Testing Numbers 5241 Considered Useful", BCP 82, RFC 3692, January 2004. 5243 [11] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) 5244 Protocol Version 1.1", RFC 4346, April 2006. 5246 [12] Crocker, D. and P. Overell, "Augmented BNF for Syntax 5247 Specifications: ABNF", STD 68, RFC 5234, January 2008. 5249 [13] Loughney, J., "NSIS Extensibility Model", draft-nsis-ext-00 5250 (work in progress), November 2007. 5252 11.2. Informative References 5254 [14] Katz, D., "IP Router Alert Option", RFC 2113, February 1997. 5256 [15] Braden, B., Zhang, L., Berson, S., Herzog, S., and S. Jamin, 5257 "Resource ReSerVation Protocol (RSVP) -- Version 1 Functional 5258 Specification", RFC 2205, September 1997. 5260 [16] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 5261 RFC 2246, January 1999. 5263 [17] Moy, J., "OSPF Version 2", STD 54, RFC 2328, April 1998. 5265 [18] Partridge, C. and A. Jackson, "IPv6 Router Alert Option", 5266 RFC 2711, October 1999. 5268 [19] Terzis, A., Krawczyk, J., Wroclawski, J., and L. Zhang, "RSVP 5269 Operation Over IP Tunnels", RFC 2746, January 2000. 5271 [20] Carpenter, B. and K. Moore, "Connection of IPv6 Domains via 5272 IPv4 Clouds", RFC 3056, February 2001. 5274 [21] Huitema, C., "An Anycast Prefix for 6to4 Relay Routers", 5275 RFC 3068, June 2001. 5277 [22] Baker, F., Iturralde, C., Le Faucheur, F., and B. Davie, 5278 "Aggregation of RSVP for IPv4 and IPv6 Reservations", RFC 3175, 5279 September 2001. 5281 [23] Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V., and 5282 G. Swallow, "RSVP-TE: Extensions to RSVP for LSP Tunnels", 5283 RFC 3209, December 2001. 5285 [24] Jamoussi, B., Andersson, L., Callon, R., Dantu, R., Wu, L., 5286 Doolan, P., Worster, T., Feldman, N., Fredette, A., Girish, M., 5287 Gray, E., Heinanen, J., Kilty, T., and A. Malis, "Constraint- 5288 Based LSP Setup using LDP", RFC 3212, January 2002. 5290 [25] Grossman, D., "New Terminology and Clarifications for 5291 Diffserv", RFC 3260, April 2002. 5293 [26] Arkko, J., Torvinen, V., Camarillo, G., Niemi, A., and T. 5294 Haukka, "Security Mechanism Agreement for the Session 5295 Initiation Protocol (SIP)", RFC 3329, January 2003. 5297 [27] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy, "STUN 5298 - Simple Traversal of User Datagram Protocol (UDP) Through 5299 Network Address Translators (NATs)", RFC 3489, March 2003. 5301 [28] Rosenberg, J., Mahy, R., and P. Matthews, "Traversal Using 5302 Relays around NAT (TURN): Relay Extensions to Session 5303 Traversal Utilities for NAT (STUN)", draft-ietf-behave-turn-09 5304 (work in progress), July 2008. 5306 [29] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, 5307 July 2004. 5309 [30] Hancock, R., Karagiannis, G., Loughney, J., and S. Van den 5310 Bosch, "Next Steps in Signaling (NSIS): Framework", RFC 4080, 5311 June 2005. 5313 [31] Tschofenig, H. and D. Kroeselberg, "Security Threats for Next 5314 Steps in Signaling (NSIS)", RFC 4081, June 2005. 5316 [32] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 5317 Requirements for Security", BCP 106, RFC 4086, June 2005. 5319 [33] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites for 5320 Transport Layer Security (TLS)", RFC 4279, December 2005. 5322 [34] Conta, A., Deering, S., and M. Gupta, "Internet Control Message 5323 Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) 5324 Specification", RFC 4443, March 2006. 5326 [35] Stiemerling, M., Tschofenig, H., Aoun, C., and E. Davies, "NAT/ 5327 Firewall NSIS Signaling Layer Protocol (NSLP)", 5328 draft-ietf-nsis-nslp-natfw-18 (work in progress), 5329 February 2008. 5331 [36] Nordmark, E. and R. Gilligan, "Basic Transition Mechanisms for 5332 IPv6 Hosts and Routers", RFC 4213, October 2005. 5334 [37] Kent, S. and K. Seo, "Security Architecture for the Internet 5335 Protocol", RFC 4301, December 2005. 5337 [38] Nikander, P., Arkko, J., Aura, T., Montenegro, G., and E. 5338 Nordmark, "Mobile IP Version 6 Route Optimization Security 5339 Design Background", RFC 4225, December 2005. 5341 [39] Audet, F. and C. Jennings, "Network Address Translation (NAT) 5342 Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, 5343 January 2007. 5345 [40] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, 5346 September 2007. 5348 [41] Aoun, C. and E. Davies, "Reasons to Move the Network Address 5349 Translator - Protocol Translator (NAT-PT) to Historic Status", 5350 RFC 4966, July 2007. 5352 [42] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. Pignataro, 5353 "The Generalized TTL Security Mechanism (GTSM)", RFC 5082, 5354 October 2007. 5356 [43] Floyd, S. and V. Jacobson, "The Synchronisation of Periodic 5357 Routing Messages", SIGCOMM Symposium on Communications 5358 Architectures and Protocols pp. 33--44, September 1993. 5360 [44] Hancock, R E., "Using the Router Alert Option for Packet 5361 Interception in GIST", draft-hancock-nsis-gist-rao-00 (work in 5362 progress), July 2008. 5364 [45] Pashalidis, A. and H. Tschofenig, "GIST Legacy NAT Traversal", 5365 draft-pashalidis-nsis-gist-legacynats-02 (work in progress), 5366 July 2007. 5368 [46] Pashalidis, A. and H. Tschofenig, "GIST NAT Traversal", 5369 draft-pashalidis-nsis-gimps-nattraversal-05 (work in progress), 5370 July 2007. 5372 [47] Tsenov, T., Tschofenig, H., Fu, X., Aoun, C., and E. Davies, 5373 "GIST State Machine", draft-ietf-nsis-ntlp-statemachine-05 5374 (work in progress), February 2008. 5376 [48] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 5377 Robustness to Blind In-Window Attacks", 5378 draft-ietf-tcpm-tcpsecure-10 (work in progress), July 2008. 5380 Appendix A. Bit-Level Formats and Error Messages 5382 This appendix provides formats for the various component parts of the 5383 GIST messages defined abstractly in Section 5.2. The whole of this 5384 appendix is normative. 5386 Each GIST message consists of a header and a sequence of objects. 5387 The GIST header has a specific format, described in more detail in 5388 Appendix A.1 below. An NSLP message is one object within a GIST 5389 message. Note that GIST itself provides the NSLP message length 5390 information and signalling application identification. General 5391 object formatting guidelines are provided in Appendix A.2 below, 5392 followed in Appendix A.3 by the format for each object. Finally, 5393 Appendix A.4 provides the formats used for error reporting. 5395 In the following object diagrams, '//' is used to indicate a variable 5396 sized field and ':' is used to indicate a field that is optionally 5397 present. Any part of the object used for padding or defined as 5398 reserved (marked 'Reserved' or 'Rsv' or, in the case of individual 5399 bits, 'r' in the diagrams below) MUST be set to 0 on transmission and 5400 MUST be ignored on reception. 5402 A.1. The GIST Common Header 5404 This header begins all GIST messages. It has a fixed format, as 5405 shown below. 5407 0 1 2 3 5408 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 5409 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5410 | Version | GIST hops | Message Length | 5411 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5412 | NSLPID | Type |S|R|E| Reserved| 5413 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5415 Version (8 bits): The GIST protocol version number. This 5416 specification defines version number 1. 5418 GIST hops (8 bits): A hop count for the number of GIST-aware nodes 5419 this message can still be processed by (including the 5420 destination). 5422 Message Length (16 bits): The total number of 32-bit words in the 5423 message after the common header itself. 5425 NSLPID (16 bits): IANA assigned identifier of the signalling 5426 application the message refers to. 5428 Type (8 bits): The GIST message type (Query, Response, etc.). 5430 S flag: S=1 if the IP source address is the same as the signalling 5431 source address, S=0 if it is different. 5433 R flag: R=1 if a reply to this message is explicitly requested. 5435 E flag: E=1 if the message was explicitly routed (Section 7.1.5). 5437 The rules governing the use of the R-flag depend on the GIST message 5438 type. It MUST always be set (R=1) in Query messages, since these 5439 always elicit a Response, and never in Confirm, Data or Error 5440 messages. It MAY be set in an MA-Hello; if set, another MA-Hello 5441 MUST be sent in reply. It MAY be set in a Response, but MUST be set 5442 if the Response contains a Responder cookie; if set, a Confirm MUST 5443 be sent in reply. The E flag MUST NOT be set unless the message type 5444 is a Data message. 5446 Parsing failures may be caused by unknown Version or Type values, 5447 inconsistent R or E flag setting, or a Message Length inconsistent 5448 with the set of objects carried. In all cases the receiver MUST if 5449 possible return a "Common Header Parse Error" message 5450 (Appendix A.4.4.1) with the appropriate subcode, and not process the 5451 message further. 5453 A.2. General Object Format 5455 Each object begins with a fixed header giving the object Type and 5456 object Length. This is followed by the object Value, which is a 5457 whole number of 32-bit words long. 5459 0 1 2 3 5460 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 5461 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5462 |A|B|r|r| Type |r|r|r|r| Length | 5463 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5464 // Value // 5465 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5467 A/B flags: The bits marked 'A' and 'B' are extensibility flags which 5468 are defined in Appendix A.2.1 below; the remaining bits marked 'r' 5469 are reserved. 5471 Type (12 bits): An IANA-assigned identifier for the type of object. 5473 Length (12 bits): Length has the units of 32-bit words, and measures 5474 the length of Value. If there is no Value, Length=0. If the 5475 Length is not consistent with the contents of the object, an 5476 "Object Value Error" message (Appendix A.4.4.10) with subcode 0 5477 "Incorrect Length" MUST be returned and the message dropped. 5479 Value (variable): Value is (therefore) a whole number of 32 bit 5480 words. If there is any padding required, the length and location 5481 are be defined by the object-specific format information; objects 5482 which contain variable length (e.g. string) types may need to 5483 include additional length subfields to do so. 5485 A.2.1. Object Extensibility 5487 The leading two bits of the TLV header are used to signal the desired 5488 treatment for objects whose Type field is unknown at the receiver. 5489 The following three categories of object have been identified, and 5490 are described here. 5492 AB=00 ("Mandatory"): If the object is not understood, the entire 5493 message containing it MUST be rejected with an "Object Type Error" 5494 message (Appendix A.4.4.9) with subcode 1 ("Unrecognised Object"). 5496 AB=01 ("Ignore"): If the object is not understood, it MUST be 5497 deleted and the rest of the message processed as usual. 5499 AB=10 ("Forward"): If the object is not understood, it MUST be 5500 retained unchanged in any message forwarded as a result of message 5501 processing, but not stored locally. 5503 The combination AB=11 is reserved. If a message is received 5504 containing an object with AB=11, it MUST be rejected with an "Object 5505 Type Error" message (Appendix A.4.4.9) with subcode 5 ("Invalid 5506 Extensibility Flags"). 5508 These extensibility rules define only the processing within the GIST 5509 layer. There is no requirement on GIST implementations to support an 5510 extensible service interface to signalling applications, so 5511 unrecognised objects with AB=01 or AB=10 do not need to be indicated 5512 to NSLPs. 5514 A.3. GIST TLV Objects 5515 A.3.1. Message-Routing-Information 5517 Type: Message-Routing-Information 5519 Length: Variable (depends on MRM) 5521 0 1 2 3 5522 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 5523 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5524 | MRM-ID |N| Reserved | | 5525 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 5526 // Method-specific addressing information (variable) // 5527 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5529 MRM-ID (8 bits): An IANA-assigned identifier for the message routing 5530 method. 5532 N flag: If set (N=1), this means that NATs do not need to translate 5533 this MRM; if clear (N=0) it means that the method-specific 5534 information contains network or transport layer information that a 5535 NAT must process. 5537 The remainder of the object contains method-specific addressing 5538 information, which is described below. 5540 A.3.1.1. Path-Coupled MRM 5542 In the case of basic path-coupled routing, the addressing information 5543 takes the following format. The N-flag N=0 for this MRM. 5545 0 1 2 3 5546 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 5547 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5548 |IP-Ver |P|T|F|S|A|B|D|Reserved | 5549 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5550 // Source Address // 5551 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5552 // Destination Address // 5553 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5554 | Source Prefix | Dest Prefix | Protocol | DS-field |Rsv| 5555 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5556 : Reserved | Flow Label : 5557 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5558 : SPI : 5559 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5560 : Source Port : Destination Port : 5561 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5562 IP-Ver (4 bits): The IP version number, 4 or 6. 5564 Source/Destination address (variable): The source and destination 5565 addresses are always present and of the same type; their length 5566 depends on the value in the IP-Ver field. 5568 Source/Dest Prefix (each 8 bits): The length of the mask to be 5569 applied to the source and destination addresses for address 5570 wildcarding. In the normal case where the MRI refers only to 5571 traffic between specific host addresses, the Source/Dest Prefix 5572 values would both be 32/128 for IPv4/6 respectively. 5574 P flag: P=1 means that the Protocol field is significant. 5576 Protocol (8 bits): The IP protocol number. This MUST be ignored if 5577 P=0. In the case of IPv6, the Protocol field refers to the true 5578 upper layer protocol carried by the packets, i.e. excluding any IP 5579 option headers. This is therefore not necessarily the same as the 5580 Next Header value from the base IPv6 header. 5582 T flag: T=1 means that the DiffServ field (DS-field) is significant. 5584 DS-field (6 bits): The DiffServ field. See [7] and [25]. 5586 F flag: F=1 means that flow label is present and is significant. F 5587 MUST NOT be set if IP-Ver is not 6. 5589 Flow Label (20 bits): The flow label; only present if F=1. If F=0, 5590 the entire 32 bit word containing the Flow Label is absent. 5592 S flag: S=1 means that the SPI field is present and is significant. 5593 The S flag MUST be 0 if the P flag is 0. 5595 SPI field (32 bits): The SPI field; see [37]. If S=0, the entire 32 5596 bit word containing the SPI is absent. 5598 A/B flags: These can only be set if P=1. If either is set, the port 5599 fields are also present. If P=0, the A/B flags MUST both be zero 5600 and the word containing the port numbers is absent. 5602 Source/Destination Port (each 16 bits): If either of A (source), B 5603 (destination) is set the word containing the port numbers is 5604 included in the object. However, the contents of each field is 5605 only significant if the corresponding flag is set; otherwise, the 5606 contents of the field is regarded as padding, and the MRI refers 5607 to all ports (i.e. acts as a wildcard). If the flag is set and 5608 Port=0x0000, the MRI will apply to a specific port, whose value is 5609 not yet known. If neither of A or B is set, the word is absent. 5611 D flag: The Direction flag has the following meaning: the value 0 5612 means 'in the same direction as the flow' (i.e. downstream), and 5613 the value 1 means 'in the opposite direction to the flow' (i.e. 5614 upstream). 5616 The MRI format defines a number of constraints on the allowed 5617 combinations of flags and fields in the object. If these constraints 5618 are violated this constitutes a parse error, and an "Object Value 5619 Error" message (Appendix A.4.4.10) with subcode 2 ("Invalid Flag- 5620 Field Combination") MUST be returned. 5622 A.3.1.2. Loose-End MRM 5624 In the case of the loose-end MRM, the addressing information takes 5625 the following format. The N-flag N=0 for this MRM. 5627 0 1 2 3 5628 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 5629 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5630 |IP-Ver |D| Reserved | 5631 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5632 // Source Address // 5633 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5634 // Destination Address // 5635 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5637 IP-Ver (4 bits): The IP version number, 4 or 6. 5639 Source/Destination address (variable): The source and destination 5640 addresses are always present and of the same type; their length 5641 depends on the value in the IP-Ver field. 5643 D flag: The Direction flag has the following meaning: the value 0 5644 means 'towards the edge of the network', and the value 1 means 5645 'from the edge of the network'. Note that for Q-mode messages, 5646 the only valid value is D=0 (see Section 5.8.2). 5648 A.3.2. Session Identification 5650 Type: Session-Identification 5652 Length: Fixed (4 32-bit words) 5653 0 1 2 3 5654 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 5655 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5656 | | 5657 + + 5658 | | 5659 + Session ID + 5660 | | 5661 + + 5662 | | 5663 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5665 A.3.3. Network-Layer-Information 5667 Type: Network-Layer-Information 5669 Length: Variable (depends on length of Peer-Identity and IP version) 5671 0 1 2 3 5672 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 5673 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5674 | PI-Length | IP-TTL |IP-Ver | Reserved | 5675 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5676 | Routing State Validity Time | 5677 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5678 // Peer Identity // 5679 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5680 // Interface Address // 5681 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5683 PI-Length (8 bits): The byte length of the Peer Identity field. 5685 Peer Identity (variable): The Peer Identity field. Note that the 5686 Peer-Identity field itself is padded to a whole number of words. 5688 IP-TTL (8 bits): Initial or reported IP layer TTL. 5690 IP-Ver (4 bits): The IP version for the Interface Address field. 5692 Interface Address (variable): The IP address allocated to the 5693 interface, matching the IP-Ver field. 5695 Routing State Validity Time (32 bits): The time for which the 5696 routing state for this flow can be considered correct without a 5697 refresh. Given in milliseconds. The value 0 (zero) is reserved 5698 and MUST NOT be used. 5700 A.3.4. Stack Proposal 5702 Type: Stack-Proposal 5704 Length: Variable (depends on number of profiles and size of each 5705 profile) 5707 0 1 2 3 5708 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 5709 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5710 | Prof-Count | Reserved | 5711 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5712 // Profile 1 // 5713 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5714 : : 5715 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5716 // Profile N // 5717 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5718 Prof-Count (8 bits): The number of profiles listed. MUST be > 0. 5720 Each profile is itself a sequence of protocol layers, and the profile 5721 is formatted as a list as follows: 5723 o The first byte is a count of the number of layers in the profile. 5724 MUST be > 0. 5726 o This is followed by a sequence of 1-byte MA-Protocol-IDs as 5727 described in Section 5.7. 5729 o The profile is padded to a word boundary with 0, 1, 2 or 3 zero 5730 bytes. These bytes MUST be ignored at the receiver. 5732 If there are no profiles (Prof-Count=0) then an "Object Value Error" 5733 message (Appendix A.4.4.10) with subcode 1 ("Value Not Supported") 5734 MUST be returned; if a particular profile is empty (the leading byte 5735 of the profile is zero), then subcode 3 ("Empty List") MUST be used. 5736 In both cases, the message MUST be dropped. 5738 A.3.5. Stack-Configuration-Data 5740 Type: Stack-Configuration-Data 5742 Length: Variable (depends on number of protocols and size of each 5743 MA-protocol-options field) 5745 0 1 2 3 5746 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 5747 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5748 | MPO-Count | Reserved | 5749 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5750 | MA-Hold-Time | 5751 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5752 // MA-protocol-options 1 // 5753 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5754 : : 5755 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5756 // MA-protocol-options N // 5757 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5759 MPO-Count (8 bits): The number of MA-protocol-options fields present 5760 (these contain their own length information). The MPO-Count MAY 5761 be zero, but this will only be the case if none of the MA- 5762 protocols referred to in the Stack-Proposal require option data. 5764 MA-Hold-Time (32 bits): The time for which the messaging association 5765 will be held open without traffic or a hello message. Note that 5766 this value is given in milliseconds, so the default time of 30 5767 seconds (Section 4.4.5) corresponds to a value of 30000. The 5768 value 0 (zero) is reserved and MUST NOT be used. 5770 The MA-protocol-options fields are formatted as follows: 5772 0 1 2 3 5773 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 5774 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5775 |MA-Protocol-ID | Profile | Length |D| Reserved | 5776 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5777 // Options Data // 5778 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5780 MA-Protocol-ID (8 bits): Protocol identifier as described in 5781 Section 5.7. 5783 Profile (8 bits): Tag indicating which profile from the accompanying 5784 Stack-Proposal object this applies to. Profiles are numbered from 5785 1 upwards; the special value 0 indicates 'applies to all 5786 profiles'. 5788 Length (8 bits): The byte length of MA-protocol-options field that 5789 follows. This will be zero-padded up to the next word boundary. 5791 D flag: If set (D=1), this protocol MUST NOT be used for a messaging 5792 association. 5794 Options Data (variable): Any options data for this protocol. Note 5795 that the format of the options data might differ depending on 5796 whether the field is in a Query or Response. 5798 A.3.6. Query Cookie 5800 Type: Query-Cookie 5802 Length: Variable (selected by querying node) 5804 0 1 2 3 5805 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 5806 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5807 // Query Cookie // 5808 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5810 The contents are implementation defined. See Section 8.5 for further 5811 discussion. 5813 A.3.7. Responder Cookie 5815 Type: Responder-Cookie 5817 Length: Variable (selected by responding node) 5819 0 1 2 3 5820 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 5821 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5822 // Responder Cookie // 5823 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5825 The contents are implementation defined. See Section 8.5 for further 5826 discussion. 5828 A.3.8. Hello-ID 5830 Type: Hello-ID 5832 Length: Fixed (1 32-bit word) 5833 0 1 2 3 5834 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 5835 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5836 | Hello-ID | 5837 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5839 The contents are implementation defined. See Section 5.2.2 for 5840 further discussion. 5842 A.3.9. NAT Traversal 5844 Type: NAT-Traversal 5846 Length: Variable (depends on length of contained fields) 5848 This object is used to support the NAT traversal mechanisms described 5849 in Section 7.2.2. 5851 0 1 2 3 5852 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 5853 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5854 | MRI-Length | Type-Count | NAT-Count | Reserved | 5855 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5856 // Original Message-Routing-Information // 5857 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5858 // List of translated objects // 5859 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5860 | Length of opaque information | | 5861 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // 5862 // Information replaced by NAT #1 | 5863 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5864 : : 5865 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5866 | Length of opaque information | | 5867 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // 5868 // Information replaced by NAT #N | 5869 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5871 MRI-Length (8 bits): The length of the included MRI payload in 32- 5872 bit words. 5874 Original Message-Routing-Information (variable): The MRI data from 5875 when the message was first sent, not including the object header. 5877 Type-Count (8 bits): The number of objects in the 'List of 5878 translated objects' field. 5880 List of translated objects (variable): This field lists the types of 5881 the objects that were translated by every NAT through which the 5882 message has passed. Each element in the list is a 16-bit field 5883 containing the first 16 bits of the object TLV header, including 5884 the AB extensibility flags, two reserved bits, and 12 bit object 5885 type. The list is initialised by the first NAT on the path; 5886 subsequent NATs may delete elements in the list. Padded with 2 5887 null bytes if necessary. 5889 NAT-Count (8 bits): The number of NATs traversed by the message, and 5890 the number of opaque payloads at the end of the object. The 5891 length fields for each opaque payload are byte counts, not 5892 including the 2 bytes of the length field itself. Note that each 5893 opaque information field is zero-padded to the next 32-bit word 5894 boundary if necessary. 5896 A.3.10. NSLP Data 5898 Type: NSLP-Data 5900 Length: Variable (depends on NSLP) 5902 This object is used to deliver data between NSLPs. GIST regards the 5903 data as a number of complete 32-bit words, as given by the length 5904 field in the TLV; any padding to a word boundary must be carried out 5905 within the NSLP itself. 5907 0 1 2 3 5908 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 5909 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5910 // NSLP Data // 5911 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5913 A.4. Errors 5915 A.4.1. Error Object 5917 Type: Error 5919 Length: Variable (depends on error) 5920 0 1 2 3 5921 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 5922 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5923 | Error Class | Error Code | Error Subcode | 5924 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5925 |S|M|C|D|Q| Reserved | MRI Length | Info Count | 5926 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5927 | | 5928 + Common Header + 5929 | (of original message) | 5930 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5931 : Session Id : 5932 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5933 : Message Routing Information : 5934 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5935 : Additional Information Fields : 5936 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5937 : Debugging Comment : 5938 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5940 The flags are: 5941 S - S=1 means the Session ID object is present 5942 M - M=1 means MRI object is present 5943 C - C=1 means a debug Comment is present after header. 5944 D - D=1 means the original message was received in D-mode 5945 Q - Q=1 means the original message was received Q-mode encapsulated 5946 (can't be set if D=0). 5948 A GIST Error object contains an 8 bit error-class (see 5949 Appendix A.4.3), a 16 bit error-code, an 8 bit error-subcode, and as 5950 much information about the message which triggered the error as is 5951 available. This information MUST include the Common header of the 5952 original message and MUST also include the Session Id and MRI objects 5953 if these could be decoded correctly. These objects are included in 5954 their entirety, except for their TLV Headers. The MRI Length field 5955 gives the length of the MRI object in 32-bit words. 5957 The Info Count field contains the number of Additional Information 5958 fields in the object, and the possible formats for these fields are 5959 given in Appendix A.4.2. The precise set of fields to include 5960 depends on the error code/subcode. For every error description in 5961 the error catalogue Appendix A.4.4, the line "Additional Info:" 5962 states what fields MUST be included; further fields beyond these MAY 5963 be included by the sender, and the fields may be included in any 5964 order. The Debugging Comment is a null- terminated UTF-8 string, 5965 padded if necessary to a whole number of 32- bit words with more null 5966 characters. 5968 A.4.2. Additional Information Fields 5970 The Common Error Header may be followed by some Additional 5971 Information fields. Each Additional Information field has a simple 5972 TLV format as follows: 5973 0 1 2 3 5974 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 5975 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5976 | AI-Type | AI-Length | 5977 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5978 // AI-Value // 5979 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5981 The AI-Type is a 16-bit IANA assigned value. The AI-Length gives the 5982 number of 32-bit words in AI-Value; if an AI-Value is not present, 5983 AI-Length=0. The AI-Types and AI-Lengths and AI-Value formats of the 5984 currently defined Additional Information fields are shown below. 5986 Message Length Info: 5987 0 1 2 3 5988 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 5989 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5990 | Calculated Length | Reserved | 5991 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5992 AI-Type: 1 5993 AI-Length: 1 5994 Calculated Length (16 bits): the length of the original message 5995 calculated by adding up all the objects in the message. Measured in 5996 32-bit words. 5998 MTU Info: 5999 0 1 2 3 6000 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 6001 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6002 | Link MTU | Reserved | 6003 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6004 AI-Type: 2 6005 AI-Length: 1 6006 Link MTU (16 bits): the IP MTU for a link along which a message 6007 could not be sent. Measured in bytes. 6009 Object Type Info: 6011 0 1 2 3 6012 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 6013 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6014 | Object Type | Reserved | 6015 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6016 AI-Type: 3 6017 AI-Length: 1 6018 Object type (16 bits): This provides information about the type 6019 of object which caused the error. 6021 Object Value Info: 6022 0 1 2 3 6023 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 6024 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6025 | Rsv | Real Object Length | Offset | 6026 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6027 // Object // 6028 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6029 AI-Type: 4 6030 AI-Length: variable (depends on Object length) 6031 This object carries information about a TLV object which was found 6032 to be invalid in the original message. An error message MAY contain 6033 more than one Object Value Info object. 6035 Real Object Length (12 bits) Since the length in the original TLV 6036 header may be inaccurate, this field provides the actual length of 6037 the object (including the TLV Header) included in the error 6038 message. Measured in 32-bit words. 6040 Offset (16 bits): The byte in the object at which the GIST node 6041 found the error. The first byte in the object has offset=0. 6043 Object (variable): The invalid TLV object (including the TLV 6044 Header). 6046 A.4.3. Error Classes 6048 The first byte of the error object, "Error Class", indicates the 6049 severity level. The currently defined severity levels are: 6051 0 (Informational): reply data which should not be thought of as 6052 changing the condition of the protocol state machine. 6054 1 (Success): reply data which indicates that the message being 6055 responded to has been processed successfully in some sense. 6057 2 (Protocol-Error): the message has been rejected because of a 6058 protocol error (e.g. an error in message format). 6060 3 (Transient-Failure): the message has been rejected because of a 6061 particular local node status which may be transient (i.e. it may 6062 be worthwhile to retry after some delay). 6064 4 (Permanent-Failure): the message has been rejected because of 6065 local node status which will not change without additional out of 6066 band (e.g. management) operations. 6068 Additional error class values are reserved. 6070 The allocation of error classes to particular errors is not precise; 6071 the above descriptions are deliberately informal. Actual error 6072 processing SHOULD take into account the specific error in question; 6073 the error class may be useful supporting information (e.g. in network 6074 debugging). 6076 A.4.4. Error Catalogue 6078 This section lists all the possible GIST errors, including when they 6079 are raised and what additional information fields MUST be carried in 6080 the error object. 6082 A.4.4.1. Common Header Parse Error 6084 Class: Protocol-Error 6085 Code: 1 6086 Additional Info: For subcode 3 only, Message Length Info carries 6087 the calculated message length. 6089 This message is sent if a GIST node receives a message where the 6090 common header cannot be parsed correctly, or where an error in the 6091 overall message format is detected. Note that in this case the 6092 original MRI and Session ID MUST NOT be included in the Error Object. 6093 This error code is split into subcodes as follows: 6095 0: Unknown Version: The GIST version is unknown. The (highest) 6096 supported version supported by the node can be inferred from the 6097 Common Header of the Error message itself. 6099 1: Unknown Type: The GIST message type is unknown. 6101 2: Invalid R-flag: The R flag in the header is inconsistent with the 6102 message type. 6104 3: Incorrect Message Length: The overall message length is not 6105 consistent with the set of objects carried. 6107 4: Invalid E-flag: The E flag is set in the header but this is not a 6108 Data message. 6110 A.4.4.2. Hop Limit Exceeded 6112 Class: Permanent-Failure 6113 Code: 2 6114 Additional Info: None 6116 This message is sent if a GIST node receives a message with a GIST 6117 hop count of zero, or a GIST node tries to forward a message after 6118 its GIST hop count has been decremented to zero on reception. This 6119 message indicates either a routing loop or too small an initial hop 6120 count value. 6122 A.4.4.3. Incorrect Encapsulation 6124 Class: Protocol-Error 6125 Code: 3 6126 Additional Info: None 6128 This message is sent if a GIST node receives a message which uses an 6129 incorrect encapsulation method (e.g. a Query arrives over an MA, or 6130 the Confirm for a handshake that sets up a messaging association 6131 arrives in D mode). 6133 A.4.4.4. Incorrectly Delivered Message 6135 Class: Protocol-Error 6136 Code: 4 6137 Additional Info: None 6139 This message is sent if a GIST node receives a message over an MA 6140 which is not associated with the MRI/NSLPID/SID combination in the 6141 message. 6143 A.4.4.5. No Routing State 6145 Class: Protocol-Error 6146 Code: 5 6147 Additional Info: None 6149 This message is sent if a node receives a message for which routing 6150 state should exist, but has not yet been created and thus there is no 6151 appropriate Querying-SM or Responding-SM. This can occur on 6152 receiving a Data or Confirm message at a node whose policy requires 6153 routing state to exist before such messages can be accepted. See 6154 also Section 6.1 and Section 6.3. 6156 A.4.4.6. Unknown NSLPID 6158 Class: Permanent-Failure 6159 Code: 6 6160 Additional Info: None 6162 This message is sent if a router receives a directly addressed 6163 message for an NSLP which it does not support. 6165 A.4.4.7. Endpoint Found 6167 Class: Permanent-Failure 6168 Code: 7 6169 Additional Info: None 6171 This message is sent if a GIST node at a flow endpoint receives a 6172 Query message for an NSLP which it does not support. 6174 A.4.4.8. Message Too Large 6176 Class: Permanent-Failure 6177 Code: 8 6178 Additional Info: MTU Info 6180 A router receives a message which it can't forward because it exceeds 6181 the IP MTU on the next or subsequent hops. 6183 A.4.4.9. Object Type Error 6185 Class: Protocol-Error 6186 Code: 9 6187 Additional Info: Object Type Info 6189 This message is sent if a GIST node receives a message containing a 6190 TLV object with an invalid type. The message indicates the object 6191 type at fault in the additional info field. This error code is split 6192 into subcodes as follows: 6194 0: Duplicate Object: This subcode is used if a GIST node receives a 6195 message containing multiple instances of an object which may only 6196 appear once in a message. In the current specification, this 6197 applies to all objects. 6199 1: Unrecognised Object: This subcode is used if a GIST node receives 6200 a message containing an object which it does not support, and the 6201 extensibility flags AB=00. 6203 2: Missing Object: This subcode is used if a GIST node receives a 6204 message which is missing one or more mandatory objects. This 6205 message is also sent if a Stack-Proposal is sent without a 6206 matching Stack-Configuration-Data object when one was necessary, 6207 or vice versa. 6209 3: Invalid Object Type: This subcode is used if the object type is 6210 known, but it is not valid for this particular GIST message type. 6212 4: Untranslated Object: This subcode is used if the object type is 6213 known and is mandatory to interpret, but it contains addressing 6214 data which has not been translated by an intervening NAT. 6216 5: Invalid Extensibility Flags: This subcode is used if an object is 6217 received with the extensibility flags AB=11. 6219 A.4.4.10. Object Value Error 6221 Class: Protocol-Error 6222 Code: 10 6223 Additional Info: 1 or 2 Object Value Info fields as given below 6225 This message is sent if a node receives a message containing an 6226 object which cannot be properly parsed. The error message contains a 6227 single Object Value Info object, except for subcode 5 as stated 6228 below. This error code is split into subcodes as follows: 6230 0: Incorrect Length: The overall length does not match the object 6231 length calculated from the object contents. 6233 1: Value Not Supported: The value of a field is not supported by the 6234 GIST node. 6236 2: Invalid Flag-Field Combination: An object contains an invalid 6237 combination of flags and/or fields. At the moment this only 6238 relates to the Path-Coupled MRI (Appendix A.3.1.1), but in future 6239 there may be more. 6241 3: Empty List: At the moment this only relates to Stack-Proposals. 6242 The error message is sent if a stack proposal with a length > 0 6243 contains only null bytes (a length of 0 is handled as "Value Not 6244 Supported"). 6246 4: Invalid Cookie: The message contains a cookie which could not be 6247 verified by the node. 6249 5: Stack-Proposal - Stack-Configuration-Data Mismatch: This subcode 6250 is used if a GIST node receives a message in which the data in the 6251 Stack-Proposal object is inconsistent with the information in the 6252 Stack Configuration Data object. In this case, both the Stack- 6253 Proposal object and Stack-Configuration-Data object MUST be 6254 included in separate Object Value Info fields in that order. 6256 A.4.4.11. Invalid IP layer TTL 6258 Class: Permanent-Failure 6259 Code: 11 6260 Additional Info: None 6262 This error indicates that a message was received with an IP layer TTL 6263 outside an acceptable range; for example, that an upstream Query was 6264 received with an IP layer TTL of less than 254 (i.e. more than one IP 6265 hop from the sender). The actual IP distance can be derived from the 6266 IP-TTL information in the NLI object carried in the same message. 6268 A.4.4.12. MRI Validation Failure 6270 Class: Permanent-Failure 6271 Code: 12 6272 Additional Info: Object Value Info 6274 This error indicates that a message was received with an MRI that 6275 could not be accepted, e.g. because of too much wildcarding or 6276 failing some validation check (cf. Section 5.8.1.2). The Object 6277 Value Info includes the MRI so the error originator can indicate the 6278 part of the MRI which caused the problem. The error code is divided 6279 into subcodes as follows: 6281 0: MRI Too Wild: The MRI contained too much wildcarding (e.g. too 6282 short a destination address prefix) to be forwarded correctly down 6283 a single path. 6285 1: IP Version Mismatch: The MRI in a path-coupled Query message 6286 refers to an IP version which is not implemented on the interface 6287 used, or is different from the IP version of the Query 6288 encapsulation (see Section 7.4). 6290 2: Ingress Filter Failure: The MRI in a path-coupled Query message 6291 describes a flow which would not pass ingress filtering on the 6292 interface used. 6294 Appendix B. API between GIST and Signalling Applications 6296 This appendix provides an abstract API between GIST and signalling 6297 applications. It should not constrain implementers, but rather help 6298 clarify the interface between the different layers of the NSIS 6299 protocol suite. In addition, although some of the data types carry 6300 the information from GIST information elements, this does not imply 6301 that the format of that data as sent over the API has to be the same. 6303 Conceptually the API has similarities to the sockets API, 6304 particularly that for unconnected UDP sockets. An extension for an 6305 API like that for UDP connected sockets could be considered. In this 6306 case, for example, the only information needed in a SendMessage 6307 primitive would be NSLP-Data, NSLP-Data-Size, and NSLP-Message-Handle 6308 (which can be null). Other information which was persistent for a 6309 group of messages could be configured once for the socket. Such 6310 extensions may make a concrete implementation more efficient but do 6311 not change the API semantics, and so are not considered further here. 6313 B.1. SendMessage 6315 This primitive is passed from a signalling application to GIST. It 6316 is used whenever the signalling application wants to initiate sending 6317 a message. 6319 SendMessage ( NSLP-Data, NSLP-Data-Size, NSLP-Message-Handle, 6320 NSLPID, Interception-Class, Session-ID, MRI, SII-Handle, 6321 Transfer-Attributes, Timeout, IP-TTL, GIST-Hop-Count ) 6323 The following arguments are mandatory. 6325 NSLP-Data: The NSLP message itself. 6327 NSLP-Data-Size: The length of NSLP-Data. 6329 NSLP-Message-Handle: A handle for this message, that can be used by 6330 GIST as a reference in subsequent MessageStatus notifications 6331 (Appendix B.3). Notifications could be about error conditions or 6332 about the security attributes that will be used for the message. 6333 A NULL handle may be supplied if the NSLP is not interested in 6334 such notifications. 6336 NSLPID: An identifier indicating which NSLP this is. 6338 Interception-Class: Hint about how GIST should encapsulate any 6339 Q-mode messages; see Section 5.3.2.5. 6341 Session-ID: The NSIS session identifier. Note that it is assumed 6342 that the signalling application provides this to GIST rather than 6343 GIST providing a value itself. 6345 MRI: Message routing information for use by GIST in determining the 6346 correct next GIST hop for this message. The MRI implies the 6347 message routing method to be used and the message direction. 6349 The following arguments are optional: 6351 SII-Handle: A handle, previously supplied by GIST, to a data 6352 structure that should be used to route the message explicitly to a 6353 particular GIST next hop. 6355 Transfer-Attributes: Attributes defining how the message should be 6356 handled (see Section 4.1.2). The following attributes can be 6357 considered: 6359 Reliability: Values 'unreliable' or 'reliable'. 6361 Security: This attribute allows the NSLP to specify what level of 6362 security protection is requested for the message (such as 6363 'integrity' or 'confidentiality'), and can also be used to 6364 specify what authenticated signalling source and destination 6365 identities should be used to send the message. The 6366 possibilities can be learned by the signalling application from 6367 prior MessageStatus or RecvMessage notifications. If an NSLP- 6368 Message-Handle is provided, GIST will inform the signalling 6369 application of what values it has actually chosen for this 6370 attribute via a MessageStatus callback. This might take place 6371 either synchronously (where GIST is selecting from available 6372 messaging associations), or asynchronously (when a new 6373 messaging association needs to be created). 6375 Local Processing: This attribute contains hints from the 6376 signalling application about what local policy should be 6377 applied to the message; in particular, its transmission 6378 priority relative to other messages, or whether GIST should 6379 attempt to set up or maintain forward routing state. 6381 Timeout: Length of time GIST should attempt to send this message 6382 before indicating an error. 6384 IP-TTL: The value of the IP layer TTL that should be used when 6385 sending this message (may be overridden by GIST for particular 6386 messages). 6388 GIST-Hop-Count: The value for the hop count when sending the 6389 message. 6391 B.2. RecvMessage 6393 This primitive is passed from GIST to a signalling application. It 6394 is used whenever GIST receives a message from the network, including 6395 the case of null messages (zero length NSLP payload), typically 6396 initial Query messages. For Queries, the results of invoking this 6397 primitive are used by GIST to check whether message routing state 6398 should be created (see the discussion of the 'Routing-State-Check' 6399 argument below). 6401 RecvMessage ( NSLP-Data, NSLP-Data-Size, NSLPID, Session-ID, MRI, 6402 Routing-State-Check, SII-Handle, Transfer-Attributes, 6403 IP-TTL, IP-Distance, GIST-Hop-Count, 6404 Inbound-Interface ) 6406 NSLP-Data: The NSLP message itself (may be empty). 6408 NSLP-Data-Size: The length of NSLP-Data (may be zero). 6410 NSLPID: An identifier indicating which NSLP this message is for. 6412 Session-ID: The NSIS session identifier. 6414 MRI: Message routing information that was used by GIST in forwarding 6415 this message. Implicitly defines the message routing method that 6416 was used and the direction of the message relative to the MRI. 6418 Routing-State-Check: This boolean is True if GIST is checking with 6419 the signalling application to see if routing state should be 6420 created with the peer or the message should be forwarded further 6421 (see Section 4.3.2). If True, the signalling application should 6422 return the following values via the RecvMessage call: 6424 A boolean indicating whether to set up the state. 6426 Optionally, an NSLP-Payload to carry in the generated Response 6427 or forwarded Query respectively. 6429 This mechanism could be extended to enable the signalling 6430 application to indicate to GIST whether state installation should 6431 be immediate or deferred (see Section 5.3.3 and Section 6.3 for 6432 further discussion). 6434 SII-Handle: A handle to a data structure, identifying a peer address 6435 and interface. Can be used to identify route changes and for 6436 explicit routing to a particular GIST next hop. 6438 Transfer-Attributes: The reliability and security attributes that 6439 were associated with the reception of this particular message. As 6440 well as the attributes associated with SendMessage, GIST may 6441 indicate the level of verification of the addresses in the MRI. 6442 Three attributes can be indicated: 6444 * Whether the signalling source address is one of the flow 6445 endpoints (i.e. whether this is the first or last GIST hop); 6447 * Whether the signalling source address has been validated by a 6448 return routability check. 6450 * Whether the message was explicitly routed (and so has not been 6451 validated by GIST as delivered consistently with local routing 6452 state). 6454 IP-TTL: The value of the IP layer TTL this message was received with 6455 (if available). 6457 IP-Distance: The number of IP hops from the peer signalling node 6458 which sent this message along the path, or 0 if this information 6459 is not available. 6461 GIST-Hop-Count: The value of the hop count the message was received 6462 with, after being decremented in the GIST receive-side processing. 6464 Inbound-Interface: Attributes of the interface on which the message 6465 was received, such as whether it lies on the internal or external 6466 side of a NAT. These attributes have only local significance and 6467 are implementation defined. 6469 B.3. MessageStatus 6471 This primitive is passed from GIST to a signalling application. It 6472 is used to notify the signalling application that a message that it 6473 requested to be sent could not be dispatched, or to inform the 6474 signalling application about the transfer attributes that have been 6475 selected for the message (specifically, security attributes). The 6476 signalling application can respond to this message with a return code 6477 to abort the sending of the message if the attributes are not 6478 acceptable. 6480 MessageStatus (NSLP-Message-Handle, Transfer-Attributes, Error-Type) 6481 NSLP-Message-Handle: A handle for the message provided by the 6482 signalling application in SendMessage. 6484 Transfer-Attributes: The reliability and security attributes that 6485 will be used to transmit this particular message. 6487 Error-Type: Indicates the type of error that occurred. For example, 6488 'no next node found'. 6490 B.4. NetworkNotification 6492 This primitive is passed from GIST to a signalling application. It 6493 indicates that a network event of possible interest to the signalling 6494 application occurred. 6496 NetworkNotification ( NSLPID, MRI, Network-Notification-Type ) 6498 NSLPID: An identifier indicating which NSLP this is message is for. 6500 MRI: Provides the message routing information to which the network 6501 notification applies. 6503 Network-Notification-Type: Indicates the type of event that caused 6504 the notification and associated additional data. Five events have 6505 been identified: 6507 Last Node: GIST has detected that this is the last NSLP-aware 6508 node in the path. See Section 4.3.4. 6510 Routing Status Change: GIST has installed new routing state, has 6511 detected that existing routing state may no longer be valid, or 6512 has re-established existing routing state. See Section 7.1.3. 6513 The new status is reported; if the status is Good, the SII- 6514 Handle of the peer is also reported, as for RecvMessage. 6516 Route Deletion: GIST has determined that an old route is now 6517 definitely invalid, e.g. that flows are definitely not using it 6518 (see Section 7.1.4). The SII-Handle of the peer is also 6519 reported. 6521 Node Authorisation Change: The authorisation status of a peer has 6522 changed, meaning that routing state is no longer valid or that 6523 a signalling peer is no longer reachable; see Section 4.4.2. 6525 Communication Failure: Communication with the peer has failed; 6526 messages may have been lost. 6528 B.5. SetStateLifetime 6530 This primitive is passed from a signalling application to GIST. It 6531 indicates the duration for which the signalling application would 6532 like GIST to retain its routing state. It can also give a hint that 6533 the signalling application is no longer interested in the state. 6535 SetStateLifetime ( NSLPID, MRI, SID, State-Lifetime ) 6537 NSLPID: Provides the NSLPID to which the routing state lifetime 6538 applies. 6540 MRI: Provides the message routing information to which the routing 6541 state lifetime applies; includes the direction (in the D flag). 6543 SID: The session ID which the signalling application will be using 6544 with this routing state. Can be wildcarded. 6546 State-Lifetime: Indicates the lifetime for which the signalling 6547 application wishes GIST to retain its routing state (may be zero, 6548 indicating that the signalling application has no further interest 6549 in the GIST state). 6551 B.6. InvalidateRoutingState 6553 This primitive is passed from a signalling application to GIST. It 6554 indicates that the signalling application has knowledge that the next 6555 signalling hop known to GIST may no longer be valid, either because 6556 of changes in the network routing or the processing capabilities of 6557 signalling application nodes. See Section 7.1. 6559 InvalidateRoutingState ( NSLPID, MRI, Status, NSLP-Data, 6560 NSLP-Data-Size, Urgent ) 6562 NSLPID: The NSLP originating the message. May be null (in which 6563 case the invalidation applies to all signalling applications). 6565 MRI: The flow for which routing state should be invalidated; 6566 includes the direction of the change (in the D flag). 6568 Status: The new status that should be assumed for the routing state, 6569 one of Bad or Tentative (see Section 7.1.3). 6571 NSLP-Data, NSLP-Data-Size Optional: a payload provided by the NSLP 6572 to be used the next GIST handshake. This can be used as part of a 6573 conditional peering process (see Section 4.3.2). The payload will 6574 be transmitted without security protection. 6576 Urgent: A hint as to whether rediscovery should take place 6577 immediately, or only with the next signalling message. 6579 Appendix C. Example Routing State Table and Handshake 6581 Figure 11 shows a signalling scenario for a single flow being managed 6582 by two signalling applications using the path-coupled message routing 6583 method. The flow sender and receiver and one router support both, 6584 two other routers support one each. The figure also shows the 6585 routing state table at node B. 6587 A B C D E 6588 +------+ +-----+ +-----+ +-----+ +--------+ 6589 | Flow | +-+ +-+ |NSLP1| |NSLP1| | | | Flow | 6590 |Sender|====|R|====|R|====|NSLP2|====| |====|NSLP2|====|Receiver| 6591 | | +-+ +-+ |GIST | |GIST | |GIST | | | 6592 +------+ +-----+ +-----+ +-----+ +--------+ 6593 Flow Direction ------------------------------>> 6595 +------------------------------------+---------+--------+-----------+ 6596 | Message Routing Information | Session | NSLPID | Routing | 6597 | | ID | | State | 6598 +------------------------------------+---------+--------+-----------+ 6599 | MRM = Path Coupled; Flow ID = | 0xABCD | NSLP1 | IP-A | 6600 | {IP-A, IP-E, proto/ports}; D=up | | | | 6601 | | | | | 6602 | MRM = Path Coupled; Flow ID = | 0xABCD | NSLP1 | (null) | 6603 | {IP-A, IP-E, proto/ports}; D=down | | | | 6604 | | | | | 6605 | MRM = Path Coupled; Flow ID = | 0x1234 | NSLP2 | IP-A | 6606 | {IP-A, IP-E, proto/ports}; D=up | | | | 6607 | | | | | 6608 | MRM = Path Coupled; Flow ID = | 0x1234 | NSLP2 | Points to | 6609 | {IP-A, IP-E, proto/ports}; D=down | | | B-D MA | 6610 +------------------------------------+---------+--------+-----------+ 6612 Figure 11: A Signalling Scenario 6614 The upstream state is just the same address for each application. 6615 For the downstream direction, NSLP1 only requires D-mode messages and 6616 so no explicit routing state towards C is needed. NSLP2 requires a 6617 messaging association for its messages towards node D, and node C 6618 does not process NSLP2 at all, so the peer state for NSLP2 is a 6619 pointer to a messaging association that runs directly from B to D. 6620 Note that E is not visible in the state table (except implicitly in 6621 the address in the message routing information); routing state is 6622 stored only for adjacent peers. (In addition to the peer 6623 identification, IP hop counts are stored for each peer where the 6624 state itself if not null; this is not shown in the table.) 6626 Figure 12 shows a GIST handshake setting up a messaging association 6627 for B-D signalling, with the exchange of Stack Proposals and MA- 6628 protocol-options in each direction. The Querying node selects TLS/ 6629 TCP as the stack configuration and sets up the messaging association 6630 over which it sends the Confirm. 6632 -------------------------- Query ----------------------------> 6633 IP(Src=IP#A; Dst=IP#E); UDP(Src=6789; Dst=GIST) 6634 D-mode magic number (0x4e04 bda5) 6635 GIST(Header(Type=Query; NSLPID=NSLP2; R=1; S=0) 6636 MRI(MRM=Path-Coupled; Flow=F; Direction=down) 6637 SessionID(0x1234) NLI(Peer='string1'; IA=IP#B) 6638 QueryCookie(0x139471239471923526) 6639 StackProposal(#Proposals=3;1=TLS/TCP; 2=TLS/SCTP; 3=TCP) 6640 StackConfigurationData(HoldTime=300; #MPO=2; 6641 TCP(Applicable: all; Data: null) 6642 SCTP(Applicable: all; Data: null))) 6644 <---------------------- Response ---------------------------- 6645 IP(Src=IP#D; Dst=IP#B); UDP(Src=GIST; Dst=6789) 6646 D-mode magic number (0x4e04 bda5) 6647 GIST(Header(Type=Response; NSLPID=NSLP2; R=1; S=1) 6648 MRI(MRM=Path-Coupled; Flow=F; Direction=up) 6649 SessionID(0x1234) NLI(Peer='stringr2', IA=IP#D) 6650 QueryCookie(0x139471239471923526) 6651 ResponderCookie(0xacdefedcdfaeeeded) 6652 StackProposal(#Proposals=3; 1=TCP; 2=SCTP; 3=TLS/TCP) 6653 StackConfigurationData(HoldTime=200; #MPO=3; 6654 TCP(Applicable: 3; Data: port=6123) 6655 TCP(Applicable: 1; Data: port=5438) 6656 SCTP(Applicable: all; Data: port=3333))) 6658 -------------------------TCP SYN-----------------------> 6659 <----------------------TCP SYN/ACK---------------------- 6660 -------------------------TCP ACK-----------------------> 6661 TCP connect(IP Src=IP#B; IP Dst=IP#D; Src Port=9166; Dst Port=6123) 6662 <-----------------------TLS INIT-----------------------> 6664 ------------------------ Confirm ----------------------------> 6665 [Sent within messaging association] 6666 GIST(Header(Type=Confirm; NSLPID=NSLP2; R=0; S=1) 6667 MRI(MRM=Path-Coupled; Flow=F; Direction=down) 6668 SessionID(0x1234) NLI(Peer='string1'; IA=IP#B) 6669 ResponderCookie(0xacdefedcdfaeeeded) 6670 StackProposal(#Proposals=3; 1=TCP; 2=SCTP; 3=TLS/TCP) 6671 StackConfigurationData(HoldTime=300)) 6673 Figure 12: GIST Handshake Message Sequence 6675 Appendix D. Change History 6677 Note to the RFC Editor: this appendix to be removed before 6678 publication as an RFC. 6680 D.1. Changes in Version -16 6682 The following changes were made in version 15 in response to IESG 6683 review: 6685 1. Removed all discussion of the use of Router Alert Option 6686 (including the old Appendix C on transition aspects), apart from 6687 a reference to a new independent draft on the topic and a new 6688 Section 5.3.2.5 which describes how such extensions would fit 6689 into the GIST/signalling application interface. 6691 2. Added new text in Section 8.7 about the issues that arise when 6692 full mutual authentication is not performed in TLS. 6694 3. Various other clarifications and editorial corrections. 6696 Authors' Addresses 6698 Henning Schulzrinne 6699 Columbia University 6700 Department of Computer Science 6701 450 Computer Science Building 6702 New York, NY 10027 6703 US 6705 Phone: +1 212 939 7042 6706 Email: hgs+nsis@cs.columbia.edu 6707 URI: http://www.cs.columbia.edu 6709 Robert Hancock 6710 Roke Manor Research 6711 Old Salisbury Lane 6712 Romsey, Hampshire SO51 0ZN 6713 UK 6715 Email: robert.hancock@roke.co.uk 6716 URI: http://www.roke.co.uk 6718 Full Copyright Statement 6720 Copyright (C) The IETF Trust (2008). 6722 This document is subject to the rights, licenses and restrictions 6723 contained in BCP 78, and except as set forth therein, the authors 6724 retain all their rights. 6726 This document and the information contained herein are provided on an 6727 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 6728 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 6729 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 6730 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 6731 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 6732 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 6734 Intellectual Property 6736 The IETF takes no position regarding the validity or scope of any 6737 Intellectual Property Rights or other rights that might be claimed to 6738 pertain to the implementation or use of the technology described in 6739 this document or the extent to which any license under such rights 6740 might or might not be available; nor does it represent that it has 6741 made any independent effort to identify any such rights. Information 6742 on the procedures with respect to rights in RFC documents can be 6743 found in BCP 78 and BCP 79. 6745 Copies of IPR disclosures made to the IETF Secretariat and any 6746 assurances of licenses to be made available, or the result of an 6747 attempt made to obtain a general license or permission for the use of 6748 such proprietary rights by implementers or users of this 6749 specification can be obtained from the IETF on-line IPR repository at 6750 http://www.ietf.org/ipr. 6752 The IETF invites any interested party to bring to its attention any 6753 copyrights, patents or patent applications, or other proprietary 6754 rights that may cover technology that may be required to implement 6755 this standard. Please address the information to the IETF at 6756 ietf-ipr@ietf.org.