README.x25 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. X.25 support within isdn4linux
  2. ==============================
  3. This is alpha/beta test code. Use it completely at your own risk.
  4. As new versions appear, the stuff described here might suddenly change
  5. or become invalid without notice.
  6. Keep in mind:
  7. You are using several new parts of the 2.2.x kernel series which
  8. have not been tested in a large scale. Therefore, you might encounter
  9. more bugs as usual.
  10. - If you connect to an X.25 neighbour not operated by yourself, ASK the
  11. other side first. Be prepared that bugs in the protocol implementation
  12. might result in problems.
  13. - This implementation has never wiped out my whole hard disk yet. But as
  14. this is experimental code, don't blame me if that happened to you.
  15. Backing up important data will never harm.
  16. - Monitor your isdn connections while using this software. This should
  17. prevent you from undesired phone bills in case of driver problems.
  18. How to configure the kernel
  19. ===========================
  20. The ITU-T (former CCITT) X.25 network protocol layer has been implemented
  21. in the Linux source tree since version 2.1.16. The isdn subsystem might be
  22. useful to run X.25 on top of ISDN. If you want to try it, select
  23. "CCITT X.25 Packet Layer"
  24. from the networking options as well as
  25. "ISDN Support" and "X.25 PLP on Top of ISDN"
  26. from the ISDN subsystem options when you configure your kernel for
  27. compilation. You currently also need to enable
  28. "Prompt for development and/or incomplete code/drivers" from the
  29. "Code maturity level options" menu. For the x25trace utility to work
  30. you also need to enable "Packet socket".
  31. For local testing it is also recommended to enable the isdnloop driver
  32. from the isdn subsystem's configuration menu.
  33. For testing, it is recommended that all isdn drivers and the X.25 PLP
  34. protocol are compiled as loadable modules. Like this, you can recover
  35. from certain errors by simply unloading and reloading the modules.
  36. What's it for? How to use it?
  37. =============================
  38. X.25 on top of isdn might be useful with two different scenarios:
  39. - You might want to access a public X.25 data network from your Linux box.
  40. You can use i4l if you were physically connected to the X.25 switch
  41. by an ISDN B-channel (leased line as well as dial up connection should
  42. work).
  43. This corresponds to ITU-T recommendation X.31 Case A (circuit-mode
  44. access to PSPDN [packet switched public data network]).
  45. NOTE: X.31 also covers a Case B (access to PSPDN via virtual
  46. circuit / packet mode service). The latter mode (which in theory
  47. also allows using the D-channel) is not supported by isdn4linux.
  48. It should however be possible to establish such packet mode connections
  49. with certain active isdn cards provided that the firmware supports X.31
  50. and the driver exports this functionality to the user. Currently,
  51. the AVM B1 driver is the only driver which does so. (It should be
  52. possible to access D-channel X.31 with active AVM cards using the
  53. CAPI interface of the AVM-B1 driver).
  54. - Or you might want to operate certain ISDN teleservices on your linux
  55. box. A lot of those teleservices run on top of the ISO-8208
  56. (DTE-DTE mode) network layer protocol. ISO-8208 is essentially the
  57. same as ITU-T X.25.
  58. Popular candidates of such teleservices are EUROfile transfer or any
  59. teleservice applying ITU-T recommendation T.90.
  60. To use the X.25 protocol on top of isdn, just create an isdn network
  61. interface as usual, configure your own and/or peer's ISDN numbers,
  62. and choose x25iface encapsulation by
  63. isdnctrl encap <iface-name> x25iface.
  64. Once encap is set like this, the device can be used by the X.25 packet layer.
  65. All the stuff needed for X.25 is implemented inside the isdn link
  66. level (mainly isdn_net.c and some new source files). Thus, it should
  67. work with every existing HL driver. I was able to successfully open X.25
  68. connections on top of the isdnloop driver and the hisax driver.
  69. "x25iface"-encapsulation bypasses demand dialing. Dialing will be
  70. initiated when the upper (X.25 packet) layer requests the lapb datalink to
  71. be established. But hangup timeout is still active. Whenever a hangup
  72. occurs, all existing X.25 connections on that link will be cleared
  73. It is recommended to use sufficiently large hangup-timeouts for the
  74. isdn interfaces.
  75. In order to set up a conforming protocol stack you also need to
  76. specify the proper l2_prot parameter:
  77. To operate in ISO-8208 X.25 DTE-DTE mode, use
  78. isdnctrl l2_prot <iface-name> x75i
  79. To access an X.25 network switch via isdn (your linux box is the DTE), use
  80. isdnctrl l2_prot <iface-name> x25dte
  81. To mimic an X.25 network switch (DCE side of the connection), use
  82. isdnctrl l2_prot <iface-name> x25dce
  83. However, x25dte or x25dce is currently not supported by any real HL
  84. level driver. The main difference between x75i and x25dte/dce is that
  85. x25d[tc]e uses fixed lap_b addresses. With x75i, the side which
  86. initiates the isdn connection uses the DTE's lap_b address while the
  87. called side used the DCE's lap_b address. Thus, l2_prot x75i might
  88. probably work if you access a public X.25 network as long as the
  89. corresponding isdn connection is set up by you. At least one test
  90. was successful to connect via isdn4linux to an X.25 switch using this
  91. trick. At the switch side, a terminal adapter X.21 was used to connect
  92. it to the isdn.
  93. How to set up a test installation?
  94. ==================================
  95. To test X.25 on top of isdn, you need to get
  96. - a recent version of the "isdnctrl" program that supports setting the new
  97. X.25 specific parameters.
  98. - the x25-utils-2.X package from
  99. ftp://ftp.hes.iki.fi/pub/ham/linux/ax25/x25utils-*
  100. (don't confuse the x25-utils with the ax25-utils)
  101. - an application program that uses linux PF_X25 sockets (some are
  102. contained in the x25-util package).
  103. Before compiling the user level utilities make sure that the compiler/
  104. preprocessor will fetch the proper kernel header files of this kernel
  105. source tree. Either make /usr/include/linux a symbolic link pointing to
  106. this kernel's include/linux directory or set the appropriate compiler flags.
  107. When all drivers and interfaces are loaded and configured you need to
  108. ifconfig the network interfaces up and add X.25-routes to them. Use
  109. the usual ifconfig tool.
  110. ifconfig <iface-name> up
  111. But a special x25route tool (distributed with the x25-util package)
  112. is needed to set up X.25 routes. I.e.
  113. x25route add 01 <iface-name>
  114. will cause all x.25 connections to the destination X.25-address
  115. "01" to be routed to your created isdn network interface.
  116. There are currently no real X.25 applications available. However, for
  117. tests, the x25-utils package contains a modified version of telnet
  118. and telnetd that uses X.25 sockets instead of tcp/ip sockets. You can
  119. use those for your first tests. Furthermore, you might check
  120. ftp://ftp.hamburg.pop.de/pub/LOCAL/linux/i4l-eft/ which contains some
  121. alpha-test implementation ("eftp4linux") of the EUROfile transfer
  122. protocol.
  123. The scripts distributed with the eftp4linux test releases might also
  124. provide useful examples for setting up X.25 on top of isdn.
  125. The x25-utility package also contains an x25trace tool that can be
  126. used to monitor X.25 packets received by the network interfaces.
  127. The /proc/net/x25* files also contain useful information.
  128. - Henner