NSIS A. Pashalidis Internet-Draft H. Tschofenig Expires:April 27,August 5, 2006 SiemensOctober 24, 2005February 2006 GIST NAT Traversalfor GIST draft-pashalidis-nsis-gimps-nattraversal-01.txtdraft-pashalidis-nsis-gimps-nattraversal-02.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire onApril 27,August 5, 2006. Copyright Notice Copyright (C) The Internet Society(2005).(2006). Abstract This document describeshow different typesa number of mechanisms for the implementation ofNetwork Address Translator (NAT) interact withthe General Internet Signalling Transport (GIST)protocol.protocol [1] on different types of Network Address Translator (NAT). Thepurposefocus ofthisthese mechanisms is the interaction of GIST with the address translation function of the NAT, and their purpose isfor signalling traffictotraverse the NATs in a wayenable GIST hosts thatpreserves its semanticsare located on either side of the NAT to correctly interpret signalling messages with respect to the dataflows it correspondstraffic they refer to. The purpose of this document is to provide guidance to people that implement GIST and NSLPs on both NAT and non-NAT nodes. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 6 4. Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 11 5. Transparent NAT traversal for GIST . . . . . . . . . . . . . . 13 5.1. NI-side NSLP-unaware GaNATs . . . . . . . . . . . . . . . 13 5.2. NR-side NSLP-unaware GaNATs . . . . . . . . . . . . . . .1819 5.3. NSLP-aware GaNATs . . . . . . . . . . . . . . . . . . . . 21 5.4. Combination of NSLP-aware and NSLP-unaware GaNATs . . . . 25 6. Non-transparent NAT traversal for GIST . . . . . . . . . . . .. . . . 2627 6.1. NI-side NSLP-unaware GaNATs . . . . . . . . . . . . . . .2627 6.2. NR-side NSLP-unaware GaNATs . . . . . . . . . . . . . . .3032 6.3. GIST peer processing . . . . . . . . . . . . . . . . . . .3438 7.GIST-unaware NATs . . . . . . . . . . . . . . . . . . . . . . 36 8.Security Considerations . . . . . . . . . . . . . . . . . . .39 8.1.41 7.1. Service Denial Attacks . . . . . . . . . . . . . . . . . .39 8.2.41 7.2. Network Intrusions . . . . . . . . . . . . . . . . . . . .40 9.42 8. IAB Considerations . . . . . . . . . . . . . . . . . . . . . .42 10.44 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .43 11.45 10. Normative References . . . . . . . . . . . . . . . . . . . . .4345 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . .4446 Intellectual Property and Copyright Statements . . . . . . . . . .4547 1. Introduction Network Address Translators (NATs) modify certain fields in the IP and transport layer header of the packets that traverse them. In the context of signalling as specified by the General Internet Signalling Transport (GIST) protocol [1], this behaviour may lead to the installation of state at network nodes that may be inconsistent and meaningless with respect to theactualdata traffic that traverses these nodes. This document describeshowmechanisms that can be used in order for GIST signalling messages to traverse NATs in a way that preserves the consistency of state that is installed in the network with respect to the data flows to which the signalling messages refer. As the mechanisms that are described in this document exclusively operate at the GIST layer, they are transparent to signalling applications. The document is organised as follows. The next section introduces the terminology that is used throughout this document. Section 3 provides a detailed discussion of the NAT traversal problem and highlights certain design decisions that have to be taken when addressing the problem. Section 4 lists the assumptions on which the subsequently proposed mechanisms are based. The mechanisms are described in Section 5presents the proposed mechanisms for "transparent" NAT traversal,and???Section 6. Finally, Section 7 presents some security issues that arise in conjunction with theproposedmechanismswhere such protection is required.described in this document. 2. Terminology The terminology, abbreviations and notational conventions that are used throughout the document are as follows. o DR: Data Responder, as defined in [1] o DS: Data Sender, as defined in [1] o GaNAT: GIST-aware NAT - a GaNAT MAY implement a number of NSLPs. o GIST: General Internet Messaging Protocol for Signalling [1] o NAT: Network Address Translator o NI: NSIS Initiator, as defined in [1] o NR: NSIS Responder, as defined in [1] o NSIS: Next Steps in Signalling: The name of the IETF working group that specified the family of signalling protocols of which thisspecificationdocument is also a member. The term NSIS is also used to refer to this family of signalling protocols as a whole. o GIST-aware: Implements GIST and MAY also implement a number of NSLPs. o GIST-unaware: GIST-unaware, does not implement any NSLP. The term is synonymous to NSIS-unaware. o NSLP: NSIS Signalling Layer Protocol, as defined in [1] o downstream: as defined in [1] o upstream: as defined in [1] o MRI: Message Routing Information, as defined in [1] o NLI.IA: Interface Address field of the Network Layer Informationheader field,object, as defined in [1] o <- : Assignment operator. The quantity to the right of the operator is assigned to the variable to its left. o A.B: Element B of structure A. Example: [IP header].SourceIPAddress denotes the source IP address of an IP header. o [data item]: This notation indicates that "data item" is a single identifier of a data structure. (Square brackets do not denote optional arguments in this document.) 3. Problem Statement According to [1], all GIST messages between two peers carry IP addresses in order to define the data flow to which the signalling refers. Moreover, certain GIST messages also carry the IP address of the sending peer, in order to enable the receiving peer to address subsequent traffic to the sender. Packets that cross an addressing boundary, say from addressing space S1 to S2, have the IP addresses in the IP header translated from space S1 to S2 by the NAT; if GIST payloads are not translated in a consistent manner, the MRI in a GIST packet that crosses the boundary, e.g. from address space S1 to S2, refers to a flow that does not exist in S2. In fact, the flow may be invalid in S2 because at the IP address that belongs to S1 may not be routable or invalid in S2. Moreover, the IP address of the sending peer may also be not routable or invalid in the addressing space of the receiving peer. The purpose of this document is to describe a way for GIST messages to be translated in a way that is consistent with the translation that NATs apply to the IP headers ofboth signalling andthe data traffic. A NAT may either be GIST-unaware or GIST-aware. Wedenoterefer to a GIST- aware NAT as aGaNAT"GaNAT" in the sequel. A GaNAT MAY also support at least one NSLP. Note that there exists an NSLP, namely the NATFW NSLP [2], that specifically addresses NAT traversal for data flows. Inevitably, the NATFW NSLP also provides the necessary mechanisms for the related signalling to traverse theNATs involved.involved NATs. Consider a GaNAT that supports both the NATFW NSLP, and the NAT traversalextension to GISTmechanism that isspecifieddescribed in thisdocument.document (which operates at the GIST layer). Suppose now that a GIST QUERY message arrives at this GaNAT that contains the NSLP identifier (NSLPID) of the NATFW NSLP. A question that arises is whether the GaNAT should use theGISTGIST-layer NAT traversalextension definedmechanism (described in thisdocument,document), or the NATFW NSLP mechanism, in order to provide "NAT traversal" for both the signalling message and the data flow to which it refers. The answer to this question is thatsucha GaNATMUSTshould implement a policy according to which one method is used in preference to the other.Note, however,Note that,shouldhowever, if the GaNATprefer the GISTprefers GIST-layer NATtraversal to NATFW NSLP,traversal, then itwillmay happen, if no on-path GaNATs exist that prefer the NATFW NSLP, thatthe downsteam NATFW peer will be unable to discover anyno downstream NATFW NSLPpeers.peers are discovered. This may make the entire NATFW session obsolete.Clearly, ifIt is therefore anticipated that the NATFW NSLP will be the preferred NAT traversal mechanism in most circumstances. However, in certain cicumstances it may be desirable for GIST signalling messages to traverse aGaNAT doesNAT, and not desirable or possible to use the NATFW NSLP for this purpose. Examples of such circumstances are the following. o GaNATs that do not implement the NATFWNSLP, thenNSLP are on theonly way forpath taken by GIST signalling messages. This situation may arise during incremental deployment of the signallingandprotocols that are developed by thedata flow to traverseNSIS working group. o GaNATs thatGaNAT, is forimplement thenecessary mechanisms to operateNATFW NSLP are on the path taken by GISTlayer. The same holds whensignalling messages that refer to a given data flow. However, the NSLP that is being signalled isan NSLP other than*not* the NATFWNSLP. EnablingNSLP and there exists no NATFW signalling session for the data flow in question. Describing NAT traversal for GIST signalling messages inpresicely thesethe above circumstances is themotivationsubject matter of thisspecification.document. In general, a given data flow between a data sender (DS) and a data receiver (DR) may have to traverse a number of NATs, some of which may be GIST-and-NATFW-aware, some may be GIST-aware, and some may be GIST-unaware. Additionally, NSLP signalling for such a data flow may be required to traverse through a subset of those NATs. Whether or not the routinginftrastructureinfrastructure and state of the network causes the signalling for such a data flow to traverse the same NATs as the flow depends, among other things, on which NSLP is being signalled. While signalling of the QoS NSLP, for example, might not traverse any of the NATs that are traversed by the data flow, the signalling of the NATFW NSLP traverses at least those NATs that implement the NATFW NSLP (otherwise the signalling path would no longer be coupled to the data path, as this coupling is defined by the GIST QUERY/RESPONSE discovery mechanism for the "path coupled" Message Routing Method). It is desirable that the GIST-layer NAT traversalextension for GISTprovides NAT traversal for every possible combination of NATs, either on the data or the signalling path, in a secure manner. Due to the GIST QUERY/RESPONSE discovery mechanism (according to which QUERY messages are simply forwarded if the current node does not support the required NSLP), two GIST nodes typically identify themselves as NSLP peers only if they both implement the same NSLP.This means that, ifIf one or more NATs that are unaware of this NSLP are between them, then the two NSLP peers are not able to discover each other at all. This is because, even in the unlikely event that the NAT bindings that are necessary for the GIST traffic to traverse the in-between NAT(s) exist, the NLI.IA field included in the RESPONSE message sent by the downstreamGISTpeer is invalid (or the IP address is unreachable) in the address space of the upstreamGISTpeer. In order to overcome this limitation, either the two peers need to cope with the in-between NAT(s), or, if the NAT(s) are GaNATs, they (the GaNATs) need to apply additional processing in order to transparently create and maintain consistency between the information in the header of GIST signalling messages and the information in the IP header of the data traffic. Additionally, if NSLP-aware NATs are on the data path, then these NATs should process NSLP traffic in a waythatthe preserves consistency after address translation. This processing deviates from the processing ofNSLP- awareNSLP-aware non-NAT nodes.In theThe following sectionswe specify mechanisms that aimdescribe how to overcome the limitation of two adjacentGISTNSLP peers not being able to executeanthe NSLP in the presence of in-between NAT(s).Note that aA number of differentsituations has to be dealt with,variations are possible, depending on the level of NSIS support bya NAT.the in-between NAT(s). The following combinations of NATs that are located between two adjacentGISTNSLP peers are considered. o all NAT(s) areGIST-unaware o all NAT(s) are (NSLP-unaware)NSLP-unaware GaNAT(s) o all NAT(s) are NSLP-awareo a combination of the above NAT types.The approach taken in this document is to propose separate mechanisms for the traversal of each of the above type of NAT. If NATs that belong to multiple types exist on the path between two adjacent NSLP peers, the proposed mechanisms should work in combination. Thus, traversal of multiple NATs of different types should not require further specification from a functional perspective. However, security issues that arise due to the combination of NAT types may have to be considered. A GIST-unaware NAT cannot tell data and signalling traffic apart. The installation of the NAT binding for the signalling traffic in such a NAT occurs typically independently from the installation of the NAT binding for the data traffic. Furthermore, as the NAT cannot associate the signalling and the datatraffic in any way,traffic, it cannot indicate that an association exists between the two NAT bindings. Therefore, in the presence of such a NAT, non-NAT GIST nodes that are located on either side of the NAT have to cope with the NAT without assistance from the NAT. This would typically require initially discovering the NAT and subsequently establishing an association between between the MRI in the signalling messages and the translated IP header in the data traffic. Due to the variety of behaviours that a GIST-unaware NAT may exhibit, establishing this association is a non-trivial task. Therefore, traversal of such (i.e. GIST-unaware) NATs is considered a special case and isfurther discussed in Section 7.outside the scope of this version of this document. Traversal of GaNAT(s) iscomperativelycomparatively more straightforward. This is because, based on the MRI in a given incoming GIST message, a GaNAT can identify the data flow to which the message refers. It can then check its NAT binding cache and determine the translation that is (or, if no NAT binding for the flow exists yet, will be) applied to the IP header of the data flow. The GaNAT can then include sufficient information about this translation into the signalling message, such that its receiver (i.e. the GIST peer that receives the data traffic after network address translation has been applied) can map the signalling message to the data flow. There exist a variety of ways for a GaNAT to encode theabovementionedabove- mentioned information into signalling messages. In this document the following two ways are considered. 1. Non-transparentapprach:approach: The GaNAT includes an additional "NAT Traversal" payload (see section A.3.8 of [1]) into the GIST header of the GIST QUERY message. This "NAT Traversal" payload is echoed by the GIST responder on the other side of the NAT.Both peers useThe responder (which is assumed to be located on the "other side" of the NAT) uses the information in this payload in order to map subsequent signalling messages to the data flows they refer to. 2. Transparent approach: The GaNAT replaces GIST header fields in a way that is consistent with the translation it applies to the data traffic, as necessary. The GaNAT does this for GIST QUERY and RESPONSE messages, for D-mode as well as for C-mode messages throughout the duration of the signalling session. The second approach being "transparent" means that a GaNAT that follows this approach remains completely transparent to the GIST peers that are located either side of it. Thus, this approach works even if these GIST peers do not support the NAT traversal object for GIST (as described insection 7.2 of[1]). Unfortunately though, the transparent approach does not work if theGaNAT is NSLP-unaware and ifsignalling traffic is to be cryptographically protected between the two GIST peers that are located either side of theGaNAT.GaNAT, and the GaNAT is NSLP-unaware. If, however, the GaNAT is NSLP-aware, then cryptographic protection is terminated at the GaNAT (i.e. the GaNAT is a GIST peer itself). In this scenario, it is clearly preferable for the GaNAT to follow the transparent approach, rather than to include a NAT Traversal object. Thus, if a GaNAT acts as a GIST peer for a signalling session, it MUST follow the transparent approach, as described in Section 5.3. However, due to the fact that the transparent approach does not work if signalling is to be cryptographically protected, a GaNAT MUST also implement the non-transparent approach (for the case where an NSLP is signalled that the GaNAT does not support), unless the GaNAT is going to be used only in deployments where cryptographic protection of signalling traffic is not a requirement. Note that a GaNAT MAY implement both approaches. If such a GaNAT is NSLP-unaware, it can then adopt thecorrectdesired behaviour, based on whether or not cryptographic protection is required for the signalling traffic between two GIST peers. If such protection is required, the GaNAT MUST adopt the mechanisms that follow the non- transparent approach; if it is not, it MAY follow the mechanisms implementing the transparent approach. The GaNAT can tell whether or not cryptographic protection is required from the stackproposals that are exchangedproposal in the GIST QUERY and RESPONSE messages; inclusion of IPsec or TLS proposals amounts to cryptographic protection being required.Regardless of which approach is taken, after a GIST response passes through an NSLP-unaware GaNAT, the GaNAT should expect a messaging association to be set up between the two involved GIST peers. For4. Assumptions The discussion in thisto happen, the GaNAT has to allow traffic to traverse it. From a security perspective, the GaNAT should allow the minimum necessary traffic types to traverse. Additionally, the amount of per signalling session state thatdocument isallocated at a GaNAT should be minimised for reasons of efficiencybased on the following assumptions. 1. No IP addresses andresistance to service denial attacks. For these reasons, it makes sense forport numbers are carried in theGaNAT to be able to predict with certainty whichpayloads of an NSLP. If this is not theGIST responder's stack proposal will be used bycase, then theinitiatorNSLP has to provide additional mechanisms for theestablishementtraversal ofa messaging association. This can(Ga)NATs. These mechanisms must beaccomplished by having the GaNAT modifycompatible thestack configuration objectmechanisms described inthe GIST RESPONSE as it passes though it suchthis document. Note that theinitiator is forced to use a particular stack proposal and, if applicable, a particular transport layer destination port. The reason why it is preferable for the GaNAT to modify only the stack configuration data object (as opposed to the stack proposal object)NATFW NSLP isthat the GIST responder expects its original stack proposalan exception tobe includedthis rule inthe GIST CONFIRM message. The initiator would not be able to echothatobject asitwoulddoes nothave seen it and, if signalling messages are cryptographically protected, then the GaNAT cannot replace the stack proposal in the GIST CONFIRM message with the one the responder expects, without causing cryptographic checksneed tofail at the responder. Thus,be compatible with theapproach takenmechanisms described in thisdocumentdocument. This isforbecause theGaNAT to render invalid all but one stack configuration data objectsGIST-layer NAT traversal mechanisms described inthe GIST RESPONSE message. Howthisis done depends ondocument and theformat of this object. If, for example, it contains transport layer port numbers,NATFW NSLP are mutually exclusive (i.e. it isrendered invalid by setting these numbers to zero. A question arises due to the factnot permissible thatthe stack proposal carried by a GIST QUERY may include multiple proposals of which some provide cryptographic protection for signalling traffic and some do not. Which behaviour shouldaGaNAT that supportsgiven (Ga)NAT applies bothapproaches assume in this case? In orderGIST-layer NAT traversal and NATFW NSLP processing toprovide maximisetheprobabilitymessages thatcryptographic protection is goingbelong toused, the GaNAT MUST follow the non-transparent approach in this case. 4. Assumptions The discussion in this document is based onthefollowing assumptions. 1. No IP addresses and port numbers are carried in the payloads of an NSLP.same signalling session). 2. The path taken by the signalling traffic between those GIST peers that have GaNATs in between is such that the responses to packets that a GaNAT sends on a given interface arrive on the same interface (if such responses are sent at all). 3. The path taken by signalling traffic remains fixed between the two GIST peers, as far as the in-between GaNATs are concerned. That is, we assume that signalling traffic traverses the same GaNAT(s) until at least one of the following conditions is met. * The NSIS state that is installed at the two GIST peers expires. * The NSIS state that is installed at the two GIST peers is refreshed using a GIST QUERY. * A new GIST QUERY/RESPONSE exchange takes place due to other reasons, e.g. a detected route change. Note that this assumption is not necessarily met by "normal" data path coupled signalling. This is because, under "normal" data path coupled signalling, the signalling traffic is "coupled" to the data traffic at nodes that decide to act as GIST peers. Thus, under "normal" path coupled signalling, it is not an error condition (e.g. a reason totrigeertrigger a "route change"), for example, if the set of on-path nodes, which do not act as GIST peers, changes, as long as adjacent GIST peers remain the same. 4. The data flow traverses the same set of GaNATs as the signalling traffic. By assumption 3, this set of GaNATs is fixed until the next GIST QUERY/RESPONSE procedure is executed. +-----+ +----+GaNAT|-----+ | | A | | | +-----+ | +------+ +------+ +--+---+ +------+ +--+ | GIST | | IP | | IP | | GIST | +--+ |DS+-+peer 1+--+router| |router+--+peer 2+-+DR| +--+ +------+ +---+--+ +--+---+ +------+ +--+ | +-----+ | | |GaNAT| | +----+ B +-----+ +-----+ Figure 1: Network with more than one NAT at an addressing boundary Figure 1 illustrates the importance of assumptions (3) and (4). With regard to that figure, suppose that a (D-mode) signalling session has been setup between the two adjacent GIST peers 1 and 2 and that both signalling and data traffic follows the path GIST peer 1 -> IP router -> GaNAT A -> IP router -> GIST peer 2. Suppose now that, after some time, GIST peer 1 decides to set up a C-mode connection with peer 2. Suppose moreover that the left IP router decides to forward the C-mode signalling traffic on the link towards GaNAT B. Thus, signalling traffic now follows the alternative path GIST peer 1 -> IP router -> GaNAT B -> IP router -> GIST peer 2. Note that this change in forwarding between the two adjacent GIST peers does not trigger a "route change" at the GIST layer because (a) it does not necessarily destroy the adjacency of peer 1 and 2 and (b) it does notnecassarilynecessarily destroy the coupling of the path taken by signalling traffic to that taken by data traffic (at GIST nodes). Nevertheless, assumptions (3) and (4) mandate that this situation does not occur. However, even if such a situation occurs, the mechanisms described in this document may still work as state expires after a certain timeout period.If assumption (1) does not hold, the NSLP has to provide additional mechanisms for the traversal of (Ga)NATs. These mechanisms must be compatible with the mechanisms employed by GIST.Assumptions (2), (3) and (4) hold if, at an addressing boundary, only one NAT exists. Due to security and management reasons, this is likely to be the case in many settings. 5. Transparent NAT traversal for GIST This section describes the operation of GaNATs that implement the transparent approach listed in Section 3.Note that theAn NSLP-aware GaNATmayMUST follow thisapproachapproach, as described in Section 5.3. An NSLP-unaware GaNAT MAY follow this approach, as described in Section 5.1 and Section 5.2, only ifit is unaware of the NSLP that is being signalled, and whenno cryptographic protection of signalling data is requested by the two NSLP peers. Note thatwe have to deal withtwo types ofGaNATs,NSLP-unaware GaNAT have to be dealt with, namely those that are located at the NSIS initiator (NI-side), and those that are located at the NSIS responder (NR-side). This distinction arises due to the fact that NI-side and NR-side GaNATs obtain the destination IP addressfor forwarded packetsof the downstream GIST peer in different ways. 5.1. NI-side NSLP-unaware GaNATs This section describes the "transparent" operation of an NI-side, NSLP-unaware GaNAT. For every arriving IP packet P, an NSLP-unaware, NI-side GaNAT executes the following algorithm. 1. If P has a RAO followed by the GIST header with an NSLP ID that is not supported,itand if P is identified as a GISTQUERY. In this caseQUERY, the GaNAT performs the following. 1. We denote Pasby GQ.ItThe GaNAT looks at the stack proposalSTin GQ. If itindicates thatincludes a proposal with cryptographicprotection is required,protection, the mechanism that isappliesapplied is the one describedin ???.Section 6.1. 2. The GaNAT remembers GQ along with the interface on which it arrived. We call this interface the "upstream link". 3. It searches its table of existing NAT bindings against entries that match the GQ.MRI. A matching entry means that the data flow, to which the signalling refers, already exists.1.+ If a matching entry is found, the GaNAT looks at which link the packets of the data flow are forwarded; we call this link the "downstream" link. Further, the GaNAT checks how the headers of the data flow (IPaddresses,addresses and portnumbers, etc)numbers) are translated according to this NAT binding. We denote[IP header].SourceIPAddress used on the downstream link as IPGaNATds, andthe sourceport number used to forward theIP address of translated datatraffic as SPNDTGaNATds. The NAT may also use a different source port number when forwarding signalling traffic. This port number is denoted as SPNSTGaNATds. 2.packets by IPds, and their [Transport layer header].SourcePort by SPDTds. + If no matching entry is found, the GaNAT determines, based on its routing table, the link on which packets that match GQ.MRI (excluding GQ.MRI.SourceIPAddress) would be forwarded. We call this link the"downstream link"."downstream" link. Then, the GaNAT acquires an IP address and source port for itself on the downstreamlink. (Thislink, denoted by IPds and SPDTds respectively. This address and port could be dynamic orstatic.) This addressstatic, and will be usedto forward both signalling and(among other things) for the installation of a NAT binding for the data trafficon the downstream link. If it also performs port translation,in the future. 4. The GaNATalso acquiresaquires a source port number for thedata traffic on the downstream link. This will be used withversion of theNAT binding, if such a bindingGIST QUERY that will beestablished for the data traffic at a later stage, and is denoted as SPNDTGaNATds. The signalling traffic packets may also beforwardedusing the a different source port number asover theincoming packets.downstream link. We denotethe acquired IP address as IPGaNATds and the sourcethis portnumber for the signalling traffic as SPNSTGaNATds.by SPSTds. (There is no requirement that SPSTds must be different from GQ.[UDP Header].SourcePort.) Issues: The reason why the GaNAT may also assign a different source port number to the signalling traffic, is to enable the GaNAT to demultiplex (i.e. forward to the correct internal address) the signalling responses that arrive fromdownstream.the downstream direction. Of course, a GaNAT does not need to actually change the source port of signalling traffic; it can always useSPNSTGaNATdsSPSTds the same port as in the incoming packet. Such a GaNAT may use the GIST session ID in order to demultiplex (i.e. forward to the correct internal address) the traffic that arrives from the downstream direction. It is unclear which of the two approaches is preferable.4.5. It creates a new GIST QUERY packet GQ', as follows. 1. GQ' <- GQ 2. GQ'.MRI.SourceIPAddress <-IPGaNATdsIPds 3. GQ'.MRI.SourcePortNumber <-SPNDTGaNATdsSPDTds 4. GQ'.[IP header].SourceIPAddress <-IPGaNATdsIPds 5. GQ'.[UDPHEADER].SourcePortheader].SourcePort <-SPNSTGaNATdsSPSTds 6. GQ'.NLI.IA <-IPGaNATdsIPds 7. GQ'.S <- true5.6. It remembers GQ and GQ', the fact that they are associated, and the associated upstream and downstream links. (Note: The GaNAT does not have to remember the entire packets; for simplicity of exposition, however, we assume it does. An implementation SHOULD discard at this point all information that is not used later.)6.7. It forwards GQ' on the downstream link. 2. Otherwise, if P carries an [IP header].DestinationIPAddress that belongs to the GaNAT, and if it is identified as a GISTresponseRESPONSE in D-mode with an NSLP ID that is not supported, the GaNAT does the following (P is denotedasby GR). 1. It searches for a matching GQ' in its buffer. AGRGQ' is said to match aGQ'GR if they carry the same cookie value. If none is found, GR is discarded. Otherwise, the GaNAT may also perform further consistency checks on a matching GR/GQ' pair, such as checking that they contain the same session IDs, MRIs, NSLP IDs. If consistency checkssucceed,fail, GR is discarded. Otherwise, the GaNAT constructs a new GISTresponseRESPONSE GR', as follows. 1. GR' <- GR 2. GR'.MRI <- GQ.MRI, where GQ is the packet associated withGQ'(asGQ' (as remembered previously), and GQ' is the packet that matches the received GR. 3. GR'.[IP header].SourceIPAddress <-IPGaNATus,IPus, whereIPGaNATus = GQ.[IP header].DestinationIPAddress.IPus is an IP address that is bound to the upstream link. 4. GR'.[IP header].DestinationIPAddress <- GQ.NLI.IA 5.GP'.SGR'.[UDP header].DestinationPort <-true.GQ.[UDP header].SourcePort 6.ItGR'.NLI.IA <- IPus 7. GR'.S <- true 8. The GaNAT inspects thestack proposalsStack-Configuration-Data object in GR' and the corresponding GQ' in order tosee ifcheck whether or not the upstreamGISTNSLP peerhas a choice of more thancan select onepossible stack. If suchof multiple transport layer protocol/destination port number combinations for the establishment of achoice exists,messaging association. If multiple choices exist, the GaNATremovesinvalidates as manystacktransport layer protocol/port number combination proposals from GR' as necessary, untilonly one stackthe upstream NSLP peer can only initiate the establishment of a messaging association with the downstream NSLP peer using a single transport layer protocol/destination port number combination. This invalidation is done by setting the D-flag in those MA-Protocol-Options fields that carry the port number proposals that are to bechoseninvalidated. Note that, by setting the D-flag in a particular MA- Protocol-Option field, the GaNAT may also invalidate the associated transport layer protocol and security (e.g. TLS) proposal. The actions of the GaNAT MUST NOT result in the strongest, in terms of security, proposal to be invalidated. In the end, the NAT will expect the upstream NSLP peer to use a particular combination of transport layer protocol and destination port (and possibly other details that are associated with the valid proposal) for the establishment of the messaging association. Wedenotecall thisstack ascombination the "stack proposal expected by the NAT" and denote it by ST. The GaNAT remembers thisST andST, its association with GQ, GQ', GR,GR'. We say that, in this case,GR', and the upstream and downstream links. By doing so, the GaNAT"installs"is said to "install" the ST. 2. It forwards GR' on the upstream link. 3. If no NAT binding for the data traffic was found in step 1.3.2, the GaNAT now installs a NAT binding (for the unidirectional data traffic) which says that "a packet K that arrives on the upstream link and for which it holds that + K.[IP header].DestinationIPAddress=GQ.MRI.DestinationIPAddress, + K.[IP header].Protocol=GQ.MRI.Protocol, and +K.[TCP/UDP header].SourcePort=GQ.MRI.SourcePortK.[Transport layer header].PortNumbers=GQ.MRI.PortNumbers should be forwarded on the downstream link, with [IP header].SourceIPAddress =IPGaNATds.IPds and [Transport layer header].SourcePort=SPDTds". Issues: there is a question of whether this NAT binding should also enable data traffic in the opposite direction to traverse the NAT; in order to be able to demultiplex upstream traffic that carries data that belongs to different flows, the GaNAT should keep the necessary per-flow state. From a signalling point of view, however, upstream data traffic that corresponds (on the application level) to the downstream flow to which this GIST session refers, is a separate flow for which, depending on the application, there may or there may not exist a signalling session. If such a signalling session exists, then the GaNAT acts as an NR-side GaNAT for this session. Thus, during the processing of this signalling care has to be taken not to establish a NAT binding for a flow for which a NAT binding already exists.Finally,Moreover, security issues may arise when traffic, for which no signalling exists, is allowed to traverse a GaNAT. Another issue is about refreshing the NAT binding. A NAT binding that was established as a result of GIST signalling should remain in place for as long as the associated GIST state in the GaNAT remains valid. If GIST signalling refers to a NAT binding that already exists, then the timeout of the NAT binding should occur according to the NAT policy, in a manner independent from GIST processing. (If signalling persists after the deletion of a NAT binding, then the NAT binding may be re-installed and then timed out together with GIST state). 3. Otherwise, if P.[IP header].DestinationIPAddress belongs to the GaNAT, and if P carries the transport protocol and destination portnumbersnumber indicated by some stackproposalST that has previously been installed by the GaNAT, and if P has arrived on either the upstream or the downstream interface that is associated with ST, then P is said to "match" ST. For such a packet, the GaNAT does the following. If P is expected to contain a GIST header, then the GaNATcheckchecks whether or not the bits where the GIST header is expected,consituteconstitute a valid GIST header. If they do not, P is silently discarded.Otherwise,If all is in order, the GaNAT constructs an outgoing packet P' as follows (the variables used below refer to those storedtogetherin association with ST). 1. P' <- P 2. If P has arrived on the upstream link, then 1. P'.[IP header].SourceIPAddress <-IPGaNATdsIPds 2. P'.[IP header].DestinationIPAddress <- GR.NLI.IA 3. P'.MRI <- GQ'.MRI3.4. P'.NLI.IA <-IPGaNATus 4.IPds 5. The GaNAT forwards P' on the downstream link. 3. else (if P has arrived on the downstream link) 1. P'.[IP header].SourceIPAddress <-IPGaNATusIPus 2. P'.[IP header].DestinationIPAddress <- GQ.NLI.IA 3. P'.MRI <- GQ.MRI3.4. P'.NLI.IA <-IPGaNATus 4.IPus 5. The GaNAT forwards P' on the upstream link. Note that the GaNAT can determine the location in a packet where a GIST header is expected. If, for example, the packet is a UDP packet, then the GIST header should follow immediately after the UDP header. If the packet is a TCP packet, then the GaNAT can determine the location where the GISTheaerheader should start by counting the number of NSLP payload bits that followed the end of the previous GIST header. The start of the next GIST header is expected at the position where the previous GIST message, including NSLP payload, ends. The GaNAT can tell where this message ends from the LENGTH field inside the previous GIST header. It should be noted here that, in order to correctly count the bits, the GaNAT may have to keep track of TCP sequence numbers, and thereby be aware of the correct ordering of packets. However, the GaNAT only has to keep buffers that are as long as the LENGTH field inside the previous GIST header (and possibly up to one MTU size more than that). Also note that some TCP packets P may not be expected to contain any GIST header (this happens when the NSLP payload from a previous packet stretches over several packets). For those packets, the GaNAT only applies the transformation in the IP header. Finally, note that a GIST header may start a packet but finish in another. If such a packet isreceived byreceived, theGaNAT, itGaNAT MUST bufferthe entirethat packet, until the packet is received where the GIST header completes. It can then apply the required processing and forward both packets. 4. Otherwise, if P matches a (data) NAT binding, the GaNAT applies normal NAT processing and forwards the packet on the corresponding link. 5. Otherwise, P is subjected to normal NAT processing. That is, P is either silentlydiscarded.discarded or it causes the installation of a (data) NAT binding. Brief discussion of the algorithm: The fact that the GaNAT replaces the NSLPpeer'speers' NLI.IA with its own IP address (in both directions), causes thetwoGIST peers to send subsequent signalling messages to the GaNAT, in the belief that they talk tothetheir adjacent NSLP peer. The GaNAT transparently forwards the signalling traffic and appropriately translates the fields in the GIST header, in a way that is consistent with the translation it applies to the data traffic. Note that, according to this mechanism, the size ofanoutgoing GISTmessagemessages is always the same as the size ofitscorresponding incoming GISTmessage. Finallymessages. Also note that the MRI that the NR sees indicates as destination address the IP address of the DR (as expected), but as source address it sees indicates theis IPGaNATdsIPds of the GaNAT that is closest to the NR. 5.2. NR-side NSLP-unaware GaNATs The case of NR-side GaNATs is more subtle, since, in this setting, the DS does not learn the IP address of the DR (which is assumed to be on the same side of the GaNATs as the NR) and the NI does not learn the address of the NR. In this setting we assume that each NR- side GaNAT that is in between two GIST peers, a priori knows a routable IP address of the next downstream GaNAT. The last GaNAT of this chain is assumed to know the IP address of the DR. In order to clarify this assumption, see, for example, Figure 2. In this figure, GaNAT A is assumed to know the IP address of GaNAT B, GaNAT B is assumed to know the IP address of GaNAT C, and GaNAT C is assumed to know the IP address of the DR. A given GaNAT that knows such an address, in effect anticipates to receive a signalling message from the upstream direction that refers to a data flow that terminates in a downstream node. In other words, such a GaNAT may typically have already a NAT binding in place for the data traffic. We call the IP address of the next downstream GaNAT (or, if the GaNAT is the last in the chain, the address of the DR) the "pending" IPaddress. In the following descriptionaddress and denote itis denotedby IPNext.HowThe GaNAT may also have a destination port associated with IPNext. If IPNext is derived from an existing data traffic NAT binding, then this port is typically the destination port after translation from that binding. This port, if known, is denoted PortNext. How IPNext and PortNext are made known to each GaNAT (e.g. how the NAT binding for the data traffic is installed in the GaNAT) is outside the scope of this document. +--+ +------+ +-----+ +-----+ +-----+ +------+ +--+ +--+ +NI+--+GISTNSLP +---+GaNAT+---+GaNAT+---+GaNAT+---+GISTNSLP +--+NR+--+DR| +--+ |peer 1| | A | | B | | C | |peer 2| +--+ +--+ +------+ +-----+ +-----+ +-----+ +------+ Figure 2: Network with NR-side GaNATs (the public Internet is assumed to be between NI andGISTNSLP peer 1) For every arriving IP packet P, an NSLP-unaware, NR-side GaNAT executes the following algorithm. 1. If P has a RAO followed by the GIST header with the NSLP ID indicates an unsupported NSLP, and if it is identified as a GISTQUERY. In this caseQUERY, the GaNAT does the following. 1. We denote Pasby GQ. The GaNAT looks at the stack proposalSTin GQ. If it indicates that cryptographic protection is required, the algorithm that is executed is the one described in section Section 6 below. 2. The GaNAT remembers GQ along with the link on which it arrived. We call this link the "upstream" link. 3. The GaNAT determines whether or not this GIST QUERY is anticipated, i.e. if a pending IPNext (and possibly PortNext) exists that matches this GIST QUERY. A pending IPNext is said to "match" a GIST QUERY, if [this condition is an open issue!] If no pending IPNext isalsomatching, P is discarded (it is a question whether or not an error message should be sent). Otherwise, additional checks may be performed (e.g. something like a DSInfo object may have to be checked against the GQ). If these checks fail, P is discarded. Otherwise, the GaNAT performs the following. 4. It searches its table of existing NAT bindings against entries that match the GQ.MRI. A matching entry means that the data flow, to which the signalling refers, already exists. + If a matching entry is found, the GaNAT looks at which link the packets of the data flow are forwarded; we call this link the "downstream" link. Further, the GaNAT checks how the IP and transport layer headers of the data flow(IP addresses, port numbers, etc)are translated according to this NAT binding.We denote [IP header].SourceIPAddress used on the downstream link as IPGaNATds, and the source port number as SPNDTGaNATds.Note that the [IP header].DestinationIPAddress and [Transport layer header].DestinationPort of this NAT binding should be equal toIPNext.IPNext and PortNext respectively. Ifit isthey are not, this should be handled as an auditive error condition.The GaNAT may also assign a new source port number to signalling traffic, which is denoted as SPNSTGaNATds.+ If no matching entry is found, the GaNAT determines, based on its routing table, the link on which packets that match GQ.MRI (excluding GQ.MRI.SourceIPAddress and where GQ.MRI.DestinationIPAddress is replaced with IPNext) would be forwarded. We call this link the "downstream" link.Then, the5. The GaNAT acquires an IP address for itself on the downstream link. (This address could be dynamic or static.) Depending on its type, the GaNAT may also acquire a UDP source portnumbersnumber for thetranslationversion ofdata traffic.the GIST QUERY that will be forwarded to the downstream direction. We denote the acquired IP addressas IPGaNATdsandthesource portnumbers for data and signalling traffic as SPNDTGaNATds and SPNSTGaNATdsnumber by IPds SPSTds respectively.5. It createsThe GaNAT then constructs a new GIST QUERY packet GQ', as follows. 1. GQ' <- GQ 2.GQ'.MRI.SourceIPAddress <- IPGaNATds 3.GQ'.MRI.DestinationIPAddress <- IPNext. 3. GQ'.MRI.DestinationPort <- PortNext. 4.GQ'.MRI.SourcePortGQ'.NLI.IA <-SPNDTGaNATds.IPds. 5. GQ'.[IP header].SourceIPAddress <-IPGaNATdsIPds. 6.GQ'.[UDP HEADER].SourcePortGQ'.[IP header].DestinationIPAddress <-SPNSTGaNATdsIPNext. 7.GQ'.[IP header].Destination_IP_AddressGQ'.[UDP header].SourcePort <-IPNextSPSTds. 8.GQ'.NLI.IA <- IPGaNATds. 9.GQ'.S <- true 6. It remembers GQ,GQ'GQ', the fact that they are associated, and the associated upstream and downstream links (interfaces). 7. It forwards GQ' on the downstream link.Steps 2,3, 4 and 5The remaining steps of the algorithm are analogous to the corresponding steps of the algorithm executed by NSLP-unaware, NI- side GaNATs, which was described in Section 5.1. 5.3. NSLP-aware GaNATs The difference of NSLP-aware GaNATs and NSLP-unaware GaNATs is that the former perform NSLP processing in addition to the processing of the NSLP-unaware GaNATs. Another way to see this is by observing that NSLP-aware GaNATs should provide an "MRI translation service" (MRITS) in addition to normal GIST and NSLP processing. The MRITS operates at the GIST layer. The motivation behindthe MRITSthis isfor GISTto hide from the NSLP that signalling messages traverse an addressing boundary. In other words, the purpose of the MRITS is to make the NSLP believe that it is operating in a single IP addressing space. When and how the MRITS is invoked for a particular packet depends on (i) the direction ofthe packetan incoming message (i.e. downstream or upstream) and (ii) the location of the GaNAT (i.e. NI-side orNR-side).NR- side). It should also be noted that certain NSLP layer tasks must be carried out in consistency with the placement of the MRITS. This is to prevent events triggered by the NSLP to cause installation of inconsistent state. In order to clarify this, consider the scenario of the QoS NSLP running in a GaNAT that operates according to the mechanisms described in this section. Since the GaNAT only presents a single addressing space to the NSLP (say, the internal addressing space), the packet classifier of the GaNAT's QoS provisioning subsystem should classify data packets based on internal addresses only (i.e. it should first translate packets that carry external addresses and then classify them). Whether the MRITS presents internal-only or external-only addresses to the NSLP is not significant, as long as NSLP layer operations are carried out consistently. In the remainder of this section we present the case where internal addresses are presented to the NSLP. The MRITS is obviously invoked only on GIST packets that carry an NSLP identifier that corresponds to an NSLP that the GaNATactually supports. Also, forimplements. For non-GIST packets, normal NAT behaviour applies. Although the MRITS is part of GIST processing, in order to clarifyour discussion,the exposition, we view it as a somewhat separate processing step (i.e. like asubroutine).subroutine) that is executed in addition to GIST, as this is specified in [1]. For NI-side, NSLP-aware GaNATs, it holds that o for a GIST/NSLP packet that is to be forwarded on the downstream link of an NI-side GaNAT, the MRITS is invoked after the packet has been processed by the NSLP and before it is given to GIST, and o for a GIST/NSLP packet that is received on the downstream link, the MRITS is invoked after GIST processing and before the packet is given to the NSLP. The converse holds for NR-side NSLP-aware GaNATs. In particular, o for a GIST/NSLP packet that is to be forwarded on the upstream link of an NI-side GaNAT, the MRITS is invoked after the packet has been processed by the NSLP and before it is given to GIST, and o for a GIST/NSLP packet that is received on the upstream link, the MRITS is invoked after GIST processing and before NSLP processing. Figure 3 illustrates this idea. +----------------+ +----------------+ | +------+ | | +------+ | | | NSLP | | | | NSLP | | | +-+---++ | | +-+--+-+ | | | | | | | | | | | +-+---+ | | +----++ | | | | |MRITS| | | |MRITS| | | | | +---+-+ | | ++----+ | | | | | | | | | | | +-+-----+-+ | | ++------+-+ | | | GIST | | | | GIST | | u/s | +-+-----+-+ | d/s u/s | ++------+-+ | d/s -----+----+ +-----+----- -----+---+ +-----+----- link +----------------+ link link +----------------+ link NI-side NR-side NSLP-aware NSLP-aware GaNAT GaNAT Figure 3: Operation of the MRI Translation Service The reason for this construction is to give the NSLP the impression that it works only with flows that originate and terminate in the internal address space. We now describe the operation of the MRITS and GIST in NSLP-aware GaNATs. An NI-side NSLP-aware GaNAT operates according to the following rules. 1. When the NSLP asks for a message to be sent towards the downstream GIST peer, the MRITS does the following(IPGaNATds(IPds andSPNDTGaNATdsSPDTds are obtained similarly to the case of anNSLP- unawareNSLP-unaware GaNAT). 1. MRI.SourceIPAddress <-IPGaNATdsIPds 2. MRI.SourcePort <-SPNDTGaNATdsSPDTds 2. Additionally, GIST performs the following on the resulting packet before it is forwarded on the downstream link(SPNSTGaNATds(SPSTds is obtained similarly to the case of an NSLP-unaware GaNAT). 1. [IP header].SourceIPAddress <-IPGaNATdsIPds 2. [UDP/TCP header].SourcePort <-SPNSTGaNATdsSPSTds 3. NLI.IA <-IPGaNATdsIPds 4. S <- true 3. If a message is received on the downstream link, the MRITS does the following before the NSLP is invoked. 1. MRI.SourceIPAddress <- IPflow 2. MRI.SourcePort <-SPNDTGaNATus,SPDTus, where IPflow is the IP address of the DS (as seen by the GaNAT) andSPNDTGaNATusSPDTus is the destination port number used in the original MRI. 4. If, after NSLP processing, a message is to be forwarded on the upstream link, GIST performs the following processing (note that no MRITS processing takes place in this case). 1. [IP header].SourceIPAddress <-IPGaNATusIPus 2. [IP header].DestinationIPAddress <- IPpeer 3. NLI.IA <-IPGaNATusIPus 4. S <- true, whereIPGaNATusIPus is the GaNATs IP address for the upstream link, IPpeer is theIPaddressIP address of the NI (or the next GaNAT in the upstream direction), and IPflow is the IP address of the DS (as seen by the GaNAT). The GaNAT is assumed to determine the correctIPGaNATusIPus and IPpeer from previous communications and in cooperation with GIST. [Issue: how exactly shouldIPGaNATus,IPus, IPpeer and IPflow be resolved; i.e. what exactly should the GaNAT remember?] An NR-side NSLP-aware GaNAT operates according to the following rules. 1. If the packet is received on the upstream link, the MRITS does the following, before the NSLP is notified. 1. P.MRI.SourceIPAddress <-IPGaNATdsIPds 2. P.MRI.DestinationIPAddress <- IPNext, whereIPGaNATdsIPds is the GaNAT's IP address for the downstream link and IPNext is the address of the DR. IPNext is obtained in a way similar to the case of an NSLP-unaware GaNAT. 2. If, after NSLP processing, a message is to be forwarded on the downstream link, GIST performs the following processing (note that no MRITS processing takes place in this case). 1. [IP header].SourceIPAddress <-IPGaNATdsIPds 2. [IP header].DestinationIPAddress <- IPNext 3. NLI.IA <-IPGaNATdsIPds 4. S <- true, whereIPGaNATdsIPds is the GaNATs IP address for the downstream link, IPNext is the IP address of the DR (or the next GaNAT in the downstream direction). The GaNAT is assumed to determine the correct IPNext in a way similar to the case of an NSLP-unaware GaNAT. 3. When the NSLP asks for a message to be sent towards the upstreamGISTpeer, the MRITS does the following. 1. MRI.SourceIPAddress <- IPflow 2. MRI.Destination_IP_Address <-IPGaNATusIPus 4. Additionally, GIST performs the following on the resulting packet before it is forwarded on the downstream link. 1. [IP header].SourceIPAddress <-IPGaNATusIPus 2. [IP header].DestinationIPAddress <- IPpeer 3. NLI.IA <-IPGaNATusIPus 4. S <- true, whereIPGaNATusIPus is the GaNATs IP address for the upstream link, IPpeer is the IP address of the NI (or the next GaNAT in the upstream direction), and IPflow is the IP address of the DS. The GaNAT is assumed to determine the correctIPGaNATusIPus and IPpeer fields from previous communications and in cooperation with GIST. [question: how exactly shouldIPGaNATusIPus and IPpeer be resolved; i.e. what exactly should the GaNAT remember]? 5.4. Combination of NSLP-aware and NSLP-unaware GaNATs In the absence of an adversary, a combination of NSLP-aware and NSLP- unaware GaNATs should work without further specification. However, in the presence of an adversary, additional security issues may arise from the combination. These issues may introduce opportunities for attack that do not exist in setting where the on-path GaNATs are either all NSLP-aware or all NSLP-unaware. 6. Non-transparent NAT traversal for GIST This section discusses the "non-transparent" operation for GaNAT traversal at the GIST layer, i.e. the first approach listed in Section 3. For thisapproach,approach the behaviour of both the GaNAT and the GIST peers is defined. As with the transparent approach, the case of the in-between GaNAT(s) being located at the NI-side is different from that of NR-side GaNATs. Note that the mechanisms in this section apply only to NSLP-unware GaNATs. The GaNAT informs the NSLP peers about its presence during the GIST discovery process. This information enables the NSLP peers to map the translated data flow to the signalling messages, and to consistently translate the MRI, so that the NSLP only "sees" the correct MRI. Cryptographic protection of signalling messages can be supported with this approach because the GaNAT only modifies the GIST QUERY andREPONSERESPONSE messages, which are never cryptographically protected in their entirety. In this approach, the GaNAT embeds anew GIST"NAT Traversal Object" (NTO) payload type into the GIST QUERY.This payloadThe NTO encodes the aforementionedinformation,information andwe call this payload type the "NAT Traversal Object" (NTO). The NTOis an optional payload in the GIST header of a GISTQUERY, andQUERY. It is added, and processed, by the GaNAT(s) through which the QUERY traverses. The information in the NTOmust enableenables the two NSLP peers to locally translate the MRI in the same way as if it were consistently and transparently translated by the in-between GaNAT(s). Note that there may be more than one GaNAT between the two NSLP peers. The format of the NTO follows the format of the object in the GIST common header. In particular, the NTO is preceded by a TLV common header, as defined in [1]. The A and B flags are both set to 0 in this header, indicating that support for the NTO is mandatory. The type value is TBD. The NTO is defined as in section A.3.8 of [1]. 6.1. NI-side NSLP-unaware GaNATs For every arriving IP packet P, an NSLP-unaware, NI-side GaNAT executes an algorithm that is equivalent to the following. 1. If P has a RAO followed by the GIST header with an NSLP ID that is not supported, and if it is identified as a GISTQUERY. In this caseQUERY, the GaNAT does the following. 1. We denote Pasby GQ. The GaNAT looks at the stack proposalSTin GQ. If it does not includeaany proposal with cryptographic protection, the GaNAT MAY choose to follow the approach described in Section 5.1 above. 2.We callThe GaNAT remembers GQ along with the link on whichGQ arrivedit arrived. We call this link the "upstream" link. 3. The GaNAT searches its table of existing NAT bindings against entries that match the GQ.MRI. A matching entry means that the data flow, to which the signalling refers, already exists. + If a matching entry is found, the GaNAT looks at which link the packets of the data flow are forwarded; we call this link the "downstream" link. Further, the GaNAT checks how the headers of the data flow (IP addresses and port numbers) are translated according to this NAT binding. We denote the source IP address of translated data packets by IPds, and their [Transport layer header].SourcePort by SPDTds. + If no matching entry is found, the GaNAT determines, based on its routing table, the link on which packets that match GQ.MRI (excluding GQ.MRI.SourceIPAddress) would be forwarded. We call this link the "downstream" link. Then, the GaNAT acquires an IP address and source port for itself on the downstreamlink. (Thislink, denoted by IPds and SPDTds respectively. This address and port could be dynamic orstatic.) 4. We denote [IP header].SourceIPAddressstatic, and will be usedon(among other things) for thedownstream link as IPGaNATds, andinstallation of a NAT binding for the data traffic in the future. 4. The GaNAT aquires a source port number for thedata and signalling traffic as SPNDTGaNATds and SPNSTGaNATds respectively.version of the GIST QUERY that will be forwarded over the downstream link. We denote this port by SPSTds. (There is no requirement that SPSTds must be different from GQ.[UDP Header].SourcePort.) 5. It creates a new GIST QUERY packet GQ', as follows. 1. GQ' <- GQ 2.GQ'.MRI.SourceAddressGQ'.MRI.SourceIPAddress <-IPGaNATds.IPds 3.GQ'.MRI.SourcePortGQ'.MRI.SourcePortNumber <-SPNDTGaNATds.SPDTds 4. GQ'.NLI.IA.<-IPGaNATds.IPds. 5. GQ'.[IP header].SourceIPAddress <-IPGaNATds.IPds. 6. GQ'.[UDP header].SourcePort <-SPNSTGaNATds.SPSTds. 7. GQ'.S <- true. 8. It checks whether or not an NTO was included in GQ. - If none was included, it creates a new NTO as follows and adds it to GQ'. Note that the MRI field of the NTO is taken from GQ. o NTO.[NAT Count] <- 1. o NTO.MRI <- GQ.MRI. o NTO.[List of translated objects] <- [type ofMRI], [type of NLI], [type of SCD]NLI] o NTO.opaque informationforreplaced by NAT 1 <-GQ.[IP header].SourceAddress, [link identifier ofGQ.NLI.IA, GQ.[UDP header].SourcePort, LinkID, where LinkID represents the upstreamlink].link. - If one was included, it replaces certain fields and appends new fields into the NTO, as follows, and adds the resulting object to GQ'. Note that the MRI field of the NTO is not modified. o NTO.[NAT Count] <- i, where i is the current [NAT count] value increased by one. o NTO.[List of translated objects] <- [type ofMRI], [type of NLI], [type of STD]NLI] oNTO.[opaqueNTO.opaque information replaced by NATi]i <-GQ.[IP header].SourceAddress, [LinkID ofGQ.NLI.IA, GQ.[UDP header].SourcePort, LinkID, where LinkID represents the upstreamlink].link. 9. It remembers GQ, GQ', the fact that they are associated, and the associated upstream and downstream links. 10. It forwards GQ' on the downstream link.Note: The encoding of the information that the GaNAT encodes into the NTO.[opaque information replaced by NAT i] field is a local implementation issue.2. Otherwise, if P carries an [IP header].DestinationIPAddress that belongs to the GaNAT, and if it is identified as a GIST RESPONSEpacket in datagram modewith an NSLP ID that is not supported, the GaNAT does the following (P is denotedasby GR). 1. If P does not contain an NTO, the GaNATforwardsdiscards itas usualwithout further processing. Otherwise, it searches for a matching GQ' in its buffer. A GQ' is said to be matching if it carries the same cookie value. If none is found, GR is discarded. Otherwise, the GaNATselectsshould also make sure that theinformation encoded by itsession ID in GR is the[opaque information replaced by NAT] field ofsame as in GQ', that theembedded NTO, denoted by IPAddressToSendNSLP IDs match, andLinkID. If multiple [opaque information replaced by NAT] fields are present inthat GR arrived on theNTO,downstream link. If these consistency checks fail, GR should be discarded. Otherwise, the GaNATuses the last one in the list. It thenconstructs a new GISTresponseRESPONSE GR', as follows (note that no changes are made to the MRI). 1. GR' <- GR 2.GR'.[IP header].DestinationIPAddress <- IPAddressToSend. 3. GR'.NTO.[NAT Count] <- current value minus one. 4. RemoveThe GaNAT selects the information that it encoded in thelast[opaque informationreplacesreplaced by NAT i] fieldfrom GR'.NTOof the embedded NTO, denoted by IPAddressToSend, PortAddressToSend and LinkID, where i is the current value of [NAT Count] as indicated in the NTO. 3. GR'.[IP header].DestinationIPAddress <- IPAddressToSend. 4. GR'.[UDP header].DestinationPort=PortAddressToSend. 5. GR'.NTO.[NAT Count] <- reduce by one. 6. GR'.S <- true. 2.It forwards GR' on the upstream link, i.e. the link identified by LinkID. 3.The GaNATSHOULD now invalidate all but one stack configuration objectsinspects the Stack-Configuration-Data object in GR and thestack proposalcorresponding GQ' inGR'.order to check whether or not the upstream NSLP peer can select one of multiple transport layer protocol/destination port number combinations for the establishment of a messaging association. If multiple choices exist, the GaNAT invalidates as many transport layer protocol/port number combination proposals from GR' as necessary, until the upstream NSLP peer can only initiate the establishment of a messaging association with the downstream NSLP peer using a single transport layer protocol/destination port number combination. This invalidation is doneso thatby setting thequering node can only choseD-flag in those MA-Protocol-Options fields thatone proposal, andcarry the port number proposals thattherefore only one NAT binding mustare to beinstalled forinvalidated. Note that, by setting thesignalling traffic to traverseD-flag in a particular MA-Protocol- Option field, theGaNAT.GaNAT may also invalidate the associated transport layer and security protocol (e.g. TCP/TLS) proposal. The actions of the GaNATSHOULD keep validMUST NOT result in the strongest, in terms of security,stack proposal.proposal to be invalidated. In the end, the NAT will expect the upstream NSLP peer to use a particular combination of transport layer protocol and destination port (and possibly other details that are associated with the valid proposal) for the establishment of the messaging association. Wedenotecall this combination the "stack proposalas PR.expected by the NAT" and denote it by ST. The GaNAT remembers this ST, its association with GQ, GQ', GR, GR', and the upstream and downstream links. By doing so, the GaNAT is said to "install" ST. 3. It forwards GR' on the link identified by LinkID. 4. The GaNAT now installs a NAT binding for the signalling traffic that is exchanged over a messaging association which says that "a packet K that arrives on the upstream link and for which it holds that + K.[IPheader].SourceIPAddress=IPAddressToSend,header].DestinationIPAddress=GR.NLI.IA,, + K.[IPheader].Protocol=PR.Protocol,header].Protocol=ST.Protocol, and +K.[TCP/UDP header].DestinationPort=PR.[Destination Port]K.[Transport layer header].DestinationPort=ST.DestinationPort should be forwarded on the downstreamlink (i.e.link, with [IP header].SourceIPAddress = IPds and [UDP/TCP header].DestinationPort=SIGPort, where SIGPort is a port that the GaNAT allocates for use as a source port for signalling traffic. 5. The GaNAT now installs a NAT binding for the UDP-encapsulated signalling traffic which says that "a packet M that arrives on the upstream linkonand for whichGR arrived),it holds that + M.[IP header].DestinationIPAddress=GR.NLI.IA, + M.[IP header].Protocol=UDP, and + M.[UDP header].DestinationPort=GIST well-known port should be forwarded on the downstream link, with [IP header].SourceIPAddress =IPGaNATds. 5.IPds. Note that this is a special type of NAT binding, in that the source port in M may vary from one incoming message to another. This is why each packet M may be mapped by the GaNAT to a different source port. Translation in the upstream direction must be applied consistently, and timeouts must also be selected appropriately. That is, the overall binding must be timed out together with the GIST state that is associated with this session. However, each incoming packet M that matches this binding causes the installation of a "sub"-binding (in the sense that a new port mapping may occur) that will typically time out faster. 6. If no NAT binding for the data traffic was found in step 1.3.2, the GaNAT now installs a NAT binding (for the unidirectional data traffic) which says that "a packetKL that arrives on the upstream link and for which it holds that +K.[IP header].DestinationIPAddress=GQ'.NTO.MRI.Destination IPAddress,L.[IP header].DestinationIPAddress=GQ.MRI.DestinationIPAddress, +K.[IP header].Protocol=GQ'.NTO.MRI.Protocol,L.[IP header].Protocol=GQ.MRI.Protocol, and +K.[TCP/UDP header].PortNumbers=GQ'.NTO.MRI.PortNumbersL.[Transport layer header].PortNumbers=GQ.MRI.PortNumbers should be forwarded on the downstreamlink (i.e. the link on which GR arrived),link, with [IP header].SourceIPAddress =IPGaNATdsIPds and [UDP/TCPheader].SourcePort=SPDTGaNATds.header].SourcePort=SPDTds. Issues: there is a question of whether this NAT binding should also enable data traffic in the opposite direction to traverse the NAT; in order to be able to demultiplex upstream traffic that carries data that belongs to different flows, the GaNAT should keep the necessary per-flow state. From a signalling point of view, however, upstream data traffic that corresponds (on the application level) to the downstream flow to which this GIST session refers, is a separate flow for which, dependent on the application, there may or there may not exist a signalling session. If such a signalling session exists, then the GaNAT acts as an NR-side GaNAT for this session. Thus, during the processing of thissignalling,signalling care has to be taken not to establish a NAT binding for a flow for which a NAT binding already exists. Finally, security issuesmayarise when traffic, for which no signalling exists, is allowed to traverse a GaNAT. 3. Otherwise, if P matches an existing NAT binding, normal NAT processing is applied. 4. Otherwise, P is subjected to normal NAT processing. That is, P is either silentlydiscarded.discarded or it causes the installation of a (data) NAT binding. 6.2. NR-side NSLP-unaware GaNATs As is the case with NR-side NSLP-unaware GaNATs that follow the "transparent" approach, an NR-side NSLP-unaware GaNAT that follows the "non-transparent" approach must know a "pending" IP addressand, depending on the scenario, also aand optionally destination port number, as described in Section 5.2. This IP address and destination port number are denotedasby IPNext and PortNext respectively. How they are made known to the GaNAT is outside the scope of this document. Note, however, that a typical scenario would be that the GaNAT has an existing NAT bindingfor the data flowin place from where this information can be derived. For everyarrivingincoming IP packet P, an NSLP-unaware, NR-side GaNAT executes the following algorithm. 1. If P carries an [IP header].DestinationIPAddress that belongs to the GaNAT, if it has a RAO followed byathe GIST header with an unsupported NSLPID, and if it is identified as a GIST QUERY, the GaNAT does the following. 1. We denote Pasby GQ. The GaNAT looks at the stack proposalSTin GQ. If itindicates that nodoes not include any proposal with cryptographicprotection is required,protection, the GaNAT MAY choose to follow the "transparent" approach as described in Section 5.2 above. 2. If GQ.[IPheader].[Destination Address]header].DestinationIPAddress, denoted by IPus in the sequel, is not bound to the link on which GQ arrived, the GaNAT silently discards the packet. Otherwise, it remembers GQ along with the link on which it arrived. We call this link the "upstream" link. 3. The GaNAT determines whether or not this GIST QUERY is anticipated, i.e. if a pending IPNext and PortNext exists. One way of determining whether or not a pending IPNext and PortNext exists is checking whether or not a NAT binding for the data traffic, as this is defined by the MRI in the GIST QUERY, exists in the NAT binding cache. If one exists, then IPNext and PortNext is the address and destination port numbertoon whichthe datathis traffic issent after translation.forwarded. If no pending IPNext is found, then GQ is discarded (it isan open issuea question whether or not an error message should be sent). Otherwise, additional checks may be performed (e.g. a DSInfo object may have to be checked against the GQ). If these checks fail, GQ is discarded. Otherwise, the GaNAT performs the following. 4.We call the link on which GQ arrived the "upstream" link. The GaNAT aquires an IP address for itself for the upstream link (this could be a static or a dynamic IP address). This address is denoted IPGaNATus. The GaNAT will use this address as a source IP address in order to send subsequent signalling messages to the upstream direction. If the GaNAT is an edge NAT, IPGaNATus will typically coincide with the destination IP address of the (original) MRI in the GIST QUERY. 5. The GaNATIt searches its table of existing NAT bindings against entries that matchtheGQ.MRI. A matching entry means that the data flow, to which the signalling refers, already exists. + If a matching entry is found, the GaNATdetermines the link onlooks at which link the packets of the data flow are forwarded; we call this link the "downstream" link. Further, the GaNAT checks how the headers of the data flow (IP addresses, port numbers) are translated according to this NAT binding. Note that the [IP header].DestinationIPAddressofand DestinationPort in this NAT binding should be equal toIPNext.IPNext and PortNext respectively. Ifit isthey are not, this should be handled as an auditive error condition. (This check is done as a consistency check.) + If no matching entry is found, the GaNAT determines, based on its routing table, the link on which packets that match GQ.MRI (where GQ.MRI.DestinationIPAddress is replaced with IPNext) would be forwarded. We call this link the "downstream" link.6.5. It creates a new GIST QUERY packet GQ', as follows. 1. GQ' <- GQ 2.GQ'.MRI.DestinationAddressGQ'.MRI.DestinationIPAddress <-IPNext.IPnext 3.GQ'.MRI.DestinationPortGQ'.MRI.DestinationPortNumber <-PortNext.PortNext 4. GQ'.[IP header].DestinationIPAddress <-IPNext.IPnext 5. GQ'.[UDP header].DestinationPort <- GIST well-known port (TBD) 6. It checks whether or not an NTO was included in GQ. - If none was included, it creates a new NTO as follows and adds it to GQ'. Note that the MRI field of the NTO is taken from GQ. o NTO.[NAT Count] <- 1. o NTO.MRI <- GQ.MRI. oNTO.[List of translated objects] <- [type of MRI], [type of NLI], [type of SCD] oNTO.opaque information for NAT 1 <-IPGaNATus, [link identifierLinkID of upstreamlink].link. - If one was included, it replaces certain fields and appends new fields into the NTO, as follows, and adds the resulting object to GQ'. Note that the MRI field of the NTO is not modified. o NTO.[NAT Count] <- i, where i is the current [NAT count] value increased by one. oNTO.[List of translated objects] <- [type of MRI], [type of NLI], [type of SCD] o NTO.[opaqueNTO.opaque information replaced by NATi]i <-IPGaNATus, [LinkIDLinkID of upstreamlink]. 6.link. 7. It remembers GQ, GQ', the fact that they are associated, and the associated upstream and downstream links. 8. It forwards GQ' on the downstream link.Note: The encoding of the information that the GaNAT encodes into the NTO.[opaque information replaced by NAT i] field is a local implementation issue.2. Otherwise, if P is identified as a GIST RESPONSE packetin datagram modewith an NSLP ID that is not supported, the GaNAT does the following (P is denotedasby GR). 1.If P does not contain an NTO, the GaNAT forwardsIt searches for a matching GQ' in its buffer. A GQ' is said to be matching if itas usual without further processing.carries the same cookie value. If none is found, GR is discarded. Otherwise, the GaNATselectsshould also make sure that theinformation encoded by itsession ID in GR is the[opaque information replaced by NAT] field ofsame as in GQ', that theembedded NTO, denoted by IPGaNATusNSLP IDs match, andLinkID.that GR arrived on the downstream link. Ifmultiple [opaque information replaced by NAT] fields are present inthese consistency checks fail, GR should be discarded. Otherwise, the GaNAT constructs a new GIST RESPONSE GR', as follows. 2. If P does not contain an NTO, the GaNATuses the last one indiscards it without further processing. Otherwise, thelist. TheGaNATthenconstructs a new GISTresponseRESPONSE GR', as follows (note that no changes are made to the MRI). 1. GR' <-GRGR. 2.GR'.[IP header].SourceIPAddress <- IPGaNATus. 3. GR'.MRI.NLI.IA <- IPGaNATus. 4. RemoveThe GaNAT selects the information that it encoded in thelast[opaque information replaced by NAT i] fieldfrom GR'.NTO.of the embedded NTO, denoted by LinkID, where i is the current value of [NAT Count] as indicated in the NTO. 3. GR'.NLI.IA <- IPus 4. GR'.NTO.[List of translated objects by NAT i] <- [type of NLI], where i is the current value of [NAT Count] as indicated in the NTO. 5. GR'.NTO.[NAT Count] <- reduce by one. 6. GR'.[IP header].SourceIPAddress <- IPus (this is the IP address that is bound to the link identified by LinkID and must be equal to GQ.[IP header].DestinationIPAddress, where GQ is the GIST QUERY associated with GQ'). 7. GR'.[UDP header].DestinationPort <- GQ.[UDP header].SourcePort, where GQ is the GIST QUERY associated with GQ'. 8. GR'.S <- true.2.3. The GaNATSHOULD now invalidate all but one stack configuration objectsinspects the Stack-Configuration-Data object in GR and thestack proposalcorresponding GQ' inGR'.order to check whether or not the upstream NSLP peer can select one of multiple transport layer protocol/destination port number combinations for the establishment of a messaging association. If multiple choices exist, the GaNAT invalidates as many transport layer protocol/port number combination proposals from GR' as necessary, until the upstream NSLP peer can only initiate the establishment of a messaging association with the downstream NSLP peer using a single transport layer protocol/destination port number combination. This invalidation is doneso thatby setting thequering node can only choseD-flag in those MA-Protocol-Options fields thatone proposal, andcarry the port number proposals thattherefore only one NAT binding mustare to beinstalled forinvalidated. Note that, by setting thesignalling traffic to traverseD-flag in a particular MA-Protocol- Option field, theGaNAT.GaNAT may also invalidate the associated transport layer and security protocol (e.g. TCP/TLS) proposal. The actions of the GaNATSHOULD keep validMUST NOT result in the strongest, in terms of security,stack proposal.proposal to be invalidated. In the end, the NAT will expect the upstream NSLP peer to use a particular combination of transport layer protocol and destination port (and possibly other details that are associated with the valid proposal) for the establishment of the messaging association. Wedenotecall this combination the "stack proposalas PR.expected by the NAT" and denote it by ST. The GaNAT remembers this ST, its association with GQ, GQ', GR, GR', and the upstream and downstream links. By doing so, the GaNAT is said to "install" ST. IfPR.[Destination Port]ST.DestinationPort is already used by the GaNAT as a destination port in order to demultiplex an existingsignallingflow, the GaNAT reserves a destination port SIGPORT(that it will use as a sourceand modifies the valid portfor UDP/TCP signalling trafficproposal in GR' such thatitSIGPORT willsend onbe used by the upstreamlink) and replaces PR.[Destination Port] with SIGPORT.GIST peer. Otherwise it setsSIGPORT=PR.[Destination Port]. It then sets GR'.[UDP header].SourcePort <- SIGPORT. 3.SIGPORT=ST.DestinationPort. 4. It forwards GR' on theupstream link, i.e. thelink identified byLinkID. 4.LinkID (i.e. the upstream link). 5. The GaNAT now installs a NAT binding for the signalling traffic that is exchanged over a messaging association which says that "a packet K that arrives on the upstream link and for which it holds that + K.[IPheader].DestinationIPAddress=IPGaNATus,header].DestinationIPAddress=IPus (which is equal to GQ.MRI.DestinationIPAddress and GQ.[IP header].DestinationIPAddress), + K.[IPheader].Protocol=PR.Protocol,header].Protocol=ST.Protocol, and +K.[TCP/UDPK.[Transport layer header].DestinationPort=SIGPORT should be forwarded on the downstreamlink (i.e.link, with [IP header].DestinationIPAddress = GR.NLI.IA and [Transport layer header].DestinationPort=ST.DestinationPort. 6. The GaNAT now installs a NAT binding for the UDP-encapsulated signalling traffic which says that "a packet M that arrives on the upstream linkonand for whichGR arrived),it holds that + M.[IP header].DestinationIPAddress=IPus, + M.[IP header].Protocol=UDP, and + M.[UDP header].DestinationPort=GIST well-known port should be forwarded on the downstream link, with [IPheader].DestinationIPAddressheader].SourceIPAddress =GR.MRI.NLI.IAGR.NLI.IA". Note that this is a special type of NAT binding, in that the source port in M may vary from one incoming message to another. This is why each packet M may be mapped by the GaNAT to a different source port. Translation in the upstream direction must be applied consistently, and[UDP/TCP header].DestinationPort=PR.[Destination Port]. 5.timeouts must also be selected appropriately. That is, the overall binding must be timed out together with the GIST state that is associated with this session. However, each incoming packet M that matches this binding causes the installation of a "sub"-binding (in the sense that a new port mapping may occur) that will typically time out faster. 7. If no NAT binding for the data traffic was found in step 1.3.2, the GaNATmaynowinstallinstalls a NAT binding (for the unidirectional data traffic) which says that "a packet L that arrives on the upstream link and for which it holds that + L.[IPheader].DestinationIPAddress=GR'.NTO.MRI.Destination IPAddress,header].DestinationIPAddress=IPus (which is equal to GQ.MRI.DestinationIPAddress and GQ.[IP header].DestinationIPAddress), + L.[IPheader].Protocol=GR'.NTO.MRI.Protocol,header].Protocol=GQ.MRI.Protocol, and +L.[TCP/UDP header].DestinationPortNumbers=GR'.NTO.MRI.DestinationPortL.[Transport layer header].PortNumbers=GQ.MRI.PortNumbers should be forwarded on the downstream link, with [IP header].DestinationIPAddress = IPNext and[UDP/TCP[Transport layer header].DestinationPort=PortNext. Note: If the GaNAT also allows data traffic to traverse in the other direction (i.e. in the upstream direction), then the IP packets of this data traffic MUST have SourceIPAddress=IPus, SourcePort=GQ.MRI.DestinationPort, DestinationPort=GQ.MRI.SourcePort, and must be forwarded on the upstream link. (This applies anyway for GaNATs with only two links and where each link is bound to a single IP address. However, for other types of GaNAT care has to be taken that this restriction is enforced.) Issues: there is a question of whether this NAT binding should also enable data traffic in the opposite direction to traverse the NAT; in order to be able tomultiplexdemultiplex upstream traffic that carries data that belongs to different flows, the GaNAT should keep the necessary per-flow state. From a signalling point of view, however, upstream data traffic that corresponds (on the application level) to the downstream flow to which this GIST session refers, is a separate flow for which, dependent on the application, there may or there may not exist a signalling session. If such a signalling session exists, then the GaNAT acts as anNI-sideNR-side GaNAT for this session. Thus, during the processing of this signalling care has to be taken not to establish a NAT binding for a flow for which a NAT binding already exists. Finally, security issuesmayarise when traffic, for which no signalling exists, is allowed to traverse a GaNAT. 3. Otherwise, if P matches an existing NAT binding, normal NAT processing is applied. 4. Otherwise, P is subjected to normal NAT processing. That is, P is either silentlydiscarded.discarded or it causes the installation of a (data) NAT binding. The remaining steps of the algorithm are analogous to the algorithm of NSLP-unaware, NR-side GaNATs, which was described in the previous section. 6.3. GIST peer processing In the presence of GaNATs on the signalling path between two NSLP peers, and if the GaNATs follow the "non-transparent" approach (which they have to follow in the context of cryptographically protected signalling), the consistent translation of the GIST header fields must be carried out by the NSLP peers. The GIST processing that performs this task, is described next. Note that this processing is in addition to the processing described insection 7.2 of[1].7. GIST-unaware NATs The following may serve as indicationsAlso note that the processing described in this section applies only to non-NAT nodes. A GIST peer that receives a GIST QUERY that carries an NSLP ID for a supported NSLP and an NTO, constructs a GIST RESPONSE according to [1]. This response is sent to theexistencepublic address ofan GIST- unaware NATthe last in- betweentwoGaNAT. This address appeared as NLI.NI in the GISTpeers. These indications can only be detected byQUERY (and also as thereceiversource address in the IP header). If local policy allows the installation ofa GIST message. The first occasion these indications may be detected is withstate without the reception of a GISTQUERY, typically byCONFIRM message, then thedownstream peer. (Note that != denotes inequality). o The MRI.SourceIPAddress does not belong toresponder stores theaddressing space ofNTO carried with thereceiving peer. o The MRI.DestinationIPAddress does not belong toQUERY together with theaddressing space ofrouting state information about thereceivingquerying GIST peer.o The IP address inIn particular, theNLI.IAMRI fielddoes not belong to the addressing spaceof thereceiving peer. o The D flag of a received GIST packet denotes downstream direction andNTO must be saved in order for theS flagpeer to be able to map subsequently received signalling messages to this signalling session. Note that it is notsetsufficient for the NSLP to exclusively rely on the NTO.MRI for this purpose. In order to see this, consider two private addressing domains, A and[IP header].SourceIPAddress != MRI.SourceIPAddress. o The D flag ofB, each with areceived GIST packet denotes upstream directionGaNAT at its border, and a node N in theS flag is not set and [IP header].SourceIPAddress != MRI.DestinationIPAddress. o This ispublic internet. In domain A, node N1 has aGIST QUERYcommunication session with N, and[IP header].DestinationIPAddress != MRI.DestinationIPAddress. Notein domain B, node N2 also has a communication session with N. Suppose thatthese are only indications. Inthepresence(private) IP addresses ofan adversary, a GIST peer may be tricked into believingN1 and N2 are equal (e.g. 192.168.0.3), and thatan GIST- unaware NAT exists between itselfthey both communicate with N using the same source andone of its neighbouring peers, while in realitydestination ports. If they both have an NSIS signalling session for thismay not bedata traffic, the NTO.MRI field in thecase. When a downstreamGISTpeer detects suchQUERY of their respective signalling sessions are identical. If these signalling sessions meet at anindication, it may notifyNSLP node that is located "after" theupstream peer aboutGaNATs, then this NSLP node sees theerror. It may include additional informationsame MRI in signalling messages thatenablesare received over a messaging association. In this case, theupstream peernode must use other information in the signalling messages (e.g. session ID, source IP address) in order toconstructmap subsequently received signalling messages to existing sessions. If local policy demands that no session-specific state is installed before the reception of a GISTpacket in such a way that, after it traversesCONFIRM message, then theGIST-unaware NAT,responder must encode theIP addressesinformation inthe MRI fieldNTO.MRI andtheNLI.IAfield are consistent with those in the IP header (which matchfrom theaddressing spaceGIST QUERY (and possibly other values such as NSLP ID and an identifier of thereceiving peer). However, this requireslink on which thespecification of new data structures and formats, processing rules, and requiresGIST QUERY arrived) in thepeers to maintain additional state. Unfortunately,responder cookie. Since thisapproachcookie islikely to failechoed inmany circumstances. In order to see this, considerthebehaviourGIST CONFIRM message, the responder can then delay the installation ofan GIST-unaware NAT whenthe relevant state until it receivesan IP packet.the GIST CONFIRM. Thepacket either 1. matches an existing NAT binding in which case its IP headerconstruction of the responder cookie istranslated andimplementation-specific, in thepacketsense that itis forwarded on another link, or 2. matches an existing policy rule which causes a new binding todoes not raise interoperability issues. Nevertheless, the cookie must beestablished and then (1) happens, or 3. is discarded because neither (1) nor (2) applies. With GIST-unaware NATs it isgenerated in amatter of local policy (i.e. the rulesway thatexistmeets the requirements listed incase (2) above) whether orsection 8.5 of [1], and in a way that does nottraffic will be allowed to traverseintroduce additional attacks against theNAT. This obviously appliessystem. Two responder cookie construction mechanisms are described in the sequel. These methods are in addition toboth signallingthose described in section 8.5 of [1], anddata traffic, as an GIST-unaware NAT is unablemeet the requirements listed in that section. Additionally, they enable the responder todistinguishauthenticate thetwo typescontents oftraffic. It may bethecase that GIST node A is unablecookie, i.e. tocontact GIST node B which is "behind" a NAT, even if communicationensure that the cookie was not tampered with while infrom B to A may be possible because such communication would match a policy rule; typically,transit. This feature is not provided by the cookie construction mechanisms described ina scenarios[1]. Responder cookie generation mechanism 1: Responder cookie = (gennum || cookie-left || cookie-right), whereA|| denotes concatenation, cookie-left istowards the NIcomputed as ENC (Q-Node NLI, MRI, NSLPID, reception interface, [timestamp]), andB is towards the NR, the NAT would have this behaviour. Another approach to deal with GIST-unaware NATscookie-right issimilar to the NAT traversal approach taken by IKEv2, i.e. by encapsulating GIST messages into UDP datagrams, rather than directly into IP datagrams. This technique requires the inclusion of additional fields into a GIST QUERY,computed asfollows. The sender adds (a hash of) its own IP addressMAC (cookie- left). ENC denotes a semantically secure symmetric encryption scheme, and MAC denotes an unforgeable message authentication code scheme. The responder must use a key with ENC that has been selected independently from theIP address of what it believes toone used with MAC. Whenever these keys are refreshed, they MUST be refreshed together. Gennum is theDR into the GIST payload. The receivergeneration number ofthis GIST messages compares these addresses tothe[IP header].SourceIPAddressENC andthe [IP header].DestinationIPAddress respectively. If at least one of themMAC keys. The timestamp isunequal, the receiver deduces that a NATan optional field. Policy dictates whether or not it isbetween sender and receiver. After the detection of a NAT,included in theremainderconstruction of thecommunication is encapsulated into UDP datagramscookie. For example, responders thatare addressed tohave aspecified port. Unfortunately,fast enough key rollover may omit theIKEv2 NAT traversal mechanism cannot be used "as is"timestamp. Example algorithms forNAT traversalENC and MAC are AES-128 inGIST. This is because ofCBC mode [3], and HMAC-SHA1 [4]. Responder cookie generation mechanism 2: Responder cookie = (Gennum || AUTHENC (Q-Node NLI, MRI, NSLPID, reception interface, [timestamp])) AUTHENC denotes a symmetric authenticated encryption scheme. Gennum is the generation number ofreasons, includingthefollowing. okey used with AUTHENC. TheNAT may usetimestamp is anIP addressoptional element for theforwardingsame reason as above. Example AUTHENC algorithms include the one specified in RFC3610. The version ofdata trafficthe MRI thatis different fromtheIP address it usesNSLP peers pass toforward GIST traffic. SincetheNATNSLP isGIST-unaware it cannot updatetheMRIone in theGIST messages such that it matches the translation applies to the data traffic. Moreover, neitherheader of the GISTsending, norQUERY (not theGIST receiving peer can performone in the NTO, if one is present). Whether or not thisupdate;is a translated MRI depends on the location of thesendingpeercannot predictwith respect to thetranslationin-between GaNAT(s). Note that theNAT will apply, and the receiving peer does not have enough information to associate data flows to signalling messages. o Itsame MRI isunclear whether or notused by theIKEv2 NAT traversal mechanism supports cascades of NATs. o It seems to be inappropriate to use UDP encapsulation for certain C-mode scenarios. For example, using UDP encapsulation for TCP C-mode would result in GIST to appearresponder inTCP over UDP over IP. 8.signalling messages that are sent towards the downstream direction. 7. Security Considerations The mechanisms proposed in this document give rise to a number of threats that must be considered. In the following,a subsetsome of these threats is mentioned.8.1.7.1. Service Denial Attacks As described above, NSLP-unaware GaNATs create some state whenever they receive a GIST QUERY message. This state is necessary in order for the GaNAT to be able to map a GIST RESPONSE that arrives from the downstream direction to the corresponding GIST QUERY and thereby to perform the required translation. The threat here is an attacker flooding the GaNAT with maliciously constructed GIST QUERIES with the aim of exhausting the GaNAT's memory. The attacker might use a variety of methods to construct such GIST QUERIES, including the following. 1. Use as [IP header].SourceIPAddress the address of some other node or an unallocated IP address. This method is also known as IP spoofing. 2. Use an invalid NSLPID, in order to make sure that all on-path GaNAT(s) will behave like NSLP-unaware GaNATs. 3. For each packet, use a different value for the cookie field. 4. For each packet, use a different value for the session ID field. 5. Combinations of the above. How vulnerable a GaNAT is to the above service denial attack depends on avariatyvariety of factors, including the following. o The amount of state allocated at the receipt of a GIST QUERY. This amount may vary depending on whether or not the data flow to which the signalling refers, already exists (i.e. whether or not the GaNAT already maintains a NAT binding for it). o The mechanism that the GaNAT uses to map RESPONSEs to QUERIEs. o Whether or not the GaNATacriquesacquires dynamic IP addresses and ports for the downstream link. In order to decrease the exposure of a GaNAT to service denial attacks, the following recommendations are made. o The GaNAT should perform ingress filtering. This limits the amount of locations from which an attacker can perform IP spoofing without being detected. o The GaNAT should allocate the minimum amount of state required at the reception of a GIST QUERY. o All state allocated by the GaNAT should timeout according to a local policy. If the GaNAT detects heavy loads (which may indicate a service denial attack in progress), the GaNAT should timeout the state allocated as a result of a received GIST QUERY quicker, proportionally to the experienced load. o The installation of a NAT binding for the data traffic (if such a binding does not exist prior to signalling) should be postponed until the correct GISTREPONSERESPONSE traverses the NAT. The service denial threats mentioned in this section do not apply to an NSLP-aware GaNAT, as such a GaNAT is required, in accordance with its local policy, to verify the validity of the cookie(s) before allocating any state, including the state required by the mechanisms in this document.8.2.7.2. Network Intrusions Although the primary goal of a NAT is to perform address translation between two addressing spaces, NATs are sometimes also used to provide a security service similar to the security service provided by firewalls. That is, a NAT can be configured so that it does not forward packets from the external into the internal network, unless it determines that the packets belong to a communication session that was originally initiated from an internal node and are, as such, solicited. If an NSLP-unaware GaNAT performs the above security-relevant function in addition to address translation, then the presence of GIST signalling and, in particular the mechanisms described in this document, might allow an adversary to cause the installation of NAT bindings in the GaNAT using these mechansisms. These NAT bindings would then enable the adversary to inject unsolicited traffic into the internal network, a capability that itmaymight not have in the absence of the mechanisms described in this document. The administrator of an NSLP-unaware GaNAT should therefore makesecurity-concioussecurity-conscious decisions regarding the operation of the GaNAT. An NSLP-aware GaNAT, on the other hand, follows an NSLP policy which indicates the required security mechanisms. This policy should account for the fact that this NSLP-aware node performs also NAT and the associated packet filtering.9.8. IAB Considerations None.10.9. Acknowledgements The authors would like to thank Cedric Aoun, Christian Dickmann, Robert Hancock, and Martin Stiemerling for their insightful comments. Furthermore, we would like to mention that this document builds on top of a previous document regarding migration scenarios.11.10. Normative References [1] Schulzrinne, H. and R. Hancock, "GIST: General Internet Signalling Transport",draft-ietf-nsis-ntlp-06draft-ietf-nsis-ntlp-09 (work in progress),May 2005.February 2006. [2] Stiemerling, M., Tschofenig, H., and C. Aoun, "NAT/Firewall NSIS Signaling Layer Protocol (NSLP)",draft-ietf-nsis-nslp-natfw-06draft-ietf-nsis-nslp-natfw-09 (work in progress),May 2005.February 2006. [3] "Advanced Encryption Standard (AES)", FIPS PUB 197, November 2001. [4] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997. Authors' Addresses Andreas Pashalidis Siemens Otto-Hahn-Ring 6 Munich, Bavaria 81739 Germany Email: Andreas.Pashalidis@siemens.com Hannes Tschofenig Siemens Otto-Hahn-Ring 6 Munich, Bavaria 81739 Germany Email: Hannes.Tschofenig@siemens.com Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Copyright Statement Copyright (C) The Internet Society(2005).(2006). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society.