RFC 1613
cisco Systems X.25 over TCP (XOT)
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
- ietf: rfc1613 1994-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms