decnet.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. Linux DECnet Networking Layer Information
  2. ===========================================
  3. 1) Other documentation....
  4. o Project Home Pages
  5. http://www.chygwyn.com/DECnet/ - Kernel info
  6. http://linux-decnet.sourceforge.net/ - Userland tools
  7. http://www.sourceforge.net/projects/linux-decnet/ - Status page
  8. 2) Configuring the kernel
  9. Be sure to turn on the following options:
  10. CONFIG_DECNET (obviously)
  11. CONFIG_PROC_FS (to see what's going on)
  12. CONFIG_SYSCTL (for easy configuration)
  13. if you want to try out router support (not properly debugged yet)
  14. you'll need the following options as well...
  15. CONFIG_DECNET_ROUTER (to be able to add/delete routes)
  16. CONFIG_NETFILTER (will be required for the DECnet routing daemon)
  17. CONFIG_DECNET_ROUTE_FWMARK is optional
  18. Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
  19. that you need it, in general you won't and it can cause ifconfig to
  20. malfunction.
  21. Run time configuration has changed slightly from the 2.4 system. If you
  22. want to configure an endnode, then the simplified procedure is as follows:
  23. o Set the MAC address on your ethernet card before starting _any_ other
  24. network protocols.
  25. As soon as your network card is brought into the UP state, DECnet should
  26. start working. If you need something more complicated or are unsure how
  27. to set the MAC address, see the next section. Also all configurations which
  28. worked with 2.4 will work under 2.5 with no change.
  29. 3) Command line options
  30. You can set a DECnet address on the kernel command line for compatibility
  31. with the 2.4 configuration procedure, but in general it's not needed any more.
  32. If you do st a DECnet address on the command line, it has only one purpose
  33. which is that its added to the addresses on the loopback device.
  34. With 2.4 kernels, DECnet would only recognise addresses as local if they
  35. were added to the loopback device. In 2.5, any local interface address
  36. can be used to loop back to the local machine. Of course this does not
  37. prevent you adding further addresses to the loopback device if you
  38. want to.
  39. N.B. Since the address list of an interface determines the addresses for
  40. which "hello" messages are sent, if you don't set an address on the loopback
  41. interface then you won't see any entries in /proc/net/neigh for the local
  42. host until such time as you start a connection. This doesn't affect the
  43. operation of the local communications in any other way though.
  44. The kernel command line takes options looking like the following:
  45. decnet=1,2
  46. the two numbers are the node address 1,2 = 1.2 For 2.2.xx kernels
  47. and early 2.3.xx kernels, you must use a comma when specifying the
  48. DECnet address like this. For more recent 2.3.xx kernels, you may
  49. use almost any character except space, although a `.` would be the most
  50. obvious choice :-)
  51. There used to be a third number specifying the node type. This option
  52. has gone away in favour of a per interface node type. This is now set
  53. using /proc/sys/net/decnet/conf/<dev>/forwarding. This file can be
  54. set with a single digit, 0=EndNode, 1=L1 Router and 2=L2 Router.
  55. There are also equivalent options for modules. The node address can
  56. also be set through the /proc/sys/net/decnet/ files, as can other system
  57. parameters.
  58. Currently the only supported devices are ethernet and ip_gre. The
  59. ethernet address of your ethernet card has to be set according to the DECnet
  60. address of the node in order for it to be autoconfigured (and then appear in
  61. /proc/net/decnet_dev). There is a utility available at the above
  62. FTP sites called dn2ethaddr which can compute the correct ethernet
  63. address to use. The address can be set by ifconfig either before or
  64. at the time the device is brought up. If you are using RedHat you can
  65. add the line:
  66. MACADDR=AA:00:04:00:03:04
  67. or something similar, to /etc/sysconfig/network-scripts/ifcfg-eth0 or
  68. wherever your network card's configuration lives. Setting the MAC address
  69. of your ethernet card to an address starting with "hi-ord" will cause a
  70. DECnet address which matches to be added to the interface (which you can
  71. verify with iproute2).
  72. The default device for routing can be set through the /proc filesystem
  73. by setting /proc/sys/net/decnet/default_device to the
  74. device you want DECnet to route packets out of when no specific route
  75. is available. Usually this will be eth0, for example:
  76. echo -n "eth0" >/proc/sys/net/decnet/default_device
  77. If you don't set the default device, then it will default to the first
  78. ethernet card which has been autoconfigured as described above. You can
  79. confirm that by looking in the default_device file of course.
  80. There is a list of what the other files under /proc/sys/net/decnet/ do
  81. on the kernel patch web site (shown above).
  82. 4) Run time kernel configuration
  83. This is either done through the sysctl/proc interface (see the kernel web
  84. pages for details on what the various options do) or through the iproute2
  85. package in the same way as IPv4/6 configuration is performed.
  86. Documentation for iproute2 is included with the package, although there is
  87. as yet no specific section on DECnet, most of the features apply to both
  88. IP and DECnet, albeit with DECnet addresses instead of IP addresses and
  89. a reduced functionality.
  90. If you want to configure a DECnet router you'll need the iproute2 package
  91. since its the _only_ way to add and delete routes currently. Eventually
  92. there will be a routing daemon to send and receive routing messages for
  93. each interface and update the kernel routing tables accordingly. The
  94. routing daemon will use netfilter to listen to routing packets, and
  95. rtnetlink to update the kernels routing tables.
  96. The DECnet raw socket layer has been removed since it was there purely
  97. for use by the routing daemon which will now use netfilter (a much cleaner
  98. and more generic solution) instead.
  99. 5) How can I tell if its working ?
  100. Here is a quick guide of what to look for in order to know if your DECnet
  101. kernel subsystem is working.
  102. - Is the node address set (see /proc/sys/net/decnet/node_address)
  103. - Is the node of the correct type
  104. (see /proc/sys/net/decnet/conf/<dev>/forwarding)
  105. - Is the Ethernet MAC address of each Ethernet card set to match
  106. the DECnet address. If in doubt use the dn2ethaddr utility available
  107. at the ftp archive.
  108. - If the previous two steps are satisfied, and the Ethernet card is up,
  109. you should find that it is listed in /proc/net/decnet_dev and also
  110. that it appears as a directory in /proc/sys/net/decnet/conf/. The
  111. loopback device (lo) should also appear and is required to communicate
  112. within a node.
  113. - If you have any DECnet routers on your network, they should appear
  114. in /proc/net/decnet_neigh, otherwise this file will only contain the
  115. entry for the node itself (if it doesn't check to see if lo is up).
  116. - If you want to send to any node which is not listed in the
  117. /proc/net/decnet_neigh file, you'll need to set the default device
  118. to point to an Ethernet card with connection to a router. This is
  119. again done with the /proc/sys/net/decnet/default_device file.
  120. - Try starting a simple server and client, like the dnping/dnmirror
  121. over the loopback interface. With luck they should communicate.
  122. For this step and those after, you'll need the DECnet library
  123. which can be obtained from the above ftp sites as well as the
  124. actual utilities themselves.
  125. - If this seems to work, then try talking to a node on your local
  126. network, and see if you can obtain the same results.
  127. - At this point you are on your own... :-)
  128. 6) How to send a bug report
  129. If you've found a bug and want to report it, then there are several things
  130. you can do to help me work out exactly what it is that is wrong. Useful
  131. information (_most_ of which _is_ _essential_) includes:
  132. - What kernel version are you running ?
  133. - What version of the patch are you running ?
  134. - How far though the above set of tests can you get ?
  135. - What is in the /proc/decnet* files and /proc/sys/net/decnet/* files ?
  136. - Which services are you running ?
  137. - Which client caused the problem ?
  138. - How much data was being transferred ?
  139. - Was the network congested ?
  140. - How can the problem be reproduced ?
  141. - Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of
  142. tcpdump don't understand how to dump DECnet properly, so including
  143. the hex listing of the packet contents is _essential_, usually the -x flag.
  144. You may also need to increase the length grabbed with the -s flag. The
  145. -e flag also provides very useful information (ethernet MAC addresses))
  146. 7) MAC FAQ
  147. A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet
  148. interact and how to get the best performance from your hardware.
  149. Ethernet cards are designed to normally only pass received network frames
  150. to a host computer when they are addressed to it, or to the broadcast address.
  151. Linux has an interface which allows the setting of extra addresses for
  152. an ethernet card to listen to. If the ethernet card supports it, the
  153. filtering operation will be done in hardware, if not the extra unwanted packets
  154. received will be discarded by the host computer. In the latter case,
  155. significant processor time and bus bandwidth can be used up on a busy
  156. network (see the NAPI documentation for a longer explanation of these
  157. effects).
  158. DECnet makes use of this interface to allow running DECnet on an ethernet
  159. card which has already been configured using TCP/IP (presumably using the
  160. built in MAC address of the card, as usual) and/or to allow multiple DECnet
  161. addresses on each physical interface. If you do this, be aware that if your
  162. ethernet card doesn't support perfect hashing in its MAC address filter
  163. then your computer will be doing more work than required. Some cards
  164. will simply set themselves into promiscuous mode in order to receive
  165. packets from the DECnet specified addresses. So if you have one of these
  166. cards its better to set the MAC address of the card as described above
  167. to gain the best efficiency. Better still is to use a card which supports
  168. NAPI as well.
  169. 8) Mailing list
  170. If you are keen to get involved in development, or want to ask questions
  171. about configuration, or even just report bugs, then there is a mailing
  172. list that you can join, details are at:
  173. http://sourceforge.net/mail/?group_id=4993
  174. 9) Legal Info
  175. The Linux DECnet project team have placed their code under the GPL. The
  176. software is provided "as is" and without warranty express or implied.
  177. DECnet is a trademark of Compaq. This software is not a product of
  178. Compaq. We acknowledge the help of people at Compaq in providing extra
  179. documentation above and beyond what was previously publicly available.
  180. Steve Whitehouse <SteveW@ACM.org>