RFC 1613

cisco Systems X.25 over TCP (XOT)

๐Ÿ“… published May 1994, from ietf

RFC 1613: cisco Systems X.25 over TCP (XOT) ๐ŸŽ€

okay bestie, this one is from the Network Working Group ๐Ÿ’… It's Request for Comments: 1613, the category is Informational (so it's sharing info, not a formal standard), and it's dated May 1994 ๐ŸŒธ

the authors are J. Forster, G. Satz, and G. Glick (all from cisco Systems, Inc.), plus R. Day (from JANET) ๐Ÿซถ the title block doesn't list anything it obsoletes or updates, so there's nothing to flag there โœจ


Status of This Memo โœจ

so this memo provides information for the Internet community ๐Ÿ“– it does not specify an Internet standard of any kind, and distribution of it is unlimited ๐Ÿ’–

Table of Contents ๐Ÿ“š

   1.  Introduction....................................................1
   2.  Conventions.....................................................2
   3.  Relationship Between XOT and X.25...............................2
   4.  Overall Packet Format...........................................3
   4.1   XOT Header....................................................4
   5.  TCP Connection, Port Number, and Logical Channel Numbers (LCNs).4
   6.  XOT Packets.....................................................5
   6.1   Virtual Circuit Setup and Clearing............................5
   6.2   Data and Flow Control.........................................6
   6.3   Interrupt, and Reset Packets..................................8
   6.4   Restart, DTE Reject, Diagnostics, and Registration............8
   6.5   PVC Setup.....................................................8
   7.  Acknowledgments................................................12
   8.  Security Considerations........................................12
   9.  References.....................................................12
  10.  Authors' Addresses.............................................13

1. Introduction ๐Ÿฆ‹

okay so sometimes people want to transport X.25 over IP internets ๐ŸŒ the X.25 Packet Level needs a reliable link level underneath it, and it normally uses LAPB. this memo documents a method for sending X.25 packets over IP internets by encapsulating the X.25 Packet Level inside TCP packets ๐ŸŽ€

TCP gives you a reliable byte stream, but X.25 needs the layer below it to provide message semantics, especially the boundary between packets. so a small (4-byte) XOT header sits between TCP and X.25 ๐Ÿงš its main content is a length field, and that's what separates the X.25 packets inside the TCP stream ๐Ÿ’œ

in general, the normal X.25 protocol packet formats and state transition rules apply to the X.25 layer in XOT. exceptions are noted as we go ๐Ÿ’…

2. Conventions ๐Ÿ“

the following language conventions are used in the items of specification in this document:

  • MUST, SHALL, or MANDATORY: this is an absolute requirement of the specification, no bending it ๐Ÿ’–
  • SHOULD or RECOMMEND: this should generally be followed for all but exceptional circumstances โœจ
  • MAY or OPTIONAL: truly optional! it can be followed or ignored depending on what the implementor needs ๐Ÿฆ‹

some places in this doc have parenthetical material labeled "DISCUSSION" ๐Ÿง  that's there to clarify and explain the text right before it.

3. Relationship Between XOT and X.25 ๐Ÿ”—

so when a networking device (a host, router, etc.) has an X.25 engine (aka a protocol implementation), that engine may be connected to interfaces running LAPB, and/or to logical interfaces running LLC or XOT/TCP/IP ๐ŸŒธ honestly, the XOT layer itself doesn't care what kind of packets the X.25 engine passes to it. but to improve interoperability between separate implementations, this document does specify some behavior of the X.25 engine in certain cases ๐Ÿซถ

this doc mostly talks about XOT from the view of switching X.25 traffic (connecting an X.25 Virtual Circuit between the local X.25 interfaces of two networking devices), but that shouldn't stop a host from offering X.25 connectivity using XOT ๐Ÿ’–

