idnits 2.17.1 draft-ietf-nsis-ntlp-19.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 23, 2009) is 5510 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 3732 ** 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 24, 2009 RMR 6 March 23, 2009 8 GIST: General Internet Signalling Transport 9 draft-ietf-nsis-ntlp-19 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 24, 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 . . . . . . . . . . . . . . . . . . . . 60 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. The usage of 2507 this destination port by other applications will result in reduced 2508 performance due to increased delay and packet drop rates due to their 2509 interception by GIST nodes. 2511 A GIST node will need to be capable to filter out all IP/UDP packets 2512 that has an UDP destination port number equal to the one registered 2513 for GIST Q-mode encapsulation on the IP-level it operates. These 2514 packets should then be further verified to be GIST packets by 2515 checking the magic number (see Section 5.3.1). The packets that 2516 meets both port and magic number requirement are further processed as 2517 GIST Q-mode packets. Any filtered packets that fails this GIST magic 2518 word check SHOULD be forwarded towards the IP packets destination 2519 with best possible effort. A GIST node is RECOMMENDED as protection 2520 against denial of service attacks to have a rate limiter preventing 2521 more packets (filtered as potential Q-mode packets) then the system 2522 can handle safely to be processed. Any excessive packets SHOULD be 2523 discarded. 2525 5.3.2.4. IP Option Processing 2527 For both IPv4 and IPv6, for Q-mode packets with IP options allowed by 2528 the above requirements, IP options processing is intended to be 2529 carried out independently of GIST processing. Note that for the 2530 options allowed by the above rules, the option semantics are 2531 independent of the payload: UDP payload modifications are not 2532 prevented by the options and do not affect the option content, and 2533 conversely the presence of the options does not affect the UDP 2534 payload. 2536 On packets originated by GIST, IP options MAY be added according to 2537 node-local policies on outgoing IP data. On packets forwarded by 2538 GIST without NSLP processing, IP options MUST be processed as for a 2539 normally forwarded IP packet. On packets locally delivered to the 2540 NSLP, the IP options MAY be passed to the NSLP and equivalent options 2541 used on subsequently generated outgoing Q-mode packets. In this 2542 case, routing related options SHOULD be processed identically as they 2543 would be for a normally forwarded IP packet. 2545 5.3.2.5. Q-Mode Interception Extensibility 2547 In this specification, the basic GIST mechanism for Q-mode 2548 interception is independent of signalling application; the NSLPID 2549 itself is only checked after IP/UDP header processing. The 2550 interception load on a GIST-aware node is therefore a function of 2551 data plane load, independent of the number of Q-mode messages or 2552 signalling application mix. There are potentially more efficient 2553 packet interception mechanisms, for example using the router alert 2554 option ([14] and [18]); details for this case are described in a 2555 separate document [44] as an experimental extension. Such extensions 2556 would initially be deployed in specific network regions rather than 2557 the Internet at large. 2559 To support this type of extension, signalling applications associate 2560 all messages for a given NSLPID with a single interception class, 2561 which is a parameter provided through the GIST API (Appendix B.1). 2562 The NSLPID to interception class mapping is defined as part of the 2563 signalling application specification; multiple NSLPIDs can be mapped 2564 to the same class. Packet interception extensions are allowed to use 2565 this additional parameter to enable Q-mode interception for specific 2566 interception classes rather than for all signalling messages. This 2567 definition of interception classes allows such extensions to be 2568 designed and implemented purely at the GIST level, without changing 2569 signalling application specifications. Guidelines on defining 2570 interception classes are given in [13]. 2572 5.3.3. Retransmission and Rate Control 2574 D-mode uses UDP, and hence has no automatic reliability or congestion 2575 control capabilities. Signalling applications requiring reliability 2576 should be serviced using C-mode, which should also carry the bulk of 2577 signalling traffic. However, some form of messaging reliability is 2578 required for the GIST control messages themselves, as is rate control 2579 to handle retransmissions and also bursts of unreliable signalling or 2580 state setup requests from the signalling applications. 2582 Query messages which do not receive Responses MAY be retransmitted; 2583 retransmissions MUST use a binary exponential backoff. The initial 2584 timer value is T1, which the backoff process can increase up to a 2585 maximum value of T2 seconds. The default value for T1 is 500 ms. T1 2586 is an estimate of the round-trip time between the querying and 2587 responding nodes. Nodes MAY use smaller values of T1 if it is known 2588 that the Query should be answered within the local network. T1 MAY 2589 be chosen larger, and this is RECOMMENDED if it is known in advance 2590 (such as on high latency access links) that the round-trip time is 2591 larger. The default value of T2 is 64*T1. Note that Queries may go 2592 unanswered either because of message loss (in either direction), or 2593 because there is no reachable GIST peer. Therefore, implementations 2594 MAY trade off reliability (large T2) against promptness of error 2595 feedback to applications (small T2). If the NSLP has indicated a 2596 timeout on the validity of this payload (see Appendix B.1), T2 MUST 2597 be chosen so that the process terminates within this timeout. 2598 Retransmitted Queries MUST use different Query-Cookie values. If the 2599 Query carries NSLP data, it may be delivered multiple times to the 2600 signalling application. These rules apply equally to the message 2601 that first creates routing state, and those that refresh it. In all 2602 cases, Responses MUST be sent promptly to avoid spurious 2603 retransmissions. Nodes generating any type of retransmission MUST be 2604 prepared to receive and match a reply to any of them, not just the 2605 one most recently sent. Although a node SHOULD terminate its 2606 retransmission process when any reply is received, it MUST continue 2607 to process further replies as normal. 2609 This algorithm is sufficient to handle lost Queries and Responses. 2610 The case of a lost Confirm is more subtle. The Responding node MAY 2611 run a retransmission timer to resend the Response until a Confirm is 2612 received; the timer MUST use the same backoff mechanism and 2613 parameters as for Responses. The problem of an amplification attack 2614 stimulated by a malicious Query is handled by requiring the cookie 2615 mechanism to enable the node receiving the Response to discard it 2616 efficiently if it does not match a previously sent Query. This 2617 approach is only appropriate if the Responding node is prepared to 2618 store per-flow state after receiving a single (Query) message, which 2619 includes the case where the node has queued NSLP data. If the 2620 Responding node has delayed state installation, the error condition 2621 will only be detected when a Data message arrives. This is handled 2622 as a routing state error (see Section 4.4.6) which causes the 2623 Querying node to restart the handshake. 2625 The basic rate-control requirements for D-mode traffic are 2626 deliberately minimal. A single rate limiter applies to all traffic, 2627 for all interfaces and message types. It applies to retransmissions 2628 as well as new messages, although an implementation MAY choose to 2629 prioritise one over the other. Rate-control applies only to locally 2630 generated D-mode messages, not to messages which are being forwarded. 2631 When the rate limiter is in effect, D-mode messages MUST be queued 2632 until transmission is re-enabled, or they MAY be dropped with an 2633 error condition indicated back to local signalling applications. In 2634 either case, the effect of this will be to reduce the rate at which 2635 new transactions can be initiated by signalling applications, thereby 2636 reducing the load on the network. 2638 The rate limiting mechanism is implementation-defined, but it is 2639 RECOMMENDED that a token bucket limiter as described in [34] be used. 2640 The token bucket MUST be sized to ensure that a node cannot saturate 2641 the network with D-mode traffic, for example when re-probing the 2642 network for multiple flows after a route change. A suitable approach 2643 is to restrict the token bucket parameters so that the mean output 2644 rate is a small fraction of the node's lowest-speed interface. It is 2645 RECOMMENDED that this fraction is no more than 5%. Note that, 2646 according to the rules of Section 4.3.3, in general D-mode SHOULD 2647 only be used for Queries and Responses rather than normal signalling 2648 traffic unless capacity for normal signalling traffic can be 2649 engineered. 2651 5.4. C-mode Transport 2653 It is a requirement of the NTLP defined in [30] that it should be 2654 able to support bundling of small messages, fragmentation of large 2655 messages, and message boundary delineation. TCP provides both 2656 bundling and fragmentation, but not message boundaries. However, the 2657 length information in the GIST common header allows the message 2658 boundary to be discovered during parsing. The bundling together of 2659 small messages can either be done within the transport protocol or 2660 can be carried out by GIST during message construction. Either way, 2661 two approaches can be distinguished: 2663 1. As messages arrive for transmission they are gathered into a 2664 bundle until a size limit is reached or a timeout expires (cf. 2665 the Nagle algorithm of TCP). This provides maximal efficiency at 2666 the cost of some latency. 2668 2. Messages awaiting transmission are gathered together while the 2669 node is not allowed to send them, for example because it is 2670 congestion controlled. 2672 The second type of bundling is always appropriate. For GIST, the 2673 first type MUST NOT be used for trigger messages (i.e. messages that 2674 update GIST or signalling application state), but may be appropriate 2675 for refresh messages (i.e. messages that just extend timers). These 2676 distinctions are known only to the signalling applications, but MAY 2677 be indicated (as an implementation issue) by setting the priority 2678 transfer attribute (Section 4.1.2). 2680 It can be seen that all of these transport protocol options can be 2681 supported by the basic GIST message format already presented. The 2682 GIST message, consisting of common header and TLVs, is carried 2683 directly in the transport protocol, possibly incorporating transport 2684 layer security protection. Further messages can be carried in a 2685 continuous stream. This specification defines only the use of TCP, 2686 but other possibilities could be included without additional work on 2687 message formatting. 2689 5.5. Message Type/Encapsulation Relationships 2691 GIST has four primary message types (Query, Response, Confirm, and 2692 Data) and three possible encapsulation methods (normal D-mode, 2693 Q-mode, and C-mode). The combinations of message type and 2694 encapsulation which are allowed for message transmission are given in 2695 the table below. In some cases there are several possible choices, 2696 depending on the existence of routing state or messaging 2697 associations. The rules governing GIST policy, including whether or 2698 not to create such state to handle a message, are described 2699 normatively in the other sections of this specification. If a 2700 message which can only be sent in Q/D-mode arrives in C-mode or vice 2701 versa, this MUST be rejected with an "Incorrect Encapsulation" error 2702 message (Appendix A.4.4.3). However, it should be noted that the 2703 processing of the message at the receiver is not otherwise affected 2704 by the encapsulation method used, except that the decapsulation 2705 process may provide additional information, such as translated 2706 addresses or IP hop count to be used in the subsequent message 2707 processing. 2709 +----------+--------------+---------------------------+-------------+ 2710 | Message | Normal | Query D-mode (Q-mode) | C-mode | 2711 | | D-mode | | | 2712 +----------+--------------+---------------------------+-------------+ 2713 | Query | Never | Always, with C-flag=1 | Never | 2714 | | | | | 2715 | Response | Unless a | Never | If a | 2716 | | messaging | | messaging | 2717 | | association | | association | 2718 | | is being | | is being | 2719 | | re-used | | re-used | 2720 | | | | | 2721 | Confirm | Only if no | Never | If a | 2722 | | messaging | | messaging | 2723 | | association | | association | 2724 | | has been set | | has been | 2725 | | up or is | | set up or | 2726 | | being | | is being | 2727 | | re-used | | re-used | 2728 | | | | | 2729 | Data | If routing | If the MRI can be used to | If a | 2730 | | state exists | derive the Q-mode | messaging | 2731 | | for the flow | encapsulation, and either | association | 2732 | | but no | no routing state exists | exists | 2733 | | messaging | or local policy requires | | 2734 | | association | Q-mode; MUST have | | 2735 | | | C-flag=1 | | 2736 +----------+--------------+---------------------------+-------------+ 2738 5.6. Error Message Processing 2740 Special rules apply to the encapsulation and transmission of error 2741 messages. 2743 GIST only generates error messages in reaction to incoming messages. 2744 Error messages MUST NOT be generated in reaction to incoming error 2745 messages. The routing and encapsulation of the error message is 2746 derived from that of the message that caused the error; in 2747 particular, local routing state is not consulted. Routing state and 2748 messaging association state MUST NOT be created to handle the error, 2749 and error messages MUST NOT be retransmitted explicitly by GIST, 2750 although they are subject to the same rate control as other messages. 2752 o If the incoming message was received in D-mode, the error MUST be 2753 sent in D-mode using the normal encapsulation, using the 2754 addressing information from the NLI object in the incoming 2755 message. If the NLI could not be determined, the error MUST be 2756 sent to the IP source of the incoming message if the S flag was 2757 set in it. The NLI object in the Error message reports 2758 information about the originator of the error. 2760 o If the incoming message was received over a messaging association, 2761 the error MUST be sent back over the same messaging association. 2763 The NSLPID in the common header of the Error message has the value 2764 zero. If for any reason the message cannot be sent (for example, 2765 because it is too large to send in D-mode, or because the MA over 2766 which the original message arrived has since been closed) an error 2767 SHOULD be logged locally. The receiver of the Error message can 2768 infer the NSLPID for the message that caused the error from the 2769 Common Header that is embedded in the Error object. 2771 5.7. Messaging Association Setup 2773 5.7.1. Overview 2775 A key attribute of GIST is that it is flexible in its ability to use 2776 existing transport and security protocols. Different transport 2777 protocols may have performance attributes appropriate to different 2778 environments; different security protocols may fit appropriately with 2779 different authentication infrastructures. Even given an initial 2780 default mandatory protocol set for GIST, the need to support new 2781 protocols in the future cannot be ruled out, and secure feature 2782 negotiation cannot be added to an existing protocol in a backwards- 2783 compatible way. Therefore, some sort of capability discovery is 2784 required. 2786 Capability discovery is carried out in Query and Response messages, 2787 using Stack-Proposal and Stack-Configuration-Data (SCD) objects. If 2788 a new messaging association is required it is then set up, followed 2789 by a Confirm. Messaging association multiplexing is achieved by 2790 short-circuiting this exchange by sending the Response or Confirm 2791 messages on an existing association (Section 4.4.3); whether to do 2792 this is a matter of local policy. The end result of this process is 2793 a messaging association which is a stack of protocols. If multiple 2794 associations exist, it is a matter of local policy how to distribute 2795 messages over them, subject to respecting the transfer attributes 2796 requested for each message. 2798 Every possible protocol for a messaging association has the following 2799 attributes: 2801 o MA-Protocol-ID, a 1-byte IANA assigned value (see Section 9). 2803 o A specification of the (non-negotiable) policies about how the 2804 protocol should be used; for example, in which direction a 2805 connection should be opened. 2807 o [Depending on the specific protocol:] Formats for an MA-protocol- 2808 options field to carry the protocol addressing and other 2809 configuration information in the SCD object. The format may 2810 differ depending on whether the field is present in the Query or 2811 Response. Some protocols do not require the definition of such 2812 additional data, in which case no corresponding MA-protocol- 2813 options field will occur in the SCD object. 2815 A Stack-Proposal object is simply a list of profiles; each profile is 2816 a sequence of MA-Protocol-IDs. A profile lists the protocols in 'top 2817 to bottom' order (e.g. TLS over TCP). A Stack-Proposal is generally 2818 accompanied by a SCD object which carries an MA-protocol-options 2819 field for any protocol listed in the Stack-Proposal which needs it. 2820 An MA-protocol-options field may apply globally, to all instances of 2821 the protocol in the Stack-Proposal; or it can be tagged as applying 2822 to a specific instance. The latter approach can for example be used 2823 to carry different port numbers for TCP depending on whether it is to 2824 be used with or without TLS. An message flow which shows several of 2825 the features of Stack-Proposal and Stack-Configuration-Data formats 2826 can be found in Appendix C. 2828 An MA-protocol-options field may also be flagged as not usable; for 2829 example, a NAT which could not handle SCTP would set this in an MA- 2830 protocol-options field about SCTP. A protocol flagged this way MUST 2831 NOT be used for a messaging association. If the Stack-Proposal and 2832 SCD are both present but not consistent, for example, if they refer 2833 to different protocols, or an MA-protocol-options field refers to a 2834 non-existent profile, an "Object Value Error" message 2835 (Appendix A.4.4.10) with subcode 5 ("Stack-Proposal - Stack- 2836 Configuration-Data Mismatch") MUST be returned and the message 2837 dropped. 2839 A node generating a SCD object MUST honour the implied protocol 2840 configurations for the period during which a messaging association 2841 might be set up; in particular, it MUST be immediately prepared to 2842 accept incoming datagrams or connections at the protocol/port 2843 combinations advertised. This MAY require the creation of listening 2844 endpoints for the transport and security protocols in question, or a 2845 node MAY keep a pool of such endpoints open for extended periods. 2846 However, the received object contents MUST be retained only for the 2847 duration of the Query/Response exchange and to allow any necessary 2848 association setup to complete. They may become invalid because of 2849 expired bindings at intermediate NATs, or because the advertising 2850 node is using agile ports. Once the setup is complete, or if it is 2851 not necessary, or fails for some reason, the object contents MUST be 2852 discarded. A default time of 30 seconds to keep the contents is 2853 RECOMMENDED. 2855 A Query requesting messaging association setup always contains a 2856 Stack-Proposal and SCD object. The Stack-Proposal MUST only include 2857 protocol configurations that are suitable for the transfer attributes 2858 of the messages that the Querying node wishes to use the messaging 2859 association for. For example, it should not simply include all 2860 configurations that the Querying node is capable of supporting. 2862 The Response always contains a Stack-Proposal and SCD object, unless 2863 multiplexing (where the Responder decides to use an existing 2864 association) occurs. For such a Response, the security protocols 2865 listed in the Stack-Proposal MUST NOT depend on the Query. A node 2866 MAY make different proposals depending on the combination of 2867 interface and NSLPID. If multiplexing does occur, which is indicated 2868 by sending the Response over an existing messaging association, the 2869 following rules apply: 2871 o The re-used messaging association MUST NOT have weaker security 2872 properties than all of the options that would have been offered in 2873 the full Response that would have been sent without re-use. 2875 o The re-used messaging association MUST have equivalent or better 2876 transport and security characteristics as at least one of the 2877 protocol configurations that was offered in the Query. 2879 Once the messaging association is set up, the Querying node repeats 2880 the responder's Stack-Proposal over it in the Confirm. The 2881 responding node MUST verify that this has not been changed as part of 2882 bidding-down attack prevention, as well as verifying the Responder 2883 cookie (Section 8.5). If either check fails, the responding node 2884 MUST NOT create the message routing state (or MUST delete it if it 2885 already exists) and SHOULD log an error condition locally. If this 2886 is the first message on a new MA, the MA MUST be torn down. See 2887 Section 8.6 for further discussion. 2889 5.7.2. Protocol Definition: Forwards-TCP 2891 This MA-Protocol-ID denotes a basic use of TCP between peers. 2892 Support for this protocol is REQUIRED. If this protocol is offered, 2893 MA-protocol-options data MUST also be carried in the SCD object. The 2894 MA-protocol-options field formats are: 2896 o in a Query: no additional options data (the MA-protocol-options 2897 length field is zero). 2899 o in a Response: 2 byte port number at which the connection will be 2900 accepted, followed by 2 pad bytes. 2902 The connection is opened in the forwards direction, from the Querying 2903 node towards the responder. The Querying node MAY use any source 2904 address and source port. The destination information MUST be derived 2905 from information in the Response: the address from the interface- 2906 address from the Network-Layer-Information object and the port from 2907 the SCD object as described above. 2909 Associations using Forwards-TCP can carry messages with the transfer 2910 attribute Reliable=True. If an error occurs on the TCP connection 2911 such as a reset, as can be detected for example by a socket exception 2912 condition, GIST MUST report this to NSLPs as discussed in 2913 Section 4.1.2. 2915 5.7.3. Protocol Definition: Transport Layer Security 2917 This MA-Protocol-ID denotes a basic use of transport layer channel 2918 security, initially in conjunction with TCP. Support for this 2919 protocol in conjunction with TCP is REQUIRED; associations using it 2920 can carry messages with transfer attributes requesting 2921 confidentiality or integrity protection. The specific TLS version 2922 will be negotiated within the TLS layer itself, but implementations 2923 MUST NOT negotiate to protocol versions prior to TLS1.0 [16] and MUST 2924 use the highest protocol version supported by both peers. 2925 Implementation of TLS1.2 [11] is RECOMMENDED. GIST nodes supporting 2926 TLS1.0 or TLS1.1 MUST- be able to negotiate the TLS ciphersuite 2927 TLS_RSA_WITH_3DES_EDE_CBC_SHA and SHOULD+ be able to negotiate the 2928 TLS ciphersuite TLS_RSA_WITH_AES_128_CBC_SHA. They MAY negotiate any 2929 mutually acceptable ciphersuite that provides authentication, 2930 integrity, and confidentiality. 2932 The default mode of TLS authentication, which applies in particular 2933 to the above ciphersuites, uses a client/server X.509 certificate 2934 exchange. The Querying node acts as a TLS client, and the Responding 2935 node acts as a TLS server. Where one of the above ciphersuites is 2936 negotiated, the GIST node acting as a server MUST provide a 2937 certificate, and MUST request one from the GIST node acting as a TLS 2938 client. This allows either server-only or mutual authentication, 2939 depending on the certificates available to the client and the policy 2940 applied at the server. 2942 GIST nodes MAY negotiate other TLS ciphersuites. In some cases, the 2943 negotiation of alternative ciphersuites is used to trigger 2944 alternative authentication procedures, such as the use of pre-shared 2945 keys [33]. The use of other authentication procedures may require 2946 additional specification work to define how they can be used as part 2947 of TLS within the GIST framework, and may or may not require the 2948 definition of additional MA-Protocol-IDs. 2950 No MA-protocol-options field is required for this TLS protocol 2951 definition. The configuration information for the transport protocol 2952 over which TLS is running (e.g. TCP port number) is provided by the 2953 MA-protocol-options for that protocol. 2955 5.7.3.1. Identity Checking in TLS 2957 After TLS authentication, a node MUST check the identity presented by 2958 the peer in order to avoid man-in-the-middle attacks, and verify that 2959 the peer is authorised to take part in signalling at the GIST layer. 2960 The authorisation check is carried out by comparing the presented 2961 identity with each Authorised Peer Database (APD) entry in turn, as 2962 discussed in Section 4.4.2. This section defines the identity 2963 comparison algorithm for a single APD entry. 2965 For TLS authentication with X.509 certificates, an identity from the 2966 DNS namespace MUST be checked against each subjectAltName extension 2967 of type dNSName present in the certificate. If no such extension is 2968 present, then the identity MUST be compared to the (most specific) 2969 Common Name in the Subject field of the certificate. When matching 2970 DNS names against dNSName or Common Name fields, matching is case- 2971 insensitive. Also, a "*" wildcard character MAY be used as the left- 2972 most name component in the certificate or identity in the APD. For 2973 example, *.example.com in the APD would match certificates for 2974 a.example.com, foo.example.com, *.example.com, etc., but would not 2975 match example.com. Similarly, a certificate for *.example.com would 2976 be valid for APD identities of a.example.com, foo.example.com, 2977 *.example.com, etc., but not example.com. 2979 Additionally, a node MUST verify the binding between the identity of 2980 the peer to which it connects and the public key presented by that 2981 peer. Nodes SHOULD implement the algorithm in Section 6 of [9] for 2982 general certificate validation, but MAY supplement that algorithm 2983 with other validation methods that achieve equivalent levels of 2984 verification (such as comparing the server certificate against a 2985 local store of already-verified certificates and identity bindings). 2987 For TLS authentication with pre-shared keys, the identity in the 2988 psk_identity_hint (for the server identity, i.e. the Responding node) 2989 or psk_identity (for the client identity, i.e. the Querying node) 2990 MUST be compared to the identities in the APD. 2992 5.8. Specific Message Routing Methods 2994 Each message routing method (see Section 3.3) requires the definition 2995 of the format of the message routing information (MRI) and Q-mode 2996 encapsulation rules. These are given in the following subsections 2997 for the MRMs currently defined. A GIST implementation on a node MUST 2998 support whatever MRMs are required by the NSLPs on that node; GIST 2999 implementations SHOULD provide support for both the MRMs defined 3000 here, in order to minimise deployment barriers for new signalling 3001 applications that need them. 3003 5.8.1. The Path-Coupled MRM 3005 5.8.1.1. Message Routing Information 3007 For the path-coupled MRM, this is conceptually the Flow Identifier as 3008 in the NSIS Framework [30]. Minimally, this could just be the flow 3009 destination address; however, to account for policy based forwarding 3010 and other issues a more complete set of header fields SHOULD be 3011 specified if possible (see Section 4.3.4 and Section 7.2 for further 3012 discussion). 3014 MRI = network-layer-version 3015 source-address prefix-length 3016 destination-address prefix-length 3017 IP-protocol 3018 diffserv-codepoint 3019 [ flow-label ] 3020 [ ipsec-SPI / L4-ports] 3022 Additional control information defines whether the flow-label, IPsec 3023 Security Parameters Index (SPI), and port information are present, 3024 and whether the IP-protocol and diffserv-codepoint fields should be 3025 interpreted as significant. The source and destination addresses 3026 MUST be real node addresses, but prefix lengths other than 32/128 3027 (for IPv4/6) MAY be used to implement address wildcarding, allowing 3028 the MRI to refer to traffic to or from a wider address range. An 3029 additional flag defines the message direction relative to the MRI 3030 (upstream vs. downstream). 3032 The MRI format allows a potentially very large number of different 3033 flag and field combinations. A GIST implementation that cannot 3034 interpret the MRI in a message MUST return an "Object Value Error" 3035 message (Appendix A.4.4.10) with subcodes 1 ("Value Not Supported") 3036 or 2 ("Invalid Flag-Field Combination") and drop the message. 3038 5.8.1.2. Downstream Q-mode Encapsulation 3040 Where the signalling message is travelling in the same ('downstream') 3041 direction as the flow defined by the MRI, the IP addressing for 3042 Q-mode encapsulated messages is as follows. Support for this 3043 encapsulation is REQUIRED. 3045 o The destination IP address MUST be the flow destination address as 3046 given in the MRI of the message payload. 3048 o By default, the source address is the flow source address, again 3049 from the MRI; therefore, the source addressing mode flag in the 3050 common header S=0. This provides the best likelihood that the 3051 message will be correctly routed through any region performing 3052 per-packet policy-based forwarding or load balancing which takes 3053 the source address into account. However, there may be 3054 circumstances where the use of the signalling source address (S=1) 3055 is preferable, such as: 3057 * In order to receive ICMP error messages about the signalling 3058 message, such as unreachable port or address. If these are 3059 delivered to the flow source rather than the signalling source, 3060 it will be very difficult for the querying node to detect that 3061 it is the last GIST node on the path. Another case is where 3062 there is an abnormally low MTU along the path, in which case 3063 the querying node needs to see the ICMP error (recall that 3064 Q-mode packets are sent with DF set). 3066 * In order to receive GIST Error messages where the error message 3067 sender could not interpret the NLI in the original message. 3069 * In order to attempt to run GIST through an unmodified NAT, 3070 which will only process and translate IP addresses in the IP 3071 header (see Section 7.2.1). 3073 Because of these considerations, use of the signalling source 3074 address is allowed as an option, with use based on local policy. 3075 A node SHOULD use the flow source address for initial Query 3076 messages, but SHOULD transition to the signalling source address 3077 for some retransmissions or as a matter of static configuration, 3078 for example if a NAT is known to be in the path out of a certain 3079 interface. The S-flag in the common header tells the message 3080 receiver which option was used. 3082 It is essential that the Query mimics the actual data flow as closely 3083 as possible, since this is the basis of how the signalling message is 3084 attached to the data path. To this end, GIST SHOULD set the DiffServ 3085 codepoint and (for IPv6) flow label to match the values in the MRI. 3087 A GIST implementation SHOULD apply validation checks to the MRI, to 3088 reject Query messages that are being injected by nodes with no 3089 legitimate interest in the flow being signalled for. In general, if 3090 the GIST node can detect that no flow could arrive over the same 3091 interface as the Query, it MUST be rejected with an appropriate error 3092 message. Such checks apply only to messages with the Q-mode 3093 encapsulation, since only those messages are required to track the 3094 flow path. The main checks are that the IP version used in the 3095 encapsulation should match that of the MRI and the version(s) used on 3096 that interface, and that the full range of source addresses (the 3097 source-address masked with its prefix-length) would pass ingress 3098 filtering checks. For these cases, the error message is "MRI 3099 Validation Failure" (Appendix A.4.4.12) with subcodes 1 or 2 ("IP 3100 Version Mismatch" or "Ingress Filter Failure") respectively. 3102 5.8.1.3. Upstream Q-mode Encapsulation 3104 In some deployment scenarios it is desirable to set up routing state 3105 in the upstream direction, (i.e. from flow receiver towards the 3106 sender). This could be used to support firewall signalling to 3107 control traffic from an un-cooperative sender, or signalling in 3108 general where the flow sender was not NSIS-capable. This capability 3109 is incorporated into GIST by defining an encapsulation and processing 3110 rules for sending Query messages upstream. 3112 In general, it is not possible to determine the hop-by-hop route 3113 upstream because of asymmetric IP routing. However, in particular 3114 cases, the upstream peer can be discovered with a high degree of 3115 confidence, for example: 3117 o The upstream GIST peer is 1 IP hop away, and can be reached by 3118 tracing back through the interface on which the flow arrives. 3120 o The upstream peer is a border router of a single-homed (stub) 3121 network. 3123 This section defines an upstream Q-mode encapsulation and validation 3124 checks for when it can be used. The functionality to generate 3125 upstream Queries is OPTIONAL, but if received they MUST be processed 3126 in the normal way with some additional IP TTL checks. No special 3127 functionality is needed for this. 3129 It is possible for routing state at a given node, for a specific MRI 3130 and NSLPID, to be created by both an upstream Query exchange 3131 (initiated by the node itself), and a downstream Query exchange 3132 (where the node is the responder). If the SIDs are different, these 3133 items of routing state MUST be considered as independent; if the SIDs 3134 match, the routing state installed by the downstream exchange MUST 3135 take precedence, provided that the downstream Query passed ingress 3136 filtering checks. The rationale for this is that the downstream 3137 Query is in general a more reliable way to install state, since it 3138 directly probes the IP routing infrastructure along the flow path, 3139 whereas use of the upstream Query depends on the correctness of the 3140 Querying node's understanding of the topology. 3142 The details of the encapsulation are as follows: 3144 o The destination address SHOULD be the flow source address as given 3145 in the MRI of the message payload. An implementation with more 3146 detailed knowledge of local IP routing MAY use an alternative 3147 destination address (e.g. the address of its default router). 3149 o The source address SHOULD be the signalling node address, so in 3150 the common header S=1. 3152 o The DiffServ codepoint and (for IPv6) flow label MAY be set to 3153 match the values from the MRI as in the downstream case, and the 3154 UDP port selection is also the same. 3156 o The IP layer TTL of the message MUST be set to 255. 3158 The sending GIST implementation SHOULD attempt to send the Query via 3159 the same interface and to the same link layer neighbour from which 3160 the data packets of the flow are arriving. 3162 The receiving GIST node MAY apply validation checks to the message 3163 and MRI, to reject Query messages which have reached a node at which 3164 they can no longer be trusted. In particular, a node SHOULD reject a 3165 message which has been propagated more than one IP hop, with an 3166 "Invalid IP layer TTL" error message (Appendix A.4.4.11). This can 3167 be determined by examining the received IP layer TTL, similar to the 3168 generalised IP TTL security mechanism described in [42]. 3169 Alternatively, receipt of an upstream Query at the flow source MAY be 3170 used to trigger setup of GIST state in the downstream direction. 3171 These restrictions may be relaxed in a future version. 3173 5.8.2. The Loose-End MRM 3175 The Loose-End MRM is used to discover GIST nodes with particular 3176 properties in the direction of a given address, for example to 3177 discover a NAT along the upstream data path as in [35]. 3179 5.8.2.1. Message Routing Information 3181 For the loose-end MRM, only a simplified version of the Flow 3182 Identifier is needed. 3184 MRI = network-layer-version 3185 source-address 3186 destination-address 3188 The source address is the address of the node initiating the 3189 discovery process, for example the node that will be the data 3190 receiver in the NAT discovery case. The destination address is the 3191 address of a node which is expected to be the other side of the node 3192 to be discovered. Additional control information defines the 3193 direction of the message relative to this flow as in the path-coupled 3194 case. 3196 5.8.2.2. Downstream Q-mode Encapsulation 3198 Only one encapsulation is defined for the loose-end MRM; by 3199 convention, this is referred to as the downstream encapsulation, and 3200 is defined as follows: 3202 o The IP destination address MUST be the destination address as 3203 given in the MRI of the message payload. 3205 o By default, the IP source address is the source address from the 3206 MRI (S=0). However, the use of the signalling source address 3207 (S=1) is allowed as in the case of the path-coupled MRM. 3209 There are no special requirements on the setting of the DiffServ 3210 codepoint, IP layer TTL, or (for IPv6) the flow label. Nor are any 3211 special validation checks applied. 3213 6. Formal Protocol Specification 3215 This section provides a more formal specification of the operation of 3216 GIST processing, in terms of rules for transitions between states of 3217 a set of communicating state machines within a node. The following 3218 description captures only the basic protocol specification; 3219 additional mechanisms can be used by an implementation to accelerate 3220 route change processing, and these are captured in Section 7.1. A 3221 more detailed description of the GIST protocol operation in state 3222 machine syntax can be found in [47]. 3224 Conceptually, GIST processing at a node may be seen in terms of four 3225 types of cooperating state machine: 3227 1. There is a top-level state machine which represents the node 3228 itself (Node-SM). It is responsible for the processing of events 3229 which cannot be directed towards a more specific state machine, 3230 for example, inbound messages for which no routing state 3231 currently exists. This machine exists permanently, and is 3232 responsible for creating per-MRI state machines to manage the 3233 GIST handshake and routing state maintenance procedures. 3235 2. For each flow and signalling direction where the node is 3236 responsible for the creation of routing state, there is an 3237 instance of a Query-Node state machine (Querying-SM). This 3238 machine sends Query and Confirm messages and waits for Responses, 3239 according to the requirements from local API commands or timer 3240 processing, such as message repetition or routing state refresh. 3242 3. For each flow and signalling direction where the node has 3243 accepted the creation of routing state by a peer, there is an 3244 instance of a Responding-Node state machine (Responding-SM). 3245 This machine is responsible for managing the status of the 3246 routing state for that flow. Depending on policy, it MAY be 3247 responsible for [re]transmission of Response messages, or this 3248 MAY be handled by the Node-SM, and a Responding-SM is not even 3249 created for a flow until a properly formatted Confirm has been 3250 accepted. 3252 4. Messaging associations have their own lifecycle, represented by 3253 an MA-SM, from when they are first created (in an incomplete 3254 state, listening for an inbound connection or waiting for 3255 outbound connections to complete), to when they are active and 3256 available for use. 3258 Apart from the fact that the various machines can be created and 3259 destroyed by each other, there is almost no interaction between them. 3260 The machines for different flows do not interact; the Querying-SM and 3261 Responding-SM for a single flow and signalling direction do not 3262 interact. That is, the Responding-SM which accepts the creation of 3263 routing state for a flow on one interface has no direct interaction 3264 with the Querying-SM which sets up routing state on the next 3265 interface along the path. This interaction is mediated instead 3266 through the NSLP. 3268 The state machine descriptions use the terminology rx_MMMM, tg_TTTT 3269 and er_EEEE for incoming messages, API/lower layer triggers and error 3270 conditions respectively. The possible events of these types are 3271 given in the table below. In addition, timeout events denoted 3272 to_TTTT may also occur; the various timers are listed independently 3273 for each type of state machine in the following subsections. 3275 +---------------------+---------------------------------------------+ 3276 | Name | Meaning | 3277 +---------------------+---------------------------------------------+ 3278 | rx_Query | A Query has been received. | 3279 | | | 3280 | rx_Response | A Response has been received. | 3281 | | | 3282 | rx_Confirm | A Confirm has been received. | 3283 | | | 3284 | rx_Data | A Data message has been received. | 3285 | | | 3286 | rx_Message | rx_Query||rx_Response||rx_Confirm||rx_Data. | 3287 | | | 3288 | rx_MA-Hello | A MA-Hello message has been received. | 3289 | | | 3290 | tg_NSLPData | A signalling application has requested data | 3291 | | transfer (via API SendMessage). | 3292 | | | 3293 | tg_Connected | The protocol stack for a messaging | 3294 | | association has completed connecting. | 3295 | | | 3296 | tg_RawData | GIST wishes to transfer data over a | 3297 | | particular messaging association. | 3298 | | | 3299 | tg_MAIdle | GIST decides that it is no longer necessary | 3300 | | to keep an MA open for itself. | 3301 | | | 3302 | er_NoRSM | A "No Routing State" error was received. | 3303 | | | 3304 | er_MAConnect | A messaging association protocol failed to | 3305 | | complete a connection. | 3306 | | | 3307 | er_MAFailure | A messaging association failed. | 3308 +---------------------+---------------------------------------------+ 3309 Incoming Events 3311 6.1. Node Processing 3313 The Node level state machine is responsible for processing events for 3314 which no more appropriate messaging association state or routing 3315 state exists. Its structure is trivial: there is a single state 3316 ('Idle'); all events cause a transition back to Idle. Some events 3317 cause the creation of other state machines. The only events that are 3318 processed by this state machine are incoming GIST messages (Query/ 3319 Response/Confirm/Data) and API requests to send data; no other events 3320 are possible. In addition to this event processing, the Node level 3321 machine is responsible for managing listening endpoints for messaging 3322 associations. Although these relate to Responding node operation, 3323 they cannot be handled by the Responder state machine since they are 3324 not created per flow. The processing rules for each event are as 3325 follows: 3327 Rule 1 (rx_Query): 3328 use the GIST service interface to determine the signalling 3329 application policy relating to this peer 3330 // note that this interaction delivers any NSLP-Data to 3331 // the NSLP as a side effect 3332 if (the signalling application indicates that routing state should 3333 be created) then 3334 if (routing state can be created without a 3-way handshake) then 3335 create Responding-SM and transfer control to it 3336 else 3337 send Response with R=1 3338 else 3339 propagate the Query with any updated NSLP payload provided 3341 Rule 2 (rx_Response): 3342 // a routing state error 3343 discard message 3345 Rule 3 (rx_Confirm): 3346 if (routing state can be created before receiving a Confirm) then 3347 // we should already have Responding-SM for it, 3348 // which would handle this message 3349 discard message 3350 send "No Routing State" error message 3351 else 3352 create Responding-SM and pass message to it 3354 Rule 4 (rx_Data): 3355 if (node policy will only process Data messages with matching 3356 routing state) then 3357 send "No Routing State" error message 3358 else 3359 pass directly to NSLP 3361 Rule 4 (er_NoRSM): 3362 discard the message 3364 Rule 5 (tg_NSLPData): 3365 if Q-mode encapsulation is not possible for this MRI 3366 reject message with an error 3367 else 3368 if (local policy & transfer attributes say routing 3369 state is not needed) then 3370 send message statelessly 3371 else 3372 create Querying-SM and pass message to it 3374 6.2. Query Node Processing 3376 The Querying-Node state machine (Querying-SM) has three states: 3378 o Awaiting Response 3380 o Established 3382 o Awaiting Refresh 3384 The Querying-SM is created by the Node-SM machine as a result of a 3385 request to send a message for a flow in a signalling direction where 3386 the appropriate state does not exist. The Query is generated 3387 immediately and the No_Response timer is started. The NSLP data MAY 3388 be carried in the Query if local policy and the transfer attributes 3389 allow it, otherwise it MUST be queued locally pending MA 3390 establishment. Then the machine transitions to the Awaiting Response 3391 state, in which timeout-based retransmissions are handled. Data 3392 messages (rx_Data events) should not occur in this state; if they do, 3393 this may indicate a lost Response and a node MAY retransmit a Query 3394 for this reason. 3396 Once a Response has been successfully received and routing state 3397 created, the machine transitions to Established, during which NSLP 3398 data can be sent and received normally. Further Responses received 3399 in this state (which may be the result of a lost Confirm) MUST be 3400 treated the same way. The Awaiting Refresh state can be considered 3401 as a substate of Established, where a new Query has been generated to 3402 refresh the routing state (as in Awaiting Response) but NSLP data can 3403 be handled normally. 3405 The timers relevant to this state machine are as follows: 3407 Refresh_QNode: Indicates when the routing state stored by this state 3408 machine must be refreshed. It is reset whenever a Response is 3409 received indicating that the routing state is still valid. 3410 Implementations MUST set the period of this timer based on the 3411 value in the RS-validity-time field of a Response to ensure that a 3412 Query is generated before the peer's routing state expires (see 3413 Section 4.4.4). 3415 No_Response: Indicates that a Response has not been received in 3416 answer to a Query. This is started whenever a Query is sent and 3417 stopped when a Response is received. 3419 Inactive_QNode: Indicates that no NSLP traffic is currently being 3420 handled by this state machine. This is reset whenever the state 3421 machine handles NSLP data, in either direction. When it expires, 3422 the state machine MAY be deleted. The period of the timer can be 3423 set at any time via the API (SetStateLifetime), and if the period 3424 is reset in this way the timer itself MUST be restarted. 3426 The main events (including all those that cause state transitions) 3427 are shown in the figure below, tagged with the number of the 3428 processing rule that is used to handle the event. These rules are 3429 listed after the diagram. All events not shown or described in the 3430 text above are assumed to be impossible in a correct implementation 3431 and MUST be ignored. 3433 [Initialisation] +-----+ 3434 -------------------------|Birth| 3435 | +-----+ 3436 | er_NoRSM[3](from all states) rx_Response[4] 3437 | || tg_NSLPData[5] 3438 | tg_NSLPData[1] || rx_Data[7] 3439 | -------- ------- 3440 | | V | V 3441 | | V | V 3442 | +----------+ +-----------+ 3443 ---->>| Awaiting | |Established| 3444 ------| Response |---------------------------->> | | 3445 | +----------+ rx_Response[4] +-----------+ 3446 | ^ | ^ | 3447 | ^ | ^ | 3448 | -------- | | 3449 | to_No_Response[2] | | 3450 | [!nResp_reached] tg_NSLPData[5] | | 3451 | || rx_Data[7] | | 3452 | -------- | | 3453 | | V | | 3454 | to_No_Response[2] | V | | 3455 | [nResp_reached] +-----------+ rx_Response[4] | | 3456 ---------- -----------| Awaiting |----------------- | 3457 | | | Refresh |<<------------------- 3458 | | +-----------+ to_Refresh_QNode[8] 3459 | | ^ | 3460 V V ^ | to_No_Response[2] 3461 V V -------- [!nResp_reached] 3462 +-----+ 3463 |Death|<<--------------- 3464 +-----+ to_Inactive_QNode[6] 3465 (from all states) 3467 Figure 7: Query Node State Machine 3469 The processing rules are as follows: 3471 Rule 1: Store the message for later transmission 3473 Rule 2: 3474 if number of Queries sent has reached the threshold 3475 // nQuery_isMax is true 3476 indicate No Response error to NSLP 3477 destroy self 3478 else 3479 send Query 3480 start No_Response timer with new value 3482 Rule 3: 3483 // Assume the Confirm was lost in transit or the peer has reset; 3484 // restart the handshake 3485 send Query 3486 (re)start No_Response timer 3488 Rule 4: 3489 if a new MA-SM is needed create one 3490 if the R flag was set send a Confirm 3491 send any stored Data messages 3492 stop No_Response timer 3493 start Refresh_QNode timer 3494 start Inactive_QNode timer if it was not running 3495 if there was piggybacked NSLP-Data 3496 pass it to the NSLP 3497 restart Inactive_QNOde timer 3499 Rule 5: 3500 send Data message 3501 restart Inactive_QNode timer 3503 Rule 6: Terminate 3505 Rule 7: 3506 pass any data to the NSLP 3507 restart Inactive_QNode timer 3509 Rule 8: 3510 send Query 3511 start No_Response timer 3512 stop Refresh_QNode timer 3514 6.3. Responder Node Processing 3516 The Responding-Node state machine (Responding-SM) has three states: 3518 o Awaiting Confirm 3520 o Established 3522 o Awaiting Refresh 3524 The policy governing the handling of Query messages and the creation 3525 of the Responding-SM has three cases: 3527 1. No Confirm is required for a Query, and the state machine can be 3528 created immediately. 3530 2. A Confirm is required for a Query, but the state machine can 3531 still be created immediately. A timer is used to retransmit 3532 Response messages and the Responding-SM is destroyed if no valid 3533 Confirm is received. 3535 3. A Confirm is required for a Query, and the state machine can only 3536 be created when it is received; the initial Query will have been 3537 handled by the Node level machine. 3539 In case 2 the Responding-SM is created in the Awaiting Confirm state, 3540 and remains there until a Confirm is received, at which point it 3541 transitions to Established. In cases 1 and 3 the Responding-SM is 3542 created directly in the Established state. Note that if the machine 3543 is created on receiving a Query, some of the message processing will 3544 already have been performed in the Node state machine. In principle, 3545 an implementation MAY change its policy on handling a Query message 3546 at any time; however, the state machine descriptions here cover only 3547 the case where the policy is fixed while waiting for a Confirm 3548 message. 3550 In the Established state the NSLP can send and receive data normally, 3551 and any additional rx_Confirm events MUST be silently ignored. The 3552 Awaiting Refresh state can be considered a substate of Established, 3553 where a Query has been received to begin the routing state refresh. 3554 In the Awaiting Refresh state the Responding-SM behaves as in the 3555 Awaiting Confirm state, except that the NSLP can still send and 3556 receive data. In particular, in both states there is timer-based 3557 retransmission of Response messages until a Confirm is received; 3558 additional rx_Query events in these states MUST also generate a reply 3559 and restart the no_Confirm timer. 3561 The timers relevant to the operation of this state machine are as 3562 follows: 3564 Expire_RNode: Indicates when the routing state stored by this state 3565 machine needs to be expired. It is reset whenever a Query or 3566 Confirm (depending on local policy) is received indicating that 3567 the routing state is still valid. Note that state cannot be 3568 refreshed from the R-Node. If this timer fires, the routing state 3569 machine is deleted, regardless of whether a No_Confirm timer is 3570 running. 3572 No_Confirm: Indicates that a Confirm has not been received in answer 3573 to a Response. This is started/reset whenever a Response is sent 3574 and stopped when a Confirm is received. 3576 The detailed state transitions and processing rules are described 3577 below as in the Query node case. 3579 rx_Query[1] rx_Query[5] 3580 [confirmRequired] +-----+ [!confirmRequired] 3581 -------------------------|Birth|---------------------------- 3582 | +-----+ | 3583 | | rx_Confirm[2] | 3584 | ---------------------------- | 3585 | | | 3586 | rx_Query[5] | | 3587 | tg_NSLPData[7] || rx_Confirm[10] | | 3588 | || rx_Query[1] || rx_Data[4] | | 3589 | || rx_Data[6] || tg_NSLPData[3] | | 3590 | -------- -------------- | | 3591 | | V | V V V 3592 | | V | V V V 3593 | +----------+ | +-----------+ 3594 ---->>| Awaiting | rx_Confirm[8] -----------|Established| 3595 ------| Confirm |------------------------------>> | | 3596 | +----------+ +-----------+ 3597 | ^ | ^ | 3598 | ^ | tg_NSLPData[3] ^ | 3599 | -------- || rx_Query[1] | | 3600 | to_No_Confirm[9] || rx_Data[4] | | 3601 | [!nConf_reached] -------- | | 3602 | | V | | 3603 | to_No_Confirm[9] | V | | 3604 | [nConf_reached] +-----------+ rx_Confirm[8] | | 3605 ---------- ------------| Awaiting |----------------- | 3606 | | | Refresh |<<------------------- 3607 | | +-----------+ rx_Query[1] 3608 | | ^ | [confirmRequired] 3609 | | ^ | 3610 | | -------- 3611 V V to_No_Confirm[9] 3612 V V [!nConf_reached] 3613 +-----+ 3614 |Death|<<--------------------- 3615 +-----+ er_NoRSM[11] 3616 to_Expire_RNode[11] 3617 (from Established/Awaiting Refresh) 3619 Figure 8: Responder Node State Machine 3621 The processing rules are as follows: 3623 Rule 1: 3624 // a Confirm is required 3625 send Response with R=1 3626 (re)start No_Confirm timer with the initial timer value 3627 Rule 2: 3628 pass any NSLP-Data object to the NSLP 3629 start Expire_RNode timer 3631 Rule 3: send the Data message 3633 Rule 4: pass data to NSLP 3635 Rule 5: 3636 // no Confirm is required 3637 send Response with R=0 3638 start Expire_RNode timer 3640 Rule 6: 3641 drop incoming data 3642 send "No Routing State" error message 3644 Rule 7: store Data message 3646 Rule 8: 3647 pass any NSLP-Data object to the NSLP 3648 send any stored Data messages 3649 stop No_Confirm timer 3650 start Expire_RNode timer 3652 Rule 9: 3653 if number of Responses sent has reached threshold 3654 // nResp_isMax is true 3655 destroy self 3656 else 3657 send Response 3658 start No_Response timer 3660 Rule 10: 3661 // can happen e.g. a retransmitted Response causes a duplicate Confirm 3662 silently ignore 3664 Rule 11: destroy self 3666 6.4. Messaging Association Processing 3668 Messaging associations (MAs) are modelled for use within GIST with a 3669 simple three-state process. The Awaiting Connection state indicates 3670 that the MA is waiting for the connection process(es) for every 3671 protocol in the messaging association to complete; this might involve 3672 creating listening endpoints or attempting active connects. Timers 3673 may also be necessary to detect connection failure (e.g. no incoming 3674 connection within a certain period), but these are not modelled 3675 explicitly. 3677 The Connected state indicates that the MA is open and ready to use, 3678 and that the node wishes it to remain open. In this state, the node 3679 operates a timer (SendHello) to ensure that messages are regularly 3680 sent to the peer, to ensure that the peer does not tear the MA down. 3681 The node transitions from Connected to Idle (indicating that it no 3682 longer needs the association) as a matter of local policy; one way to 3683 manage the policy is to use an activity timer but this is not 3684 specified explicitly by the state machine (see also Section 4.4.5). 3686 In the Idle state, the node no longer requires the messaging 3687 association but the peer still requires it and is indicating this by 3688 sending periodic MA-Hello messages. A different timer (NoHello) 3689 operates to purge the MA when these messages stop arriving. If real 3690 data is transferred over the MA, the state machine transitions back 3691 to Connected. 3693 At any time in the Connected or Idle states, a node MAY test the 3694 connectivity to its peer and the liveness of the GIST instance at 3695 that peer by sending a MA-Hello request with R=1. Failure to receive 3696 a reply with a matching Hello-ID within a timeout MAY be taken as a 3697 reason to trigger er_MAFailure. Initiation of such a test and the 3698 timeout setting are left to the discretion of the implementaion. 3699 Note that er_MAFailure may also be signalled by indications from the 3700 underlying messaging association protocols. If a messaging 3701 association fails, this MUST be indicated back to the routing state 3702 machines which use it, and these MAY generate indications to 3703 signalling applications. In particular, if the messaging association 3704 was being used to deliver messages reliably, this MUST be reported as 3705 a NetworkNotification error (Appendix B.4). 3707 Clearly, many internal details of the messaging association protocols 3708 are hidden in this model, especially where the messaging association 3709 uses multiple protocol layers. Note also that although the existence 3710 of messaging associations is not directly visible to signalling 3711 applications, there is some interaction between the two because 3712 security-related information becomes available during the open 3713 process, and this may be indicated to signalling applications if they 3714 have requested it. 3716 The timers relevant to the operation of this state machine are as 3717 follows: 3719 SendHello: Indicates that an MA-Hello message should be sent to the 3720 remote node. The period of this timer is determined by the MA- 3721 Hold-Time sent by the remote node during the Query/Response/ 3722 Confirm exchange. 3724 NoHello: Indicates that no MA-Hello has been received from the 3725 remote node for a period of time. The period of this timer is 3726 sent to the remote node as the MA-Hold-Time during the Query/ 3727 Response exchange. 3729 The detailed state transitions and processing rules are described 3730 below as in the Query node case. 3732 [Initialisation] +-----+ 3733 ----------------------------|Birth| 3734 | +-----+ tg_RawData[1] 3735 | || rx_Message[2] 3736 | || rx_MA-Hello[3] 3737 | tg_RawData[5] || to_SendHello[4] 3738 | -------- -------- 3739 | | V | V 3740 | | V | V 3741 | +----------+ +-----------+ 3742 ---->>| Awaiting | tg_Connected[6] | Connected | 3743 ------|Connection|----------------------->>| | 3744 | +----------+ +-----------+ 3745 | ^ | 3746 | tg_RawData[1] ^ | 3747 | || rx_Message[2] | | tg_MAIdle[7] 3748 | | V 3749 | | V 3750 | er_MAConnect[8] +-----+ to_NoHello[8] +-----------+ 3751 ---------------->>|Death|<<----------------| Idle | 3752 +-----+ +-----------+ 3753 ^ ^ | 3754 ^ ^ | 3755 --------------- -------- 3756 er_MAFailure[8] rx_MA-Hello[9] 3757 (from Connected/Idle) 3759 Figure 9: Messaging Association State Machine 3761 The processing rules are as follows: 3763 Rule 1: 3764 pass message to transport layer 3765 if the NoHello timer was running, stop it 3766 (re)start SendHello 3768 Rule 2: 3769 pass message to Node-SM, or R-SM (for a Confirm), 3770 or Q-SM (for a Response) 3771 if the NoHello timer was running, stop it 3772 Rule 3: 3773 if reply requested 3774 send MA-Hello 3775 restart SendHello timer 3777 Rule 4: 3778 send MA-Hello message 3779 restart SendHello timer 3781 Rule 5: queue message for later transmission 3783 Rule 6: 3784 pass outstanding queued messages to transport layer 3785 stop any timers controlling connection establishment 3786 start SendHello timer 3788 Rule 7: 3789 stop SendHello timer 3790 start NoHello timer 3792 Rule 8: 3793 report failure to routing state machines and signalling applications 3794 destroy self 3796 Rule 9: 3797 if reply requested 3798 send MA-Hello 3799 restart NoHello timer 3801 7. Additional Protocol Features 3803 7.1. Route Changes and Local Repair 3805 7.1.1. Introduction 3807 When IP layer re-routing takes place in the network, GIST and 3808 signalling application state need to be updated for all flows whose 3809 paths have changed. The updates to signalling application state 3810 depend mainly on the signalling application: for example, if the path 3811 characteristics have actually changed, simply moving state from the 3812 old to the new path is not sufficient. Therefore, GIST cannot carry 3813 out the complete path update processing. Its responsibilities are to 3814 detect the route change, update its local routing state consistently, 3815 and inform interested signalling applications at affected nodes. 3817 xxxxxxxxxxxxxxxxxxxxxxxxxxxx 3818 x +--+ +--+ +--+ x Initial 3819 x .|C1|_.....|D1|_.....|E1| x Configuration 3820 x . +--+. .+--+. .+--+\. x 3821 >>xxxxxxxxxxxxx . . . . . . xxxxxx>> 3822 +-+ +-+ . .. .. . +-+ 3823 ...|A|_......|B|/ .. .. .|F|_.... 3824 +-+ +-+ . . . . . . +-+ 3825 . . . . . . 3826 . +--+ +--+ +--+ . 3827 .|C2|_.....|D2|_.....|E2|/ 3828 +--+ +--+ +--+ 3830 +--+ +--+ +--+ Configuration 3831 .|C1|......|D1|......|E1| after failure 3832 . +--+ .+--+ +--+ of E1-F link 3833 . \. . \. ./ 3834 +-+ +-+ . .. .. +-+ 3835 ...|A|_......|B|. .. .. .|F|_.... 3836 +-+ +-+\ . . . . . +-+ 3837 >>xxxxxxxxxxxxx . . . . . . xxxxxx>> 3838 x . +--+ +--+ +--+ . x 3839 x .|C2|_.....|D2|_.....|E2|/ x 3840 x +--+ +--+ +--+ x 3841 xxxxxxxxxxxxxxxxxxxxxxxxxxxx 3843 ........... = physical link topology 3844 >>xxxxxxx>> = flow direction 3845 _.......... = outgoing link for flow xxxxxx given 3846 by local forwarding table 3848 Figure 10: A Re-Routing Event 3850 Route change management is complicated by the distributed nature of 3851 the problem. Consider the re-routing event shown in Figure 10. An 3852 external observer can tell that the main responsibility for 3853 controlling the updates will probably lie with nodes B and F; 3854 however, E1 is best placed to detect the event quickly at the GIST 3855 level, and C1 and D1 could also attempt to initiate the repair. 3857 The NSIS framework [30] makes the assumption that signalling 3858 applications are soft-state based and operate end to end. In this 3859 case, because GIST also periodically updates its picture of routing 3860 state, route changes will eventually be repaired automatically. The 3861 specification as already given includes this functionality. However, 3862 especially if upper layer refresh times are extended to reduce 3863 signalling load, the duration of inconsistent state may be very long 3864 indeed. Therefore, GIST includes logic to exchange prompt 3865 notifications with signalling applications, to allow local repair if 3866 possible. The additional mechanisms to achieve this are described in 3867 the following subsections. To a large extent, these additions can be 3868 seen as implementation issues; the protocol messages and their 3869 significance are not changed, but there are extra interactions 3870 through the API between GIST and signalling applications, and 3871 additional triggers for transitions between the various GIST states. 3873 7.1.2. Route Change Detection Mechanisms 3875 There are two aspects to detecting a route change at a single node: 3877 o Detecting that the outgoing path, in the direction of the Query, 3878 has or may have changed. 3880 o Detecting that the incoming path, in the direction of the 3881 Response, has (or may have) changed, in which case the node may no 3882 longer be on the path at all. 3884 At a single node, these processes are largely independent, although 3885 clearly a change in one direction at a node corresponds to a change 3886 in the opposite direction at its peer. Note that there are two 3887 possible forms for a route change: the interface through which a flow 3888 leaves or enters a node may change, and the adjacent peer may change. 3889 In general, a route change can include one or the other or both (or 3890 indeed neither, although such changes are very hard to detect). 3892 The route change detection mechanisms available to a node depend on 3893 the MRM in use and the role the node played in setting up the routing 3894 state in the first place (i.e. as Querying or Responding node). The 3895 following discussion is specific to the case of the path-coupled MRM 3896 using downstream Queries only; other scenarios may require other 3897 methods. However, the repair logic described in the subsequent 3898 subsections is intended to be universal. 3900 There are five mechanisms for a node to detect that a route change 3901 has occurred, which are listed below. They apply differently 3902 depending on whether the change is in the Query or Response 3903 direction, and these differences are summarised in the following 3904 table. 3906 Local Trigger: In local trigger mode, GIST finds out from the local 3907 forwarding table that the next hop has changed. This only works 3908 if the routing change is local, not if it happens a few IP routing 3909 hops away, including the case that it happens at a GIST-unaware 3910 node. 3912 Extended Trigger: Here, GIST checks a link-state topology database 3913 to discover that the path has changed. This makes certain 3914 assumptions on consistency of IP route computation and only works 3915 within a single area for OSPF [17] and similar link-state 3916 protocols. Where available, this offers the most accurate and 3917 rapid indication of route changes, but requires more access to the 3918 routing internals than a typical operating system may provide. 3920 GIST C-mode Monitoring: GIST may find that C-mode packets are 3921 arriving (from either peer) with a different IP layer TTL or on a 3922 different interface. This provides no direct information about 3923 the new flow path, but indicates that routing has changed and that 3924 rediscovery may be required. 3926 Data Plane Monitoring: The signalling application on a node may 3927 detect a change in behaviour of the flow, such as IP layer TTL 3928 change, arrival on a different interface, or loss of the flow 3929 altogether. The signalling application on the node is allowed to 3930 notify this information locally to GIST (Appendix B.6). 3932 GIST Probing: According to the specification, each GIST node MUST 3933 periodically repeat the discovery (Query/Response) operation. 3934 Values for the probe frequency are discussed in Section 4.4.4. 3935 The period can be negotiated independently for each GIST hop, so 3936 nodes that have access to the other techniques listed above MAY 3937 use long periods between probes. The querying node will discover 3938 the route change by a modification in the Network-Layer- 3939 Information in the Response. The responding node can detect a 3940 change in the upstream peer similarly; further, if the responding 3941 node can store the interface on which Queries arrive, it can 3942 detect if this interface changes even when the peer does not. 3944 +-------------+--------------------------+--------------------------+ 3945 | Method | Query direction | Response direction | 3946 +-------------+--------------------------+--------------------------+ 3947 | Local | Discovers new interface | Not applicable | 3948 | Trigger | (and peer if local) | | 3949 | | | | 3950 | Extended | Discovers new interface | May determine that route | 3951 | Trigger | and may determine new | from peer will have | 3952 | | peer | changed | 3953 | | | | 3954 | C-mode | Provides hint that | Provides hint that | 3955 | Monitoring | change has occurred | change has occurred | 3956 | | | | 3957 | Data Plane | Not applicable | NSLP informs GIST that a | 3958 | Monitoring | | change may have occurred | 3959 | | | | 3960 | Probing | Discovers changed NLI in | Discovers changed NLI in | 3961 | | Response | Query | 3962 +-------------+--------------------------+--------------------------+ 3964 7.1.3. GIST Behaviour Supporting Re-Routing 3966 The basic GIST behaviour necessary to support re-routing can be 3967 modelled using a 3-level classification of the validity of each item 3968 of current routing state. (In addition to current routing state, 3969 NSIS can maintain past routing state, described in Section 7.1.4 3970 below.) This classification applies separately to the Querying and 3971 Responding node for each pair of GIST peers. The levels are: 3973 Bad: The routing state is either missing altogether, or not safe to 3974 use to send data. 3976 Tentative: The routing state may have changed, but it is still 3977 usable for sending NSLP data pending verification. 3979 Good: The routing state has been established and no events affecting 3980 it have since been detected. 3982 These classifications are not identical to the states described in 3983 Section 6, but there are dependencies between them. Specifically, 3984 routing state is considered Bad until the state machine first enters 3985 the Established state, at which point it becomes Good. Thereafter, 3986 the status may be invalidated for any of the reasons discussed above; 3987 it is an implementation issue to decide which techniques to implement 3988 in any given node, and how to reclassify routing state (as Bad or 3989 Tentative) for each. The status returns to Good, either when the 3990 state machine re-enters the Established state, or if GIST can 3991 determine from direct examination of the IP routing or forwarding 3992 tables that the peer has not changed. When the status returns to 3993 Good, GIST MUST if necessary update its routing state table so that 3994 the relationships between MRI/SID/NSLPID tuples and messaging 3995 associations are up to date. 3997 When classification of the routing state for the downstream direction 3998 changes to Bad/Tentative because of local IP routing indications, 3999 GIST MAY automatically change the classification in the upstream 4000 direction to Tentative unless local routing indicates that this is 4001 not necessary. This SHOULD NOT be done in the case where the initial 4002 change was indicated by the signalling application. This mechanism 4003 accounts for the fact that a routing change may affect several nodes, 4004 and so can be an indication that upstream routing may also have 4005 changed. In any case, whenever GIST updates the routing status, it 4006 informs the signalling application with the NetworkNotification API 4007 (Appendix B.4), unless the change was caused via the API in the first 4008 place. 4010 The GIST behaviour for state repair is different for the Querying and 4011 Responding node. At the Responding node, there is no additional 4012 behaviour, since the Responding node cannot initiate protocol 4013 transitions autonomously, it can only react to the Querying node. 4014 The Querying node has three options, depending on how the transition 4015 from 'Good' was initially caused: 4017 1. To inspect the IP routing/forwarding table and verifying that the 4018 next peer has not changed. This technique MUST NOT be used if 4019 the transition was caused by a signalling application, but SHOULD 4020 be used otherwise if available. 4022 2. To move to the 'Awaiting Refresh' state. This technique MUST NOT 4023 be used if the current status is 'Bad', since data is being 4024 incorrectly delivered. 4026 3. To move to the 'Awaiting Response' state. This technique may be 4027 used at any time, but has the effect of freezing NSLP 4028 communication while GIST state is being repaired. 4030 The second and third techniques trigger the execution of a GIST 4031 handshake to carry out the repair. It may be desirable to delay the 4032 start of the handshake process, either to wait for the network to 4033 stabilise, to avoid flooding the network with Query traffic for a 4034 large number of affected flows, or to wait for confirmation that the 4035 node is still on the path from the upstream peer. One approach is to 4036 delay the handshake until there is NSLP data to be transmitted. 4037 Implementation of such delays is a matter of local policy; however, 4038 GIST MUST begin the handshake immediately if the status change was 4039 caused by an InvalidateRoutingState API call marked as 'Urgent', and 4040 SHOULD begin it if the upstream routing state is still known to be 4041 Good. 4043 7.1.4. Load Splitting and Route Flapping 4045 The Q-mode encapsulation rules of Section 5.8 try to ensure that the 4046 Query messages discovering the path mimic the flow as accurately as 4047 possible. However, in environments where there is load balancing 4048 over multiple routes, and this is based on header fields differing 4049 between flow and Q-mode packets or done on a round-robin basis, the 4050 path discovered by the Query may vary from one handshake to the next 4051 even though the underlying network is stable. This will appear to 4052 GIST as a route flap; route flapping can also be caused by problems 4053 in the basic network connectivity or routing protocol operation. For 4054 example, a mobile node might be switching back and forth between two 4055 links, or might appear to have disappeared even though it is still 4056 attached to the network via a different route. 4058 This specification does not define mechanisms for GIST to manage 4059 multiple parallel routes or an unstable route; instead, GIST MAY 4060 expose this to the NSLP, which can then manage it according to 4061 signalling application requirements. The algorithms already 4062 described always maintain the concept of the current route, i.e. the 4063 latest peer discovered for a particular flow. Instead, GIST allows 4064 the use of prior signalling paths for some period while the 4065 signalling applications still need them. Since NSLP peers are a 4066 single GIST hop apart, the necessary information to represent a path 4067 can be just an entry in the node's routing state table for that flow 4068 (more generally, anything that uniquely identifies the peer, such as 4069 the NLI, could be used). Rather than requiring GIST to maintain 4070 multiple generations of this information, it is provided to the 4071 signalling application in the same node in an opaque form for each 4072 message that is received from the peer. The signalling application 4073 can store it if necessary and provide it back to the GIST layer in 4074 case it needs to be used. Because this is a reference to information 4075 about the source of a prior signalling message, it is denoted 'SII- 4076 Handle' (for Source Identification Information) in the abstract API 4077 of Appendix B. 4079 Note that GIST if possible SHOULD use the same SII-Handle for 4080 multiple sessions to the same peer, since this then allows signalling 4081 applications to aggregate some signalling, such as summary refreshes 4082 or bulk teardowns. Messages sent using the SII-Handle MUST bypass 4083 the routing state tables at the sender, and this MUST be indicated by 4084 setting the E flag in the common header (Appendix A.1). Messages 4085 other than Data messages MUST NOT be sent in this way. At the 4086 receiver, GIST MUST NOT validate the MRI/SID/NSLPID against local 4087 routing state and instead indicates the mode of reception to 4088 signalling applications through the API (Appendix B.2). Signalling 4089 applications should validate the source and effect of the message 4090 themselves, and if appropriate should in particular indicate to GIST 4091 (see Appendix B.5) that routing state is no longer required for this 4092 flow. This is necessary to prevent GIST in nodes on the old path 4093 initiating routing state refresh and thus causing state conflicts at 4094 the crossover router. 4096 GIST notifies signalling applications about route modifications as 4097 two types of event, additions and deletions. An addition is notified 4098 as a change of the current routing state according to the Bad/ 4099 Tentative/Good classification above, while deletion is expressed as a 4100 statement that an SII-Handle no longer lies on the path. Both can be 4101 reported through the NetworkNotification API call (Appendix B.4). A 4102 minimal implementation MAY notify a route change as a single (add, 4103 delete) operation; however, a more sophisticated implementation MAY 4104 delay the delete notification, for example if it knows that the old 4105 route continues to be used in parallel, or that the true route is 4106 flapping between the two. It is then a matter of signalling 4107 application design whether to tear down state on the old path, leave 4108 it unchanged, or modify it in some signalling application specific 4109 way to reflect the fact that multiple paths are operating in 4110 parallel. 4112 7.1.5. Signalling Application Operation 4114 Signalling applications can use these functions as provided by GIST 4115 to carry out rapid local repair following re-routing events. The 4116 signalling application instances carry out the multi-hop aspects of 4117 the procedure, including crossover node detection, and tear-down/ 4118 reinstallation of signalling application state; they also trigger 4119 GIST to carry out the local routing state maintenance operations over 4120 each individual hop. The local repair procedures depend heavily on 4121 the fact that stateful NSLP nodes are a single GIST hop apart; this 4122 is enforced by the details of the GIST peer discovery process. 4124 The following outline description of a possible set of NSLP actions 4125 takes the scenario of Figure 10 as an example. 4127 1. The signalling application at node E1 is notified by GIST of 4128 route changes affecting the downstream and upstream directions. 4129 The downstream status was updated to Bad because of a trigger 4130 from the local forwarding tables, and the upstream status changed 4131 automatically to Tentative as a consequence. The signalling 4132 application at E1 MAY begin local repair immediately, or MAY 4133 propagate a notification upstream to D1 that re-routing has 4134 occurred. 4136 2. The signalling application at node D1 is notified of the route 4137 change, either by signalling application notifications or from 4138 the GIST level (e.g. by a trigger from a link-state topology 4139 database). If the information propagates faster within the IP 4140 routing protocol, GIST will change the upstream/downstream 4141 routing state to Tentative/Bad automatically, and this will cause 4142 the signalling application to propagate the notification further 4143 upstream. 4145 3. This process continues until the notification reaches node A. 4146 Here, there is no downstream routing change, so GIST only learns 4147 of the update via the signalling application trigger. Since the 4148 upstream status is still Good, it therefore begins the repair 4149 handshake immediately. 4151 4. The handshake initiated by node A causes its downstream routing 4152 state to be confirmed as Good and unchanged there; it also 4153 confirms the (Tentative) upstream routing state at B as Good. 4154 This is enough to identify B as the crossover router, and the 4155 signalling application and GIST can begin the local repair 4156 process. 4158 An alternative way to reach step (4) is that node B is able to 4159 determine autonomously that there is no likelihood of an upstream 4160 route change. For example, it could be an area border router and the 4161 route change is only intra-area. In this case, the signalling 4162 application and GIST will see that the upstream state is Good and can 4163 begin the local repair directly. 4165 After a route deletion, a signalling application may wish to remove 4166 state at another node which is no longer on the path. However, since 4167 it is no longer on the path, in principle GIST can no longer send 4168 messages to it. In general, provided this state is soft, it will 4169 time out anyway; however, the timeouts involved may have been set to 4170 be very long to reduce signalling load. Instead, signalling 4171 applications MAY use the SII-Handle described above to route explicit 4172 teardown messages. 4174 7.2. NAT Traversal 4176 GIST messages, for example for the path-coupled MRM, must carry 4177 addressing and higher layer information as payload data in order to 4178 define the flow signalled for. (This applies to all GIST messages, 4179 regardless of how they are encapsulated or which direction they are 4180 travelling in.) At an addressing boundary the data flow packets will 4181 have their headers translated; if the signalling payloads are not 4182 translated consistently, the signalling messages will refer to 4183 incorrect (and probably meaningless) flows after passing through the 4184 boundary. In addition, GIST handshake messages carry additional 4185 addressing information about the GIST nodes themselves, and this must 4186 also be processed appropriately when traversing a NAT. 4188 There is a dual problem of whether the GIST peers either side of the 4189 boundary can work out how to address each other, and whether they can 4190 work out what translation to apply to the signalling packet payloads. 4191 Existing generic NAT traversal techniques such as STUN [27] or TURN 4192 [28] can operate only on the two addresses visible in the IP header. 4193 It is therefore intrinsically difficult to use these techniques to 4194 discover a consistent translation of the three or four interdependent 4195 addresses for the flow and signalling source and destination. 4197 For legacy NATs and MRMs that carry addressing information, the base 4198 GIST specification is therefore limited to detecting the situation 4199 and triggering the appropriate error conditions to terminate the 4200 signalling path. (MRMs that do not contain addressing information 4201 could traverse such NATs safely, with some modifications to the GIST 4202 processing rules. Such modifications could be described in the 4203 documents defining such MRMs.) Legacy NAT handling is covered in 4204 Section 7.2.1 below. A more general solution can be constructed 4205 using GIST-awareness in the NATs themselves; this solution is 4206 outlined in Section 7.2.2 with processing rules in Section 7.2.3. 4208 In all cases, GIST interaction with the NAT is determined by the way 4209 the NAT handles the Query/Response messages in the initial GIST 4210 handshake; these messages are UDP datagrams. Best current practice 4211 for NAT treatment of UDP traffic is defined in [39], and the legacy 4212 NAT handling defined in this specification is fully consistent with 4213 that document. The GIST-aware NAT traversal technique is equivalent 4214 to requiring an Application Layer Gateway in the NAT for a specific 4215 class of UDP transactions, namely those where the destination UDP 4216 port for the initial message is the GIST port (see Section 9). 4218 7.2.1. Legacy NAT Handling 4220 Legacy NAT detection during the GIST handshake depends on analysis of 4221 the IP header and S flag in the GIST common header, and the NLI 4222 object included in the handshake messages. The message sequence 4223 proceeds differently depending on whether the Querying node is on the 4224 internal or external side of the NAT. 4226 For the case of the Querying node on the internal side of the NAT, if 4227 the S flag is not set in the Query (S=0), a legacy NAT cannot be 4228 detected. The receiver will generate a normal Response to the 4229 interface-address given in the NLI in the Query, but the interface- 4230 address will not be routable and the Response will not be delivered. 4231 If retransmitted Queries keep S=0, this behaviour will persist until 4232 the Querying node times out. The signalling path will thus terminate 4233 at this point, not traversing the NAT. 4235 The situation changes once S=1 in a Query; note the Q-mode 4236 encapsulation rules recommend that S=1 is used at least for some 4237 retransmissions (see Section 5.8). If S=1, the receiver MUST check 4238 the source address in the IP header against the interface-address in 4239 the NLI, and if these addresses do not match this indicates that a 4240 legacy NAT has been found. For MRMs which contain addressing 4241 information that needs translation, legacy NAT traversal is not 4242 possible. The receiver MUST return an "Object Type Error" message 4243 (Appendix A.4.4.9) with subcode 4 ("Untranslated Object") indicating 4244 the MRI as the object in question. The error message MUST be 4245 addressed to the source address from the IP header of the incoming 4246 message. The Responding node SHOULD use the destination IP address 4247 of the original datagram as the source address for IP header of the 4248 Response; this makes it more likely that the NAT will accept the 4249 incoming message, since it looks like a normal UDP/IP request/reply 4250 exchange. If this message is able to traverse back through the NAT, 4251 the Querying node will terminate the handshake immediately; 4252 otherwise, this reduces to the previous case of a lost Response and 4253 the Querying node will give up on reaching its retransmission limit. 4255 When the Querying node is on the external side of the NAT, the Query 4256 will only traverse the NAT if some static configuration has been 4257 carried out on the NAT to forward GIST Q-mode traffic to a node on 4258 the internal network. Regardless of the S-flag in the Query, the 4259 Responding node cannot directly detect the presence of the NAT. It 4260 MUST send a normal Response with S=1 to an address derived from the 4261 Querying node's NLI which will traverse the NAT as normal UDP 4262 traffic. The Querying node MUST check the source address in the IP 4263 header with the NLI in the Response, and when it finds a mismatch it 4264 MUST terminate the handshake. 4266 Note that in either of the error cases (internal or external Querying 4267 node), an alternative to terminating the handshake could be to invoke 4268 some legacy NAT traversal procedure. This specification does not 4269 define any such procedure, although one possible approach is 4270 described in [45]. Any such traversal procedure MUST be incorporated 4271 into GIST using the existing GIST extensibility capabilities. Note 4272 also that this detection process only functions with the handshake 4273 exchange; it cannot operate on simple Data messages, whether they are 4274 Q-mode or normally encapsulated. Nodes SHOULD NOT send Data messages 4275 outside a messaging association if they cannot ensure that they are 4276 operating in an environment free of legacy NATs. 4278 7.2.2. GIST-aware NAT Traversal 4280 The most robust solution to the NAT traversal problem is to require 4281 that a NAT is GIST-aware, and to allow it to modify messages based on 4282 the contents of the MRI. This makes the assumption that NATs only 4283 rewrite the header fields included in the MRI, and not other higher 4284 layer identifiers. Provided this is done consistently with the data 4285 flow header translation, signalling messages can be valid each side 4286 of the boundary, without requiring the NAT to be signalling 4287 application aware. Note, however, that if the NAT does not 4288 understand the MRI, and the N-flag in the MRI is clear (see 4289 Appendix A.3.1), it should reject the message with an "Object Type 4290 Error" message (Appendix A.4.4.9) with subcode 4 ("Untranslated 4291 Object"). 4293 The basic concept is that GIST-aware NATs modify any signalling 4294 messages that have to be able to be interpreted without routing state 4295 being available; these messages are identified by the context-free 4296 flag C=1 in the common header, and include the Query in GIST 4297 handshake. In addition, NATs have to modify the remaining handshake 4298 messages that set up routing state. When routing state is set up, 4299 GIST records how subsequent messages related to that routing state 4300 should be translated; if no routing state is being used for a 4301 message, GIST directly uses the modifications made by the NAT to 4302 translate it. 4304 This specification defines an additional NAT traversal object that a 4305 NAT inserts into all Q-mode encapsulated messages with the context- 4306 free flag C=1, and which GIST echoes back in any replies, i.e. 4307 Response or Error messages. NATs apply GIST-specific processing only 4308 to Q-mode encapsulated messages with C=1, or D-mode messages carrying 4309 the NAT traversal object. All other GIST messages, either in C-mode, 4310 or D-mode messages with no NAT-Traversal object, should be treated as 4311 normal data traffic by the NAT, i.e. with IP and transport layer 4312 header translation but no GIST-specific processing. Note that the 4313 distinction between Q-mode and D-mode encapsulation may not be 4314 observable to the NAT, which is why the setting of the C-flag or 4315 presence of the NAT traversal object are used as interception 4316 criteria. The NAT decisions are based purely on the value of the 4317 C-flag and the presence of the NAT traversal object, not on the 4318 message type. 4320 The NAT-Traversal object (Appendix A.3.9), carries the translation 4321 between the MRIs which are appropriate for the internal and external 4322 sides of the NAT. It also carries a list of which other objects in 4323 the message have been translated. This should always include the 4324 NLI, and the Stack-Configuration-Data if present; if GIST is extended 4325 with further objects that carry addressing data, this list allows a 4326 message receiver to know if the new objects were supported by the 4327 NAT. Finally, the NAT-Traversal object MAY be used to carry data to 4328 assist the NAT in back-translating D-mode responses; this could be 4329 the original NLI or SCD, or opaque equivalents in the case of 4330 topology hiding. 4332 A consequence of this approach is that the routing state tables at 4333 the signalling application peers each side of the NAT are no longer 4334 directly compatible. In particular, they use different MRI values to 4335 refer to the same flow. However, messages after the Query/Response 4336 (the initial Confirm and subsequent Data messages) need to use a 4337 common MRI, since the NAT does not rewrite these, and this is chosen 4338 to be the MRI of the Querying node. It is the responsibility of the 4339 Responding node to translate between the two MRIs on inbound and 4340 outbound messages, which is why the unmodified MRI is propagated in 4341 the NAT-Traversal object. 4343 7.2.3. Message Processing Rules 4345 This specification normatively defines the behaviour of a GIST node 4346 receiving a message containing a NAT-Traversal object. However, it 4347 does not define normative behaviour for a NAT translating GIST 4348 messages, since much of this will depend on NAT implementation and 4349 policy about allocating bindings. In addition, it is not necessary 4350 for a GIST implementation itself. Therefore, those aspects of the 4351 following description are informative; full details of NAT behaviour 4352 for handling GIST messages can be found in [46]. 4354 A possible set of operations for a NAT to process a message with C=1 4355 is as follows. Note that for a Data message, only a subset of the 4356 operations is applicable. 4358 1. Verify that bindings for any data flow are actually in place. 4360 2. Create a new Message-Routing-Information object with fields 4361 modified according to the data flow bindings. 4363 3. Create bindings for subsequent C-mode signalling based on the 4364 information in the Network-Layer-Information and Stack- 4365 Configuration-Data objects. 4367 4. Create new Network-Layer-Information and if necessary Stack- 4368 Configuration-Data objects with fields to force D-mode response 4369 messages through the NAT, and to allow C-mode exchanges using the 4370 C-mode signalling bindings. 4372 5. Add a NAT-Traversal object, listing the objects which have been 4373 modified and including the unmodified MRI and any other data 4374 needed to interpret the response. If a NAT-Traversal object is 4375 already present, in the case of a sequence of NATs, the list of 4376 modified objects may be updated and further opaque data added, 4377 but the MRI contained in it is left unchanged. 4379 6. Encapsulate the message according to the normal rules of this 4380 specification for the Q-mode encapsulation. If the S-flag was 4381 set in the original message, the same IP source address selection 4382 policy should be applied to the forwarded message. 4384 7. Forward the message with these new payloads. 4386 A GIST node receiving such a message MUST verify that all mandatory 4387 objects containing addressing have been translated correctly, or else 4388 reject the message with an "Object Type Error" message 4389 (Appendix A.4.4.9) with subcode 4 ("Untranslated Object"). The error 4390 message MUST include the NAT-Traversal object as the first TLV after 4391 the common header, and this is also true for any other error message 4392 generated as a reply. Otherwise, the message is processed 4393 essentially as normal. If no state needs to be updated for the 4394 message, the NAT-Traversal object can be effectively ignored. The 4395 other possibility is that a Response must be returned, either because 4396 the message is the beginning of a handshake for a new flow, or it is 4397 a refresh for existing state. In both cases, the GIST node MUST 4398 create the Response in the normal way using the local form of the 4399 MRI, and its own NLI and (if necessary) SCD. It MUST also include 4400 the NAT-Traversal object as the first object in the Response after 4401 the common header. 4403 A NAT will intercept D-mode messages containing such echoed NAT- 4404 Traversal objects. The NAT processing is a subset of the processing 4405 for the C=1 case: 4407 1. Verify the existence of bindings for the data flow. 4409 2. Leave the Message-Routing-Information object unchanged. 4411 3. Modify the NLI and SCD objects for the Responding node if 4412 necessary, and create or update any bindings for C-mode 4413 signalling traffic. 4415 4. Forward the message. 4417 A GIST node receiving such a message (Response or Error) MUST use the 4418 MRI from the NAT-Traversal object as the key to index its internal 4419 routing state; it MAY also store the translated MRI for additional 4420 (e.g. diagnostic) information, but this is not used in the GIST 4421 processing. The remainder of GIST processing is unchanged. 4423 Note that Confirm messages are not given GIST-specific processing by 4424 the NAT. Thus, a Responding node which has delayed state 4425 installation until receiving the Confirm, only has available the 4426 untranslated MRI describing the flow, and the untranslated NLI as 4427 peer routing state. This would prevent the correct interpretation of 4428 the signalling messages; also, subsequent Query (refresh) messages 4429 would always be seen as route changes because of the NLI change. 4430 Therefore, a Responding node that wishes to delay state installation 4431 until receiving a Confirm must somehow reconstruct the translations 4432 when the Confirm arrives. How to do this is an implementation issue; 4433 one approach is to carry the translated objects as part of the 4434 Responder cookie which is echoed in the Confirm. Indeed, for one of 4435 the cookie constructions in Section 8.5 this is automatic. 4437 7.3. Interaction with IP Tunnelling 4439 The interaction between GIST and IP tunnelling is very simple. An IP 4440 packet carrying a GIST message is treated exactly the same as any 4441 other packet with the same source and destination addresses: in other 4442 words, it is given the tunnel encapsulation and forwarded with the 4443 other data packets. 4445 Tunnelled packets will not be identifiable as GIST messages until 4446 they leave the tunnel, since the GIST protocol encapsulation (e.g. 4447 port numbers) will be hidden within the standard tunnel 4448 encapsulation. If signalling is needed for the tunnel itself, this 4449 has to be initiated as a separate signalling session by one of the 4450 tunnel endpoints - that is, the tunnel counts as a new flow. Because 4451 the relationship between signalling for the microflow and signalling 4452 for the tunnel as a whole will depend on the signalling application 4453 in question, it is a signalling application responsibility to be 4454 aware of the fact that tunnelling is taking place and to carry out 4455 additional signalling if necessary; in other words, at least one 4456 tunnel endpoint must be signalling application aware. 4458 In some cases, it is the tunnel exit point (i.e. the node where 4459 tunnelled data and downstream signalling packets leave the tunnel) 4460 that will wish to carry out the tunnel signalling, but this node will 4461 not have knowledge or control of how the tunnel entry point is 4462 carrying out the data flow encapsulation. The information about how 4463 the inner MRI/SID relate to the tunnel MRI/SID needs to be carried in 4464 the signalling data from the tunnel entry point; this functionality 4465 is the equivalent to the RSVP SESSION_ASSOC object of [19]. In the 4466 NSIS protocol suite, these bindings are managed by the signalling 4467 applications, either implicitly (e.g. by SID re-use) or explicitly by 4468 carrying objects that bind the inner and outer SIDs as part of the 4469 NSLP payload. 4471 7.4. IPv4-IPv6 Transition and Interworking 4473 GIST itself is essentially IP version neutral: version dependencies 4474 are isolated in the formats of the Message-Routing-Information, 4475 Network-Layer-Information and Stack-Configuration-Data objects, and 4476 GIST also depends on the version independence of the protocols that 4477 support messaging associations. In mixed environments, GIST 4478 operation will be influenced by the IP transition mechanisms in use. 4479 This section provides a high level overview of how GIST is affected, 4480 considering only the currently predominant mechanisms. 4482 Dual Stack: (As described in [36].) In mixed environments, GIST 4483 MUST use the same IP version for Q-mode encapsulated messages as 4484 given by the MRI of the flow it is signalling for, and SHOULD do 4485 so for other signalling also (see Section 5.2.2). Messages with 4486 mismatching versions MUST be rejected with an "MRI Validation 4487 Failure" error message (Appendix A.4.4.12) with subcode 1 ("IP 4488 Version Mismatch"). The IP version used in D-mode is closely tied 4489 to the IP version used by the data flow, so it is intrinsically 4490 impossible for an IPv4-only or IPv6-only GIST node to support 4491 signalling for flows using the other IP version. Hosts which are 4492 dual stack for applications and routers which are dual stack for 4493 forwarding need GIST implementations which can support both IP 4494 versions. Applications with a choice of IP versions might select 4495 a version based on which could be supported in the network by 4496 GIST, which could be established by invoking parallel discovery 4497 procedures. 4499 Packet Translation: (Applicable to SIIT [8].) Some transition 4500 mechanisms allow IPv4 and IPv6 nodes to communicate by placing 4501 packet translators between them. From the GIST perspective, this 4502 should be treated essentially the same way as any other NAT 4503 operation (e.g. between internal and external addresses) as 4504 described in Section 7.2. The translating node needs to be GIST- 4505 aware; it will have to translate the addressing payloads between 4506 IPv4 and IPv6 formats for flows which cross between the two. The 4507 translation rules for the fields in the MRI payload (including 4508 e.g. DiffServ-codepoint and flow-label) are as defined in [8]. 4509 The same analysis applies to NAT-PT, although this technique is no 4510 longer proposed as a general purpose transition mechanism [41]. 4512 Tunnelling: (Applicable to 6to4 [20].) Many transition mechanisms 4513 handle the problem of how an end to end IPv6 (or IPv4) flow can be 4514 carried over intermediate IPv4 (or IPv6) regions by tunnelling; 4515 the methods tend to focus on minimising the tunnel administration 4516 overhead. For GIST, the treatment should be similar to any other 4517 IP tunnelling mechanism, as described in Section 7.3. In 4518 particular, the end to end flow signalling will pass transparently 4519 through the tunnel, and signalling for the tunnel itself will have 4520 to be managed by the tunnel endpoints. However, additional 4521 considerations may arise because of special features of the tunnel 4522 management procedures. In particular, [21] is based on using an 4523 anycast address as the destination tunnel endpoint. GIST MAY use 4524 anycast destination addresses in the Q-mode encapsulation of 4525 D-mode messages if necessary, but MUST NOT use them in the 4526 Network-Layer-Information addressing field; unicast addresses MUST 4527 be used instead. Note that the addresses from the IP header are 4528 not used by GIST in matching requests and replies, so there is no 4529 requirement to use anycast source addresses. 4531 8. Security Considerations 4533 The security requirement for GIST is to protect the signalling plane 4534 against identified security threats. For the signalling problem as a 4535 whole, these threats have been outlined in [31]; the NSIS framework 4536 [30] assigns a subset of the responsibilities to the NTLP. The main 4537 issues to be handled can be summarised as: 4539 Message Protection: Signalling message content can be protected 4540 against eavesdropping, modification, injection and replay while in 4541 transit. This applies both to GIST payloads, and GIST should also 4542 provide such protection as a service to signalling applications 4543 between adjacent peers. 4545 Routing State Integrity Protection: It is important that signalling 4546 messages are delivered to the correct nodes, and nowhere else. 4547 Here, 'correct' is defined as 'the appropriate nodes for the 4548 signalling given the Message-Routing-Information'. In the case 4549 where the MRI is based on the Flow Identification for path-coupled 4550 signalling, 'appropriate' means 'the same nodes that the 4551 infrastructure will route data flow packets through'. GIST has no 4552 role in deciding whether the data flow itself is being routed 4553 correctly; all it can do is ensure the signalling is routed 4554 consistently with it. GIST uses internal state to decide how to 4555 route signalling messages, and this state needs to be protected 4556 against corruption. 4558 Prevention of Denial of Service Attacks: GIST nodes and the network 4559 have finite resources (state storage, processing power, 4560 bandwidth). The protocol tries to minimise exhaustion attacks 4561 against these resources and not allow GIST nodes to be used to 4562 launch attacks on other network elements. 4564 The main additional issue is handling authorisation for executing 4565 signalling operations (e.g. allocating resources). This is assumed 4566 to be done in each signalling application. 4568 In many cases, GIST relies on the security mechanisms available in 4569 messaging associations to handle these issues, rather than 4570 introducing new security measures. Obviously, this requires the 4571 interaction of these mechanisms with the rest of the GIST protocol to 4572 be understood and verified, and some aspects of this are discussed in 4573 Section 5.7. 4575 8.1. Message Confidentiality and Integrity 4577 GIST can use messaging association functionality, specifically in 4578 this version TLS (Section 5.7.3), to ensure message confidentiality 4579 and integrity. Implementation of this functionality is REQUIRED but 4580 its use for any given flow or signalling application is OPTIONAL. In 4581 some cases, confidentiality of GIST information itself is not likely 4582 to be a prime concern, in particular since messages are often sent to 4583 parties which are unknown ahead of time, although the content visible 4584 even at the GIST level gives significant opportunities for traffic 4585 analysis. Signalling applications may have their own mechanism for 4586 securing content as necessary; however, they may find it convenient 4587 to rely on protection provided by messaging associations, since it 4588 runs unbroken between signalling application peers. 4590 8.2. Peer Node Authentication 4592 Cryptographic protection (of confidentiality or integrity) requires a 4593 security association with session keys. These can be established by 4594 an authentication and key exchange protocol based on shared secrets, 4595 public key techniques or a combination of both. Authentication and 4596 key agreement is possible using the protocols associated with the 4597 messaging association being secured. TLS incorporates this 4598 functionality directly. GIST nodes rely on the messaging association 4599 protocol to authenticate the identity of the next hop, and GIST has 4600 no authentication capability of its own. 4602 With routing state discovery, there are few effective ways to know 4603 what is the legitimate next or previous hop as opposed to an 4604 impostor. In other words, cryptographic authentication here only 4605 provides assurance that a node is 'who' it is (i.e. the legitimate 4606 owner of identity in some namespace), not 'what' it is (i.e. a node 4607 which is genuinely on the flow path and therefore can carry out 4608 signalling for a particular flow). Authentication provides only 4609 limited protection, in that a known peer is unlikely to lie about its 4610 role. Additional methods of protection against this type of attack 4611 are considered in Section 8.3 below. 4613 It is an implementation issue whether peer node authentication should 4614 be made signalling application dependent; for example, whether 4615 successful authentication could be made dependent on presenting 4616 credentials related to a particular signalling role (e.g. signalling 4617 for QoS). The abstract API of Appendix B leaves open such policy and 4618 authentication interactions between GIST and the NSLP it is serving. 4619 However, it does allow applications to inspect the authenticated 4620 identity of the peer to which a message will be sent before 4621 transmission. 4623 8.3. Routing State Integrity 4625 Internal state in a node (see Section 4.2) is used to route messages. 4626 If this state is corrupted, signalling messages may be misdirected. 4628 In the case where the MRM is path-coupled, the messages need to be 4629 routed identically to the data flow described by the MRI, and the 4630 routing state table is the GIST view of how these flows are being 4631 routed through the network in the immediate neighbourhood of the 4632 node. Routes are only weakly secured (e.g. there is no cryptographic 4633 binding of a flow to a route), and there is no authoritative 4634 information about flow routes other than the current state of the 4635 network itself. Therefore, consistency between GIST and network 4636 routing state has to be ensured by directly interacting with the IP 4637 routing mechanisms to ensure that the signalling peers are the 4638 appropriate ones for any given flow. An overview of security issues 4639 and techniques in this context is provided in [38]. 4641 In one direction, peer identification is installed and refreshed only 4642 on receiving a Response (compare Figure 5). This MUST echo the 4643 cookie from a previous Query, which will have been sent along the 4644 flow path with the Q-mode encapsulation, i.e. end-to-end addressed. 4645 Hence, only the true next peer or an on-path attacker will be able to 4646 generate such a message, provided freshness of the cookie can be 4647 checked at the querying node. 4649 In the other direction, peer identification MAY be installed directly 4650 on receiving a Query containing addressing information for the 4651 signalling source. However, any node in the network could generate 4652 such a message; indeed, many nodes in the network could be the 4653 genuine upstream peer for a given flow. To protect against this, 4654 four strategies are used: 4656 Filtering: the receiving node MAY reject signalling messages which 4657 claim to be for flows with flow source addresses which could be 4658 ruled out by ingress filtering. An extension of this technique 4659 would be for the receiving node to monitor the data plane and to 4660 check explicitly that the flow packets are arriving over the same 4661 interface and if possible from the same link layer neighbour as 4662 the D-mode signalling packets. If they are not, it is likely that 4663 at least one of the signalling or flow packets is being spoofed. 4665 Return routability checking: the receiving node MAY refuse to 4666 install upstream state until it has completed a Confirm handshake 4667 with the peer. This echoes the Response cookie of the Response, 4668 and discourages nodes from using forged source addresses. This 4669 also plays a role in denial of service prevention, see below. 4671 Authorisation: a stronger approach is to carry out a peer 4672 authorisation check (see Section 4.4.2) as part of messaging 4673 association setup. The ideal situation is that the receiving node 4674 can determine the correct upstream node address from routing table 4675 analysis or knowledge of local topology constraints, and then 4676 verify from the authorised peer database (APD) that the peer has 4677 this IP address. This is only technically feasible in a limited 4678 set of deployment environments. The APD can also be used to list 4679 the subsets of nodes which are feasible peers for particular 4680 source or destination subnets, or to blacklist nodes which have 4681 previously originated attacks or exist in untrustworthy networks, 4682 which provide weaker levels of authorisation checking. 4684 SID segregation: The routing state lookup for a given MRI and NSLPID 4685 MUST also take the SID into account. A malicious node can only 4686 overwrite existing GIST routing state if it can guess the 4687 corresponding SID; it can insert state with random SID values, but 4688 generally this will not be used to route signalling messages for 4689 which state has already been legitimately established. 4691 8.4. Denial of Service Prevention and Overload Protection 4693 GIST is designed so that in general each Query only generates at most 4694 one Response which is at most only slightly larger than the Query, so 4695 that a GIST node cannot become the source of a denial of service 4696 amplification attack. (There is a special case of retransmitted 4697 Response messages, see Section 5.3.3.) 4699 However, GIST can still be subjected to denial-of-service attacks 4700 where an attacker using forged source addresses forces a node to 4701 establish state without return routability, causing a problem similar 4702 to TCP SYN flood attacks. Furthermore, an adversary might use 4703 modified or replayed unprotected signalling messages as part of such 4704 an attack. There are two types of state attacks and one 4705 computational resource attack. In the first state attack, an 4706 attacker floods a node with messages that the node has to store until 4707 it can determine the next hop. If the destination address is chosen 4708 so that there is no GIST-capable next hop, the node would accumulate 4709 messages for several seconds until the discovery retransmission 4710 attempt times out. The second type of state-based attack causes GIST 4711 state to be established by bogus messages. A related computational/ 4712 network-resource attack uses unverified messages to cause a node 4713 query an authentication or authorisation infrastructure, or attempt 4714 to cryptographically verify a digital signature. 4716 We use a combination of two defences against these attacks: 4718 1. The responding node need not establish a session or discover its 4719 next hop on receiving the Query, but MAY wait for a Confirm, 4720 possibly on a secure channel. If the channel exists, the 4721 additional delay is one one-way delay and the total is no more 4722 than the minimal theoretically possible delay of a three-way 4723 handshake, i.e., 1.5 node-to-node round-trip times. The delay 4724 gets significantly larger if a new connection needs to be 4725 established first. 4727 2. The Response to the Query contains a cookie, which is repeated in 4728 the Confirm. State is only established for messages that contain 4729 a valid cookie. The setup delay is also 1.5 round-trip times. 4730 This mechanism is similar to that in SCTP [40] and other modern 4731 protocols. 4733 There is a potential overload condition if a node is flooded with 4734 Query or Confirm messages. One option is for the node to bypass 4735 these messages altogether as described in Section 4.3.2, effectively 4736 falling back to being a non-NSIS node. If this is not possible, a 4737 node MAY still choose to limit the rate at which it processes Query 4738 messages and discard the excess, although it SHOULD first adapt its 4739 policy to one of sending Responses statelessly if it is not already 4740 doing so. A conformant GIST node will automatically decrease the 4741 load by retransmitting Queries with an exponential backoff. A non- 4742 conformant node (launching a DoS attack) can generate uncorrelated 4743 Queries at an arbitrary rate, which makes it hard to apply rate- 4744 limiting without also affecting genuine handshake attempts. However, 4745 if Confirm messages are requested, the cookie binds the message to a 4746 Querying node address which has been validated by a return 4747 routability check and rate-limits can be applied per-source. 4749 Once a node has decided to establish routing state, there may still 4750 be transport and security state to be established between peers. 4751 This state setup is also vulnerable to denial of service attacks. 4752 GIST relies on the implementations of the lower layer protocols that 4753 make up messaging associations to mitigate such attacks. In the 4754 current specification, the querying node is always the one wishing to 4755 establish a messaging association, so it is the responding node that 4756 needs to be protected. It is possible for an attacking node to 4757 execute these protocols legally to set up large numbers of 4758 associations that were never used, and responding node 4759 implementations MAY use rate-limiting or other techniques to control 4760 the load in such cases. 4762 Signalling applications can use the services provided by GIST to 4763 defend against certain (e.g. flooding) denial of service attacks. In 4764 particular, they can elect to process only messages from peers that 4765 have passed a return routability check or been authenticated at the 4766 messaging association level (see Appendix B.2). Signalling 4767 applications that accept messages under other circumstances (in 4768 particular, before routing state has been fully established at the 4769 GIST level) need to take this into account when designing their 4770 denial of service prevention mechanisms, for example by not creating 4771 local state as a result of processing such messages. Signalling 4772 applications can also manage overload by invoking flow control, as 4773 described in Section 4.1.1. 4775 8.5. Requirements on Cookie Mechanisms 4777 The requirements on the Query cookie can be summarised as follows: 4779 Liveness: The cookie must be live, that is, it must change from one 4780 handshake to the next. To prevent replay attacks. 4782 Unpredictability: The cookie must not be guessable e.g. from a 4783 sequence or timestamp. To prevent direct forgery based on seeing 4784 a history of captured messages. 4786 Easily validated: It must be efficient for the Q-Node to validate 4787 that a particular cookie matches an in-progress handshake, for a 4788 routing state machine which already exists. To discard responses 4789 which have been randomly generated by an adversary, or to discard 4790 responses to queries which were generated with forged source 4791 addresses or an incorrect address in the included NLI object. 4793 Uniqueness: The cookie must be unique to a given handshake since it 4794 is actually used to match the Response to a handshake anyway, e.g. 4795 because of messaging association multiplexing. 4797 Likewise, the requirements on the Responder cookie can be summarised 4798 as follows: 4800 Liveness: The cookie must be live as above, to prevent replay 4801 attacks. 4803 Creation simplicity: The cookie must be lightweight to generatem, to 4804 avoid resource exhaustion at the responding node. 4806 Validation simplicity: It must be simple for the R-node to validate 4807 that an R-cookie was generated by itself and no-one else, without 4808 storing state about the handshake it was generated for. 4810 Binding: The cookie must be bound to the routing state that will be 4811 installed, to prevent use with different routing state e.g. in a 4812 modified Confirm. The routing state here includes the Peer- 4813 Identity and Interface-Address given in the NLI of the Query, and 4814 the MRI/NSLPID for the messaging. 4816 It can also include the interface on which the Query was received 4817 for use later in route change detection (Section 7.1.2). Since a 4818 Q-mode encapsulated message is the one that will best follow the 4819 data path, subsequent changes in this arrival interface indicate 4820 route changes between the peers. 4822 A suitable implementation for the Q-Cookie is a cryptographically 4823 strong random number which is unique for this routing state machine 4824 handshake. A node MUST implement this or an equivalently strong 4825 mechanism. Guidance on random number generation can be found in 4826 [32]. 4828 A suitable basic implementation for the R-Cookie is as follows: 4830 R-Cookie = liveness data + reception interface 4831 + hash (locally known secret, 4832 Q-Node NLI identity and address, MRI, NSLPID, 4833 liveness data) 4835 A node MUST implement this or an equivalently strong mechanism. 4836 There are several alternatives for the liveness data. One is to use 4837 a timestamp like SCTP. Another is to give the local secret a (rapid) 4838 rollover, with the liveness data as the generation number of the 4839 secret, like IKEv2. In both cases, the liveness data has to be 4840 carried outside the hash, to allow the hash to be verified at the 4841 Responder. Another approach is to replace the hash with encryption 4842 under a locally known secret, in which case the liveness data does 4843 not need to be carried in the clear. Any symmetric cipher immune to 4844 known plaintext attacks can be used. In the case of GIST-aware NAT 4845 traversal with delayed state installation it is necessary to carry 4846 additional data in the cookie; appropriate constructions are 4847 described in [46]. 4849 To support the validation simplicity requirement, the Responder can 4850 check the liveness data to filter out some blind (flooding) attacks 4851 before beginning any cryptographic cookie verification. To support 4852 this usage, the liveness data must be carried in the clear and not be 4853 easily guessable; this rules out the timestamp approach, and suggests 4854 the use of sequence of secrets with the liveness data identifying the 4855 position in the sequence. The secret strength and rollover frequency 4856 must be high enough that the secret cannot be brute-forced during its 4857 lifetime. Note that any node can use a Query to discover the current 4858 liveness data, so it remains hard to defend against sophisticated 4859 attacks which disguise such probes within a flood of Queries from 4860 forged source addresses. Therefore, it remains important to use an 4861 efficient hashing mechanism or equivalent. 4863 If a node receives a message for which cookie validation fails, it 4864 MAY return an "Object Value Error" message (Appendix A.4.4.10) with 4865 subcode 4 ("Invalid Cookie") to the sender and SHOULD log an error 4866 condition locally, as well as dropping the message. However, sending 4867 the error in general makes a node a source of backscatter. 4869 Therefore, this MUST only be enabled selectively, e.g. during initial 4870 deployment or debugging. 4872 8.6. Security Protocol Selection Policy 4874 This specification defines a single mandatory-to-implement security 4875 protocol (TLS, Section 5.7.3). However, it is possible to define 4876 additional security protocols in the future, for example to allow re- 4877 use with other types of credentials, or migrate towards protocols 4878 with stronger security properties. In addition, use of any security 4879 protocol for a messaging association is optional. Security protocol 4880 selection is carried out as part of the GIST handshake mechanism 4881 (Section 4.4.1). 4883 The selection process may be vulnerable to downgrade attacks, where a 4884 man in the middle modifies the capabilities offered in the Query or 4885 Response to mislead the peers into accepting a lower level of 4886 protection than is achievable. There is a two part defence against 4887 such attacks (the following is based the same concepts as [26]): 4889 1. The Response does not depend on the Stack-Proposal in the Query 4890 (see Section 5.7.1). Therefore, tampering with the Query has no 4891 effect on the resulting messaging association configuration. 4893 2. The Responding node's Stack-Proposal is echoed in the Confirm. 4894 The Responding node checks this to validate that the proposal it 4895 made in the Response is the same as the one received by the 4896 Querying node. Note that as a consequence of the previous point, 4897 the Responding node does not have to remember the proposal 4898 explicitly, since it is a static function of local policy. 4900 The validity of the second part depends on the strength of the 4901 security protection provided for the Confirm. If the Querying node 4902 is prepared to create messaging associations with null security 4903 properties (e.g. TCP only), the defence is ineffective, since the 4904 man in the middle can re-insert the original Responder's Stack- 4905 Proposal, and the Responding node will assume that the minimal 4906 protection is a consequence of Querying node limitations. However, 4907 if the messaging association provides at least integrity protection 4908 that cannot be broken in real-time, the Confirm cannot be modified in 4909 this way. Therefore, if the Querying node does not apply a security 4910 policy to the messaging association protocols to be created that 4911 ensures at least this minimal level of protection is met, it remains 4912 open to the threat that a downgrade has occurred. Applying such a 4913 policy ensures capability discovery process will result in the setup 4914 of a messaging association with the correct security properties as 4915 appropriate for the two peers involved. 4917 8.7. Residual Threats 4919 Taking the above security mechanisms into account, the main residual 4920 threats against NSIS are three types of on-path attack, 4921 vulnerabilities from particular limited modes of TLS usage, and 4922 implementation-related weaknesses. 4924 An on-path attacker who can intercept the initial Query can do most 4925 things it wants to the subsequent signalling. It is very hard to 4926 protect against this at the GIST level; the only defence is to use 4927 strong messaging association security to see whether the Responding 4928 node is authorised to take part in NSLP signalling exchanges. To 4929 some extent, this behaviour is logically indistinguishable from 4930 correct operation, so it is easy to see why defence is difficult. 4931 Note that an on-path attacker of this sort can do anything to the 4932 traffic as well as the signalling. Therefore, the additional threat 4933 induced by the signalling weakness seems tolerable. 4935 At the NSLP level, there is a concern about transitivity of trust of 4936 correctness of routing along the signalling chain. The NSLP at the 4937 querying node can have good assurance that it is communicating with 4938 an on-path peer or a node delegated by the on-path node by depending 4939 on the security protection provided by GIST. However, it has no 4940 assurance that the node beyond the responder is also on-path, or that 4941 the MRI (in particular) is not being modified by the responder to 4942 refer to a different flow. Therefore, if it sends signalling 4943 messages with payloads (e.g. authorisation tokens) which are valuable 4944 to nodes beyond the adjacent hop, it is up to the NSLP to ensure that 4945 the appropriate chain of trust exists. This could be achieved using 4946 higher layer security protection such as CMS [29]. 4948 There is a further residual attack by a node which is not on the path 4949 of the Query, but is on the path of the Response, or is able to use a 4950 Response from one handshake to interfere with another. The attacker 4951 modifies the Response to cause the Querying node to form an adjacency 4952 with it rather than the true peer. In principle, this attack could 4953 be prevented by including an additional cryptographic object in the 4954 Response which ties the Response to the initial Query and the routing 4955 state and can be verified by the Querying node. 4957 GIST depends on TLS for peer node authentication, and subsequent 4958 channel security. The analysis in [31] indicates the threats that 4959 arise when the peer node authentication is incomplete, specifically 4960 when unilateral authentication is performed (one node authenticates 4961 the other, but not vice versa). In this specification, mutual 4962 authentication can be supported either by certificate exchange or the 4963 use of pre-shared keys (see Section 5.7.3); if some other TLS 4964 authentication mechanism is negotiated, its properties would have to 4965 be analysed to determine acceptability for use with GIST. If mutual 4966 authentication is performed, the requirements for NTLP security are 4967 met. 4969 However, in the case of certificate exchange, this specification 4970 allows the possibility that only a server certificate is provided, 4971 which means that the Querying node authenticates the Responding node 4972 but not vice versa. Accepting such unilateral authentication allows 4973 for partial security in environments where client certificates are 4974 not widespread, and is better than no security at all; however, it 4975 does expose the Responding node to certain threats described in 4976 section 3.1 of [31]. For example, the Responding node cannot verify 4977 whether there is a man-in-the-middle between it and the Querying 4978 node, which could be manipulating the signalling messages, and it 4979 cannot verify the identity of the Querying node if it requests 4980 authorisation of resources. Note that in the case of host-network 4981 signalling, the Responding node could be either the host or the first 4982 hop router, depending on the signalling direction. Because of these 4983 vulnerabilities, modes or deployments of TLS which do not provide 4984 mutual authentication can be considered as at best transitional 4985 stages rather than providing a robust security solution. 4987 Certain security aspects of GIST operation depend on signalling 4988 application behaviour: a poorly implemented or compromised NSLP could 4989 degrade GIST security. However, the degradation would only affect 4990 GIST handling of the NSLP's own signalling traffic or overall 4991 resource usage at the node where the weakness occurred, and 4992 implementation weakness or compromise could have just as great an 4993 effect within the NSLP itself. GIST depends on NSLPs to choose SIDs 4994 appropriately (Section 4.1.3). If NSLPs choose non-random SIDs this 4995 makes off-path attacks based on SID guessing easier to carry out. 4996 NSLPs can also leak information in structured SIDs, but they could 4997 leak similar information in the NLSP payload data anyway. 4999 9. IANA Considerations 5001 This section defines the registries and initial codepoint assignments 5002 for GIST. It also defines the procedural requirements to be followed 5003 by IANA in allocating new codepoints. Note that the guidelines on 5004 the technical criteria to be followed in evaluating requests for new 5005 codepoint assignments are covered normatively in a separate document 5006 which considers the NSIS protocol suite in a unified way. That 5007 document discusses the general issue of NSIS extensibility, as well 5008 as the technical criteria for particular registries; see [13] for 5009 further details. 5011 The registry definitions that follow leave large blocks of codes 5012 marked "Reserved - not to be allocated". This is to allow a future 5013 revision of this specification or another Standards Track document to 5014 modify the relative space given to different allocation policies 5015 without having to change the initial rules retrospectively if they 5016 turn out to have been inappropriate, e.g. if the space for one 5017 particular policy is exhausted too quickly. 5019 The allocation policies used in this section follow the guidance 5020 given in [5]. In addition, for a number of the GIST registries, this 5021 specification also defines private/experimental ranges as discussed 5022 in [10]. Note that the only environment in which these codepoints 5023 can validly be used is a closed one in which the experimenter knows 5024 all the experiments in progress. 5026 This specification allocates the following codepoints in existing 5027 registries: 5029 Well-known UDP port XXX as the destination port for Q-mode 5030 encapsulated GIST messages (Section 5.3). 5032 This specification creates the following registries with the 5033 structures as defined below: 5035 NSLP Identifiers: Each signalling application requires the 5036 assignment of one or more NSLPIDs. The following NSLPID is 5037 allocated by this specification: 5039 +---------+---------------------------------------------------------+ 5040 | NSLPID | Application | 5041 +---------+---------------------------------------------------------+ 5042 | 0 | Used for GIST messages not related to any signalling | 5043 | | application. | 5044 +---------+---------------------------------------------------------+ 5046 The NSLPID is a 16 bit integer, and allocation policies for 5047 further values are as follows: 5049 1-32703: IESG Approval 5051 32704-32767: Private/Experimental Use 5053 32768-65536: Reserved - not to be allocated 5055 GIST Message Type: The GIST common header (Appendix A.1) contains a 5056 7-bit message type field. The following values are allocated by 5057 this specification: 5059 +---------+----------+ 5060 | MType | Message | 5061 +---------+----------+ 5062 | 0 | Query | 5063 | | | 5064 | 1 | Response | 5065 | | | 5066 | 2 | Confirm | 5067 | | | 5068 | 3 | Data | 5069 | | | 5070 | 4 | Error | 5071 | | | 5072 | 5 | MA-Hello | 5073 +---------+----------+ 5075 Allocation policies for further values are as follows: 5077 6-31: Standards Action 5079 32-55: Expert Review 5081 56-63: Private/Experimental Use 5083 64-127: Reserved - not to be allocated 5085 Object Types: There is a 12-bit field in the object header 5086 (Appendix A.2). The following values for object type are defined 5087 by this specification: 5089 +---------+-----------------------------+ 5090 | OType | Object Type | 5091 +---------+-----------------------------+ 5092 | 0 | Message Routing Information | 5093 | | | 5094 | 1 | Session ID | 5095 | | | 5096 | 2 | Network Layer Information | 5097 | | | 5098 | 3 | Stack Proposal | 5099 | | | 5100 | 4 | Stack Configuration Data | 5101 | | | 5102 | 5 | Query Cookie | 5103 | | | 5104 | 6 | Responder Cookie | 5105 | | | 5106 | 7 | NAT Traversal | 5107 | | | 5108 | 8 | NSLP Data | 5109 | | | 5110 | 9 | Error | 5111 | | | 5112 | 10 | Hello ID | 5113 +---------+-----------------------------+ 5115 Allocation policies for further values are as follows: 5117 10-1023: Standards Action 5119 1024-1999: Specification Required 5121 2000-2047: Private/Experimental Use 5123 2048-4095: Reserved - not to be allocated 5125 When a new object type is allocated according to one of the first 5126 two policies, the specification MUST provide the object format and 5127 define the setting of the extensibility bits (A/B, see 5128 Appendix A.2.1). 5130 Message Routing Methods: GIST allows multiple message routing 5131 methods (see Section 3.3). The MRM is indicated in the leading 5132 byte of the MRI object (Appendix A.3.1). This specification 5133 defines the following values: 5135 +------------+------------------------+ 5136 | MRM-ID | Message Routing Method | 5137 +------------+------------------------+ 5138 | 0 | Path Coupled MRM | 5139 | | | 5140 | 1 | Loose End MRM | 5141 +------------+------------------------+ 5143 Allocation policies for further values are as follows: 5145 2-63: Standards Action 5147 64-119: Expert Review 5149 120-127: Private/Experimental Use 5151 128-255: Reserved - not to be allocated 5153 When a new MRM is defined according to one of the first two 5154 policies, a specification document will be required. This MUST 5155 provide the information described in Section 3.3. 5157 MA-Protocol-IDs: Each protocol that can be used in a messaging 5158 association is identified by a 1-byte MA-Protocol-ID 5159 (Section 5.7). Note that the MA-Protocol-ID is not an IP Protocol 5160 number; indeed, some of the messaging association protocols - such 5161 as TLS - do not have an IP Protocol number. This is used as a tag 5162 in the Stack-Proposal and Stack-Configuration-Data objects 5163 (Appendix A.3.4 and Appendix A.3.5). The following values are 5164 defined by this specification: 5166 +---------------------+-----------------------------------------+ 5167 | MA-Protocol-ID | Protocol | 5168 +---------------------+-----------------------------------------+ 5169 | 0 | Reserved - not to be allocated | 5170 | | | 5171 | 1 | TCP opened in the forwards direction | 5172 | | | 5173 | 2 | TLS initiated in the forwards direction | 5174 +---------------------+-----------------------------------------+ 5176 Allocation policies for further values are as follows: 5178 3-63: Standards Action 5179 64-119: Expert Review 5181 120-127: Private/Experimental Use 5183 128-255: Reserved - not to be allocated 5185 When a new MA-Protocol-ID is allocated according to one of the 5186 first two policies, a specification document will be required. 5187 This MUST define the format for the MA-protocol-options field (if 5188 any) in the Stack-Configuration-Data object that is needed to 5189 define its configuration. If a protocol is to be used for 5190 reliable message transfer, it MUST be described how delivery 5191 errors are to be detected by GIST. Extensions to include new 5192 channel security protocols MUST include a description of how to 5193 integrate the functionality described in Section 3.9 with the rest 5194 of GIST operation. If the new MA-Protocol-ID can be used in 5195 conjunction with existing ones (for example, a new transport 5196 protocol which could be used with Transport Layer Security), the 5197 specification MUST define the interaction between the two. 5199 Error Codes/Subcodes: There is a 2 byte error code and 1 byte 5200 subcode in the Value field of the Error object (Appendix A.4.1). 5201 Error codes 1-12 are defined in Appendix A.4.4 together with 5202 subcodes 0-5 (code 1), 0-5 (code 9), 0-5 (code 10), and 0-2 (code 5203 12). Additional codes and subcodes are allocated on a first-come, 5204 first-served basis. When a new code/subcode combination is 5205 allocated, the following information MUST be provided: 5207 Error case: textual name of error 5209 Error class: from the categories given in Appendix A.4.3 5211 Error code: allocated by IANA, if a new code is required 5213 Error subcode: subcode point, also allocated by IANA 5215 Additional information: what additional information fields it is 5216 mandatory to include in the error message, from Appendix A.4.2 5218 Additional Information Types: An Error object (Appendix A.4.1) may 5219 contain Additional Information fields. Each possible field type 5220 is identified by a 16-bit AI-Type. AI-Types 1-4 are defined in 5221 Appendix A.4.2; additional AI-Types are allocated on a first-come, 5222 first-served basis. 5224 10. Acknowledgements 5226 This document is based on the discussions within the IETF NSIS 5227 working group. It has been informed by prior work and formal and 5228 informal inputs from: Cedric Aoun, Attila Bader, Vitor Bernado, 5229 Roland Bless, Bob Braden, Marcus Brunner, Benoit Campedel, Yoshiko 5230 Chong, Luis Cordeiro, Elwyn Davies, Michel Diaz, Christian Dickmann, 5231 Pasi Eronen, Alan Ford, Xiaoming Fu, Bo Gao, Ruediger Geib, Eleanor 5232 Hepworth, Thomas Herzog, Cheng Hong, Teemu Huovila, Jia Jia, Cornelia 5233 Kappler, Georgios Karagiannis, Ruud Klaver, Max Laier, Chris Lang, 5234 Lauri Liuhto, John Loughney, Allison Mankin, Jukka Manner, Pete 5235 McCann, Andrew McDonald, Mac McTiffin, Glenn Morrow, Dave Oran, 5236 Andreas Pashalidis, Henning Peters, Tom Phelan, Akbar Rahman, Takako 5237 Sanda, Charles Shen, Melinda Shore, Martin Stiemerling, Martijn 5238 Swanink, Mike Thomas, Hannes Tschofenig, Sven van den Bosch, Nuutti 5239 Varis, Michael Welzl, Lars Westberg, and Mayi Zoumaro-djayoon. Parts 5240 of the TLS usage description (Section 5.7.3) were derived from the 5241 Diameter base protocol specification, RFC3588. In addition, Hannes 5242 Tschofenig provided a detailed set of review comments on the security 5243 section, and Andrew McDonald provided the formal description for the 5244 initial packet formats and the name matching algorithm for TLS. 5245 Chris Lang's implementation work provided objective feedback on the 5246 clarity and feasibility of the specification, and he also provided 5247 the state machine description and the initial error catalogue and 5248 formats. Magnus Westerlund carried out a detailed AD review which 5249 identified a number of issues and led to significant clarifications, 5250 which was followed by an even more detailed IESG review, with 5251 comments from Jari Arkko, Ross Callon, Brian Carpenter, Lisa 5252 Dusseault, Lars Eggert, Ted Hardie, Sam Hartman, Russ Housley, Cullen 5253 Jennings, Tim Polk, and a very detailed analysis by Adrian Farrel 5254 from the Routing Area directorate; Suresh Krishnan carried out a 5255 detailed review for the Gen-ART. 5257 11. References 5259 11.1. Normative References 5261 [1] Braden, R., "Requirements for Internet Hosts - Communication 5262 Layers", STD 3, RFC 1122, October 1989. 5264 [2] Baker, F., "Requirements for IP Version 4 Routers", RFC 1812, 5265 June 1995. 5267 [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement 5268 Levels", BCP 14, RFC 2119, March 1997. 5270 [4] Schiller, J., "Cryptographic Algorithms for Use in the Internet 5271 Key Exchange Version 2 (IKEv2)", RFC 4307, December 2005. 5273 [5] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 5274 Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. 5276 [6] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) 5277 Specification", RFC 2460, December 1998. 5279 [7] Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of 5280 the Differentiated Services Field (DS Field) in the IPv4 and 5281 IPv6 Headers", RFC 2474, December 1998. 5283 [8] Nordmark, E., "Stateless IP/ICMP Translation Algorithm (SIIT)", 5284 RFC 2765, February 2000. 5286 [9] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, 5287 R., and W. Polk, "Internet X.509 Public Key Infrastructure 5288 Certificate and Certificate Revocation List (CRL) Profile", 5289 RFC 5280, May 2008. 5291 [10] Narten, T., "Assigning Experimental and Testing Numbers 5292 Considered Useful", BCP 82, RFC 3692, January 2004. 5294 [11] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) 5295 Protocol Version 1.2", RFC 5246, August 2008. 5297 [12] Crocker, D. and P. Overell, "Augmented BNF for Syntax 5298 Specifications: ABNF", STD 68, RFC 5234, January 2008. 5300 [13] Manner, J., Bless, R., Loughney, J., and E. Davies, "Using and 5301 Extending the NSIS Protocol Family", draft-nsis-ext-02 (work in 5302 progress), November 2008. 5304 11.2. Informative References 5306 [14] Katz, D., "IP Router Alert Option", RFC 2113, February 1997. 5308 [15] Braden, B., Zhang, L., Berson, S., Herzog, S., and S. Jamin, 5309 "Resource ReSerVation Protocol (RSVP) -- Version 1 Functional 5310 Specification", RFC 2205, September 1997. 5312 [16] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 5313 RFC 2246, January 1999. 5315 [17] Moy, J., "OSPF Version 2", STD 54, RFC 2328, April 1998. 5317 [18] Partridge, C. and A. Jackson, "IPv6 Router Alert Option", 5318 RFC 2711, October 1999. 5320 [19] Terzis, A., Krawczyk, J., Wroclawski, J., and L. Zhang, "RSVP 5321 Operation Over IP Tunnels", RFC 2746, January 2000. 5323 [20] Carpenter, B. and K. Moore, "Connection of IPv6 Domains via 5324 IPv4 Clouds", RFC 3056, February 2001. 5326 [21] Huitema, C., "An Anycast Prefix for 6to4 Relay Routers", 5327 RFC 3068, June 2001. 5329 [22] Baker, F., Iturralde, C., Le Faucheur, F., and B. Davie, 5330 "Aggregation of RSVP for IPv4 and IPv6 Reservations", RFC 3175, 5331 September 2001. 5333 [23] Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V., and 5334 G. Swallow, "RSVP-TE: Extensions to RSVP for LSP Tunnels", 5335 RFC 3209, December 2001. 5337 [24] Jamoussi, B., Andersson, L., Callon, R., Dantu, R., Wu, L., 5338 Doolan, P., Worster, T., Feldman, N., Fredette, A., Girish, M., 5339 Gray, E., Heinanen, J., Kilty, T., and A. Malis, "Constraint- 5340 Based LSP Setup using LDP", RFC 3212, January 2002. 5342 [25] Grossman, D., "New Terminology and Clarifications for 5343 Diffserv", RFC 3260, April 2002. 5345 [26] Arkko, J., Torvinen, V., Camarillo, G., Niemi, A., and T. 5346 Haukka, "Security Mechanism Agreement for the Session 5347 Initiation Protocol (SIP)", RFC 3329, January 2003. 5349 [27] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session 5350 Traversal Utilities for NAT (STUN)", RFC 5389, October 2008. 5352 [28] Rosenberg, J., Mahy, R., and P. Matthews, "Traversal Using 5353 Relays around NAT (TURN): Relay Extensions to Session 5354 Traversal Utilities for NAT (STUN)", draft-ietf-behave-turn-13 5355 (work in progress), February 2009. 5357 [29] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852, 5358 July 2004. 5360 [30] Hancock, R., Karagiannis, G., Loughney, J., and S. Van den 5361 Bosch, "Next Steps in Signaling (NSIS): Framework", RFC 4080, 5362 June 2005. 5364 [31] Tschofenig, H. and D. Kroeselberg, "Security Threats for Next 5365 Steps in Signaling (NSIS)", RFC 4081, June 2005. 5367 [32] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 5368 Requirements for Security", BCP 106, RFC 4086, June 2005. 5370 [33] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites for 5371 Transport Layer Security (TLS)", RFC 4279, December 2005. 5373 [34] Conta, A., Deering, S., and M. Gupta, "Internet Control Message 5374 Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) 5375 Specification", RFC 4443, March 2006. 5377 [35] Stiemerling, M., Tschofenig, H., Aoun, C., and E. Davies, "NAT/ 5378 Firewall NSIS Signaling Layer Protocol (NSLP)", 5379 draft-ietf-nsis-nslp-natfw-20 (work in progress), 5380 November 2008. 5382 [36] Nordmark, E. and R. Gilligan, "Basic Transition Mechanisms for 5383 IPv6 Hosts and Routers", RFC 4213, October 2005. 5385 [37] Kent, S. and K. Seo, "Security Architecture for the Internet 5386 Protocol", RFC 4301, December 2005. 5388 [38] Nikander, P., Arkko, J., Aura, T., Montenegro, G., and E. 5389 Nordmark, "Mobile IP Version 6 Route Optimization Security 5390 Design Background", RFC 4225, December 2005. 5392 [39] Audet, F. and C. Jennings, "Network Address Translation (NAT) 5393 Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, 5394 January 2007. 5396 [40] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, 5397 September 2007. 5399 [41] Aoun, C. and E. Davies, "Reasons to Move the Network Address 5400 Translator - Protocol Translator (NAT-PT) to Historic Status", 5401 RFC 4966, July 2007. 5403 [42] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. Pignataro, 5404 "The Generalized TTL Security Mechanism (GTSM)", RFC 5082, 5405 October 2007. 5407 [43] Floyd, S. and V. Jacobson, "The Synchronisation of Periodic 5408 Routing Messages", SIGCOMM Symposium on Communications 5409 Architectures and Protocols pp. 33--44, September 1993. 5411 [44] Hancock, R E., "Using the Router Alert Option for Packet 5412 Interception in GIST", draft-hancock-nsis-gist-rao-00 (work in 5413 progress), July 2008. 5415 [45] Pashalidis, A. and H. Tschofenig, "GIST Legacy NAT Traversal", 5416 draft-pashalidis-nsis-gist-legacynats-02 (work in progress), 5417 July 2007. 5419 [46] Pashalidis, A. and H. Tschofenig, "GIST NAT Traversal", 5420 draft-pashalidis-nsis-gimps-nattraversal-05 (work in progress), 5421 July 2007. 5423 [47] Tsenov, T., Tschofenig, H., Fu, X., Aoun, C., and E. Davies, 5424 "GIST State Machine", draft-ietf-nsis-ntlp-statemachine-06 5425 (work in progress), November 2008. 5427 [48] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 5428 Robustness to Blind In-Window Attacks", 5429 draft-ietf-tcpm-tcpsecure-11 (work in progress), November 2008. 5431 Appendix A. Bit-Level Formats and Error Messages 5433 This appendix provides formats for the various component parts of the 5434 GIST messages defined abstractly in Section 5.2. The whole of this 5435 appendix is normative. 5437 Each GIST message consists of a header and a sequence of objects. 5438 The GIST header has a specific format, described in more detail in 5439 Appendix A.1 below. An NSLP message is one object within a GIST 5440 message. Note that GIST itself provides the NSLP message length 5441 information and signalling application identification. General 5442 object formatting guidelines are provided in Appendix A.2 below, 5443 followed in Appendix A.3 by the format for each object. Finally, 5444 Appendix A.4 provides the formats used for error reporting. 5446 In the following object diagrams, '//' is used to indicate a variable 5447 sized field and ':' is used to indicate a field that is optionally 5448 present. Any part of the object used for padding or defined as 5449 reserved (marked 'Reserved' or 'Rsv' or, in the case of individual 5450 bits, 'r' in the diagrams below) MUST be set to 0 on transmission and 5451 MUST be ignored on reception. 5453 A.1. The GIST Common Header 5455 This header begins all GIST messages. It has a fixed format, as 5456 shown below. 5458 0 1 2 3 5459 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 5460 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5461 | Version | GIST hops | Message Length | 5462 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5463 | NSLPID |C| Type |S|R|E| Reserved| 5464 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5466 Version (8 bits): The GIST protocol version number. This 5467 specification defines version number 1. 5469 GIST hops (8 bits): A hop count for the number of GIST-aware nodes 5470 this message can still be processed by (including the 5471 destination). 5473 Message Length (16 bits): The total number of 32-bit words in the 5474 message after the common header itself. 5476 NSLPID (16 bits): IANA assigned identifier of the signalling 5477 application the message refers to. 5479 C flag: C=1 if the message has to be able to be interpreted in the 5480 absence of routing state (Section 5.2.1). 5482 Type (7 bits): The GIST message type (Query, Response, etc.). 5484 S flag: S=1 if the IP source address is the same as the signalling 5485 source address, S=0 if it is different. 5487 R flag: R=1 if a reply to this message is explicitly requested. 5489 E flag: E=1 if the message was explicitly routed (Section 7.1.5). 5491 The rules governing the use of the R-flag depend on the GIST message 5492 type. It MUST always be set (R=1) in Query messages, since these 5493 always elicit a Response, and never in Confirm, Data or Error 5494 messages. It MAY be set in an MA-Hello; if set, another MA-Hello 5495 MUST be sent in reply. It MAY be set in a Response, but MUST be set 5496 if the Response contains a Responder cookie; if set, a Confirm MUST 5497 be sent in reply. The E flag MUST NOT be set unless the message type 5498 is a Data message. 5500 Parsing failures may be caused by unknown Version or Type values, 5501 inconsistent C, R or E flag setting, or a Message Length inconsistent 5502 with the set of objects carried. In all cases the receiver MUST if 5503 possible return a "Common Header Parse Error" message 5504 (Appendix A.4.4.1) with the appropriate subcode, and not process the 5505 message further. 5507 A.2. General Object Format 5509 Each object begins with a fixed header giving the object Type and 5510 object Length. This is followed by the object Value, which is a 5511 whole number of 32-bit words long. 5513 0 1 2 3 5514 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 5515 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5516 |A|B|r|r| Type |r|r|r|r| Length | 5517 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5518 // Value // 5519 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5520 A/B flags: The bits marked 'A' and 'B' are extensibility flags which 5521 are defined in Appendix A.2.1 below; the remaining bits marked 'r' 5522 are reserved. 5524 Type (12 bits): An IANA-assigned identifier for the type of object. 5526 Length (12 bits): Length has the units of 32-bit words, and measures 5527 the length of Value. If there is no Value, Length=0. If the 5528 Length is not consistent with the contents of the object, an 5529 "Object Value Error" message (Appendix A.4.4.10) with subcode 0 5530 "Incorrect Length" MUST be returned and the message dropped. 5532 Value (variable): Value is (therefore) a whole number of 32 bit 5533 words. If there is any padding required, the length and location 5534 are be defined by the object-specific format information; objects 5535 which contain variable length (e.g. string) types may need to 5536 include additional length subfields to do so. 5538 A.2.1. Object Extensibility 5540 The leading two bits of the TLV header are used to signal the desired 5541 treatment for objects whose Type field is unknown at the receiver. 5542 The following three categories of object have been identified, and 5543 are described here. 5545 AB=00 ("Mandatory"): If the object is not understood, the entire 5546 message containing it MUST be rejected with an "Object Type Error" 5547 message (Appendix A.4.4.9) with subcode 1 ("Unrecognised Object"). 5549 AB=01 ("Ignore"): If the object is not understood, it MUST be 5550 deleted and the rest of the message processed as usual. 5552 AB=10 ("Forward"): If the object is not understood, it MUST be 5553 retained unchanged in any message forwarded as a result of message 5554 processing, but not stored locally. 5556 The combination AB=11 is reserved. If a message is received 5557 containing an object with AB=11, it MUST be rejected with an "Object 5558 Type Error" message (Appendix A.4.4.9) with subcode 5 ("Invalid 5559 Extensibility Flags"). 5561 These extensibility rules define only the processing within the GIST 5562 layer. There is no requirement on GIST implementations to support an 5563 extensible service interface to signalling applications, so 5564 unrecognised objects with AB=01 or AB=10 do not need to be indicated 5565 to NSLPs. 5567 A.3. GIST TLV Objects 5569 A.3.1. Message-Routing-Information 5571 Type: Message-Routing-Information 5573 Length: Variable (depends on MRM) 5575 0 1 2 3 5576 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 5577 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5578 | MRM-ID |N| Reserved | | 5579 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + 5580 // Method-specific addressing information (variable) // 5581 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5583 MRM-ID (8 bits): An IANA-assigned identifier for the message routing 5584 method. 5586 N flag: If set (N=1), this means that NATs do not need to translate 5587 this MRM; if clear (N=0) it means that the method-specific 5588 information contains network or transport layer information that a 5589 NAT must process. 5591 The remainder of the object contains method-specific addressing 5592 information, which is described below. 5594 A.3.1.1. Path-Coupled MRM 5596 In the case of basic path-coupled routing, the addressing information 5597 takes the following format. The N-flag N=0 for this MRM. 5599 0 1 2 3 5600 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 5601 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5602 |IP-Ver |P|T|F|S|A|B|D|Reserved | 5603 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5604 // Source Address // 5605 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5606 // Destination Address // 5607 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5608 | Source Prefix | Dest Prefix | Protocol | DS-field |Rsv| 5609 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5610 : Reserved | Flow Label : 5611 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5612 : SPI : 5613 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5614 : Source Port : Destination Port : 5615 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5617 IP-Ver (4 bits): The IP version number, 4 or 6. 5619 Source/Destination address (variable): The source and destination 5620 addresses are always present and of the same type; their length 5621 depends on the value in the IP-Ver field. 5623 Source/Dest Prefix (each 8 bits): The length of the mask to be 5624 applied to the source and destination addresses for address 5625 wildcarding. In the normal case where the MRI refers only to 5626 traffic between specific host addresses, the Source/Dest Prefix 5627 values would both be 32/128 for IPv4/6 respectively. 5629 P flag: P=1 means that the Protocol field is significant. 5631 Protocol (8 bits): The IP protocol number. This MUST be ignored if 5632 P=0. In the case of IPv6, the Protocol field refers to the true 5633 upper layer protocol carried by the packets, i.e. excluding any IP 5634 option headers. This is therefore not necessarily the same as the 5635 Next Header value from the base IPv6 header. 5637 T flag: T=1 means that the DiffServ field (DS-field) is significant. 5639 DS-field (6 bits): The DiffServ field. See [7] and [25]. 5641 F flag: F=1 means that flow label is present and is significant. F 5642 MUST NOT be set if IP-Ver is not 6. 5644 Flow Label (20 bits): The flow label; only present if F=1. If F=0, 5645 the entire 32 bit word containing the Flow Label is absent. 5647 S flag: S=1 means that the SPI field is present and is significant. 5648 The S flag MUST be 0 if the P flag is 0. 5650 SPI field (32 bits): The SPI field; see [37]. If S=0, the entire 32 5651 bit word containing the SPI is absent. 5653 A/B flags: These can only be set if P=1. If either is set, the port 5654 fields are also present. If P=0, the A/B flags MUST both be zero 5655 and the word containing the port numbers is absent. 5657 Source/Destination Port (each 16 bits): If either of A (source), B 5658 (destination) is set the word containing the port numbers is 5659 included in the object. However, the contents of each field is 5660 only significant if the corresponding flag is set; otherwise, the 5661 contents of the field is regarded as padding, and the MRI refers 5662 to all ports (i.e. acts as a wildcard). If the flag is set and 5663 Port=0x0000, the MRI will apply to a specific port, whose value is 5664 not yet known. If neither of A or B is set, the word is absent. 5666 D flag: The Direction flag has the following meaning: the value 0 5667 means 'in the same direction as the flow' (i.e. downstream), and 5668 the value 1 means 'in the opposite direction to the flow' (i.e. 5669 upstream). 5671 The MRI format defines a number of constraints on the allowed 5672 combinations of flags and fields in the object. If these constraints 5673 are violated this constitutes a parse error, and an "Object Value 5674 Error" message (Appendix A.4.4.10) with subcode 2 ("Invalid Flag- 5675 Field Combination") MUST be returned. 5677 A.3.1.2. Loose-End MRM 5679 In the case of the loose-end MRM, the addressing information takes 5680 the following format. The N-flag N=0 for this MRM. 5682 0 1 2 3 5683 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 5684 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5685 |IP-Ver |D| Reserved | 5686 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5687 // Source Address // 5688 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5689 // Destination Address // 5690 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5691 IP-Ver (4 bits): The IP version number, 4 or 6. 5693 Source/Destination address (variable): The source and destination 5694 addresses are always present and of the same type; their length 5695 depends on the value in the IP-Ver field. 5697 D flag: The Direction flag has the following meaning: the value 0 5698 means 'towards the edge of the network', and the value 1 means 5699 'from the edge of the network'. Note that for Q-mode messages, 5700 the only valid value is D=0 (see Section 5.8.2). 5702 A.3.2. Session Identification 5704 Type: Session-Identification 5706 Length: Fixed (4 32-bit words) 5708 0 1 2 3 5709 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 5710 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5711 | | 5712 + + 5713 | | 5714 + Session ID + 5715 | | 5716 + + 5717 | | 5718 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5720 A.3.3. Network-Layer-Information 5722 Type: Network-Layer-Information 5724 Length: Variable (depends on length of Peer-Identity and IP version) 5726 0 1 2 3 5727 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 5728 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5729 | PI-Length | IP-TTL |IP-Ver | Reserved | 5730 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5731 | Routing State Validity Time | 5732 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5733 // Peer Identity // 5734 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5735 // Interface Address // 5736 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5737 PI-Length (8 bits): The byte length of the Peer Identity field. 5739 Peer Identity (variable): The Peer Identity field. Note that the 5740 Peer-Identity field itself is padded to a whole number of words. 5742 IP-TTL (8 bits): Initial or reported IP layer TTL. 5744 IP-Ver (4 bits): The IP version for the Interface Address field. 5746 Interface Address (variable): The IP address allocated to the 5747 interface, matching the IP-Ver field. 5749 Routing State Validity Time (32 bits): The time for which the 5750 routing state for this flow can be considered correct without a 5751 refresh. Given in milliseconds. The value 0 (zero) is reserved 5752 and MUST NOT be used. 5754 A.3.4. Stack Proposal 5756 Type: Stack-Proposal 5758 Length: Variable (depends on number of profiles and size of each 5759 profile) 5761 0 1 2 3 5762 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 5763 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5764 | Prof-Count | Reserved | 5765 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5766 // Profile 1 // 5767 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5768 : : 5769 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5770 // Profile N // 5771 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5772 Prof-Count (8 bits): The number of profiles listed. MUST be > 0. 5774 Each profile is itself a sequence of protocol layers, and the profile 5775 is formatted as a list as follows: 5777 o The first byte is a count of the number of layers in the profile. 5778 MUST be > 0. 5780 o This is followed by a sequence of 1-byte MA-Protocol-IDs as 5781 described in Section 5.7. 5783 o The profile is padded to a word boundary with 0, 1, 2 or 3 zero 5784 bytes. These bytes MUST be ignored at the receiver. 5786 If there are no profiles (Prof-Count=0) then an "Object Value Error" 5787 message (Appendix A.4.4.10) with subcode 1 ("Value Not Supported") 5788 MUST be returned; if a particular profile is empty (the leading byte 5789 of the profile is zero), then subcode 3 ("Empty List") MUST be used. 5790 In both cases, the message MUST be dropped. 5792 A.3.5. Stack-Configuration-Data 5794 Type: Stack-Configuration-Data 5796 Length: Variable (depends on number of protocols and size of each 5797 MA-protocol-options field) 5799 0 1 2 3 5800 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 5801 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5802 | MPO-Count | Reserved | 5803 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5804 | MA-Hold-Time | 5805 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5806 // MA-protocol-options 1 // 5807 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5808 : : 5809 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5810 // MA-protocol-options N // 5811 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5813 MPO-Count (8 bits): The number of MA-protocol-options fields present 5814 (these contain their own length information). The MPO-Count MAY 5815 be zero, but this will only be the case if none of the MA- 5816 protocols referred to in the Stack-Proposal require option data. 5818 MA-Hold-Time (32 bits): The time for which the messaging association 5819 will be held open without traffic or a hello message. Note that 5820 this value is given in milliseconds, so the default time of 30 5821 seconds (Section 4.4.5) corresponds to a value of 30000. The 5822 value 0 (zero) is reserved and MUST NOT be used. 5824 The MA-protocol-options fields are formatted as follows: 5826 0 1 2 3 5827 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 5828 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5829 |MA-Protocol-ID | Profile | Length |D| Reserved | 5830 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5831 // Options Data // 5832 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5834 MA-Protocol-ID (8 bits): Protocol identifier as described in 5835 Section 5.7. 5837 Profile (8 bits): Tag indicating which profile from the accompanying 5838 Stack-Proposal object this applies to. Profiles are numbered from 5839 1 upwards; the special value 0 indicates 'applies to all 5840 profiles'. 5842 Length (8 bits): The byte length of MA-protocol-options field that 5843 follows. This will be zero-padded up to the next word boundary. 5845 D flag: If set (D=1), this protocol MUST NOT be used for a messaging 5846 association. 5848 Options Data (variable): Any options data for this protocol. Note 5849 that the format of the options data might differ depending on 5850 whether the field is in a Query or Response. 5852 A.3.6. Query Cookie 5854 Type: Query-Cookie 5856 Length: Variable (selected by querying node) 5858 0 1 2 3 5859 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 5860 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5861 // Query Cookie // 5862 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5864 The contents are implementation defined. See Section 8.5 for further 5865 discussion. 5867 A.3.7. Responder Cookie 5868 Type: Responder-Cookie 5870 Length: Variable (selected by responding node) 5872 0 1 2 3 5873 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 5874 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5875 // Responder Cookie // 5876 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5878 The contents are implementation defined. See Section 8.5 for further 5879 discussion. 5881 A.3.8. Hello-ID 5883 Type: Hello-ID 5885 Length: Fixed (1 32-bit word) 5887 0 1 2 3 5888 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 5889 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5890 | Hello-ID | 5891 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5893 The contents are implementation defined. See Section 5.2.2 for 5894 further discussion. 5896 A.3.9. NAT Traversal 5898 Type: NAT-Traversal 5900 Length: Variable (depends on length of contained fields) 5902 This object is used to support the NAT traversal mechanisms described 5903 in Section 7.2.2. 5905 0 1 2 3 5906 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 5907 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5908 | MRI-Length | Type-Count | NAT-Count | Reserved | 5909 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5910 // Original Message-Routing-Information // 5911 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5912 // List of translated objects // 5913 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5914 | Length of opaque information | | 5915 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // 5916 // Information replaced by NAT #1 | 5917 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5918 : : 5919 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5920 | Length of opaque information | | 5921 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // 5922 // Information replaced by NAT #N | 5923 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5925 MRI-Length (8 bits): The length of the included MRI payload in 32- 5926 bit words. 5928 Original Message-Routing-Information (variable): The MRI data from 5929 when the message was first sent, not including the object header. 5931 Type-Count (8 bits): The number of objects in the 'List of 5932 translated objects' field. 5934 List of translated objects (variable): This field lists the types of 5935 the objects that were translated by every NAT through which the 5936 message has passed. Each element in the list is a 16-bit field 5937 containing the first 16 bits of the object TLV header, including 5938 the AB extensibility flags, two reserved bits, and 12 bit object 5939 type. The list is initialised by the first NAT on the path; 5940 subsequent NATs may delete elements in the list. Padded with 2 5941 null bytes if necessary. 5943 NAT-Count (8 bits): The number of NATs traversed by the message, and 5944 the number of opaque payloads at the end of the object. The 5945 length fields for each opaque payload are byte counts, not 5946 including the 2 bytes of the length field itself. Note that each 5947 opaque information field is zero-padded to the next 32-bit word 5948 boundary if necessary. 5950 A.3.10. NSLP Data 5952 Type: NSLP-Data 5954 Length: Variable (depends on NSLP) 5956 This object is used to deliver data between NSLPs. GIST regards the 5957 data as a number of complete 32-bit words, as given by the length 5958 field in the TLV; any padding to a word boundary must be carried out 5959 within the NSLP itself. 5961 0 1 2 3 5962 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 5963 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5964 // NSLP Data // 5965 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5967 A.4. Errors 5969 A.4.1. Error Object 5971 Type: Error 5973 Length: Variable (depends on error) 5974 0 1 2 3 5975 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 5976 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5977 | Error Class | Error Code | Error Subcode | 5978 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5979 |S|M|C|D|Q| Reserved | MRI Length | Info Count | 5980 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5981 | | 5982 + Common Header + 5983 | (of original message) | 5984 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5985 : Session Id : 5986 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5987 : Message Routing Information : 5988 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5989 : Additional Information Fields : 5990 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5991 : Debugging Comment : 5992 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5994 The flags are: 5995 S - S=1 means the Session ID object is present 5996 M - M=1 means MRI object is present 5997 C - C=1 means a debug Comment is present after header. 5998 D - D=1 means the original message was received in D-mode 5999 Q - Q=1 means the original message was received Q-mode encapsulated 6000 (can't be set if D=0). 6002 A GIST Error object contains an 8 bit error-class (see 6003 Appendix A.4.3), a 16 bit error-code, an 8 bit error-subcode, and as 6004 much information about the message which triggered the error as is 6005 available. This information MUST include the Common header of the 6006 original message and MUST also include the Session Id and MRI objects 6007 if these could be decoded correctly. These objects are included in 6008 their entirety, except for their TLV Headers. The MRI Length field 6009 gives the length of the MRI object in 32-bit words. 6011 The Info Count field contains the number of Additional Information 6012 fields in the object, and the possible formats for these fields are 6013 given in Appendix A.4.2. The precise set of fields to include 6014 depends on the error code/subcode. For every error description in 6015 the error catalogue Appendix A.4.4, the line "Additional Info:" 6016 states what fields MUST be included; further fields beyond these MAY 6017 be included by the sender, and the fields may be included in any 6018 order. The Debugging Comment is a null-terminated UTF-8 string, 6019 padded if necessary to a whole number of 32- bit words with more null 6020 characters. 6022 A.4.2. Additional Information Fields 6024 The Common Error Header may be followed by some Additional 6025 Information fields. Each Additional Information field has a simple 6026 TLV format as follows: 6027 0 1 2 3 6028 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 6029 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6030 | AI-Type | AI-Length | 6031 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6032 // AI-Value // 6033 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6035 The AI-Type is a 16-bit IANA assigned value. The AI-Length gives the 6036 number of 32-bit words in AI-Value; if an AI-Value is not present, 6037 AI-Length=0. The AI-Types and AI-Lengths and AI-Value formats of the 6038 currently defined Additional Information fields are shown below. 6040 Message Length Info: 6041 0 1 2 3 6042 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 6043 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6044 | Calculated Length | Reserved | 6045 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6046 AI-Type: 1 6047 AI-Length: 1 6048 Calculated Length (16 bits): the length of the original message 6049 calculated by adding up all the objects in the message. Measured in 6050 32-bit words. 6052 MTU Info: 6053 0 1 2 3 6054 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 6055 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6056 | Link MTU | Reserved | 6057 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6058 AI-Type: 2 6059 AI-Length: 1 6060 Link MTU (16 bits): the IP MTU for a link along which a message 6061 could not be sent. Measured in bytes. 6063 Object Type Info: 6065 0 1 2 3 6066 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 6067 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6068 | Object Type | Reserved | 6069 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6070 AI-Type: 3 6071 AI-Length: 1 6072 Object type (16 bits): This provides information about the type 6073 of object which caused the error. 6075 Object Value Info: 6076 0 1 2 3 6077 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 6078 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6079 | Rsv | Real Object Length | Offset | 6080 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6081 // Object // 6082 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 6083 AI-Type: 4 6084 AI-Length: variable (depends on Object length) 6085 This object carries information about a TLV object which was found 6086 to be invalid in the original message. An error message MAY contain 6087 more than one Object Value Info object. 6089 Real Object Length (12 bits) Since the length in the original TLV 6090 header may be inaccurate, this field provides the actual length of 6091 the object (including the TLV Header) included in the error 6092 message. Measured in 32-bit words. 6094 Offset (16 bits): The byte in the object at which the GIST node 6095 found the error. The first byte in the object has offset=0. 6097 Object (variable): The invalid TLV object (including the TLV 6098 Header). 6100 A.4.3. Error Classes 6102 The first byte of the error object, "Error Class", indicates the 6103 severity level. The currently defined severity levels are: 6105 0 (Informational): reply data which should not be thought of as 6106 changing the condition of the protocol state machine. 6108 1 (Success): reply data which indicates that the message being 6109 responded to has been processed successfully in some sense. 6111 2 (Protocol-Error): the message has been rejected because of a 6112 protocol error (e.g. an error in message format). 6114 3 (Transient-Failure): the message has been rejected because of a 6115 particular local node status which may be transient (i.e. it may 6116 be worthwhile to retry after some delay). 6118 4 (Permanent-Failure): the message has been rejected because of 6119 local node status which will not change without additional out of 6120 band (e.g. management) operations. 6122 Additional error class values are reserved. 6124 The allocation of error classes to particular errors is not precise; 6125 the above descriptions are deliberately informal. Actual error 6126 processing SHOULD take into account the specific error in question; 6127 the error class may be useful supporting information (e.g. in network 6128 debugging). 6130 A.4.4. Error Catalogue 6132 This section lists all the possible GIST errors, including when they 6133 are raised and what additional information fields MUST be carried in 6134 the error object. 6136 A.4.4.1. Common Header Parse Error 6138 Class: Protocol-Error 6139 Code: 1 6140 Additional Info: For subcode 3 only, Message Length Info carries 6141 the calculated message length. 6143 This message is sent if a GIST node receives a message where the 6144 common header cannot be parsed correctly, or where an error in the 6145 overall message format is detected. Note that in this case the 6146 original MRI and Session ID MUST NOT be included in the Error Object. 6147 This error code is split into subcodes as follows: 6149 0: Unknown Version: The GIST version is unknown. The (highest) 6150 supported version supported by the node can be inferred from the 6151 Common Header of the Error message itself. 6153 1: Unknown Type: The GIST message type is unknown. 6155 2: Invalid R-flag: The R flag in the header is inconsistent with the 6156 message type. 6158 3: Incorrect Message Length: The overall message length is not 6159 consistent with the set of objects carried. 6161 4: Invalid E-flag: The E flag is set in the header but this is not a 6162 Data message. 6164 5: Invalid C-flag: The C flag was set on something other than a 6165 Query message or Q-mode Data message, or was clear on a Query 6166 message. 6168 A.4.4.2. Hop Limit Exceeded 6170 Class: Permanent-Failure 6171 Code: 2 6172 Additional Info: None 6174 This message is sent if a GIST node receives a message with a GIST 6175 hop count of zero, or a GIST node tries to forward a message after 6176 its GIST hop count has been decremented to zero on reception. This 6177 message indicates either a routing loop or too small an initial hop 6178 count value. 6180 A.4.4.3. Incorrect Encapsulation 6182 Class: Protocol-Error 6183 Code: 3 6184 Additional Info: None 6186 This message is sent if a GIST node receives a message which uses an 6187 incorrect encapsulation method (e.g. a Query arrives over an MA, or 6188 the Confirm for a handshake that sets up a messaging association 6189 arrives in D mode). 6191 A.4.4.4. Incorrectly Delivered Message 6193 Class: Protocol-Error 6194 Code: 4 6195 Additional Info: None 6197 This message is sent if a GIST node receives a message over an MA 6198 which is not associated with the MRI/NSLPID/SID combination in the 6199 message. 6201 A.4.4.5. No Routing State 6203 Class: Protocol-Error 6204 Code: 5 6205 Additional Info: None 6206 This message is sent if a node receives a message for which routing 6207 state should exist, but has not yet been created and thus there is no 6208 appropriate Querying-SM or Responding-SM. This can occur on 6209 receiving a Data or Confirm message at a node whose policy requires 6210 routing state to exist before such messages can be accepted. See 6211 also Section 6.1 and Section 6.3. 6213 A.4.4.6. Unknown NSLPID 6215 Class: Permanent-Failure 6216 Code: 6 6217 Additional Info: None 6219 This message is sent if a router receives a directly addressed 6220 message for an NSLP which it does not support. 6222 A.4.4.7. Endpoint Found 6224 Class: Permanent-Failure 6225 Code: 7 6226 Additional Info: None 6228 This message is sent if a GIST node at a flow endpoint receives a 6229 Query message for an NSLP which it does not support. 6231 A.4.4.8. Message Too Large 6233 Class: Permanent-Failure 6234 Code: 8 6235 Additional Info: MTU Info 6237 A router receives a message which it can't forward because it exceeds 6238 the IP MTU on the next or subsequent hops. 6240 A.4.4.9. Object Type Error 6242 Class: Protocol-Error 6243 Code: 9 6244 Additional Info: Object Type Info 6246 This message is sent if a GIST node receives a message containing a 6247 TLV object with an invalid type. The message indicates the object 6248 type at fault in the additional info field. This error code is split 6249 into subcodes as follows: 6251 0: Duplicate Object: This subcode is used if a GIST node receives a 6252 message containing multiple instances of an object which may only 6253 appear once in a message. In the current specification, this 6254 applies to all objects. 6256 1: Unrecognised Object: This subcode is used if a GIST node receives 6257 a message containing an object which it does not support, and the 6258 extensibility flags AB=00. 6260 2: Missing Object: This subcode is used if a GIST node receives a 6261 message which is missing one or more mandatory objects. This 6262 message is also sent if a Stack-Proposal is sent without a 6263 matching Stack-Configuration-Data object when one was necessary, 6264 or vice versa. 6266 3: Invalid Object Type: This subcode is used if the object type is 6267 known, but it is not valid for this particular GIST message type. 6269 4: Untranslated Object: This subcode is used if the object type is 6270 known and is mandatory to interpret, but it contains addressing 6271 data which has not been translated by an intervening NAT. 6273 5: Invalid Extensibility Flags: This subcode is used if an object is 6274 received with the extensibility flags AB=11. 6276 A.4.4.10. Object Value Error 6278 Class: Protocol-Error 6279 Code: 10 6280 Additional Info: 1 or 2 Object Value Info fields as given below 6282 This message is sent if a node receives a message containing an 6283 object which cannot be properly parsed. The error message contains a 6284 single Object Value Info object, except for subcode 5 as stated 6285 below. This error code is split into subcodes as follows: 6287 0: Incorrect Length: The overall length does not match the object 6288 length calculated from the object contents. 6290 1: Value Not Supported: The value of a field is not supported by the 6291 GIST node. 6293 2: Invalid Flag-Field Combination: An object contains an invalid 6294 combination of flags and/or fields. At the moment this only 6295 relates to the Path-Coupled MRI (Appendix A.3.1.1), but in future 6296 there may be more. 6298 3: Empty List: At the moment this only relates to Stack-Proposals. 6299 The error message is sent if a stack proposal with a length > 0 6300 contains only null bytes (a length of 0 is handled as "Value Not 6301 Supported"). 6303 4: Invalid Cookie: The message contains a cookie which could not be 6304 verified by the node. 6306 5: Stack-Proposal - Stack-Configuration-Data Mismatch: This subcode 6307 is used if a GIST node receives a message in which the data in the 6308 Stack-Proposal object is inconsistent with the information in the 6309 Stack Configuration Data object. In this case, both the Stack- 6310 Proposal object and Stack-Configuration-Data object MUST be 6311 included in separate Object Value Info fields in that order. 6313 A.4.4.11. Invalid IP layer TTL 6315 Class: Permanent-Failure 6316 Code: 11 6317 Additional Info: None 6319 This error indicates that a message was received with an IP layer TTL 6320 outside an acceptable range; for example, that an upstream Query was 6321 received with an IP layer TTL of less than 254 (i.e. more than one IP 6322 hop from the sender). The actual IP distance can be derived from the 6323 IP-TTL information in the NLI object carried in the same message. 6325 A.4.4.12. MRI Validation Failure 6327 Class: Permanent-Failure 6328 Code: 12 6329 Additional Info: Object Value Info 6331 This error indicates that a message was received with an MRI that 6332 could not be accepted, e.g. because of too much wildcarding or 6333 failing some validation check (cf. Section 5.8.1.2). The Object 6334 Value Info includes the MRI so the error originator can indicate the 6335 part of the MRI which caused the problem. The error code is divided 6336 into subcodes as follows: 6338 0: MRI Too Wild: The MRI contained too much wildcarding (e.g. too 6339 short a destination address prefix) to be forwarded correctly down 6340 a single path. 6342 1: IP Version Mismatch: The MRI in a path-coupled Query message 6343 refers to an IP version which is not implemented on the interface 6344 used, or is different from the IP version of the Query 6345 encapsulation (see Section 7.4). 6347 2: Ingress Filter Failure: The MRI in a path-coupled Query message 6348 describes a flow which would not pass ingress filtering on the 6349 interface used. 6351 Appendix B. API between GIST and Signalling Applications 6353 This appendix provides an abstract API between GIST and signalling 6354 applications. It should not constrain implementers, but rather help 6355 clarify the interface between the different layers of the NSIS 6356 protocol suite. In addition, although some of the data types carry 6357 the information from GIST information elements, this does not imply 6358 that the format of that data as sent over the API has to be the same. 6360 Conceptually the API has similarities to the sockets API, 6361 particularly that for unconnected UDP sockets. An extension for an 6362 API like that for UDP connected sockets could be considered. In this 6363 case, for example, the only information needed in a SendMessage 6364 primitive would be NSLP-Data, NSLP-Data-Size, and NSLP-Message-Handle 6365 (which can be null). Other information which was persistent for a 6366 group of messages could be configured once for the socket. Such 6367 extensions may make a concrete implementation more efficient but do 6368 not change the API semantics, and so are not considered further here. 6370 B.1. SendMessage 6372 This primitive is passed from a signalling application to GIST. It 6373 is used whenever the signalling application wants to initiate sending 6374 a message. 6376 SendMessage ( NSLP-Data, NSLP-Data-Size, NSLP-Message-Handle, 6377 NSLPID, Interception-Class, Session-ID, MRI, SII-Handle, 6378 Transfer-Attributes, Timeout, IP-TTL, GIST-Hop-Count ) 6380 The following arguments are mandatory. 6382 NSLP-Data: The NSLP message itself. 6384 NSLP-Data-Size: The length of NSLP-Data. 6386 NSLP-Message-Handle: A handle for this message, that can be used by 6387 GIST as a reference in subsequent MessageStatus notifications 6388 (Appendix B.3). Notifications could be about error conditions or 6389 about the security attributes that will be used for the message. 6390 A NULL handle may be supplied if the NSLP is not interested in 6391 such notifications. 6393 NSLPID: An identifier indicating which NSLP this is. 6395 Interception-Class: Hint about how GIST should encapsulate any 6396 Q-mode messages; see Section 5.3.2.5. 6398 Session-ID: The NSIS session identifier. Note that it is assumed 6399 that the signalling application provides this to GIST rather than 6400 GIST providing a value itself. 6402 MRI: Message routing information for use by GIST in determining the 6403 correct next GIST hop for this message. The MRI implies the 6404 message routing method to be used and the message direction. 6406 The following arguments are optional: 6408 SII-Handle: A handle, previously supplied by GIST, to a data 6409 structure that should be used to route the message explicitly to a 6410 particular GIST next hop. 6412 Transfer-Attributes: Attributes defining how the message should be 6413 handled (see Section 4.1.2). The following attributes can be 6414 considered: 6416 Reliability: Values 'unreliable' or 'reliable'. 6418 Security: This attribute allows the NSLP to specify what level of 6419 security protection is requested for the message (such as 6420 'integrity' or 'confidentiality'), and can also be used to 6421 specify what authenticated signalling source and destination 6422 identities should be used to send the message. The 6423 possibilities can be learned by the signalling application from 6424 prior MessageStatus or RecvMessage notifications. If an NSLP- 6425 Message-Handle is provided, GIST will inform the signalling 6426 application of what values it has actually chosen for this 6427 attribute via a MessageStatus callback. This might take place 6428 either synchronously (where GIST is selecting from available 6429 messaging associations), or asynchronously (when a new 6430 messaging association needs to be created). 6432 Local Processing: This attribute contains hints from the 6433 signalling application about what local policy should be 6434 applied to the message; in particular, its transmission 6435 priority relative to other messages, or whether GIST should 6436 attempt to set up or maintain forward routing state. 6438 Timeout: Length of time GIST should attempt to send this message 6439 before indicating an error. 6441 IP-TTL: The value of the IP layer TTL that should be used when 6442 sending this message (may be overridden by GIST for particular 6443 messages). 6445 GIST-Hop-Count: The value for the hop count when sending the 6446 message. 6448 B.2. RecvMessage 6450 This primitive is passed from GIST to a signalling application. It 6451 is used whenever GIST receives a message from the network, including 6452 the case of null messages (zero length NSLP payload), typically 6453 initial Query messages. For Queries, the results of invoking this 6454 primitive are used by GIST to check whether message routing state 6455 should be created (see the discussion of the 'Routing-State-Check' 6456 argument below). 6458 RecvMessage ( NSLP-Data, NSLP-Data-Size, NSLPID, Session-ID, MRI, 6459 Routing-State-Check, SII-Handle, Transfer-Attributes, 6460 IP-TTL, IP-Distance, GIST-Hop-Count, 6461 Inbound-Interface ) 6463 NSLP-Data: The NSLP message itself (may be empty). 6465 NSLP-Data-Size: The length of NSLP-Data (may be zero). 6467 NSLPID: An identifier indicating which NSLP this message is for. 6469 Session-ID: The NSIS session identifier. 6471 MRI: Message routing information that was used by GIST in forwarding 6472 this message. Implicitly defines the message routing method that 6473 was used and the direction of the message relative to the MRI. 6475 Routing-State-Check: This boolean is True if GIST is checking with 6476 the signalling application to see if routing state should be 6477 created with the peer or the message should be forwarded further 6478 (see Section 4.3.2). If True, the signalling application should 6479 return the following values via the RecvMessage call: 6481 A boolean indicating whether to set up the state. 6483 Optionally, an NSLP-Payload to carry in the generated Response 6484 or forwarded Query respectively. 6486 This mechanism could be extended to enable the signalling 6487 application to indicate to GIST whether state installation should 6488 be immediate or deferred (see Section 5.3.3 and Section 6.3 for 6489 further discussion). 6491 SII-Handle: A handle to a data structure, identifying a peer address 6492 and interface. Can be used to identify route changes and for 6493 explicit routing to a particular GIST next hop. 6495 Transfer-Attributes: The reliability and security attributes that 6496 were associated with the reception of this particular message. As 6497 well as the attributes associated with SendMessage, GIST may 6498 indicate the level of verification of the addresses in the MRI. 6499 Three attributes can be indicated: 6501 * Whether the signalling source address is one of the flow 6502 endpoints (i.e. whether this is the first or last GIST hop); 6504 * Whether the signalling source address has been validated by a 6505 return routability check. 6507 * Whether the message was explicitly routed (and so has not been 6508 validated by GIST as delivered consistently with local routing 6509 state). 6511 IP-TTL: The value of the IP layer TTL this message was received with 6512 (if available). 6514 IP-Distance: The number of IP hops from the peer signalling node 6515 which sent this message along the path, or 0 if this information 6516 is not available. 6518 GIST-Hop-Count: The value of the hop count the message was received 6519 with, after being decremented in the GIST receive-side processing. 6521 Inbound-Interface: Attributes of the interface on which the message 6522 was received, such as whether it lies on the internal or external 6523 side of a NAT. These attributes have only local significance and 6524 are implementation defined. 6526 B.3. MessageStatus 6528 This primitive is passed from GIST to a signalling application. It 6529 is used to notify the signalling application that a message that it 6530 requested to be sent could not be dispatched, or to inform the 6531 signalling application about the transfer attributes that have been 6532 selected for the message (specifically, security attributes). The 6533 signalling application can respond to this message with a return code 6534 to abort the sending of the message if the attributes are not 6535 acceptable. 6537 MessageStatus (NSLP-Message-Handle, Transfer-Attributes, Error-Type) 6538 NSLP-Message-Handle: A handle for the message provided by the 6539 signalling application in SendMessage. 6541 Transfer-Attributes: The reliability and security attributes that 6542 will be used to transmit this particular message. 6544 Error-Type: Indicates the type of error that occurred. For example, 6545 'no next node found'. 6547 B.4. NetworkNotification 6549 This primitive is passed from GIST to a signalling application. It 6550 indicates that a network event of possible interest to the signalling 6551 application occurred. 6553 NetworkNotification ( NSLPID, MRI, Network-Notification-Type ) 6555 NSLPID: An identifier indicating which NSLP this is message is for. 6557 MRI: Provides the message routing information to which the network 6558 notification applies. 6560 Network-Notification-Type: Indicates the type of event that caused 6561 the notification and associated additional data. Five events have 6562 been identified: 6564 Last Node: GIST has detected that this is the last NSLP-aware 6565 node in the path. See Section 4.3.4. 6567 Routing Status Change: GIST has installed new routing state, has 6568 detected that existing routing state may no longer be valid, or 6569 has re-established existing routing state. See Section 7.1.3. 6570 The new status is reported; if the status is Good, the SII- 6571 Handle of the peer is also reported, as for RecvMessage. 6573 Route Deletion: GIST has determined that an old route is now 6574 definitely invalid, e.g. that flows are definitely not using it 6575 (see Section 7.1.4). The SII-Handle of the peer is also 6576 reported. 6578 Node Authorisation Change: The authorisation status of a peer has 6579 changed, meaning that routing state is no longer valid or that 6580 a signalling peer is no longer reachable; see Section 4.4.2. 6582 Communication Failure: Communication with the peer has failed; 6583 messages may have been lost. 6585 B.5. SetStateLifetime 6587 This primitive is passed from a signalling application to GIST. It 6588 indicates the duration for which the signalling application would 6589 like GIST to retain its routing state. It can also give a hint that 6590 the signalling application is no longer interested in the state. 6592 SetStateLifetime ( NSLPID, MRI, SID, State-Lifetime ) 6594 NSLPID: Provides the NSLPID to which the routing state lifetime 6595 applies. 6597 MRI: Provides the message routing information to which the routing 6598 state lifetime applies; includes the direction (in the D flag). 6600 SID: The session ID which the signalling application will be using 6601 with this routing state. Can be wildcarded. 6603 State-Lifetime: Indicates the lifetime for which the signalling 6604 application wishes GIST to retain its routing state (may be zero, 6605 indicating that the signalling application has no further interest 6606 in the GIST state). 6608 B.6. InvalidateRoutingState 6610 This primitive is passed from a signalling application to GIST. It 6611 indicates that the signalling application has knowledge that the next 6612 signalling hop known to GIST may no longer be valid, either because 6613 of changes in the network routing or the processing capabilities of 6614 signalling application nodes. See Section 7.1. 6616 InvalidateRoutingState ( NSLPID, MRI, Status, NSLP-Data, 6617 NSLP-Data-Size, Urgent ) 6619 NSLPID: The NSLP originating the message. May be null (in which 6620 case the invalidation applies to all signalling applications). 6622 MRI: The flow for which routing state should be invalidated; 6623 includes the direction of the change (in the D flag). 6625 Status: The new status that should be assumed for the routing state, 6626 one of Bad or Tentative (see Section 7.1.3). 6628 NSLP-Data, NSLP-Data-Size Optional: a payload provided by the NSLP 6629 to be used the next GIST handshake. This can be used as part of a 6630 conditional peering process (see Section 4.3.2). The payload will 6631 be transmitted without security protection. 6633 Urgent: A hint as to whether rediscovery should take place 6634 immediately, or only with the next signalling message. 6636 Appendix C. Example Routing State Table and Handshake 6638 Figure 11 shows a signalling scenario for a single flow being managed 6639 by two signalling applications using the path-coupled message routing 6640 method. The flow sender and receiver and one router support both, 6641 two other routers support one each. The figure also shows the 6642 routing state table at node B. 6644 A B C D E 6645 +------+ +-----+ +-----+ +-----+ +--------+ 6646 | Flow | +-+ +-+ |NSLP1| |NSLP1| | | | Flow | 6647 |Sender|====|R|====|R|====|NSLP2|====| |====|NSLP2|====|Receiver| 6648 | | +-+ +-+ |GIST | |GIST | |GIST | | | 6649 +------+ +-----+ +-----+ +-----+ +--------+ 6650 Flow Direction ------------------------------>> 6652 +------------------------------------+---------+--------+-----------+ 6653 | Message Routing Information | Session | NSLPID | Routing | 6654 | | ID | | State | 6655 +------------------------------------+---------+--------+-----------+ 6656 | MRM = Path Coupled; Flow ID = | 0xABCD | NSLP1 | IP-A | 6657 | {IP-A, IP-E, proto/ports}; D=up | | | | 6658 | | | | | 6659 | MRM = Path Coupled; Flow ID = | 0xABCD | NSLP1 | (null) | 6660 | {IP-A, IP-E, proto/ports}; D=down | | | | 6661 | | | | | 6662 | MRM = Path Coupled; Flow ID = | 0x1234 | NSLP2 | IP-A | 6663 | {IP-A, IP-E, proto/ports}; D=up | | | | 6664 | | | | | 6665 | MRM = Path Coupled; Flow ID = | 0x1234 | NSLP2 | Points to | 6666 | {IP-A, IP-E, proto/ports}; D=down | | | B-D MA | 6667 +------------------------------------+---------+--------+-----------+ 6669 Figure 11: A Signalling Scenario 6671 The upstream state is just the same address for each application. 6672 For the downstream direction, NSLP1 only requires D-mode messages and 6673 so no explicit routing state towards C is needed. NSLP2 requires a 6674 messaging association for its messages towards node D, and node C 6675 does not process NSLP2 at all, so the peer state for NSLP2 is a 6676 pointer to a messaging association that runs directly from B to D. 6677 Note that E is not visible in the state table (except implicitly in 6678 the address in the message routing information); routing state is 6679 stored only for adjacent peers. (In addition to the peer 6680 identification, IP hop counts are stored for each peer where the 6681 state itself if not null; this is not shown in the table.) 6683 Figure 12 shows a GIST handshake setting up a messaging association 6684 for B-D signalling, with the exchange of Stack Proposals and MA- 6685 protocol-options in each direction. The Querying node selects TLS/ 6686 TCP as the stack configuration and sets up the messaging association 6687 over which it sends the Confirm. 6689 -------------------------- Query ----------------------------> 6690 IP(Src=IP#A; Dst=IP#E); UDP(Src=6789; Dst=GIST) 6691 D-mode magic number (0x4e04 bda5) 6692 GIST(Header(Type=Query; NSLPID=NSLP2; C=1; R=1; S=0) 6693 MRI(MRM=Path-Coupled; Flow=F; Direction=down) 6694 SessionID(0x1234) NLI(Peer='string1'; IA=IP#B) 6695 QueryCookie(0x139471239471923526) 6696 StackProposal(#Proposals=3;1=TLS/TCP; 2=TLS/SCTP; 3=TCP) 6697 StackConfigurationData(HoldTime=300; #MPO=2; 6698 TCP(Applicable: all; Data: null) 6699 SCTP(Applicable: all; Data: null))) 6701 <---------------------- Response ---------------------------- 6702 IP(Src=IP#D; Dst=IP#B); UDP(Src=GIST; Dst=6789) 6703 D-mode magic number (0x4e04 bda5) 6704 GIST(Header(Type=Response; NSLPID=NSLP2; C=0; R=1; S=1) 6705 MRI(MRM=Path-Coupled; Flow=F; Direction=up) 6706 SessionID(0x1234) NLI(Peer='stringr2', IA=IP#D) 6707 QueryCookie(0x139471239471923526) 6708 ResponderCookie(0xacdefedcdfaeeeded) 6709 StackProposal(#Proposals=3; 1=TCP; 2=SCTP; 3=TLS/TCP) 6710 StackConfigurationData(HoldTime=200; #MPO=3; 6711 TCP(Applicable: 3; Data: port=6123) 6712 TCP(Applicable: 1; Data: port=5438) 6713 SCTP(Applicable: all; Data: port=3333))) 6715 -------------------------TCP SYN-----------------------> 6716 <----------------------TCP SYN/ACK---------------------- 6717 -------------------------TCP ACK-----------------------> 6718 TCP connect(IP Src=IP#B; IP Dst=IP#D; Src Port=9166; Dst Port=6123) 6719 <-----------------------TLS INIT-----------------------> 6721 ------------------------ Confirm ----------------------------> 6722 [Sent within messaging association] 6723 GIST(Header(Type=Confirm; NSLPID=NSLP2; C=0; R=0; S=1) 6724 MRI(MRM=Path-Coupled; Flow=F; Direction=down) 6725 SessionID(0x1234) NLI(Peer='string1'; IA=IP#B) 6726 ResponderCookie(0xacdefedcdfaeeeded) 6727 StackProposal(#Proposals=3; 1=TCP; 2=SCTP; 3=TLS/TCP) 6728 StackConfigurationData(HoldTime=300)) 6730 Figure 12: GIST Handshake Message Sequence 6732 Appendix D. Change History 6734 Note to the RFC Editor: this appendix to be removed before 6735 publication as an RFC. 6737 D.1. Changes in Version -17 6739 The following changes were made in version 17. 6741 1. Added the C-flag to allow GIST-aware NATs to identify messages to 6742 be processed. The initial definition is in Section 5.2.1, and 6743 the detailed description in Section 7.2.2. There are consequent 6744 changes in the header format (Appendix A.1), error messages 6745 (Appendix A.4.4.1) and IANA considerations (Section 9). 6747 2. Changed the recommended version of TLS from 1.1 to 1.2. 6749 3. Various other clarifications and editorial corrections. 6751 Authors' Addresses 6753 Henning Schulzrinne 6754 Columbia University 6755 Department of Computer Science 6756 450 Computer Science Building 6757 New York, NY 10027 6758 US 6760 Phone: +1 212 939 7042 6761 Email: hgs+nsis@cs.columbia.edu 6762 URI: http://www.cs.columbia.edu 6764 Robert Hancock 6765 Roke Manor Research 6766 Old Salisbury Lane 6767 Romsey, Hampshire SO51 0ZN 6768 UK 6770 Email: stiemerling@nw.neclab.eu 6771 URI: http://www.roke.co.uk