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