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