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