Import 2.1.99pre2
[davej-history.git] / Documentation / isdn / README.x25
blobcc1b701208c09e94f93adf22d2c81a780af66760
1  
2 X25 support within isdn4linux
5 This is experimental code and should be used with linux version 2.1.72.
6 or later. Use it completely at your own risk.
9 As new versions appear, the stuff described here might suddenly change
10 or become invalid without notice.
12 Keep in mind:
14 You are using an experimental kernel (2.1.x series) with an experimental
15 x25 protocol implementation and experimental x25-on-top-of-isdn extensions.
16 Thus, be prepared to face problems related therefrom.
18 - If you connect to an x25 neighbour not operated by yourself, ASK the
19   other side first. Be prepared that bugs in the protocol implementation
20   might result in problems (even crashing the peer, however such ugly events
21   should only happen if your peer's protocol implementation has serious bugs).
23 - This implementation has never wiped out my whole hard disk yet. But as
24   this is experimental code, don't blame me if that happened to you. Take
25   appropriate actions (such as backing up important data) before
26   trying this code.
28 - Monitor your isdn connections while using this software. This should
29   prevent you from undesired phone bills in case of driver problems.
30   
34 How to configure the kernel
37 The ITU-T (former CCITT) X.25 network protocol layer has been implemented
38 in the Linux source tree since version 2.1.16. The isdn subsystem might be 
39 useful to run X.25 on top of ISDN. If you want to try it, select
41    "CCITT X.25 Packet Layer"
43 from the networking options as well as
45    "ISDN Support" and "X.25 PLP on Top of ISDN"
47 from the ISDN subsystem options when you configure your kernel for
48 compilation. You currently also need to enable
49 "Prompt for development and/or incomplete code/drivers" from the
50 "Code maturity level options" menu. For the x25trace utility to work
51 you also need to enable "Packet socket" (I recommend to choose "y",
52 not "m" for testing) from the networking options.
55 For testing you should also select the isdnloop driver from the
56 isdn subsystem's configuration menu.
60 What's it for? How to use it?
63 X25 on top of isdn might be useful with two different scenarios:
65 - You might want to access a public X.25 data network from your Linux box.
66   You can use i4l if you were physically connected to the X.25 switch
67   by an ISDN line (leased line as well as dial up connection should work,
68   but connecting to x.25 network switches is currently untested. Testing
69   needs to be done by somebody with access to such a switch.) 
71 - Or you might want to operate certain ISDN teleservices on 
72   your linux box. A lot of those teleservices run on top of the ISO-8208 
73   network layer protocol. ISO-8208 is essentially the same as ITU-T X.25.
75   Popular candidates of such teleservices are EUROFILE transfer or any
76   teleservice applying ITU-T recommendation T.90 (i.e., AFAIK, G4 Fax).
78 To use the X.25 protocol on top of isdn, just create an isdn network
79 interface as usual, configure your own and/or peer's ISDN numbers,
80 and choose x25iface encapsulation by
82    isdnctrl encap <iface-name> x25iface.
84 Once encap is set like this, the device can be used by the x25 packet layer.
86 All the stuff needed for x25 is implemented inside the isdn link
87 level (mainly isdn_net.c and some new source files). Thus, it should
88 work with every existing HL driver. I was able to successfully open x25
89 connections on top of the isdnloop driver and the hisax driver.
90 "x25iface"-encapsulation bypasses demand dialing. Dialing will be
91 initiated when the upper (x25 packet) layer requests the lapb datalink to
92 be established. But hangup timeout is still active. The connection
93 will not automatically be re-established by the isdn_net module
94 itself when new data arrives after the hangup timeout. But
95 the x25 network code will re-establish the datalink connection
96 (resulting in re-dialing and an x25 protocol reset) when new data is
97 to be transmitted. (This currently does not work properly with the
98 isdnloop driver, see "known problems" below)
101 In order to set up a conforming protocol stack you also need to
102 specify the proper l2_prot parameter:
104 To operate in ISO-8208  X.25 DTE-DTE mode, use
106    isdnctrl l2_prot <iface-name> x75i
108 To access an X.25 network switch via isdn (your linux box is the DTE), use
110    isdnctrl l2_prot <iface-name> x25dte
112 To mimic an X.25 network switch (DCE side of the connection), use
114    isdnctrl l2_prot <iface-name> x25dce
116 However, x25dte or x25dce is currently not supported by any real HL
117 level driver. The main difference between x75 and x25dte/dce is that
118 x25d[tc]e uses fixed lap_b addresses. With x75i, the side which
119 initiates the isdn connection uses the DTE's lap_b address while the
120 called side used the DCE's lap_b address. Thus, l2_prot x75i will
121 probably work if you access a public x25 network as long as the
122 corresponding isdn connection is set up by you. However, I've never
123 tested this.
127 How to use the test installation?
130 To test x25 on top of isdn, you need to get
132 - a patched version of the "isdnctrl" program that supports setting the new
133   x25 specific parameters.
135 - the x25-utils-2.1.x package from ftp.pspt.fi/pub/ham/linux/ax25
136   or any mirror site (i.e. ftp://ftp.gwdg.de/pub/linux/misc/ax25/).
138 - a kernel patch that enhances isdn4linux to provide x25 network
139   interface support. (This file is part of that kernel patch).
141 - an application that uses linux AF_X25 sockets program. 
143 Before compiling the user level utilities make sure that the compiler/
144 preprocessor will fetch the proper (patched) kernel header files. Either make
145 /usr/include/linux a symbolic link pointing to your developer kernel's
146 include/linux directory or set the appropriate compiler flags.
148 It is recommended that all isdn drivers and the x25 PLP protocol 
149 are compiled as loadable modules. Like this, you can recover
150 from certain errors by simply unloading and reloading the modules.
152 When all drivers and interfaces are loaded and configured you need to
153 ifconfig the network interfaces up and add x25-routes to them. Use
154 the usual ifconfig tool.
156 ifconfig <iface-name> up
158 But a special x25route tool (distributed with the x25-util package)
159 is needed to set up x25 routes. I.e. 
161 x25route add 01 <iface-name>
163 will cause all x.25 connections to the destination x.25-address
164 "01" to be routed to your created isdn network interface.
167 There are currently no real x25 applications available. However, for
168 tests, the x25-utils package contains a modified version of telnet
169 and telnetd that uses x25 sockets instead of tcp/ip sockets. Use
170 this for your first tests. Furthermore, there is an x25.echod and a client
171 named "eftp" (which contains some experimental code to download files
172 from a remote eft server using the EUROfile transfer protocol).
173 It available at ftp://ftp.hamburg.pop.de/pub/LOCAL/linux/i4l-eft/eftp4linux-*
175 The x25-utility package also contains an x25trace tool that can be
176 used to monitor x25 packets received by the network interfaces.
177 The /proc/net/x25* files also contain useful information. 
179 The eftp4linux test release also contains an "ix25test" script that can
180 be used for testing x25 on top of isdn4linux. Edit
181 this script according to your local needs and then call it as
183 ix25test start
185 This will set up a sample configuration using the isdnloop and hisax
186 driver and create some isdn network interfaces.
187 It is recommended that all other isdn drivers and the
188 x25 module are unloaded before calling this script.
192 Known problems and deficiencies:
194 The isdnloop HL driver apparently has problems to re-establish a
195 connection that has been hung up from the outgoing device. You have to
196 unload the isdnloop driver after the faked isdn-connection is closed
197 and insmod it again. With the Hisax driver, this problem is not present.
199 Sometimes the x25 module cannot be unloaded (decrementation of its use
200 count seems to get lost occasionally).
202 Using the x25 based telnet and telnetd programm to establish connection
203 from your own to your own computer repeatedly sometimes totally locked
204 up my system. However, this kernel patch also modifies
205 net/x25/af_x25.c to include a workaround. With this workaround
206 enabled, my system is stable. (If you want to disable the
207 workaround, just undefine ISDN_X25_FIXES in af_x25.c).
209 The latter problem could be reproduced by using hisax as well as the
210 isdnloop driver. It seems that it is not caused by the isdn code.
211 Somehow, the inode of a socket is freed while a process still refers
212 the socket's wait queue. This causes problems when the process tries to
213 remove itself from the wait queue (refered by the dangling
214 sock->sleep pointer) before returning from a select() system call.
216 - Henner