RFC 1006

ISO Transport Service on top of the TCP Version: 3

๐Ÿ“… published May 1987, from ietf

ISO Transport Service on top of the TCP โœจ

Okay bestie, this one is RFC 1006 ๐Ÿฆ‹, written by Marshall T. Rose and Dwight E. Cass from the Northrop Research and Technology Center. It's from the Network Working Group, dated May 1987, and it's on Version: 3 ๐Ÿ’–. It obsoletes RFC 983, the older memo this one replaces ๐ŸŒธ.

Status of this Memo

So this memo is a standard for the Internet community ๐ŸŽ€. Hosts on the Internet that choose to implement ISO transport services on top of the TCP are expected to adopt and implement this standard. TCP port 102 is reserved for hosts which implement this standard. Distribution of this memo is unlimited ๐ŸŒˆ.

This memo specifies version 3 of the protocol and supersedes [RFC983]. The changes between the protocol in Request for Comments 983 and this memo are minor, but they're unfortunately incompatible ๐Ÿ˜ญ.

1. Introduction and Philosophy โœจ

The Internet community already has a super mature set of transport and internetwork protocols (TCP/IP), and they're honestly so good at giving end-users network and transport services ๐Ÿ’…. Meanwhile, the CCITT and the ISO have defined a bunch of session, presentation, and application recommendations that the international community and loads of vendors have adopted ๐Ÿ“š. The goal is to offer these higher layers directly in the ARPA Internet, as much as possible, without disrupting the facilities that already exist. That lets users build expertise with ISO and CCITT applications that weren't previously available in the ARPA Internet ๐Ÿงš. It also gives us a smoother convergence and transition from TCP/IP-based networks to ISO-based networks in the medium and long term ๐Ÿซถ.

There are two basic ways to "port" an ISO or CCITT application to a TCP/IP environment ๐Ÿ“. The first option is to port each application separately and develop local protocols on top of TCP. That's useful in the short term, since special-purpose interfaces to TCP can be built quickly, but it lacks generality ๐Ÿ™ˆ.

The second option is based on the fact that both the ARPA Internet protocol suite and the ISO protocol suite are layered systems (though the former uses layering from a more pragmatic perspective) ๐Ÿงฉ. A key part of the layering principle is layer-independence. This section is redundant for most readers, but we need a little background to introduce the concept ๐Ÿ’œ.

Externally, a layer is defined by two definitions:

  • a service-offered definition, which describes the services provided by the layer and the interfaces it provides to access those services; and,
  • a service-required definition, which describes the services used by the layer and the interfaces it uses to access those services.

Collectively, all of the entities in the network which co-operate to provide the service are known as the service-provider. Individually, each of these entities is known as a service-peer ๐Ÿ‘‘.

Internally, a layer is defined by one definition:

  • a protocol definition, which describes the rules which each service-peer uses when communicating with other service-peers.

Putting all this together, the service-provider uses the protocol and services from the layer below to offer its service to the layer above. Protocol verification, for instance, deals with proving that this actually happens (and it's also a fertile field for many Ph.D. dissertations in computer science) ๐ŸŽ“.

The concept of layer-independence is quite simply this:

IF one preserves the services offered by the service-provider

THEN the service-user is completely naive with respect to the
protocol which the service-peers use

For the purposes of this memo, we'll use layer-independence to define a Transport Service Access Point (TSAP) that appears to be identical to the services and interfaces offered by the ISO/CCITT TSAP (as defined in [ISO8072]). But we'll actually implement the ISO TP0 protocol on top of TCP/IP (as defined in [RFC793,RFC791]), not on top of the ISO/CCITT network protocol ๐Ÿฆ‹. Since the transport class 0 protocol is used over the TCP/IP connection, it achieves identical functionality to transport class 4. So ISO/CCITT higher level layers (all session, presentation, and application entities) can operate fully without knowing they're running on a TCP/IP internetwork ๐Ÿ’–.

2. Motivation ๐Ÿ’Œ

When migrating from TCP/IP to the ISO protocols, there are several strategies one might undertake. This memo was written with one particular strategy in mind ๐ŸŽฏ.

The migration strategy this memo uses is based on gatewaying between the TCP/IP and ISO protocol suites at the transport layer. There are two strong arguments for this approach:

  1. Experience teaches us that it takes just as long to get good implementations of the lower level protocols as it takes to get implementations of the higher level ones. In particular, it has been observed that there is still a lot of work being done at the ISO network and transport layers. As a result, implementations of protocols above these layers are not being aggressively pursued. Thus, something must be done "now" to provide a medium in which the higher level protocols can be developed. Since TCP/IP is mature and essentially provides identical functionality, it's an ideal medium to support this development ๐ŸŒธ.
  2. Implementing gateways at the IP and ISO IP layers is probably not of general use in the long term. In effect, this would require each Internet host to support both TP4 and TCP. So a better strategy is to implement a graceful migration path from TCP/IP to ISO protocols for the ARPA Internet, once the ISO protocols have matured sufficiently ๐Ÿ™ˆ.

Both of these arguments indicate that gatewaying should occur at or above the transport layer service access point. Further, the first argument suggests that the best approach is to perform the gatewaying exactly AT the transport service access point, to maximize the number of ISO layers which can be developed ๐Ÿ”ฅ.

NOTE: This memo does not intend to act as a migration or intercept document. It is intended ONLY to meet the needs discussed above. However, it would not be unexpected that the protocol described in this memo might form part of an overall transition plan. The description of such a plan, however, is COMPLETELY beyond the scope of this memo. ๐Ÿ’€

Finally, in general, building gateways between other layers in the TCP/IP and ISO protocol suites is problematic, at best.

To summarize: the primary motivation for the standard described in this memo is to make it easier to gain experience with higher-level ISO protocols (session, presentation, and application). The stability and maturity of TCP/IP are ideal for providing solid transport services, independent of the actual implementation ๐ŸŽ€.

3. The Model ๐Ÿง 

The [ISO8072] standard describes the ISO transport service definition, which from here on is called TP.

ASIDE: This memo references the ISO specifications rather than the CCITT recommendations. The differences between these parallel standards are quite small, and can be ignored, with respect to this memo, without loss of generality. For the relationships, here's the breakdown ๐Ÿ“:
                         Transport service    [ISO8072]       [X.214]
                         Transport protocol   [ISO8073]       [X.224]
                         Session protocol     [ISO8327]       [X.225]

The ISO transport service definition describes the services offered by the TS-provider (transport service) and the interfaces used to access those services. This memo focuses on how the ARPA Transmission Control Protocol (TCP) [RFC793] can be used to offer those services and provide those interfaces โœจ.

      +-----------+                                       +-----------+
      |  TS-user  |                                       |  TS-user  |
      +-----------+                                       +-----------+
           |                                                     |
           | TSAP interface                       TSAP interface |
           |  [ISO8072]                                          |
           |                                                     |
      +----------+   ISO Transport Services on the TCP     +----------+
      |  client  |-----------------------------------------|  server  |
      +----------+              (this memo)                +----------+
           |                                                     |
           | TCP interface                         TCP interface |
           |  [RFC793]                                           |
           |                                                     |

For expository purposes, the following abbreviations are used:

  • TS-peer: a process which implements the protocol described by this memo
  • TS-user: a process talking using the services of a TS-peer
  • TS-provider: the black-box entity implementing the protocol described by this memo

For the purposes of this memo, which describes version 2 of the TSAP protocol, all aspects of [ISO8072] are supported with one exception:

  • Quality of Service parameters

In the spirit of CCITT, this is left "for further study" ๐Ÿ”ฎ. A future version of the protocol will most likely support the QOS parameters for TP by mapping them onto various TCP parameters.

The ISO standards don't specify the format of a session port (termed a TSAP ID). This memo mandates the use of the GOSIP specification [GOSIP86] for the interpretation of this field. (Please refer to Section 5.2, entitled "UPPER LAYERS ADDRESSING".) ๐Ÿงš

Finally, the ISO TSAP is fundamentally symmetric in behavior. There's no underlying client/server model. Instead of a server listening on a well-known port, when a connection is established the TS-provider generates an INDICATION event, which the TS-user presumably catches and acts upon ๐Ÿฆ‹. Although this might be implemented by having a server "listen" by hanging on the INDICATION event, from the perspective of the ISO TSAP, all TS-users just sit around in the IDLE state until they either generate a REQUEST or accept an INDICATION ๐Ÿ’….

4. The Primitives โœจ

okay so this protocol just assumes TCP[RFC793] already gives it these service primitives ๐Ÿ’–:

                                    Events

         connected       - open succeeded (either ACTIVE or PASSIVE)

         connect fails   - ACTIVE open failed

         data ready      - data can be read from the connection

         errored         - the connection has errored and is now closed

         closed          - an orderly disconnection has started

                                     Actions

         listen on port  - PASSIVE open on the given port

         open port       - ACTIVE open to the given port

         read data       - data is read from the connection

         send data       - data is sent on the connection

         close           - the connection is closed (pending data is
                           sent)

the memo then shows how to use those TCP services to fake the primitives that [ISO8073] wants ๐Ÿงš. bestie, this part is giving pure illusion energy ๐Ÿฆ‹:

                                 Events

         N-CONNECT.INDICATION
                          - An NS-user (responder) is notified that
                            connection establishment is in progress


         N-CONNECT.CONFIRMATION
                          - An NS-user (responder) is notified that
                            the connection has been established

         N-DATA.INDICATION
                          - An NS-user is notified that data can be
                            read from the connection

         N-DISCONNECT.INDICATION
                          - An NS-user is notified that the connection
                            is closed

                                Actions

         N-CONNECT.REQUEST
                          - An NS-user (initiator) indicates that it
                            wants to establish a connection

         N-CONNECT.RESPONSE
                          - An NS-user (responder) indicates that it
                            will honor the request

         N-DATA.REQUEST   - An NS-user sends data

         N-DISCONNECT.REQUEST
                          - An NS-user indicates that the connection
                            is to be closed

and then there's the TS-user list, as defined in [ISO8072]. this is the set the protocol actually hands to the TS-user ๐Ÿ’…:

                                    Events

         T-CONNECT.INDICATION
                          - a TS-user (responder) is notified that
                            connection establishment is in progress

         T-CONNECT.CONFIRMATION
                          - a TS-user (initiator) is notified that the
                            connection has been established

         T-DATA.INDICATION
                          - a TS-user is notified that data can be read
                            from the connection

         T-EXPEDITED DATA.INDICATION
                          - a TS-user is notified that "expedited" data
                            can be read from the connection

         T-DISCONNECT.INDICATION
                          - a TS-user is notified that the connection
                            is closed

                                Actions

         T-CONNECT.REQUEST
                          - a TS-user (initiator) indicates that it
                            wants to establish a connection

         T-CONNECT.RESPONSE
                          - a TS-user (responder) indicates that it
                            will honor the request

         T-DATA.REQUEST   - a TS-user sends data

         T-EXPEDITED DATA.REQUEST
                          - a TS-user sends "expedited" data

         T-DISCONNECT.REQUEST
                          - a TS-user indicates that the connection
                            is to be closed

5. The Protocol ๐Ÿ’…

the protocol in this memo is basically the same as the protocol for ISO transport class 0 ๐ŸŒˆ. the differences are these:

  • for testing purposes, initial data may be exchanged during connection establishment
  • for testing purposes, an expedited data service is supported
  • for performance reasons, a much larger TSDU size is supported
  • the network service used by the protocol is provided by the TCP

ISO transport swaps info between peers in chunks called transport protocol data units (TPDUs) ๐ŸŽ€. this protocol wraps those TPDUs up in chunks called TPKTs. the structure of TPKTs and how they relate to TPDUs get covered in the next section ๐Ÿซถ.

PRIMITIVES ๐ŸŽ€

the TCP service primitives map onto the ones transport class 0 expects, and this part is honestly so straightforward ๐Ÿ˜ญ:

                   network service              TCP
                   ---------------              ---
                   CONNECTION ESTABLISHMENT

                       N-CONNECT.REQUEST        open completes

                       N-CONNECT.INDICATION     listen (PASSIVE open)
                                                finishes

                       N-CONNECT.RESPONSE       listen completes

                       N-CONNECT.CONFIRMATION   open (ACTIVE open)
                                                finishes

                   DATA TRANSFER

                       N-DATA.REQUEST           send data

                       N-DATA.INDICATION        data ready followed by

                                                read data

                   CONNECTION RELEASE

                       N-DISCONNECT.REQUEST     close

                       N-DISCONNECT.INDICATION  connection closes or
                                                errors

mapping the parameters is also straightforward ๐Ÿ“:

                     network service             TCP
                     ---------------             ---
                     CONNECTION RELEASE

                         Called address          server's IP address
                                                 (4 octets)

                         Calling address         client's IP address
                                                 (4 octets)

                         all others              ignored

                      DATA TRANSFER

                         NS-user data (NSDU)     data

                      CONNECTION RELEASE

                         all parameters          ignored

CONNECTION ESTABLISHMENT ๐Ÿฆ‹

the connection establishment procedures are the same as the ones in [ISO8073], with three exceptions โœจ.

first, for testing, the connection request and connection confirmation TPDUs can carry initial user data in their user data fields ๐Ÿงช.

second, to experiment with expedited data, the connection request and connection confirmation TPDUs can negotiate expedited data transfer. that uses the negotiation mechanism from [ISO8073], like setting the "use of transport expedited data transfer service" bit in the "Additional Option Selection" variable part. the default is not to use the transport expedited data transfer service ๐Ÿ™ˆ.

third, for good performance, the default TPDU size is 65531 octets instead of 128 octets ๐Ÿš€. if you want a smaller, standard TPDU size, you use the negotiation mechanism from [ISO8073] again, like setting the desired bit in the "TPDU Size" variable part ๐Ÿ’œ.

to perform an N-CONNECT.REQUEST action, the TS-peer does an active open to the desired IP address on TCP port 102. when TCP signals success or failure, that results in an N-CONNECT.INDICATION action ๐ŸŒธ.

to wait for an N-CONNECT.INDICATION event, a server listens on TCP port 102. when a client successfully connects to that port, the event happens and an implicit N-CONNECT.RESPONSE action is performed ๐Ÿงš.

NOTE: In most implementations, a single server will perpetually LISTEN on port 102, handing off connections as they are made

DATA TRANSFER ๐ŸŒธ

the data transfer procedures match the ones in [ISO8073], with one exception: expedited data may be supported (if it was negotiated during connection establishment) by sending a modified ED TPDU, described below ๐Ÿ‘‘. that TPDU goes out on the same TCP connection as all the other TPDUs. this method isn't faithful to the spirit of [ISO8072], but it's true to the letter of the spec ๐Ÿ’€.

to perform an N-DATA.REQUEST action, the TS-peer builds the TPKT it wants and uses the TCP send data primitive ๐Ÿ“.

to trigger an N-DATA.INDICATION action, TCP signals that data is ready, and a TPKT gets read using the TCP read data primitive ๐ŸŒˆ.

CONNECTION RELEASE ๐Ÿซถ

to perform an N-DISCONNECT.REQUEST action, the TS-peer just closes the TCP connection ๐Ÿฆ‹.

if TCP tells the TS-peer that the connection has closed or errored, that counts as an N-DISCONNECT.INDICATION event ๐Ÿ’–.

6. Packet Format โœจ

okay so this part is where things get really fun ๐ŸŽ€. the big difference between TCP and the network service TP0 expects is that TCP just gives you a continuous stream of octets with no boundaries at all ๐ŸŒŠ. TP0 wants info sent and delivered as discrete chunks called network service data units (NSDUs) ๐Ÿ“ฆ. ngl, other transport classes can cram more than one TPDU into a single NSDU, but transport class 0 doesn't do that. so for our purposes, an NSDU is literally the same thing as a TPDU ๐Ÿ’–.

the protocol in this memo uses a simple packetization scheme to delimit TPDUs. each packet, called a TPKT ๐Ÿงš, is an object made of an integral number of octets, and its length is variable ๐Ÿฆ‹.

NOTE: For the purposes of presentation, these objects are shown as being 4 octets (32 bits wide). This representation is an artifact of the style of this memo and should not be interpreted as requiring that a TPKT be a multiple of 4 octets in length.

a TPKT has two parts: a packet-header and a TPDU. the header format is constant no matter what type of packet it is, so it's giving consistency ๐Ÿ’…. here's the packet-header layout:

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |      vrsn     |    reserved   |          packet length        |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

where:

vrsn is 8 bits. This field is always 3 for the version of the protocol described in this memo. ๐ŸŒธ

packet length is 16 bits (min=7, max=65535). This field contains the length of entire packet in octets, including packet-header. This permits a maximum TPDU size of 65531 octets. Based on the size of the data transfer (DT) TPDU, this permits a maximum TSDU size of 65524 octets. ๐Ÿ“

the format of the TPDU is defined in [ISO8073]. note that only TPDUs formatted for transport class 0 are exchanged (different transport classes may use slightly different formats) ๐Ÿซถ.

to support expedited data, a non-standard TPDU for expedited data is permitted ๐Ÿ”ฅ. the format used for the ED TPDU is nearly identical to the format for the normal data, DT, TPDU. the only difference is that the value used for the TPDU's code is ED, not DT:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | header length | code  |credit |TPDU-NR and EOT|   user data   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      ...      |      ...      |      ...      |      ...      |
      |      ...      |      ...      |      ...      |      ...      |
      |      ...      |      ...      |      ...      |      ...      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

after the credit field (which is always ZERO on output and ignored on input), there is one additional field prior to the user data ๐Ÿ“.

TPDU-NR and EOT is 8 bits.

bit 7 (the high-order bit, bit mask 1000 0000) indicates the end of a TSDU. all other bits should be ZERO on output and ignored on input ๐ŸŽฏ.

note that the TP specification limits the size of an expedited transport service data unit (XSDU) to 16 octets ๐Ÿ’œ.


7. Comments ๐Ÿ’ฌ

ok storytime ๐Ÿฆ‹. since the release of RFC983 in April of 1986, we have gained so much experience using ISO transport services on top of the TCP. in September of 1986, we introduced version 2 of the protocol, mostly based on comments from the community ๐Ÿ™Œ.

in January of 1987, we noticed that the differences between version 2 of the protocol and the actual transport class 0 definition were actually quite small. in hindsight, that realization took way longer than it should have ๐Ÿ™ˆ. TP0 is meant to run over a reliable network service, e.g., X.25. the TCP can be used to provide a service of this type, and, if no one complains too loudly, one could state that this memo really just describes a method for encapsulating TP0 inside of TCP! ๐Ÿ‘‘

the changes going from version 1 of the protocol to version 2 and then to version 3 are all relatively small โœจ. initially, when we described version 1, we decided to use the TPDU formats from the ISO transport protocol. this naturally led to the evolution described above ๐ŸŒˆ.


8. References ๐Ÿ“š

  • [GOSIP86] The U.S. Government OSI User's Committee. "Government Open Systems Interconnection Procurement (GOSIP) Specification for Fiscal years 1987 and 1988." (December, 1986) [draft status]
  • [ISO8072] ISO. "International Standard 8072. Information Processing Systems -- Open Systems Interconnection: Transport Service Definition." (June, 1984)
  • [ISO8073] ISO. "International Standard 8073. Information Processing Systems -- Open Systems Interconnection: Transport Protocol Specification." (June, 1984)
  • [ISO8327] ISO. "International Standard 8327. Information Processing Systems -- Open Systems Interconnection: Session Protocol Specification." (June, 1984)
  • [RFC791] Internet Protocol. Request for Comments 791 (MILSTD 1777) (September, 1981)
  • [RFC793] Transmission Control Protocol. Request for Comments 793 (MILSTD 1778) (September, 1981)
  • [RFC983] ISO Transport Services on Top of the TCP. Request for Comments 983 (April, 1986)
  • [X.214] CCITT. "Recommendation X.214. Transport Service Definitions for Open Systems Interconnection (OSI) for CCITT Applications." (October, 1984)
  • [X.224] CCITT. "Recommendation X.224. Transport Protocol Specification for Open Systems Interconnection (OSI) for CCITT Applications." (October, 1984)
  • [X.225] CCITT. "Recommendation X.225. Session Protocol Specification for Open Systems Interconnection (OSI) for CCITT Applications." (October, 1984)
๐Ÿ“ฆ where this page comes from