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