xref: /OK3568_Linux_fs/kernel/Documentation/networking/arcnet.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun======
4*4882a593SmuzhiyunARCnet
5*4882a593Smuzhiyun======
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun.. note::
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun   See also arcnet-hardware.txt in this directory for jumper-setting
10*4882a593Smuzhiyun   and cabling information if you're like many of us and didn't happen to get a
11*4882a593Smuzhiyun   manual with your ARCnet card.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunSince no one seems to listen to me otherwise, perhaps a poem will get your
14*4882a593Smuzhiyunattention::
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun		This driver's getting fat and beefy,
17*4882a593Smuzhiyun		But my cat is still named Fifi.
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunHmm, I think I'm allowed to call that a poem, even though it's only two
20*4882a593Smuzhiyunlines.  Hey, I'm in Computer Science, not English.  Give me a break.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunThe point is:  I REALLY REALLY REALLY REALLY REALLY want to hear from you if
23*4882a593Smuzhiyunyou test this and get it working.  Or if you don't.  Or anything.
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was
26*4882a593Smuzhiyunnice, but after that even FEWER people started writing to me because they
27*4882a593Smuzhiyundidn't even have to install the patch.  <sigh>
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunCome on, be a sport!  Send me a success report!
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun(hey, that was even better than my original poem... this is getting bad!)
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun.. warning::
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun   If you don't e-mail me about your success/failure soon, I may be forced to
37*4882a593Smuzhiyun   start SINGING.  And we don't want that, do we?
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun   (You know, it might be argued that I'm pushing this point a little too much.
40*4882a593Smuzhiyun   If you think so, why not flame me in a quick little e-mail?  Please also
41*4882a593Smuzhiyun   include the type of card(s) you're using, software, size of network, and
42*4882a593Smuzhiyun   whether it's working or not.)
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun   My e-mail address is: apenwarr@worldvisions.ca
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunThese are the ARCnet drivers for Linux.
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunThis new release (2.91) has been put together by David Woodhouse
49*4882a593Smuzhiyun<dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support
50*4882a593Smuzhiyunfor yet another chipset. Now the generic support has been separated from the
51*4882a593Smuzhiyunindividual chipset drivers, and the source files aren't quite so packed with
52*4882a593Smuzhiyun#ifdefs! I've changed this file a bit, but kept it in the first person from
53*4882a593SmuzhiyunAvery, because I didn't want to completely rewrite it.
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunThe previous release resulted from many months of on-and-off effort from me
56*4882a593Smuzhiyun(Avery Pennarun), many bug reports/fixes and suggestions from others, and in
57*4882a593Smuzhiyunparticular a lot of input and coding from Tomasz Motylewski.  Starting with
58*4882a593SmuzhiyunARCnet 2.10 ALPHA, Tomasz's all-new-and-improved RFC1051 support has been
59*4882a593Smuzhiyunincluded and seems to be working fine!
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunWhere do I discuss these drivers?
63*4882a593Smuzhiyun---------------------------------
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunTomasz has been so kind as to set up a new and improved mailing list.
66*4882a593SmuzhiyunSubscribe by sending a message with the BODY "subscribe linux-arcnet YOUR
67*4882a593SmuzhiyunREAL NAME" to listserv@tichy.ch.uj.edu.pl.  Then, to submit messages to the
68*4882a593Smuzhiyunlist, mail to linux-arcnet@tichy.ch.uj.edu.pl.
69*4882a593Smuzhiyun
70*4882a593SmuzhiyunThere are archives of the mailing list at:
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun	http://epistolary.org/mailman/listinfo.cgi/arcnet
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunThe people on linux-net@vger.kernel.org (now defunct, replaced by
75*4882a593Smuzhiyunnetdev@vger.kernel.org) have also been known to be very helpful, especially
76*4882a593Smuzhiyunwhen we're talking about ALPHA Linux kernels that may or may not work right
77*4882a593Smuzhiyunin the first place.
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun
80*4882a593SmuzhiyunOther Drivers and Info
81*4882a593Smuzhiyun----------------------
82*4882a593Smuzhiyun
83*4882a593SmuzhiyunYou can try my ARCNET page on the World Wide Web at:
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun	http://www.qis.net/~jschmitz/arcnet/
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunAlso, SMC (one of the companies that makes ARCnet cards) has a WWW site you
88*4882a593Smuzhiyunmight be interested in, which includes several drivers for various cards
89*4882a593Smuzhiyunincluding ARCnet.  Try:
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	http://www.smc.com/
92*4882a593Smuzhiyun
93*4882a593SmuzhiyunPerformance Technologies makes various network software that supports
94*4882a593SmuzhiyunARCnet:
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun	http://www.perftech.com/ or ftp to ftp.perftech.com.
97*4882a593Smuzhiyun
98*4882a593SmuzhiyunNovell makes a networking stack for DOS which includes ARCnet drivers.  Try
99*4882a593SmuzhiyunFTPing to ftp.novell.com.
100*4882a593Smuzhiyun
101*4882a593SmuzhiyunYou can get the Crynwr packet driver collection (including arcether.com, the
102*4882a593Smuzhiyunone you'll want to use with ARCnet cards) from
103*4882a593Smuzhiyunoak.oakland.edu:/simtel/msdos/pktdrvr. It won't work perfectly on a 386+
104*4882a593Smuzhiyunwithout patches, though, and also doesn't like several cards.  Fixed
105*4882a593Smuzhiyunversions are available on my WWW page, or via e-mail if you don't have WWW
106*4882a593Smuzhiyunaccess.
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun
109*4882a593SmuzhiyunInstalling the Driver
110*4882a593Smuzhiyun---------------------
111*4882a593Smuzhiyun
112*4882a593SmuzhiyunAll you will need to do in order to install the driver is::
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun	make config
115*4882a593Smuzhiyun		(be sure to choose ARCnet in the network devices
116*4882a593Smuzhiyun		and at least one chipset driver.)
117*4882a593Smuzhiyun	make clean
118*4882a593Smuzhiyun	make zImage
119*4882a593Smuzhiyun
120*4882a593SmuzhiyunIf you obtained this ARCnet package as an upgrade to the ARCnet driver in
121*4882a593Smuzhiyunyour current kernel, you will need to first copy arcnet.c over the one in
122*4882a593Smuzhiyunthe linux/drivers/net directory.
123*4882a593Smuzhiyun
124*4882a593SmuzhiyunYou will know the driver is installed properly if you get some ARCnet
125*4882a593Smuzhiyunmessages when you reboot into the new Linux kernel.
126*4882a593Smuzhiyun
127*4882a593SmuzhiyunThere are four chipset options:
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun 1. Standard ARCnet COM90xx chipset.
130*4882a593Smuzhiyun
131*4882a593SmuzhiyunThis is the normal ARCnet card, which you've probably got. This is the only
132*4882a593Smuzhiyunchipset driver which will autoprobe if not told where the card is.
133*4882a593SmuzhiyunIt following options on the command line::
134*4882a593Smuzhiyun
135*4882a593Smuzhiyun com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name>
136*4882a593Smuzhiyun
137*4882a593SmuzhiyunIf you load the chipset support as a module, the options are::
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun io=<io> irq=<irq> shmem=<shmem> device=<name>
140*4882a593Smuzhiyun
141*4882a593SmuzhiyunTo disable the autoprobe, just specify "com90xx=" on the kernel command line.
142*4882a593SmuzhiyunTo specify the name alone, but allow autoprobe, just put "com90xx=<name>"
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun 2. ARCnet COM20020 chipset.
145*4882a593Smuzhiyun
146*4882a593SmuzhiyunThis is the new chipset from SMC with support for promiscuous mode (packet
147*4882a593Smuzhiyunsniffing), extra diagnostic information, etc. Unfortunately, there is no
148*4882a593Smuzhiyunsensible method of autoprobing for these cards. You must specify the I/O
149*4882a593Smuzhiyunaddress on the kernel command line.
150*4882a593Smuzhiyun
151*4882a593SmuzhiyunThe command line options are::
152*4882a593Smuzhiyun
153*4882a593Smuzhiyun com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name]
154*4882a593Smuzhiyun
155*4882a593SmuzhiyunIf you load the chipset support as a module, the options are::
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP>
158*4882a593Smuzhiyun timeout=<timeout> device=<name>
159*4882a593Smuzhiyun
160*4882a593SmuzhiyunThe COM20020 chipset allows you to set the node ID in software, overriding the
161*4882a593Smuzhiyundefault which is still set in DIP switches on the card. If you don't have the
162*4882a593SmuzhiyunCOM20020 data sheets, and you don't know what the other three options refer
163*4882a593Smuzhiyunto, then they won't interest you - forget them.
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun 3. ARCnet COM90xx chipset in IO-mapped mode.
166*4882a593Smuzhiyun
167*4882a593SmuzhiyunThis will also work with the normal ARCnet cards, but doesn't use the shared
168*4882a593Smuzhiyunmemory. It performs less well than the above driver, but is provided in case
169*4882a593Smuzhiyunyou have a card which doesn't support shared memory, or (strangely) in case
170*4882a593Smuzhiyunyou have so many ARCnet cards in your machine that you run out of shmem slots.
171*4882a593SmuzhiyunIf you don't give the IO address on the kernel command line, then the driver
172*4882a593Smuzhiyunwill not find the card.
173*4882a593Smuzhiyun
174*4882a593SmuzhiyunThe command line options are::
175*4882a593Smuzhiyun
176*4882a593Smuzhiyun com90io=<io>[,<irq>][,<name>]
177*4882a593Smuzhiyun
178*4882a593SmuzhiyunIf you load the chipset support as a module, the options are:
179*4882a593Smuzhiyun io=<io> irq=<irq> device=<name>
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun 4. ARCnet RIM I cards.
182*4882a593Smuzhiyun
183*4882a593SmuzhiyunThese are COM90xx chips which are _completely_ memory mapped. The support for
184*4882a593Smuzhiyunthese is not tested. If you have one, please mail the author with a success
185*4882a593Smuzhiyunreport. All options must be specified, except the device name.
186*4882a593SmuzhiyunCommand line options::
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun arcrimi=<shmem>,<irq>,<node_ID>[,<name>]
189*4882a593Smuzhiyun
190*4882a593SmuzhiyunIf you load the chipset support as a module, the options are::
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun shmem=<shmem> irq=<irq> node=<node_ID> device=<name>
193*4882a593Smuzhiyun
194*4882a593Smuzhiyun
195*4882a593SmuzhiyunLoadable Module Support
196*4882a593Smuzhiyun-----------------------
197*4882a593Smuzhiyun
198*4882a593SmuzhiyunConfigure and rebuild Linux.  When asked, answer 'm' to "Generic ARCnet
199*4882a593Smuzhiyunsupport" and to support for your ARCnet chipset if you want to use the
200*4882a593Smuzhiyunloadable module. You can also say 'y' to "Generic ARCnet support" and 'm'
201*4882a593Smuzhiyunto the chipset support if you wish.
202*4882a593Smuzhiyun
203*4882a593Smuzhiyun::
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun	make config
206*4882a593Smuzhiyun	make clean
207*4882a593Smuzhiyun	make zImage
208*4882a593Smuzhiyun	make modules
209*4882a593Smuzhiyun
210*4882a593SmuzhiyunIf you're using a loadable module, you need to use insmod to load it, and
211*4882a593Smuzhiyunyou can specify various characteristics of your card on the command
212*4882a593Smuzhiyunline.  (In recent versions of the driver, autoprobing is much more reliable
213*4882a593Smuzhiyunand works as a module, so most of this is now unnecessary.)
214*4882a593Smuzhiyun
215*4882a593SmuzhiyunFor example::
216*4882a593Smuzhiyun
217*4882a593Smuzhiyun	cd /usr/src/linux/modules
218*4882a593Smuzhiyun	insmod arcnet.o
219*4882a593Smuzhiyun	insmod com90xx.o
220*4882a593Smuzhiyun	insmod com20020.o io=0x2e0 device=eth1
221*4882a593Smuzhiyun
222*4882a593Smuzhiyun
223*4882a593SmuzhiyunUsing the Driver
224*4882a593Smuzhiyun----------------
225*4882a593Smuzhiyun
226*4882a593SmuzhiyunIf you build your kernel with ARCnet COM90xx support included, it should
227*4882a593Smuzhiyunprobe for your card automatically when you boot. If you use a different
228*4882a593Smuzhiyunchipset driver complied into the kernel, you must give the necessary options
229*4882a593Smuzhiyunon the kernel command line, as detailed above.
230*4882a593Smuzhiyun
231*4882a593SmuzhiyunGo read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be
232*4882a593Smuzhiyunavailable where you picked up this driver.  Think of your ARCnet as a
233*4882a593Smuzhiyunsouped-up (or down, as the case may be) Ethernet card.
234*4882a593Smuzhiyun
235*4882a593SmuzhiyunBy the way, be sure to change all references from "eth0" to "arc0" in the
236*4882a593SmuzhiyunHOWTOs.  Remember that ARCnet isn't a "true" Ethernet, and the device name
237*4882a593Smuzhiyunis DIFFERENT.
238*4882a593Smuzhiyun
239*4882a593Smuzhiyun
240*4882a593SmuzhiyunMultiple Cards in One Computer
241*4882a593Smuzhiyun------------------------------
242*4882a593Smuzhiyun
243*4882a593SmuzhiyunLinux has pretty good support for this now, but since I've been busy, the
244*4882a593SmuzhiyunARCnet driver has somewhat suffered in this respect. COM90xx support, if
245*4882a593Smuzhiyuncompiled into the kernel, will (try to) autodetect all the installed cards.
246*4882a593Smuzhiyun
247*4882a593SmuzhiyunIf you have other cards, with support compiled into the kernel, then you can
248*4882a593Smuzhiyunjust repeat the options on the kernel command line, e.g.::
249*4882a593Smuzhiyun
250*4882a593Smuzhiyun	LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260
251*4882a593Smuzhiyun
252*4882a593SmuzhiyunIf you have the chipset support built as a loadable module, then you need to
253*4882a593Smuzhiyundo something like this::
254*4882a593Smuzhiyun
255*4882a593Smuzhiyun	insmod -o arc0 com90xx
256*4882a593Smuzhiyun	insmod -o arc1 com20020 io=0x2e0
257*4882a593Smuzhiyun	insmod -o arc2 com90xx
258*4882a593Smuzhiyun
259*4882a593SmuzhiyunThe ARCnet drivers will now sort out their names automatically.
260*4882a593Smuzhiyun
261*4882a593Smuzhiyun
262*4882a593SmuzhiyunHow do I get it to work with...?
263*4882a593Smuzhiyun--------------------------------
264*4882a593Smuzhiyun
265*4882a593SmuzhiyunNFS:
266*4882a593Smuzhiyun	Should be fine linux->linux, just pretend you're using Ethernet cards.
267*4882a593Smuzhiyun	oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients.  There
268*4882a593Smuzhiyun	is also a DOS-based NFS server called SOSS.  It doesn't multitask
269*4882a593Smuzhiyun	quite the way Linux does (actually, it doesn't multitask AT ALL) but
270*4882a593Smuzhiyun	you never know what you might need.
271*4882a593Smuzhiyun
272*4882a593Smuzhiyun	With AmiTCP (and possibly others), you may need to set the following
273*4882a593Smuzhiyun	options in your Amiga nfstab:  MD 1024 MR 1024 MW 1024
274*4882a593Smuzhiyun	(Thanks to Christian Gottschling <ferksy@indigo.tng.oche.de>
275*4882a593Smuzhiyun	for this.)
276*4882a593Smuzhiyun
277*4882a593Smuzhiyun	Probably these refer to maximum NFS data/read/write block sizes.  I
278*4882a593Smuzhiyun	don't know why the defaults on the Amiga didn't work; write to me if
279*4882a593Smuzhiyun	you know more.
280*4882a593Smuzhiyun
281*4882a593SmuzhiyunDOS:
282*4882a593Smuzhiyun	If you're using the freeware arcether.com, you might want to install
283*4882a593Smuzhiyun	the driver patch from my web page.  It helps with PC/TCP, and also
284*4882a593Smuzhiyun	can get arcether to load if it timed out too quickly during
285*4882a593Smuzhiyun	initialization.  In fact, if you use it on a 386+ you REALLY need
286*4882a593Smuzhiyun	the patch, really.
287*4882a593Smuzhiyun
288*4882a593SmuzhiyunWindows:
289*4882a593Smuzhiyun	See DOS :)  Trumpet Winsock works fine with either the Novell or
290*4882a593Smuzhiyun	Arcether client, assuming you remember to load winpkt of course.
291*4882a593Smuzhiyun
292*4882a593SmuzhiyunLAN Manager and Windows for Workgroups:
293*4882a593Smuzhiyun	These programs use protocols that
294*4882a593Smuzhiyun	are incompatible with the Internet standard.  They try to pretend
295*4882a593Smuzhiyun	the cards are Ethernet, and confuse everyone else on the network.
296*4882a593Smuzhiyun
297*4882a593Smuzhiyun	However, v2.00 and higher of the Linux ARCnet driver supports this
298*4882a593Smuzhiyun	protocol via the 'arc0e' device.  See the section on "Multiprotocol
299*4882a593Smuzhiyun	Support" for more information.
300*4882a593Smuzhiyun
301*4882a593Smuzhiyun	Using the freeware Samba server and clients for Linux, you can now
302*4882a593Smuzhiyun	interface quite nicely with TCP/IP-based WfWg or Lan Manager
303*4882a593Smuzhiyun	networks.
304*4882a593Smuzhiyun
305*4882a593SmuzhiyunWindows 95:
306*4882a593Smuzhiyun	Tools are included with Win95 that let you use either the LANMAN
307*4882a593Smuzhiyun	style network drivers (NDIS) or Novell drivers (ODI) to handle your
308*4882a593Smuzhiyun	ARCnet packets.  If you use ODI, you'll need to use the 'arc0'
309*4882a593Smuzhiyun	device with Linux.  If you use NDIS, then try the 'arc0e' device.
310*4882a593Smuzhiyun	See the "Multiprotocol Support" section below if you need arc0e,
311*4882a593Smuzhiyun	you're completely insane, and/or you need to build some kind of
312*4882a593Smuzhiyun	hybrid network that uses both encapsulation types.
313*4882a593Smuzhiyun
314*4882a593SmuzhiyunOS/2:
315*4882a593Smuzhiyun	I've been told it works under Warp Connect with an ARCnet driver from
316*4882a593Smuzhiyun	SMC.  You need to use the 'arc0e' interface for this.  If you get
317*4882a593Smuzhiyun	the SMC driver to work with the TCP/IP stuff included in the
318*4882a593Smuzhiyun	"normal" Warp Bonus Pack, let me know.
319*4882a593Smuzhiyun
320*4882a593Smuzhiyun	ftp.microsoft.com also has a freeware "Lan Manager for OS/2" client
321*4882a593Smuzhiyun	which should use the same protocol as WfWg does.  I had no luck
322*4882a593Smuzhiyun	installing it under Warp, however.  Please mail me with any results.
323*4882a593Smuzhiyun
324*4882a593SmuzhiyunNetBSD/AmiTCP:
325*4882a593Smuzhiyun	These use an old version of the Internet standard ARCnet
326*4882a593Smuzhiyun	protocol (RFC1051) which is compatible with the Linux driver v2.10
327*4882a593Smuzhiyun	ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet"
328*4882a593Smuzhiyun	below.)  ** Newer versions of NetBSD apparently support RFC1201.
329*4882a593Smuzhiyun
330*4882a593Smuzhiyun
331*4882a593SmuzhiyunUsing Multiprotocol ARCnet
332*4882a593Smuzhiyun--------------------------
333*4882a593Smuzhiyun
334*4882a593SmuzhiyunThe ARCnet driver v2.10 ALPHA supports three protocols, each on its own
335*4882a593Smuzhiyun"virtual network device":
336*4882a593Smuzhiyun
337*4882a593Smuzhiyun	======  ===============================================================
338*4882a593Smuzhiyun	arc0	RFC1201 protocol, the official Internet standard which just
339*4882a593Smuzhiyun		happens to be 100% compatible with Novell's TRXNET driver.
340*4882a593Smuzhiyun		Version 1.00 of the ARCnet driver supported _only_ this
341*4882a593Smuzhiyun		protocol.  arc0 is the fastest of the three protocols (for
342*4882a593Smuzhiyun		whatever reason), and allows larger packets to be used
343*4882a593Smuzhiyun		because it supports RFC1201 "packet splitting" operations.
344*4882a593Smuzhiyun		Unless you have a specific need to use a different protocol,
345*4882a593Smuzhiyun		I strongly suggest that you stick with this one.
346*4882a593Smuzhiyun
347*4882a593Smuzhiyun	arc0e	"Ethernet-Encapsulation" which sends packets over ARCnet
348*4882a593Smuzhiyun		that are actually a lot like Ethernet packets, including the
349*4882a593Smuzhiyun		6-byte hardware addresses.  This protocol is compatible with
350*4882a593Smuzhiyun		Microsoft's NDIS ARCnet driver, like the one in WfWg and
351*4882a593Smuzhiyun		LANMAN.  Because the MTU of 493 is actually smaller than the
352*4882a593Smuzhiyun		one "required" by TCP/IP (576), there is a chance that some
353*4882a593Smuzhiyun		network operations will not function properly.  The Linux
354*4882a593Smuzhiyun		TCP/IP layer can compensate in most cases, however, by
355*4882a593Smuzhiyun		automatically fragmenting the TCP/IP packets to make them
356*4882a593Smuzhiyun		fit.  arc0e also works slightly more slowly than arc0, for
357*4882a593Smuzhiyun		reasons yet to be determined.  (Probably it's the smaller
358*4882a593Smuzhiyun		MTU that does it.)
359*4882a593Smuzhiyun
360*4882a593Smuzhiyun	arc0s	The "[s]imple" RFC1051 protocol is the "previous" Internet
361*4882a593Smuzhiyun		standard that is completely incompatible with the new
362*4882a593Smuzhiyun		standard.  Some software today, however, continues to
363*4882a593Smuzhiyun		support the old standard (and only the old standard)
364*4882a593Smuzhiyun		including NetBSD and AmiTCP.  RFC1051 also does not support
365*4882a593Smuzhiyun		RFC1201's packet splitting, and the MTU of 507 is still
366*4882a593Smuzhiyun		smaller than the Internet "requirement," so it's quite
367*4882a593Smuzhiyun		possible that you may run into problems.  It's also slower
368*4882a593Smuzhiyun		than RFC1201 by about 25%, for the same reason as arc0e.
369*4882a593Smuzhiyun
370*4882a593Smuzhiyun		The arc0s support was contributed by Tomasz Motylewski
371*4882a593Smuzhiyun		and modified somewhat by me.  Bugs are probably my fault.
372*4882a593Smuzhiyun	======  ===============================================================
373*4882a593Smuzhiyun
374*4882a593SmuzhiyunYou can choose not to compile arc0e and arc0s into the driver if you want -
375*4882a593Smuzhiyunthis will save you a bit of memory and avoid confusion when eg. trying to
376*4882a593Smuzhiyunuse the "NFS-root" stuff in recent Linux kernels.
377*4882a593Smuzhiyun
378*4882a593SmuzhiyunThe arc0e and arc0s devices are created automatically when you first
379*4882a593Smuzhiyunifconfig the arc0 device.  To actually use them, though, you need to also
380*4882a593Smuzhiyunifconfig the other virtual devices you need.  There are a number of ways you
381*4882a593Smuzhiyuncan set up your network then:
382*4882a593Smuzhiyun
383*4882a593Smuzhiyun
384*4882a593Smuzhiyun1. Single Protocol.
385*4882a593Smuzhiyun
386*4882a593Smuzhiyun   This is the simplest way to configure your network: use just one of the
387*4882a593Smuzhiyun   two available protocols.  As mentioned above, it's a good idea to use
388*4882a593Smuzhiyun   only arc0 unless you have a good reason (like some other software, ie.
389*4882a593Smuzhiyun   WfWg, that only works with arc0e).
390*4882a593Smuzhiyun
391*4882a593Smuzhiyun   If you need only arc0, then the following commands should get you going::
392*4882a593Smuzhiyun
393*4882a593Smuzhiyun	ifconfig arc0 MY.IP.ADD.RESS
394*4882a593Smuzhiyun	route add MY.IP.ADD.RESS arc0
395*4882a593Smuzhiyun	route add -net SUB.NET.ADD.RESS arc0
396*4882a593Smuzhiyun	[add other local routes here]
397*4882a593Smuzhiyun
398*4882a593Smuzhiyun   If you need arc0e (and only arc0e), it's a little different::
399*4882a593Smuzhiyun
400*4882a593Smuzhiyun	ifconfig arc0 MY.IP.ADD.RESS
401*4882a593Smuzhiyun	ifconfig arc0e MY.IP.ADD.RESS
402*4882a593Smuzhiyun	route add MY.IP.ADD.RESS arc0e
403*4882a593Smuzhiyun	route add -net SUB.NET.ADD.RESS arc0e
404*4882a593Smuzhiyun
405*4882a593Smuzhiyun   arc0s works much the same way as arc0e.
406*4882a593Smuzhiyun
407*4882a593Smuzhiyun
408*4882a593Smuzhiyun2. More than one protocol on the same wire.
409*4882a593Smuzhiyun
410*4882a593Smuzhiyun   Now things start getting confusing.  To even try it, you may need to be
411*4882a593Smuzhiyun   partly crazy.  Here's what *I* did. :) Note that I don't include arc0s in
412*4882a593Smuzhiyun   my home network; I don't have any NetBSD or AmiTCP computers, so I only
413*4882a593Smuzhiyun   use arc0s during limited testing.
414*4882a593Smuzhiyun
415*4882a593Smuzhiyun   I have three computers on my home network; two Linux boxes (which prefer
416*4882a593Smuzhiyun   RFC1201 protocol, for reasons listed above), and one XT that can't run
417*4882a593Smuzhiyun   Linux but runs the free Microsoft LANMAN Client instead.
418*4882a593Smuzhiyun
419*4882a593Smuzhiyun   Worse, one of the Linux computers (freedom) also has a modem and acts as
420*4882a593Smuzhiyun   a router to my Internet provider.  The other Linux box (insight) also has
421*4882a593Smuzhiyun   its own IP address and needs to use freedom as its default gateway.  The
422*4882a593Smuzhiyun   XT (patience), however, does not have its own Internet IP address and so
423*4882a593Smuzhiyun   I assigned it one on a "private subnet" (as defined by RFC1597).
424*4882a593Smuzhiyun
425*4882a593Smuzhiyun   To start with, take a simple network with just insight and freedom.
426*4882a593Smuzhiyun   Insight needs to:
427*4882a593Smuzhiyun
428*4882a593Smuzhiyun	- talk to freedom via RFC1201 (arc0) protocol, because I like it
429*4882a593Smuzhiyun	  more and it's faster.
430*4882a593Smuzhiyun	- use freedom as its Internet gateway.
431*4882a593Smuzhiyun
432*4882a593Smuzhiyun   That's pretty easy to do.  Set up insight like this::
433*4882a593Smuzhiyun
434*4882a593Smuzhiyun	ifconfig arc0 insight
435*4882a593Smuzhiyun	route add insight arc0
436*4882a593Smuzhiyun	route add freedom arc0	/* I would use the subnet here (like I said
437*4882a593Smuzhiyun					to in "single protocol" above),
438*4882a593Smuzhiyun					but the rest of the subnet
439*4882a593Smuzhiyun					unfortunately lies across the PPP
440*4882a593Smuzhiyun					link on freedom, which confuses
441*4882a593Smuzhiyun					things. */
442*4882a593Smuzhiyun	route add default gw freedom
443*4882a593Smuzhiyun
444*4882a593Smuzhiyun   And freedom gets configured like so::
445*4882a593Smuzhiyun
446*4882a593Smuzhiyun	ifconfig arc0 freedom
447*4882a593Smuzhiyun	route add freedom arc0
448*4882a593Smuzhiyun	route add insight arc0
449*4882a593Smuzhiyun	/* and default gateway is configured by pppd */
450*4882a593Smuzhiyun
451*4882a593Smuzhiyun   Great, now insight talks to freedom directly on arc0, and sends packets
452*4882a593Smuzhiyun   to the Internet through freedom.  If you didn't know how to do the above,
453*4882a593Smuzhiyun   you should probably stop reading this section now because it only gets
454*4882a593Smuzhiyun   worse.
455*4882a593Smuzhiyun
456*4882a593Smuzhiyun   Now, how do I add patience into the network?  It will be using LANMAN
457*4882a593Smuzhiyun   Client, which means I need the arc0e device.  It needs to be able to talk
458*4882a593Smuzhiyun   to both insight and freedom, and also use freedom as a gateway to the
459*4882a593Smuzhiyun   Internet.  (Recall that patience has a "private IP address" which won't
460*4882a593Smuzhiyun   work on the Internet; that's okay, I configured Linux IP masquerading on
461*4882a593Smuzhiyun   freedom for this subnet).
462*4882a593Smuzhiyun
463*4882a593Smuzhiyun   So patience (necessarily; I don't have another IP number from my
464*4882a593Smuzhiyun   provider) has an IP address on a different subnet than freedom and
465*4882a593Smuzhiyun   insight, but needs to use freedom as an Internet gateway.  Worse, most
466*4882a593Smuzhiyun   DOS networking programs, including LANMAN, have braindead networking
467*4882a593Smuzhiyun   schemes that rely completely on the netmask and a 'default gateway' to
468*4882a593Smuzhiyun   determine how to route packets.  This means that to get to freedom or
469*4882a593Smuzhiyun   insight, patience WILL send through its default gateway, regardless of
470*4882a593Smuzhiyun   the fact that both freedom and insight (courtesy of the arc0e device)
471*4882a593Smuzhiyun   could understand a direct transmission.
472*4882a593Smuzhiyun
473*4882a593Smuzhiyun   I compensate by giving freedom an extra IP address - aliased 'gatekeeper' -
474*4882a593Smuzhiyun   that is on my private subnet, the same subnet that patience is on.  I
475*4882a593Smuzhiyun   then define gatekeeper to be the default gateway for patience.
476*4882a593Smuzhiyun
477*4882a593Smuzhiyun   To configure freedom (in addition to the commands above)::
478*4882a593Smuzhiyun
479*4882a593Smuzhiyun	ifconfig arc0e gatekeeper
480*4882a593Smuzhiyun	route add gatekeeper arc0e
481*4882a593Smuzhiyun	route add patience arc0e
482*4882a593Smuzhiyun
483*4882a593Smuzhiyun   This way, freedom will send all packets for patience through arc0e,
484*4882a593Smuzhiyun   giving its IP address as gatekeeper (on the private subnet).  When it
485*4882a593Smuzhiyun   talks to insight or the Internet, it will use its "freedom" Internet IP
486*4882a593Smuzhiyun   address.
487*4882a593Smuzhiyun
488*4882a593Smuzhiyun   You will notice that we haven't configured the arc0e device on insight.
489*4882a593Smuzhiyun   This would work, but is not really necessary, and would require me to
490*4882a593Smuzhiyun   assign insight another special IP number from my private subnet.  Since
491*4882a593Smuzhiyun   both insight and patience are using freedom as their default gateway, the
492*4882a593Smuzhiyun   two can already talk to each other.
493*4882a593Smuzhiyun
494*4882a593Smuzhiyun   It's quite fortunate that I set things up like this the first time (cough
495*4882a593Smuzhiyun   cough) because it's really handy when I boot insight into DOS.  There, it
496*4882a593Smuzhiyun   runs the Novell ODI protocol stack, which only works with RFC1201 ARCnet.
497*4882a593Smuzhiyun   In this mode it would be impossible for insight to communicate directly
498*4882a593Smuzhiyun   with patience, since the Novell stack is incompatible with Microsoft's
499*4882a593Smuzhiyun   Ethernet-Encap.  Without changing any settings on freedom or patience, I
500*4882a593Smuzhiyun   simply set freedom as the default gateway for insight (now in DOS,
501*4882a593Smuzhiyun   remember) and all the forwarding happens "automagically" between the two
502*4882a593Smuzhiyun   hosts that would normally not be able to communicate at all.
503*4882a593Smuzhiyun
504*4882a593Smuzhiyun   For those who like diagrams, I have created two "virtual subnets" on the
505*4882a593Smuzhiyun   same physical ARCnet wire.  You can picture it like this::
506*4882a593Smuzhiyun
507*4882a593Smuzhiyun
508*4882a593Smuzhiyun	  [RFC1201 NETWORK]                   [ETHER-ENCAP NETWORK]
509*4882a593Smuzhiyun      (registered Internet subnet)           (RFC1597 private subnet)
510*4882a593Smuzhiyun
511*4882a593Smuzhiyun			     (IP Masquerade)
512*4882a593Smuzhiyun	  /---------------\         *            /---------------\
513*4882a593Smuzhiyun	  |               |         *            |               |
514*4882a593Smuzhiyun	  |               +-Freedom-*-Gatekeeper-+               |
515*4882a593Smuzhiyun	  |               |    |    *            |               |
516*4882a593Smuzhiyun	  \-------+-------/    |    *            \-------+-------/
517*4882a593Smuzhiyun		  |            |                         |
518*4882a593Smuzhiyun	       Insight         |                      Patience
519*4882a593Smuzhiyun			   (Internet)
520*4882a593Smuzhiyun
521*4882a593Smuzhiyun
522*4882a593Smuzhiyun
523*4882a593SmuzhiyunIt works: what now?
524*4882a593Smuzhiyun-------------------
525*4882a593Smuzhiyun
526*4882a593SmuzhiyunSend mail describing your setup, preferably including driver version, kernel
527*4882a593Smuzhiyunversion, ARCnet card model, CPU type, number of systems on your network, and
528*4882a593Smuzhiyunlist of software in use to me at the following address:
529*4882a593Smuzhiyun
530*4882a593Smuzhiyun	apenwarr@worldvisions.ca
531*4882a593Smuzhiyun
532*4882a593SmuzhiyunI do send (sometimes automated) replies to all messages I receive.  My email
533*4882a593Smuzhiyuncan be weird (and also usually gets forwarded all over the place along the
534*4882a593Smuzhiyunway to me), so if you don't get a reply within a reasonable time, please
535*4882a593Smuzhiyunresend.
536*4882a593Smuzhiyun
537*4882a593Smuzhiyun
538*4882a593SmuzhiyunIt doesn't work: what now?
539*4882a593Smuzhiyun--------------------------
540*4882a593Smuzhiyun
541*4882a593SmuzhiyunDo the same as above, but also include the output of the ifconfig and route
542*4882a593Smuzhiyuncommands, as well as any pertinent log entries (ie. anything that starts
543*4882a593Smuzhiyunwith "arcnet:" and has shown up since the last reboot) in your mail.
544*4882a593Smuzhiyun
545*4882a593SmuzhiyunIf you want to try fixing it yourself (I strongly recommend that you mail me
546*4882a593Smuzhiyunabout the problem first, since it might already have been solved) you may
547*4882a593Smuzhiyunwant to try some of the debug levels available.  For heavy testing on
548*4882a593SmuzhiyunD_DURING or more, it would be a REALLY good idea to kill your klogd daemon
549*4882a593Smuzhiyunfirst!  D_DURING displays 4-5 lines for each packet sent or received.  D_TX,
550*4882a593SmuzhiyunD_RX, and D_SKB actually DISPLAY each packet as it is sent or received,
551*4882a593Smuzhiyunwhich is obviously quite big.
552*4882a593Smuzhiyun
553*4882a593SmuzhiyunStarting with v2.40 ALPHA, the autoprobe routines have changed
554*4882a593Smuzhiyunsignificantly.  In particular, they won't tell you why the card was not
555*4882a593Smuzhiyunfound unless you turn on the D_INIT_REASONS debugging flag.
556*4882a593Smuzhiyun
557*4882a593SmuzhiyunOnce the driver is running, you can run the arcdump shell script (available
558*4882a593Smuzhiyunfrom me or in the full ARCnet package, if you have it) as root to list the
559*4882a593Smuzhiyuncontents of the arcnet buffers at any time.  To make any sense at all out of
560*4882a593Smuzhiyunthis, you should grab the pertinent RFCs. (some are listed near the top of
561*4882a593Smuzhiyunarcnet.c).  arcdump assumes your card is at 0xD0000.  If it isn't, edit the
562*4882a593Smuzhiyunscript.
563*4882a593Smuzhiyun
564*4882a593SmuzhiyunBuffers 0 and 1 are used for receiving, and Buffers 2 and 3 are for sending.
565*4882a593SmuzhiyunPing-pong buffers are implemented both ways.
566*4882a593Smuzhiyun
567*4882a593SmuzhiyunIf your debug level includes D_DURING and you did NOT define SLOW_XMIT_COPY,
568*4882a593Smuzhiyunthe buffers are cleared to a constant value of 0x42 every time the card is
569*4882a593Smuzhiyunreset (which should only happen when you do an ifconfig up, or when Linux
570*4882a593Smuzhiyundecides that the driver is broken).  During a transmit, unused parts of the
571*4882a593Smuzhiyunbuffer will be cleared to 0x42 as well.  This is to make it easier to figure
572*4882a593Smuzhiyunout which bytes are being used by a packet.
573*4882a593Smuzhiyun
574*4882a593SmuzhiyunYou can change the debug level without recompiling the kernel by typing::
575*4882a593Smuzhiyun
576*4882a593Smuzhiyun	ifconfig arc0 down metric 1xxx
577*4882a593Smuzhiyun	/etc/rc.d/rc.inet1
578*4882a593Smuzhiyun
579*4882a593Smuzhiyunwhere "xxx" is the debug level you want.  For example, "metric 1015" would put
580*4882a593Smuzhiyunyou at debug level 15.  Debug level 7 is currently the default.
581*4882a593Smuzhiyun
582*4882a593SmuzhiyunNote that the debug level is (starting with v1.90 ALPHA) a binary
583*4882a593Smuzhiyuncombination of different debug flags; so debug level 7 is really 1+2+4 or
584*4882a593SmuzhiyunD_NORMAL+D_EXTRA+D_INIT.  To include D_DURING, you would add 16 to this,
585*4882a593Smuzhiyunresulting in debug level 23.
586*4882a593Smuzhiyun
587*4882a593SmuzhiyunIf you don't understand that, you probably don't want to know anyway.
588*4882a593SmuzhiyunE-mail me about your problem.
589*4882a593Smuzhiyun
590*4882a593Smuzhiyun
591*4882a593SmuzhiyunI want to send money: what now?
592*4882a593Smuzhiyun-------------------------------
593*4882a593Smuzhiyun
594*4882a593SmuzhiyunGo take a nap or something.  You'll feel better in the morning.
595