162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci======
462306a36Sopenharmony_ciARCnet
562306a36Sopenharmony_ci======
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci.. note::
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci   See also arcnet-hardware.txt in this directory for jumper-setting
1062306a36Sopenharmony_ci   and cabling information if you're like many of us and didn't happen to get a
1162306a36Sopenharmony_ci   manual with your ARCnet card.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciSince no one seems to listen to me otherwise, perhaps a poem will get your
1462306a36Sopenharmony_ciattention::
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci		This driver's getting fat and beefy,
1762306a36Sopenharmony_ci		But my cat is still named Fifi.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciHmm, I think I'm allowed to call that a poem, even though it's only two
2062306a36Sopenharmony_cilines.  Hey, I'm in Computer Science, not English.  Give me a break.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciThe point is:  I REALLY REALLY REALLY REALLY REALLY want to hear from you if
2362306a36Sopenharmony_ciyou test this and get it working.  Or if you don't.  Or anything.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was
2662306a36Sopenharmony_cinice, but after that even FEWER people started writing to me because they
2762306a36Sopenharmony_cididn't even have to install the patch.  <sigh>
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciCome on, be a sport!  Send me a success report!
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci(hey, that was even better than my original poem... this is getting bad!)
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci.. warning::
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci   If you don't e-mail me about your success/failure soon, I may be forced to
3762306a36Sopenharmony_ci   start SINGING.  And we don't want that, do we?
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci   (You know, it might be argued that I'm pushing this point a little too much.
4062306a36Sopenharmony_ci   If you think so, why not flame me in a quick little e-mail?  Please also
4162306a36Sopenharmony_ci   include the type of card(s) you're using, software, size of network, and
4262306a36Sopenharmony_ci   whether it's working or not.)
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci   My e-mail address is: apenwarr@worldvisions.ca
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciThese are the ARCnet drivers for Linux.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciThis new release (2.91) has been put together by David Woodhouse
4962306a36Sopenharmony_ci<dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support
5062306a36Sopenharmony_cifor yet another chipset. Now the generic support has been separated from the
5162306a36Sopenharmony_ciindividual chipset drivers, and the source files aren't quite so packed with
5262306a36Sopenharmony_ci#ifdefs! I've changed this file a bit, but kept it in the first person from
5362306a36Sopenharmony_ciAvery, because I didn't want to completely rewrite it.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciThe previous release resulted from many months of on-and-off effort from me
5662306a36Sopenharmony_ci(Avery Pennarun), many bug reports/fixes and suggestions from others, and in
5762306a36Sopenharmony_ciparticular a lot of input and coding from Tomasz Motylewski.  Starting with
5862306a36Sopenharmony_ciARCnet 2.10 ALPHA, Tomasz's all-new-and-improved RFC1051 support has been
5962306a36Sopenharmony_ciincluded and seems to be working fine!
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciWhere do I discuss these drivers?
6362306a36Sopenharmony_ci---------------------------------
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciTomasz has been so kind as to set up a new and improved mailing list.
6662306a36Sopenharmony_ciSubscribe by sending a message with the BODY "subscribe linux-arcnet YOUR
6762306a36Sopenharmony_ciREAL NAME" to listserv@tichy.ch.uj.edu.pl.  Then, to submit messages to the
6862306a36Sopenharmony_cilist, mail to linux-arcnet@tichy.ch.uj.edu.pl.
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ciThere are archives of the mailing list at:
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	http://epistolary.org/mailman/listinfo.cgi/arcnet
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciThe people on linux-net@vger.kernel.org (now defunct, replaced by
7562306a36Sopenharmony_cinetdev@vger.kernel.org) have also been known to be very helpful, especially
7662306a36Sopenharmony_ciwhen we're talking about ALPHA Linux kernels that may or may not work right
7762306a36Sopenharmony_ciin the first place.
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciOther Drivers and Info
8162306a36Sopenharmony_ci----------------------
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ciYou can try my ARCNET page on the World Wide Web at:
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci	http://www.qis.net/~jschmitz/arcnet/
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ciAlso, SMC (one of the companies that makes ARCnet cards) has a WWW site you
8862306a36Sopenharmony_cimight be interested in, which includes several drivers for various cards
8962306a36Sopenharmony_ciincluding ARCnet.  Try:
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci	http://www.smc.com/
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ciPerformance Technologies makes various network software that supports
9462306a36Sopenharmony_ciARCnet:
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci	http://www.perftech.com/ or ftp to ftp.perftech.com.
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciNovell makes a networking stack for DOS which includes ARCnet drivers.  Try
9962306a36Sopenharmony_ciFTPing to ftp.novell.com.
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ciYou can get the Crynwr packet driver collection (including arcether.com, the
10262306a36Sopenharmony_cione you'll want to use with ARCnet cards) from
10362306a36Sopenharmony_cioak.oakland.edu:/simtel/msdos/pktdrvr. It won't work perfectly on a 386+
10462306a36Sopenharmony_ciwithout patches, though, and also doesn't like several cards.  Fixed
10562306a36Sopenharmony_civersions are available on my WWW page, or via e-mail if you don't have WWW
10662306a36Sopenharmony_ciaccess.
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ciInstalling the Driver
11062306a36Sopenharmony_ci---------------------
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ciAll you will need to do in order to install the driver is::
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci	make config
11562306a36Sopenharmony_ci		(be sure to choose ARCnet in the network devices
11662306a36Sopenharmony_ci		and at least one chipset driver.)
11762306a36Sopenharmony_ci	make clean
11862306a36Sopenharmony_ci	make zImage
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ciIf you obtained this ARCnet package as an upgrade to the ARCnet driver in
12162306a36Sopenharmony_ciyour current kernel, you will need to first copy arcnet.c over the one in
12262306a36Sopenharmony_cithe linux/drivers/net directory.
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ciYou will know the driver is installed properly if you get some ARCnet
12562306a36Sopenharmony_cimessages when you reboot into the new Linux kernel.
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ciThere are four chipset options:
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci 1. Standard ARCnet COM90xx chipset.
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ciThis is the normal ARCnet card, which you've probably got. This is the only
13262306a36Sopenharmony_cichipset driver which will autoprobe if not told where the card is.
13362306a36Sopenharmony_ciIt following options on the command line::
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name>
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ciIf you load the chipset support as a module, the options are::
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci io=<io> irq=<irq> shmem=<shmem> device=<name>
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ciTo disable the autoprobe, just specify "com90xx=" on the kernel command line.
14262306a36Sopenharmony_ciTo specify the name alone, but allow autoprobe, just put "com90xx=<name>"
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci 2. ARCnet COM20020 chipset.
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ciThis is the new chipset from SMC with support for promiscuous mode (packet
14762306a36Sopenharmony_cisniffing), extra diagnostic information, etc. Unfortunately, there is no
14862306a36Sopenharmony_cisensible method of autoprobing for these cards. You must specify the I/O
14962306a36Sopenharmony_ciaddress on the kernel command line.
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ciThe command line options are::
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name]
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ciIf you load the chipset support as a module, the options are::
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ci io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP>
15862306a36Sopenharmony_ci timeout=<timeout> device=<name>
15962306a36Sopenharmony_ci
16062306a36Sopenharmony_ciThe COM20020 chipset allows you to set the node ID in software, overriding the
16162306a36Sopenharmony_cidefault which is still set in DIP switches on the card. If you don't have the
16262306a36Sopenharmony_ciCOM20020 data sheets, and you don't know what the other three options refer
16362306a36Sopenharmony_cito, then they won't interest you - forget them.
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ci 3. ARCnet COM90xx chipset in IO-mapped mode.
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ciThis will also work with the normal ARCnet cards, but doesn't use the shared
16862306a36Sopenharmony_cimemory. It performs less well than the above driver, but is provided in case
16962306a36Sopenharmony_ciyou have a card which doesn't support shared memory, or (strangely) in case
17062306a36Sopenharmony_ciyou have so many ARCnet cards in your machine that you run out of shmem slots.
17162306a36Sopenharmony_ciIf you don't give the IO address on the kernel command line, then the driver
17262306a36Sopenharmony_ciwill not find the card.
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ciThe command line options are::
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ci com90io=<io>[,<irq>][,<name>]
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ciIf you load the chipset support as a module, the options are:
17962306a36Sopenharmony_ci io=<io> irq=<irq> device=<name>
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci 4. ARCnet RIM I cards.
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ciThese are COM90xx chips which are _completely_ memory mapped. The support for
18462306a36Sopenharmony_cithese is not tested. If you have one, please mail the author with a success
18562306a36Sopenharmony_cireport. All options must be specified, except the device name.
18662306a36Sopenharmony_ciCommand line options::
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ci arcrimi=<shmem>,<irq>,<node_ID>[,<name>]
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ciIf you load the chipset support as a module, the options are::
19162306a36Sopenharmony_ci
19262306a36Sopenharmony_ci shmem=<shmem> irq=<irq> node=<node_ID> device=<name>
19362306a36Sopenharmony_ci
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ciLoadable Module Support
19662306a36Sopenharmony_ci-----------------------
19762306a36Sopenharmony_ci
19862306a36Sopenharmony_ciConfigure and rebuild Linux.  When asked, answer 'm' to "Generic ARCnet
19962306a36Sopenharmony_cisupport" and to support for your ARCnet chipset if you want to use the
20062306a36Sopenharmony_ciloadable module. You can also say 'y' to "Generic ARCnet support" and 'm'
20162306a36Sopenharmony_cito the chipset support if you wish.
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ci::
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci	make config
20662306a36Sopenharmony_ci	make clean
20762306a36Sopenharmony_ci	make zImage
20862306a36Sopenharmony_ci	make modules
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ciIf you're using a loadable module, you need to use insmod to load it, and
21162306a36Sopenharmony_ciyou can specify various characteristics of your card on the command
21262306a36Sopenharmony_ciline.  (In recent versions of the driver, autoprobing is much more reliable
21362306a36Sopenharmony_ciand works as a module, so most of this is now unnecessary.)
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ciFor example::
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ci	cd /usr/src/linux/modules
21862306a36Sopenharmony_ci	insmod arcnet.o
21962306a36Sopenharmony_ci	insmod com90xx.o
22062306a36Sopenharmony_ci	insmod com20020.o io=0x2e0 device=eth1
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ciUsing the Driver
22462306a36Sopenharmony_ci----------------
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_ciIf you build your kernel with ARCnet COM90xx support included, it should
22762306a36Sopenharmony_ciprobe for your card automatically when you boot. If you use a different
22862306a36Sopenharmony_cichipset driver complied into the kernel, you must give the necessary options
22962306a36Sopenharmony_cion the kernel command line, as detailed above.
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ciGo read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be
23262306a36Sopenharmony_ciavailable where you picked up this driver.  Think of your ARCnet as a
23362306a36Sopenharmony_cisouped-up (or down, as the case may be) Ethernet card.
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ciBy the way, be sure to change all references from "eth0" to "arc0" in the
23662306a36Sopenharmony_ciHOWTOs.  Remember that ARCnet isn't a "true" Ethernet, and the device name
23762306a36Sopenharmony_ciis DIFFERENT.
23862306a36Sopenharmony_ci
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ciMultiple Cards in One Computer
24162306a36Sopenharmony_ci------------------------------
24262306a36Sopenharmony_ci
24362306a36Sopenharmony_ciLinux has pretty good support for this now, but since I've been busy, the
24462306a36Sopenharmony_ciARCnet driver has somewhat suffered in this respect. COM90xx support, if
24562306a36Sopenharmony_cicompiled into the kernel, will (try to) autodetect all the installed cards.
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ciIf you have other cards, with support compiled into the kernel, then you can
24862306a36Sopenharmony_cijust repeat the options on the kernel command line, e.g.::
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci	LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260
25162306a36Sopenharmony_ci
25262306a36Sopenharmony_ciIf you have the chipset support built as a loadable module, then you need to
25362306a36Sopenharmony_cido something like this::
25462306a36Sopenharmony_ci
25562306a36Sopenharmony_ci	insmod -o arc0 com90xx
25662306a36Sopenharmony_ci	insmod -o arc1 com20020 io=0x2e0
25762306a36Sopenharmony_ci	insmod -o arc2 com90xx
25862306a36Sopenharmony_ci
25962306a36Sopenharmony_ciThe ARCnet drivers will now sort out their names automatically.
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ciHow do I get it to work with...?
26362306a36Sopenharmony_ci--------------------------------
26462306a36Sopenharmony_ci
26562306a36Sopenharmony_ciNFS:
26662306a36Sopenharmony_ci	Should be fine linux->linux, just pretend you're using Ethernet cards.
26762306a36Sopenharmony_ci	oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients.  There
26862306a36Sopenharmony_ci	is also a DOS-based NFS server called SOSS.  It doesn't multitask
26962306a36Sopenharmony_ci	quite the way Linux does (actually, it doesn't multitask AT ALL) but
27062306a36Sopenharmony_ci	you never know what you might need.
27162306a36Sopenharmony_ci
27262306a36Sopenharmony_ci	With AmiTCP (and possibly others), you may need to set the following
27362306a36Sopenharmony_ci	options in your Amiga nfstab:  MD 1024 MR 1024 MW 1024
27462306a36Sopenharmony_ci	(Thanks to Christian Gottschling <ferksy@indigo.tng.oche.de>
27562306a36Sopenharmony_ci	for this.)
27662306a36Sopenharmony_ci
27762306a36Sopenharmony_ci	Probably these refer to maximum NFS data/read/write block sizes.  I
27862306a36Sopenharmony_ci	don't know why the defaults on the Amiga didn't work; write to me if
27962306a36Sopenharmony_ci	you know more.
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ciDOS:
28262306a36Sopenharmony_ci	If you're using the freeware arcether.com, you might want to install
28362306a36Sopenharmony_ci	the driver patch from my web page.  It helps with PC/TCP, and also
28462306a36Sopenharmony_ci	can get arcether to load if it timed out too quickly during
28562306a36Sopenharmony_ci	initialization.  In fact, if you use it on a 386+ you REALLY need
28662306a36Sopenharmony_ci	the patch, really.
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ciWindows:
28962306a36Sopenharmony_ci	See DOS :)  Trumpet Winsock works fine with either the Novell or
29062306a36Sopenharmony_ci	Arcether client, assuming you remember to load winpkt of course.
29162306a36Sopenharmony_ci
29262306a36Sopenharmony_ciLAN Manager and Windows for Workgroups:
29362306a36Sopenharmony_ci	These programs use protocols that
29462306a36Sopenharmony_ci	are incompatible with the Internet standard.  They try to pretend
29562306a36Sopenharmony_ci	the cards are Ethernet, and confuse everyone else on the network.
29662306a36Sopenharmony_ci
29762306a36Sopenharmony_ci	However, v2.00 and higher of the Linux ARCnet driver supports this
29862306a36Sopenharmony_ci	protocol via the 'arc0e' device.  See the section on "Multiprotocol
29962306a36Sopenharmony_ci	Support" for more information.
30062306a36Sopenharmony_ci
30162306a36Sopenharmony_ci	Using the freeware Samba server and clients for Linux, you can now
30262306a36Sopenharmony_ci	interface quite nicely with TCP/IP-based WfWg or Lan Manager
30362306a36Sopenharmony_ci	networks.
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ciWindows 95:
30662306a36Sopenharmony_ci	Tools are included with Win95 that let you use either the LANMAN
30762306a36Sopenharmony_ci	style network drivers (NDIS) or Novell drivers (ODI) to handle your
30862306a36Sopenharmony_ci	ARCnet packets.  If you use ODI, you'll need to use the 'arc0'
30962306a36Sopenharmony_ci	device with Linux.  If you use NDIS, then try the 'arc0e' device.
31062306a36Sopenharmony_ci	See the "Multiprotocol Support" section below if you need arc0e,
31162306a36Sopenharmony_ci	you're completely insane, and/or you need to build some kind of
31262306a36Sopenharmony_ci	hybrid network that uses both encapsulation types.
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_ciOS/2:
31562306a36Sopenharmony_ci	I've been told it works under Warp Connect with an ARCnet driver from
31662306a36Sopenharmony_ci	SMC.  You need to use the 'arc0e' interface for this.  If you get
31762306a36Sopenharmony_ci	the SMC driver to work with the TCP/IP stuff included in the
31862306a36Sopenharmony_ci	"normal" Warp Bonus Pack, let me know.
31962306a36Sopenharmony_ci
32062306a36Sopenharmony_ci	ftp.microsoft.com also has a freeware "Lan Manager for OS/2" client
32162306a36Sopenharmony_ci	which should use the same protocol as WfWg does.  I had no luck
32262306a36Sopenharmony_ci	installing it under Warp, however.  Please mail me with any results.
32362306a36Sopenharmony_ci
32462306a36Sopenharmony_ciNetBSD/AmiTCP:
32562306a36Sopenharmony_ci	These use an old version of the Internet standard ARCnet
32662306a36Sopenharmony_ci	protocol (RFC1051) which is compatible with the Linux driver v2.10
32762306a36Sopenharmony_ci	ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet"
32862306a36Sopenharmony_ci	below.)  ** Newer versions of NetBSD apparently support RFC1201.
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_ci
33162306a36Sopenharmony_ciUsing Multiprotocol ARCnet
33262306a36Sopenharmony_ci--------------------------
33362306a36Sopenharmony_ci
33462306a36Sopenharmony_ciThe ARCnet driver v2.10 ALPHA supports three protocols, each on its own
33562306a36Sopenharmony_ci"virtual network device":
33662306a36Sopenharmony_ci
33762306a36Sopenharmony_ci	======  ===============================================================
33862306a36Sopenharmony_ci	arc0	RFC1201 protocol, the official Internet standard which just
33962306a36Sopenharmony_ci		happens to be 100% compatible with Novell's TRXNET driver.
34062306a36Sopenharmony_ci		Version 1.00 of the ARCnet driver supported _only_ this
34162306a36Sopenharmony_ci		protocol.  arc0 is the fastest of the three protocols (for
34262306a36Sopenharmony_ci		whatever reason), and allows larger packets to be used
34362306a36Sopenharmony_ci		because it supports RFC1201 "packet splitting" operations.
34462306a36Sopenharmony_ci		Unless you have a specific need to use a different protocol,
34562306a36Sopenharmony_ci		I strongly suggest that you stick with this one.
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_ci	arc0e	"Ethernet-Encapsulation" which sends packets over ARCnet
34862306a36Sopenharmony_ci		that are actually a lot like Ethernet packets, including the
34962306a36Sopenharmony_ci		6-byte hardware addresses.  This protocol is compatible with
35062306a36Sopenharmony_ci		Microsoft's NDIS ARCnet driver, like the one in WfWg and
35162306a36Sopenharmony_ci		LANMAN.  Because the MTU of 493 is actually smaller than the
35262306a36Sopenharmony_ci		one "required" by TCP/IP (576), there is a chance that some
35362306a36Sopenharmony_ci		network operations will not function properly.  The Linux
35462306a36Sopenharmony_ci		TCP/IP layer can compensate in most cases, however, by
35562306a36Sopenharmony_ci		automatically fragmenting the TCP/IP packets to make them
35662306a36Sopenharmony_ci		fit.  arc0e also works slightly more slowly than arc0, for
35762306a36Sopenharmony_ci		reasons yet to be determined.  (Probably it's the smaller
35862306a36Sopenharmony_ci		MTU that does it.)
35962306a36Sopenharmony_ci
36062306a36Sopenharmony_ci	arc0s	The "[s]imple" RFC1051 protocol is the "previous" Internet
36162306a36Sopenharmony_ci		standard that is completely incompatible with the new
36262306a36Sopenharmony_ci		standard.  Some software today, however, continues to
36362306a36Sopenharmony_ci		support the old standard (and only the old standard)
36462306a36Sopenharmony_ci		including NetBSD and AmiTCP.  RFC1051 also does not support
36562306a36Sopenharmony_ci		RFC1201's packet splitting, and the MTU of 507 is still
36662306a36Sopenharmony_ci		smaller than the Internet "requirement," so it's quite
36762306a36Sopenharmony_ci		possible that you may run into problems.  It's also slower
36862306a36Sopenharmony_ci		than RFC1201 by about 25%, for the same reason as arc0e.
36962306a36Sopenharmony_ci
37062306a36Sopenharmony_ci		The arc0s support was contributed by Tomasz Motylewski
37162306a36Sopenharmony_ci		and modified somewhat by me.  Bugs are probably my fault.
37262306a36Sopenharmony_ci	======  ===============================================================
37362306a36Sopenharmony_ci
37462306a36Sopenharmony_ciYou can choose not to compile arc0e and arc0s into the driver if you want -
37562306a36Sopenharmony_cithis will save you a bit of memory and avoid confusion when eg. trying to
37662306a36Sopenharmony_ciuse the "NFS-root" stuff in recent Linux kernels.
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ciThe arc0e and arc0s devices are created automatically when you first
37962306a36Sopenharmony_ciifconfig the arc0 device.  To actually use them, though, you need to also
38062306a36Sopenharmony_ciifconfig the other virtual devices you need.  There are a number of ways you
38162306a36Sopenharmony_cican set up your network then:
38262306a36Sopenharmony_ci
38362306a36Sopenharmony_ci
38462306a36Sopenharmony_ci1. Single Protocol.
38562306a36Sopenharmony_ci
38662306a36Sopenharmony_ci   This is the simplest way to configure your network: use just one of the
38762306a36Sopenharmony_ci   two available protocols.  As mentioned above, it's a good idea to use
38862306a36Sopenharmony_ci   only arc0 unless you have a good reason (like some other software, ie.
38962306a36Sopenharmony_ci   WfWg, that only works with arc0e).
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_ci   If you need only arc0, then the following commands should get you going::
39262306a36Sopenharmony_ci
39362306a36Sopenharmony_ci	ifconfig arc0 MY.IP.ADD.RESS
39462306a36Sopenharmony_ci	route add MY.IP.ADD.RESS arc0
39562306a36Sopenharmony_ci	route add -net SUB.NET.ADD.RESS arc0
39662306a36Sopenharmony_ci	[add other local routes here]
39762306a36Sopenharmony_ci
39862306a36Sopenharmony_ci   If you need arc0e (and only arc0e), it's a little different::
39962306a36Sopenharmony_ci
40062306a36Sopenharmony_ci	ifconfig arc0 MY.IP.ADD.RESS
40162306a36Sopenharmony_ci	ifconfig arc0e MY.IP.ADD.RESS
40262306a36Sopenharmony_ci	route add MY.IP.ADD.RESS arc0e
40362306a36Sopenharmony_ci	route add -net SUB.NET.ADD.RESS arc0e
40462306a36Sopenharmony_ci
40562306a36Sopenharmony_ci   arc0s works much the same way as arc0e.
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_ci
40862306a36Sopenharmony_ci2. More than one protocol on the same wire.
40962306a36Sopenharmony_ci
41062306a36Sopenharmony_ci   Now things start getting confusing.  To even try it, you may need to be
41162306a36Sopenharmony_ci   partly crazy.  Here's what *I* did. :) Note that I don't include arc0s in
41262306a36Sopenharmony_ci   my home network; I don't have any NetBSD or AmiTCP computers, so I only
41362306a36Sopenharmony_ci   use arc0s during limited testing.
41462306a36Sopenharmony_ci
41562306a36Sopenharmony_ci   I have three computers on my home network; two Linux boxes (which prefer
41662306a36Sopenharmony_ci   RFC1201 protocol, for reasons listed above), and one XT that can't run
41762306a36Sopenharmony_ci   Linux but runs the free Microsoft LANMAN Client instead.
41862306a36Sopenharmony_ci
41962306a36Sopenharmony_ci   Worse, one of the Linux computers (freedom) also has a modem and acts as
42062306a36Sopenharmony_ci   a router to my Internet provider.  The other Linux box (insight) also has
42162306a36Sopenharmony_ci   its own IP address and needs to use freedom as its default gateway.  The
42262306a36Sopenharmony_ci   XT (patience), however, does not have its own Internet IP address and so
42362306a36Sopenharmony_ci   I assigned it one on a "private subnet" (as defined by RFC1597).
42462306a36Sopenharmony_ci
42562306a36Sopenharmony_ci   To start with, take a simple network with just insight and freedom.
42662306a36Sopenharmony_ci   Insight needs to:
42762306a36Sopenharmony_ci
42862306a36Sopenharmony_ci	- talk to freedom via RFC1201 (arc0) protocol, because I like it
42962306a36Sopenharmony_ci	  more and it's faster.
43062306a36Sopenharmony_ci	- use freedom as its Internet gateway.
43162306a36Sopenharmony_ci
43262306a36Sopenharmony_ci   That's pretty easy to do.  Set up insight like this::
43362306a36Sopenharmony_ci
43462306a36Sopenharmony_ci	ifconfig arc0 insight
43562306a36Sopenharmony_ci	route add insight arc0
43662306a36Sopenharmony_ci	route add freedom arc0	/* I would use the subnet here (like I said
43762306a36Sopenharmony_ci					to in "single protocol" above),
43862306a36Sopenharmony_ci					but the rest of the subnet
43962306a36Sopenharmony_ci					unfortunately lies across the PPP
44062306a36Sopenharmony_ci					link on freedom, which confuses
44162306a36Sopenharmony_ci					things. */
44262306a36Sopenharmony_ci	route add default gw freedom
44362306a36Sopenharmony_ci
44462306a36Sopenharmony_ci   And freedom gets configured like so::
44562306a36Sopenharmony_ci
44662306a36Sopenharmony_ci	ifconfig arc0 freedom
44762306a36Sopenharmony_ci	route add freedom arc0
44862306a36Sopenharmony_ci	route add insight arc0
44962306a36Sopenharmony_ci	/* and default gateway is configured by pppd */
45062306a36Sopenharmony_ci
45162306a36Sopenharmony_ci   Great, now insight talks to freedom directly on arc0, and sends packets
45262306a36Sopenharmony_ci   to the Internet through freedom.  If you didn't know how to do the above,
45362306a36Sopenharmony_ci   you should probably stop reading this section now because it only gets
45462306a36Sopenharmony_ci   worse.
45562306a36Sopenharmony_ci
45662306a36Sopenharmony_ci   Now, how do I add patience into the network?  It will be using LANMAN
45762306a36Sopenharmony_ci   Client, which means I need the arc0e device.  It needs to be able to talk
45862306a36Sopenharmony_ci   to both insight and freedom, and also use freedom as a gateway to the
45962306a36Sopenharmony_ci   Internet.  (Recall that patience has a "private IP address" which won't
46062306a36Sopenharmony_ci   work on the Internet; that's okay, I configured Linux IP masquerading on
46162306a36Sopenharmony_ci   freedom for this subnet).
46262306a36Sopenharmony_ci
46362306a36Sopenharmony_ci   So patience (necessarily; I don't have another IP number from my
46462306a36Sopenharmony_ci   provider) has an IP address on a different subnet than freedom and
46562306a36Sopenharmony_ci   insight, but needs to use freedom as an Internet gateway.  Worse, most
46662306a36Sopenharmony_ci   DOS networking programs, including LANMAN, have braindead networking
46762306a36Sopenharmony_ci   schemes that rely completely on the netmask and a 'default gateway' to
46862306a36Sopenharmony_ci   determine how to route packets.  This means that to get to freedom or
46962306a36Sopenharmony_ci   insight, patience WILL send through its default gateway, regardless of
47062306a36Sopenharmony_ci   the fact that both freedom and insight (courtesy of the arc0e device)
47162306a36Sopenharmony_ci   could understand a direct transmission.
47262306a36Sopenharmony_ci
47362306a36Sopenharmony_ci   I compensate by giving freedom an extra IP address - aliased 'gatekeeper' -
47462306a36Sopenharmony_ci   that is on my private subnet, the same subnet that patience is on.  I
47562306a36Sopenharmony_ci   then define gatekeeper to be the default gateway for patience.
47662306a36Sopenharmony_ci
47762306a36Sopenharmony_ci   To configure freedom (in addition to the commands above)::
47862306a36Sopenharmony_ci
47962306a36Sopenharmony_ci	ifconfig arc0e gatekeeper
48062306a36Sopenharmony_ci	route add gatekeeper arc0e
48162306a36Sopenharmony_ci	route add patience arc0e
48262306a36Sopenharmony_ci
48362306a36Sopenharmony_ci   This way, freedom will send all packets for patience through arc0e,
48462306a36Sopenharmony_ci   giving its IP address as gatekeeper (on the private subnet).  When it
48562306a36Sopenharmony_ci   talks to insight or the Internet, it will use its "freedom" Internet IP
48662306a36Sopenharmony_ci   address.
48762306a36Sopenharmony_ci
48862306a36Sopenharmony_ci   You will notice that we haven't configured the arc0e device on insight.
48962306a36Sopenharmony_ci   This would work, but is not really necessary, and would require me to
49062306a36Sopenharmony_ci   assign insight another special IP number from my private subnet.  Since
49162306a36Sopenharmony_ci   both insight and patience are using freedom as their default gateway, the
49262306a36Sopenharmony_ci   two can already talk to each other.
49362306a36Sopenharmony_ci
49462306a36Sopenharmony_ci   It's quite fortunate that I set things up like this the first time (cough
49562306a36Sopenharmony_ci   cough) because it's really handy when I boot insight into DOS.  There, it
49662306a36Sopenharmony_ci   runs the Novell ODI protocol stack, which only works with RFC1201 ARCnet.
49762306a36Sopenharmony_ci   In this mode it would be impossible for insight to communicate directly
49862306a36Sopenharmony_ci   with patience, since the Novell stack is incompatible with Microsoft's
49962306a36Sopenharmony_ci   Ethernet-Encap.  Without changing any settings on freedom or patience, I
50062306a36Sopenharmony_ci   simply set freedom as the default gateway for insight (now in DOS,
50162306a36Sopenharmony_ci   remember) and all the forwarding happens "automagically" between the two
50262306a36Sopenharmony_ci   hosts that would normally not be able to communicate at all.
50362306a36Sopenharmony_ci
50462306a36Sopenharmony_ci   For those who like diagrams, I have created two "virtual subnets" on the
50562306a36Sopenharmony_ci   same physical ARCnet wire.  You can picture it like this::
50662306a36Sopenharmony_ci
50762306a36Sopenharmony_ci
50862306a36Sopenharmony_ci	  [RFC1201 NETWORK]                   [ETHER-ENCAP NETWORK]
50962306a36Sopenharmony_ci      (registered Internet subnet)           (RFC1597 private subnet)
51062306a36Sopenharmony_ci
51162306a36Sopenharmony_ci			     (IP Masquerade)
51262306a36Sopenharmony_ci	  /---------------\         *            /---------------\
51362306a36Sopenharmony_ci	  |               |         *            |               |
51462306a36Sopenharmony_ci	  |               +-Freedom-*-Gatekeeper-+               |
51562306a36Sopenharmony_ci	  |               |    |    *            |               |
51662306a36Sopenharmony_ci	  \-------+-------/    |    *            \-------+-------/
51762306a36Sopenharmony_ci		  |            |                         |
51862306a36Sopenharmony_ci	       Insight         |                      Patience
51962306a36Sopenharmony_ci			   (Internet)
52062306a36Sopenharmony_ci
52162306a36Sopenharmony_ci
52262306a36Sopenharmony_ci
52362306a36Sopenharmony_ciIt works: what now?
52462306a36Sopenharmony_ci-------------------
52562306a36Sopenharmony_ci
52662306a36Sopenharmony_ciSend mail describing your setup, preferably including driver version, kernel
52762306a36Sopenharmony_civersion, ARCnet card model, CPU type, number of systems on your network, and
52862306a36Sopenharmony_cilist of software in use to me at the following address:
52962306a36Sopenharmony_ci
53062306a36Sopenharmony_ci	apenwarr@worldvisions.ca
53162306a36Sopenharmony_ci
53262306a36Sopenharmony_ciI do send (sometimes automated) replies to all messages I receive.  My email
53362306a36Sopenharmony_cican be weird (and also usually gets forwarded all over the place along the
53462306a36Sopenharmony_ciway to me), so if you don't get a reply within a reasonable time, please
53562306a36Sopenharmony_ciresend.
53662306a36Sopenharmony_ci
53762306a36Sopenharmony_ci
53862306a36Sopenharmony_ciIt doesn't work: what now?
53962306a36Sopenharmony_ci--------------------------
54062306a36Sopenharmony_ci
54162306a36Sopenharmony_ciDo the same as above, but also include the output of the ifconfig and route
54262306a36Sopenharmony_cicommands, as well as any pertinent log entries (ie. anything that starts
54362306a36Sopenharmony_ciwith "arcnet:" and has shown up since the last reboot) in your mail.
54462306a36Sopenharmony_ci
54562306a36Sopenharmony_ciIf you want to try fixing it yourself (I strongly recommend that you mail me
54662306a36Sopenharmony_ciabout the problem first, since it might already have been solved) you may
54762306a36Sopenharmony_ciwant to try some of the debug levels available.  For heavy testing on
54862306a36Sopenharmony_ciD_DURING or more, it would be a REALLY good idea to kill your klogd daemon
54962306a36Sopenharmony_cifirst!  D_DURING displays 4-5 lines for each packet sent or received.  D_TX,
55062306a36Sopenharmony_ciD_RX, and D_SKB actually DISPLAY each packet as it is sent or received,
55162306a36Sopenharmony_ciwhich is obviously quite big.
55262306a36Sopenharmony_ci
55362306a36Sopenharmony_ciStarting with v2.40 ALPHA, the autoprobe routines have changed
55462306a36Sopenharmony_cisignificantly.  In particular, they won't tell you why the card was not
55562306a36Sopenharmony_cifound unless you turn on the D_INIT_REASONS debugging flag.
55662306a36Sopenharmony_ci
55762306a36Sopenharmony_ciOnce the driver is running, you can run the arcdump shell script (available
55862306a36Sopenharmony_cifrom me or in the full ARCnet package, if you have it) as root to list the
55962306a36Sopenharmony_cicontents of the arcnet buffers at any time.  To make any sense at all out of
56062306a36Sopenharmony_cithis, you should grab the pertinent RFCs. (some are listed near the top of
56162306a36Sopenharmony_ciarcnet.c).  arcdump assumes your card is at 0xD0000.  If it isn't, edit the
56262306a36Sopenharmony_ciscript.
56362306a36Sopenharmony_ci
56462306a36Sopenharmony_ciBuffers 0 and 1 are used for receiving, and Buffers 2 and 3 are for sending.
56562306a36Sopenharmony_ciPing-pong buffers are implemented both ways.
56662306a36Sopenharmony_ci
56762306a36Sopenharmony_ciIf your debug level includes D_DURING and you did NOT define SLOW_XMIT_COPY,
56862306a36Sopenharmony_cithe buffers are cleared to a constant value of 0x42 every time the card is
56962306a36Sopenharmony_cireset (which should only happen when you do an ifconfig up, or when Linux
57062306a36Sopenharmony_cidecides that the driver is broken).  During a transmit, unused parts of the
57162306a36Sopenharmony_cibuffer will be cleared to 0x42 as well.  This is to make it easier to figure
57262306a36Sopenharmony_ciout which bytes are being used by a packet.
57362306a36Sopenharmony_ci
57462306a36Sopenharmony_ciYou can change the debug level without recompiling the kernel by typing::
57562306a36Sopenharmony_ci
57662306a36Sopenharmony_ci	ifconfig arc0 down metric 1xxx
57762306a36Sopenharmony_ci	/etc/rc.d/rc.inet1
57862306a36Sopenharmony_ci
57962306a36Sopenharmony_ciwhere "xxx" is the debug level you want.  For example, "metric 1015" would put
58062306a36Sopenharmony_ciyou at debug level 15.  Debug level 7 is currently the default.
58162306a36Sopenharmony_ci
58262306a36Sopenharmony_ciNote that the debug level is (starting with v1.90 ALPHA) a binary
58362306a36Sopenharmony_cicombination of different debug flags; so debug level 7 is really 1+2+4 or
58462306a36Sopenharmony_ciD_NORMAL+D_EXTRA+D_INIT.  To include D_DURING, you would add 16 to this,
58562306a36Sopenharmony_ciresulting in debug level 23.
58662306a36Sopenharmony_ci
58762306a36Sopenharmony_ciIf you don't understand that, you probably don't want to know anyway.
58862306a36Sopenharmony_ciE-mail me about your problem.
58962306a36Sopenharmony_ci
59062306a36Sopenharmony_ci
59162306a36Sopenharmony_ciI want to send money: what now?
59262306a36Sopenharmony_ci-------------------------------
59362306a36Sopenharmony_ci
59462306a36Sopenharmony_ciGo take a nap or something.  You'll feel better in the morning.
595