different X.25 standards might call a packet type by a different name, depending on the assigned DTE/DCE role of the interface that originated it. XOT is meant to be insensitive to the DTE/DCE role of the local interfaces at either end of an XOT TCP connection, so for this doc the following terms are interchangeable unless stated otherwise ๐Ÿ‘‘

  • Call, Call Request and Incoming Call
  • Call Confirm, Call Accepted and Call Connected
  • Clear, Clear Request and Clear Indication
  • Clear Confirm, DTE Clear Confirmation and DCE Clear Confirmation
  • Data, DTE Data and DCE Data
  • Interrupt, DTE Interrupt and DCE Interrupt
  • Interrupt Confirm, DTE Interrupt Confirmation and DCE Interrupt Confirmation
  • RR, DTE RR and DCE RR
  • RNR, DTE RNR and DCE RNR
  • REJ, Reject and DTE REJ
  • Reset, Reset Request and Reset Indication
  • Reset Confirm, DTE Reset Confirmation and DCE Reset Confirmation
  • Restart, Restart Request and Restart Indication
  • Restart Confirm, DTE Restart Confirmation and DCE Restart Confirmation

4. Overall Packet Format ๐Ÿ“ฆ

the entire encapsulated packet has the following format:

                  ---------------------------------
                  |                               |
                  |       IP Header               |
                  |                               |
                  ---------------------------------
                  |                               |
                  |       TCP Header              |
                  |                               |
                  ---------------------------------
                  |                               |
                  |       XOT Header              |
                  |                               |
                  ---------------------------------
                  |                               |
                  |       X.25  Packet            |
                  |                               |
                  ---------------------------------

RFC convention is that a packet format is drawn with the data sent first above the data sent later ๐Ÿงš this doc follows that. so even though we're talking about X.25 being transported over TCP, the X.25 part sits lower on the page than the TCP part.

4.1 XOT Header ๐ŸŽ€

the XOT header has this format:

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Version              |           Length              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Version (2 octets) ๐Ÿ”ข

the version number of the XOT protocol is encoded in the first two octets ๐Ÿ’œ the version number MUST be 0, and other values of this field are reserved for future use. if a value other than 0 is received, then the TCP connection MUST be closed. ๐Ÿšจ

Length (2 octets) ๐Ÿ“

the length of the X.25 packet is encoded in the second two octets. values must be legal X.25 packet lengths ๐ŸŒˆ if the Length field has an illegal value, then the TCP connection MUST be closed.

5. TCP Connection, Port Number, and Logical Channel Numbers (LCNs) ๐Ÿ”Œ

a separate TCP connection MUST be used for each X.25 virtual circuit. all connections MUST be made to TCP port number 1998 ๐ŸŽฏ this port number is an IANA Registered Port Number registered by cisco Systems, and cisco has designated it for use by XOT.

the TCP connection MUST be created before the virtual circuit can be established. the TCP connection MAY be maintained after the virtual circuit has been cleared. data MUST NOT be passed along with the TCP SYN packet ๐Ÿšซ

the Logical Channel Number (LCN) field in the X.25 header has no significance and has arbitrary values ๐Ÿ™ˆ a corollary of this is that there is no assignment of one side of the connection to be DTE and the other to be DCE.

DISCUSSION ๐Ÿ’ฌ

consider three devices A, B and C, where A and B both run XOT sessions to C. it's possible that C could receive two calls with the same LCN. unless C's X.25 engine could tell that they came in on different logical (XOT) interfaces, there would be a danger of call collision ๐Ÿ˜ฌ (and honestly, a valid LCN on one interface might not even be valid on a different interface). so C's X.25 engine has to tell the two streams apart, but the LCN field isn't enough to do that. the XOT protocol design decision was to have the XOT layer communicate the stream identification to the X.25 layer ๐Ÿ’€

6. XOT Packets ๐Ÿ’Œ

for each X.25 packet received from the TCP connection that's going out a local interface, an XOT implementation MUST set the packet's logical channel number to the one used on the outgoing interface. for the purposes of this RFC, a logical channel number is the 12 bit field that the X.25 Recommendations confusingly define as the high-order 4 bit "logical channel group number" and low-order 8 bit "logical channel number". the latter phrase is used to refer to both the aggregated 12 bits and the low-order 8 bits ๐Ÿคฏ

an XOT implementation SHOULD NOT modify the X.25 packet header information it received on a local interface when that information is transmitted over the TCP connection ๐Ÿ™…

