generic-hdlc.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. Generic HDLC layer
  2. Krzysztof Halasa <khc@pm.waw.pl>
  3. Generic HDLC layer currently supports:
  4. 1. Frame Relay (ANSI, CCITT, Cisco and no LMI).
  5. - Normal (routed) and Ethernet-bridged (Ethernet device emulation)
  6. interfaces can share a single PVC.
  7. - ARP support (no InARP support in the kernel - there is an
  8. experimental InARP user-space daemon available on:
  9. http://www.kernel.org/pub/linux/utils/net/hdlc/).
  10. 2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation.
  11. 3. Cisco HDLC.
  12. 4. PPP (uses syncppp.c).
  13. 5. X.25 (uses X.25 routines).
  14. Generic HDLC is a protocol driver only - it needs a low-level driver
  15. for your particular hardware.
  16. Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible
  17. with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
  18. Make sure the hdlc.o and the hardware driver are loaded. It should
  19. create a number of "hdlc" (hdlc0 etc) network devices, one for each
  20. WAN port. You'll need the "sethdlc" utility, get it from:
  21. http://www.kernel.org/pub/linux/utils/net/hdlc/
  22. Compile sethdlc.c utility:
  23. gcc -O2 -Wall -o sethdlc sethdlc.c
  24. Make sure you're using a correct version of sethdlc for your kernel.
  25. Use sethdlc to set physical interface, clock rate, HDLC mode used,
  26. and add any required PVCs if using Frame Relay.
  27. Usually you want something like:
  28. sethdlc hdlc0 clock int rate 128000
  29. sethdlc hdlc0 cisco interval 10 timeout 25
  30. or
  31. sethdlc hdlc0 rs232 clock ext
  32. sethdlc hdlc0 fr lmi ansi
  33. sethdlc hdlc0 create 99
  34. ifconfig hdlc0 up
  35. ifconfig pvc0 localIP pointopoint remoteIP
  36. In Frame Relay mode, ifconfig master hdlc device up (without assigning
  37. any IP address to it) before using pvc devices.
  38. Setting interface:
  39. * v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
  40. if the card has software-selectable interfaces
  41. loopback - activate hardware loopback (for testing only)
  42. * clock ext - both RX clock and TX clock external
  43. * clock int - both RX clock and TX clock internal
  44. * clock txint - RX clock external, TX clock internal
  45. * clock txfromrx - RX clock external, TX clock derived from RX clock
  46. * rate - sets clock rate in bps (for "int" or "txint" clock only)
  47. Setting protocol:
  48. * hdlc - sets raw HDLC (IP-only) mode
  49. nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code
  50. no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu
  51. crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity
  52. * hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding
  53. as above.
  54. * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported)
  55. interval - time in seconds between keepalive packets
  56. timeout - time in seconds after last received keepalive packet before
  57. we assume the link is down
  58. * ppp - sets synchronous PPP mode
  59. * x25 - sets X.25 mode
  60. * fr - Frame Relay mode
  61. lmi ansi / ccitt / cisco / none - LMI (link management) type
  62. dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
  63. It has nothing to do with clocks!
  64. t391 - link integrity verification polling timer (in seconds) - user
  65. t392 - polling verification timer (in seconds) - network
  66. n391 - full status polling counter - user
  67. n392 - error threshold - both user and network
  68. n393 - monitored events count - both user and network
  69. Frame-Relay only:
  70. * create n | delete n - adds / deletes PVC interface with DLCI #n.
  71. Newly created interface will be named pvc0, pvc1 etc.
  72. * create ether n | delete ether n - adds a device for Ethernet-bridged
  73. frames. The device will be named pvceth0, pvceth1 etc.
  74. Board-specific issues
  75. ---------------------
  76. n2.o and c101.o need parameters to work:
  77. insmod n2 hw=io,irq,ram,ports[:io,irq,...]
  78. example:
  79. insmod n2 hw=0x300,10,0xD0000,01
  80. or
  81. insmod c101 hw=irq,ram[:irq,...]
  82. example:
  83. insmod c101 hw=9,0xdc000
  84. If built into the kernel, these drivers need kernel (command line) parameters:
  85. n2.hw=io,irq,ram,ports:...
  86. or
  87. c101.hw=irq,ram:...
  88. If you have a problem with N2, C101 or PLX200SYN card, you can issue the
  89. "private" command to see port's packet descriptor rings (in kernel logs):
  90. sethdlc hdlc0 private
  91. The hardware driver has to be build with #define DEBUG_RINGS.
  92. Attaching this info to bug reports would be helpful. Anyway, let me know
  93. if you have problems using this.
  94. For patches and other info look at:
  95. <http://www.kernel.org/pub/linux/utils/net/hdlc/>.