an XOT implementation MUST modify the X.25 packet header information as required for proper X.25 protocol operation for packets received on a TCP connection that are going to be transmitted over a local interface โœจ

an XOT implementation MAY support connection between interfaces that use different flow control modulos ๐ŸŒŸ if this feature is supported, XOT MUST modify the packet General Format Identifier on all packets received over the TCP connection to set the proper modulus identifier.

6.1. Virtual Circuit Setup and Clearing ๐Ÿ“ž

Once the TCP connection is up, the XOT that opened it sends the X.25 Call packet ๐Ÿ’–. Then one of three things happens: a Call Confirm or Clear packet comes back, the X.25 T11/T21 timeout fires, or the XOT TCP connection gets closed ๐Ÿ˜ญ. The usual X.25 state transitions take it from there โœจ.

Any legal X.25 facility from the X.25 family (including but not limited to the 1980, 1984 and 1988 CCITT X.25 Recommendations) MAY show up in the Call, Call Confirm and Clear packets ๐ŸŽ€. If you get an unknown or unsupported X.25 facility over the TCP connection, it SHOULD be ignored (so it doesn't get passed out the local interface) or treated as an error, depending on what the X.25 standard you're running says ๐Ÿซถ.

Here's the flow control part, and it's a big deal ๐Ÿ‘‘. To keep end-to-end flow control simple, the packet size and window size are always sent explicitly as facilities in the Call packet. The Call packet MUST contain both Packet Size and Window Size facilities. The Call Confirm packet MAY contain these facilities too. If a Call comes in over TCP without one or both of the flow control facilities, that's a local decision. If the XOT accepts that Call anyway, it MUST fill in the missing flow control values that apply to the connection in the Call Confirm packet it sends back ๐Ÿ’….

DISCUSSION ๐Ÿ’ญ

Okay so, X.25 interfaces normally have network default values for packet size and window size ๐Ÿค“. The thinking was that when you connect totally different sites over a TCP/IP network, a network default is hard to pull off in practice ๐Ÿ™ˆ. Without one, every call has to state its own packet size and window size, and that's exactly why the facilities are required. You can expect this to be handled either by the XOT layer itself, or by configuring the X.25 engine so there's no network default on that interface ๐Ÿงš.

After sending a Clear, the TCP connection MAY be closed right away, without waiting for the Clear Confirm ๐Ÿฆ‹. A Clear Confirm received on the TCP connection MAY be quietly thrown away ๐ŸŒธ.

A packet with an invalid X.25 Packet Type Identifier (PTI) that arrives over the TCP connection before a Call has been received (that is, while in the P1 state) MUST be silently discarded ๐Ÿ’€.


6.2. Data and Flow Control ๐ŸŒŠ

DISCUSSION ๐Ÿ’ญ

So X.25 flow control is a local matter, but different implementation choices change how XOT behaves ๐ŸŽ€. There are two main approaches. One is end-to-end flow control, where DATA, RR and RNR packets get sent over the TCP connection as they come in on the local interface. The other is local flow control, where flow control packets (RR, RNR and, if supported, REJ) get sent on a VC based on local criteria. With local flow control, a complete packet sequence of DATA packets can get fragmented or combined, and data packet numbering normally only means something locally between DTE and DCE ๐Ÿงฉ.

Existing XOT implementations do end-to-end flow control ๐Ÿ’–. Data and flow control packets are basically passed straight between the two local interfaces over the TCP connection, with the X.25 header data adjusted as needed for mixed modulo operation โœจ. That doesn't rule out an XOT that does local flow control. For interoperability, though, a local flow control implementation has to run the XOT session so that a connecting end-to-end flow control implementation gets DATA packets of the right size, with flow control fields carrying the proper P(S) and P(R) values ๐Ÿซถ.

An X.25 implementation doing local flow control can also set up a Call between two local interfaces, where each logical channel has its own packet and window sizes. In that setup, DATA packets have to be fragmented or collected between the interfaces, and each interface manages its own distinct packet sequence numbers. XOT operation is really just an extension of this. A VC connects the local interface to an XOT/TCP virtual interface, and each side has its own distinct window and packet sizes ๐Ÿฆ‹.

An XOT that implements local flow control MUST send data packet acknowledgements across the TCP connection for the DATA packets it receives from the TCP connection, using the received packet numbers. It MUST also observe the maximum packet sizes agreed to across the TCP connection ๐Ÿ‘‘.

An XOT implementation MUST NOT assume that an RNR sent across the TCP connection will stop the flow of DATA packets in the other direction. Okay, important bestie moment ๐Ÿ™ˆ. An RNR packet received from the TCP connection MAY cause an RNR packet to be sent across the local interface. End-to-end flow control implementations MAY also pass along the P(R) from an RNR packet received from the TCP connection, by sending an RR packet on the local interface ๐ŸŒˆ.

An XOT implementation that allows mixed-modulo connections and implements end-to-end flow control MUST intervene in the window size negotiation process whenever a modulo 128 Call Request proposes a window size of 8 or larger to an XOT connection serving a modulo 8 interface. The intervention MUST either refuse the connection, or lower the too-large window size(s) to a value that's valid for the interface. It also has to report the final result of the window size negotiation in the Call Confirm packet returned over the TCP connection ๐Ÿ”ฅ.

For any type of flow control implementation that supports mixed modulo connections, both cooperating XOTs MUST interpret the P(S) and P(R) values received from the TCP connection, and perform any flow control operation needed for correct X.25 operation of the local interface ๐Ÿ’…. End-to-end flow control implementations MUST translate between the two modulos and construct the analogous X.25 header P(S) and P(R) fields for DATA, RR and RNR packets ๐Ÿงš.

An XOT implementation MAY support connecting two XOT TCP sessions to each other. If it does, XOT MUST simply connect the two TCP sessions without modifying the data passed through them โญ.


6.3. Interrupt, and Reset Packets โšก

Interrupt, Interrupt Confirm, Reset and Reset Confirm packets get sent over the TCP connection using the normal X.25 packet formats and state transitions ๐Ÿฆ‹. The end-to-end nature of both the Interrupt and Reset services MUST be maintained for correct X.25 operation ๐Ÿซถ.


6.4. Restart, DTE Reject, Diagnostics, and Registration ๐Ÿ“‹

Some X.25 packets only mean something on the local DTE/DCE interface, so they're not for the TCP connection ๐Ÿ™…โ€โ™€๏ธ. Those are Restart, Restart Confirm, DTE Reject, Diagnostic, Registration Request and Registration Confirmation. These packets MUST NOT be sent over the TCP connection. If one of them is received, it MUST be silently discarded ๐ŸŒธ.

6.5 PVC Setup ๐ŸŽ€

Okay bestie, this is where it gets spicy. An XOT implementation MAY support connecting a PVC via XOT. ๐Ÿฆ‹

DISCUSSION ๐Ÿ’ฌ

PVCs are basically circuits that are just... there. They're presumed to be available whenever X.25 service is up (aka the R1 state) ๐ŸŒธ. Connecting one over XOT is kinda complicated because no Call, Call Confirm, Clear, or Clear Confirm packets get transferred (or are even allowed) across the X.25 interface. The network provider already set them up because the users signed up for them, so they exist with zero drama ๐Ÿ’….

Supporting a PVC over XOT means the XOT entities have to exchange data outside the X.25 standards, and that setup has to handle a bunch of error conditions too. Not for the faint of heart ๐Ÿ˜ญ

The setup of a PVC between two XOT entities happens by swapping a non-standard X.25 packet type (wrapped up in an XOT Header) ๐ŸŽ. The exchange kicks off right after a brand-new TCP XOT connection is established. The XOT implementation that opened the TCP connection is the initiator, and the other one is the responder โœจ.

The PVC Setup packet starts with the X.25 General Format Identifier, LCN, and Packet Type Identifier fields, then adds some extra data. Here's what this non-standard packet type looks like:

   +--+--+--+--+--+--+--+--+--+
   | X.25 GFI  |  X.25 LCN    |
   +--+--+--+--+              +
   |                          |
   +--+--+--+--+--+--+--+--+--+
   |        X.25 PTI          | PVC setup PTI (= 0xF5)
   +--+--+--+--+--+--+--+--+--+
   |                          | version (= 0x81)
   +--+--+--+--+--+--+--+--+--+
   |                          | status
   +--+--+--+--+--+--+--+--+--+
   |                          | initiator interface name length (N)
   +--+--+--+--+--+--+--+--+--+
   |                          | initiator LCN (high octet)
   +--+--+--+--+--+--+--+--+--+
   |                          | initiator LCN (low octet)
   +--+--+--+--+--+--+--+--+--+
   |                          | responder interface name length (M)
   +--+--+--+--+--+--+--+--+--+
   |                          | responder LCN (high octet)
   +--+--+--+--+--+--+--+--+--+
   |                          | responder LCN (low octet)
   +--+--+--+--+--+--+--+--+--+
   |                          | sender incoming window
   +--+--+--+--+--+--+--+--+--+
   |                          | sender outgoing window
   +--+--+--+--+--+--+--+--+--+
   |                          | sender incoming max. packet size
   +--+--+--+--+--+--+--+--+--+
   |                          | sender outgoing max. packet size
   +--+--+--+--+--+--+--+--+--+
   |                          | initiator interface name (N octets)
   |                          |
   +--+--+--+--+--+--+--+--+--+
   |                          | responder interface name (M octets)
   |                          |
   +--+--+--+--+--+--+--+--+--+

DISCUSSION ๐Ÿ’ฌ

The PVC setup packet was designed so the responder can just tweak a few fields of what it received and send it straight back to the initiator. Lazy-genius energy honestly ๐Ÿง โœจ

The Packet Type Identifier was picked from the unused X.25 PTI values, so it's never mixed up with the standard ones ๐Ÿ™ˆ

The version value is there to stop connections with older experimental implementations ๐Ÿ’…

The PVC status field has these values defined:

Status    Meaning
------    --------------------------------------
 0x00     Waiting to connect

 0x08     Destination disconnected
 0x09     PVC/TCP connection refused
 0x0A     PVC/TCP routing error
 0x0B     PVC/TCP connect timed out

 0x10     Trying to connect via TCP
 0x11     Awaiting PVC-SETUP reply
 0x12     Connected
 0x13     No such destination interface
 0x14     Destination interface is not up
 0x15     Non-X.25 destination interface
 0x16     No such destination PVC
 0x17     Destination PVC configuration mismatch
 0x18     Mismatched flow control values
 0x19     Can't support flow control values
 0x1A     PVC setup protocol error

DISCUSSION ๐Ÿ’ฌ

Not every status value belongs in a setup packet ๐Ÿค”. This numbering is one implementation's choice: 0x00 through 0x07 is a short connect timer, 0x08 through 0x0F is a long connect timer, and anything above 0x0F means no connect attempt. The ones that actually fit in a setup packet are 0x00 and anything greater than 0x12.

Most of the error statuses are pretty self-explanatory, but a few are sneaky ๐Ÿ‘€. 0x17 ("Destination PVC configuration mismatch") can come back if the targeted PVC already has an XOT PVC connection active. 0x19 ("Can't support flow control values") can show up when the flow control values match, but, for instance, a modulo 8 interface is asked to set up a PVC with a window size bigger than 7, or an interface is asked to use a maximum packet size that's too large for its data link layer to transfer.

An XOT MAY retry a failed PVC setup. If retries are implemented, the XOT SHOULD wait between attempts (5 minutes is suggested) โณ

Each XOT PVC is configured with the identity of the other XOT (that's the IP address), the name of the interface to connect to, the Logical Channel Number on that interface, and the flow control values to use ๐ŸŽ€. These details are carried in the PVC setup packets, and the responding XOT checks that the configurations are compatible.

The interface name fields hold the ASCII names of the two interfaces involved. These names SHOULD be case-insensitive. There MUST NOT be any padding or trailing zero octets between or after the interface names ๐Ÿซถ

The flow control values are from the perspective of the local interface of the XOT implementation that sent the PVC setup packet. Maximum packet size values are encoded the same way as in the packet size facility, meaning the base-2 log of the size in octets. So 7 means a maximum packet size of 128 octets ๐Ÿงฎ. If the responding XOT implements end-to-end flow control, it will require the configured flow control values to be complementary, so a returned status of 0x18 tells you what values the responding XOT needs. (Heads up: the incoming value of one local interface corresponds to the outgoing value of the connecting local interface, and vice versa ๐Ÿ”„.)

After the TCP connection is established, the initiator sends a PVC setup packet, and the status value MUST be 0x00. The responder replies with its own PVC setup packet or closes the TCP connection. An XOT PVC setup is successful if the responder returns a status of 0x00 ๐Ÿฅณ. Once the XOT PVC connection is successfully established, each XOT MUST complete a Reset procedure on the local interface. So if each local interface LCI is in state D1, a Reset packet would be generated both to the local interface and the XOT TCP connection ๐Ÿ’–

An XOT PVC connection is broken by simply closing the TCP connection. X.25 packets that are not legal for PVCs MUST NOT be transferred across an XOT PVC connection ๐Ÿšซ. When a local interface goes through the Restart procedure, the XOT PVC connections MUST be either perform a Reset (which is appropriate if the interface stays in state R1) or close the XOT PVC connection ๐Ÿ”.

DISCUSSION ๐Ÿ’ฌ

An XOT implementation SHOULD also think about how a PVC setup collision gets handled ๐Ÿ‘ฏ. Receiving an XOT PVC setup for a PVC that is itself trying to set up an XOT connection could go one of two ways. It could accept the (valid) setup attempt and, if two TCP XOT connections result, just use one connection to send XOT data (XOT MUST NOT send traffic over both) and accept XOT data on either. Or it can close the incoming attempt and, if no connections result, retry the connection after waiting a random interval ๐ŸŽฒ. If two connections are allowed for a PVC, closing one SHOULD result in closing the other ๐Ÿ’œ.


7. Acknowledgments ๐Ÿ’Œ

Greg Satz is the original designer and implementor of X.25 over TCP, so he gets a massive shoutout ๐Ÿ™Œ. Aviva Garrett of cisco Systems reviewed the specification and made tons of editorial corrections โœจ.


8. Security Considerations ๐Ÿ”’

Security issues are not discussed in this memo. Full stop, no hidden chapter, so take that as the warning it is ๐Ÿ™ˆ

9. References ๐Ÿ“š

[1] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1340, USC/Information Sciences Institute, July 1992.

[2] CCITT, Blue Book Volume VIII--Fascicle VIII.2, "Data Communication Networks: Services and Facilities, Interfaces"; Recommendation X.25, "Interface Between Data Circuit-Terminating Equipment (DCE) for Terminals Operating in the Packet Mode and Connected to Public Data Networks by Dedicated Circuit", 1989, Geneva.


10. Authors' Addresses ๐Ÿงš

James R. Forster ๐Ÿ’–

   James R. Forster
   Engineering Dept.
   cisco Systems
   1525 O'Brien Dr.
   Menlo Park. CA. 94025

   Phone: 1.415.688.8245
   Fax:   1.415.688.8282
   EMail: forster@cisco.com

Greg Satz ๐Ÿ’œ

   Greg Satz
   Engineering Dept.
   cisco Systems
   1525 O'Brien Dr.
   Menlo Park. CA. 94025

   Phone: 1.415.688.8245
   Fax:   1.415.688.8282
   EMail: satz@cisco.com

Gilbert Glick ๐Ÿฆ‹

   Gilbert Glick
   Engineering Dept.
   cisco Systems
   1525 O'Brien Dr.
   Menlo Park. CA. 94025

   Phone: 1.415.688.8245
   Fax:   1.415.688.8282
   EMail: gglick@cisco.com

Bob Day ๐ŸŒธ

   Bob Day
   Joint Network Team
   c/o Rutherford Appleton Laboratory
   Chilton
   Didcot
   Oxfordshire OX11 0QX
   United Kingdom

   Phone: 44.235.44.5163
   Fax:   44.235.44.6251
   EMail: R.Day@jnt.ac.uk

And that's a wrap on the whole spec, bestie ๐ŸŒˆ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from