arcnet.txt 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. ----------------------------------------------------------------------------
  2. NOTE: See also arcnet-hardware.txt in this directory for jumper-setting
  3. and cabling information if you're like many of us and didn't happen to get a
  4. manual with your ARCnet card.
  5. ----------------------------------------------------------------------------
  6. Since no one seems to listen to me otherwise, perhaps a poem will get your
  7. attention:
  8. This driver's getting fat and beefy,
  9. But my cat is still named Fifi.
  10. Hmm, I think I'm allowed to call that a poem, even though it's only two
  11. lines. Hey, I'm in Computer Science, not English. Give me a break.
  12. The point is: I REALLY REALLY REALLY REALLY REALLY want to hear from you if
  13. you test this and get it working. Or if you don't. Or anything.
  14. ARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was
  15. nice, but after that even FEWER people started writing to me because they
  16. didn't even have to install the patch. <sigh>
  17. Come on, be a sport! Send me a success report!
  18. (hey, that was even better than my original poem... this is getting bad!)
  19. --------
  20. WARNING:
  21. --------
  22. If you don't e-mail me about your success/failure soon, I may be forced to
  23. start SINGING. And we don't want that, do we?
  24. (You know, it might be argued that I'm pushing this point a little too much.
  25. If you think so, why not flame me in a quick little e-mail? Please also
  26. include the type of card(s) you're using, software, size of network, and
  27. whether it's working or not.)
  28. My e-mail address is: apenwarr@worldvisions.ca
  29. ---------------------------------------------------------------------------
  30. These are the ARCnet drivers for Linux.
  31. This new release (2.91) has been put together by David Woodhouse
  32. <dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support
  33. for yet another chipset. Now the generic support has been separated from the
  34. individual chipset drivers, and the source files aren't quite so packed with
  35. #ifdefs! I've changed this file a bit, but kept it in the first person from
  36. Avery, because I didn't want to completely rewrite it.
  37. The previous release resulted from many months of on-and-off effort from me
  38. (Avery Pennarun), many bug reports/fixes and suggestions from others, and in
  39. particular a lot of input and coding from Tomasz Motylewski. Starting with
  40. ARCnet 2.10 ALPHA, Tomasz's all-new-and-improved RFC1051 support has been
  41. included and seems to be working fine!
  42. Where do I discuss these drivers?
  43. ---------------------------------
  44. Tomasz has been so kind as to set up a new and improved mailing list.
  45. Subscribe by sending a message with the BODY "subscribe linux-arcnet YOUR
  46. REAL NAME" to listserv@tichy.ch.uj.edu.pl. Then, to submit messages to the
  47. list, mail to linux-arcnet@tichy.ch.uj.edu.pl.
  48. There are archives of the mailing list at:
  49. http://epistolary.org/mailman/listinfo.cgi/arcnet
  50. The people on linux-net@vger.kernel.org (now defunct, replaced by
  51. netdev@vger.kernel.org) have also been known to be very helpful, especially
  52. when we're talking about ALPHA Linux kernels that may or may not work right
  53. in the first place.
  54. Other Drivers and Info
  55. ----------------------
  56. You can try my ARCNET page on the World Wide Web at:
  57. http://www.qis.net/~jschmitz/arcnet/
  58. Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you
  59. might be interested in, which includes several drivers for various cards
  60. including ARCnet. Try:
  61. http://www.smc.com/
  62. Performance Technologies makes various network software that supports
  63. ARCnet:
  64. http://www.perftech.com/ or ftp to ftp.perftech.com.
  65. Novell makes a networking stack for DOS which includes ARCnet drivers. Try
  66. FTPing to ftp.novell.com.
  67. You can get the Crynwr packet driver collection (including arcether.com, the
  68. one you'll want to use with ARCnet cards) from
  69. oak.oakland.edu:/simtel/msdos/pktdrvr. It won't work perfectly on a 386+
  70. without patches, though, and also doesn't like several cards. Fixed
  71. versions are available on my WWW page, or via e-mail if you don't have WWW
  72. access.
  73. Installing the Driver
  74. ---------------------
  75. All you will need to do in order to install the driver is:
  76. make config
  77. (be sure to choose ARCnet in the network devices
  78. and at least one chipset driver.)
  79. make clean
  80. make zImage
  81. If you obtained this ARCnet package as an upgrade to the ARCnet driver in
  82. your current kernel, you will need to first copy arcnet.c over the one in
  83. the linux/drivers/net directory.
  84. You will know the driver is installed properly if you get some ARCnet
  85. messages when you reboot into the new Linux kernel.
  86. There are four chipset options:
  87. 1. Standard ARCnet COM90xx chipset.
  88. This is the normal ARCnet card, which you've probably got. This is the only
  89. chipset driver which will autoprobe if not told where the card is.
  90. It following options on the command line:
  91. com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name>
  92. If you load the chipset support as a module, the options are:
  93. io=<io> irq=<irq> shmem=<shmem> device=<name>
  94. To disable the autoprobe, just specify "com90xx=" on the kernel command line.
  95. To specify the name alone, but allow autoprobe, just put "com90xx=<name>"
  96. 2. ARCnet COM20020 chipset.
  97. This is the new chipset from SMC with support for promiscuous mode (packet
  98. sniffing), extra diagnostic information, etc. Unfortunately, there is no
  99. sensible method of autoprobing for these cards. You must specify the I/O
  100. address on the kernel command line.
  101. The command line options are:
  102. com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name]
  103. If you load the chipset support as a module, the options are:
  104. io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP>
  105. timeout=<timeout> device=<name>
  106. The COM20020 chipset allows you to set the node ID in software, overriding the
  107. default which is still set in DIP switches on the card. If you don't have the
  108. COM20020 data sheets, and you don't know what the other three options refer
  109. to, then they won't interest you - forget them.
  110. 3. ARCnet COM90xx chipset in IO-mapped mode.
  111. This will also work with the normal ARCnet cards, but doesn't use the shared
  112. memory. It performs less well than the above driver, but is provided in case
  113. you have a card which doesn't support shared memory, or (strangely) in case
  114. you have so many ARCnet cards in your machine that you run out of shmem slots.
  115. If you don't give the IO address on the kernel command line, then the driver
  116. will not find the card.
  117. The command line options are:
  118. com90io=<io>[,<irq>][,<name>]
  119. If you load the chipset support as a module, the options are:
  120. io=<io> irq=<irq> device=<name>
  121. 4. ARCnet RIM I cards.
  122. These are COM90xx chips which are _completely_ memory mapped. The support for
  123. these is not tested. If you have one, please mail the author with a success
  124. report. All options must be specified, except the device name.
  125. Command line options:
  126. arcrimi=<shmem>,<irq>,<node_ID>[,<name>]
  127. If you load the chipset support as a module, the options are:
  128. shmem=<shmem> irq=<irq> node=<node_ID> device=<name>
  129. Loadable Module Support
  130. -----------------------
  131. Configure and rebuild Linux. When asked, answer 'm' to "Generic ARCnet
  132. support" and to support for your ARCnet chipset if you want to use the
  133. loadable module. You can also say 'y' to "Generic ARCnet support" and 'm'
  134. to the chipset support if you wish.
  135. make config
  136. make clean
  137. make zImage
  138. make modules
  139. If you're using a loadable module, you need to use insmod to load it, and
  140. you can specify various characteristics of your card on the command
  141. line. (In recent versions of the driver, autoprobing is much more reliable
  142. and works as a module, so most of this is now unnecessary.)
  143. For example:
  144. cd /usr/src/linux/modules
  145. insmod arcnet.o
  146. insmod com90xx.o
  147. insmod com20020.o io=0x2e0 device=eth1
  148. Using the Driver
  149. ----------------
  150. If you build your kernel with ARCnet COM90xx support included, it should
  151. probe for your card automatically when you boot. If you use a different
  152. chipset driver complied into the kernel, you must give the necessary options
  153. on the kernel command line, as detailed above.
  154. Go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be
  155. available where you picked up this driver. Think of your ARCnet as a
  156. souped-up (or down, as the case may be) Ethernet card.
  157. By the way, be sure to change all references from "eth0" to "arc0" in the
  158. HOWTOs. Remember that ARCnet isn't a "true" Ethernet, and the device name
  159. is DIFFERENT.
  160. Multiple Cards in One Computer
  161. ------------------------------
  162. Linux has pretty good support for this now, but since I've been busy, the
  163. ARCnet driver has somewhat suffered in this respect. COM90xx support, if
  164. compiled into the kernel, will (try to) autodetect all the installed cards.
  165. If you have other cards, with support compiled into the kernel, then you can
  166. just repeat the options on the kernel command line, e.g.:
  167. LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260
  168. If you have the chipset support built as a loadable module, then you need to
  169. do something like this:
  170. insmod -o arc0 com90xx
  171. insmod -o arc1 com20020 io=0x2e0
  172. insmod -o arc2 com90xx
  173. The ARCnet drivers will now sort out their names automatically.
  174. How do I get it to work with...?
  175. --------------------------------
  176. NFS: Should be fine linux->linux, just pretend you're using Ethernet cards.
  177. oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients. There
  178. is also a DOS-based NFS server called SOSS. It doesn't multitask
  179. quite the way Linux does (actually, it doesn't multitask AT ALL) but
  180. you never know what you might need.
  181. With AmiTCP (and possibly others), you may need to set the following
  182. options in your Amiga nfstab: MD 1024 MR 1024 MW 1024
  183. (Thanks to Christian Gottschling <ferksy@indigo.tng.oche.de>
  184. for this.)
  185. Probably these refer to maximum NFS data/read/write block sizes. I
  186. don't know why the defaults on the Amiga didn't work; write to me if
  187. you know more.
  188. DOS: If you're using the freeware arcether.com, you might want to install
  189. the driver patch from my web page. It helps with PC/TCP, and also
  190. can get arcether to load if it timed out too quickly during
  191. initialization. In fact, if you use it on a 386+ you REALLY need
  192. the patch, really.
  193. Windows: See DOS :) Trumpet Winsock works fine with either the Novell or
  194. Arcether client, assuming you remember to load winpkt of course.
  195. LAN Manager and Windows for Workgroups: These programs use protocols that
  196. are incompatible with the Internet standard. They try to pretend
  197. the cards are Ethernet, and confuse everyone else on the network.
  198. However, v2.00 and higher of the Linux ARCnet driver supports this
  199. protocol via the 'arc0e' device. See the section on "Multiprotocol
  200. Support" for more information.
  201. Using the freeware Samba server and clients for Linux, you can now
  202. interface quite nicely with TCP/IP-based WfWg or Lan Manager
  203. networks.
  204. Windows 95: Tools are included with Win95 that let you use either the LANMAN
  205. style network drivers (NDIS) or Novell drivers (ODI) to handle your
  206. ARCnet packets. If you use ODI, you'll need to use the 'arc0'
  207. device with Linux. If you use NDIS, then try the 'arc0e' device.
  208. See the "Multiprotocol Support" section below if you need arc0e,
  209. you're completely insane, and/or you need to build some kind of
  210. hybrid network that uses both encapsulation types.
  211. OS/2: I've been told it works under Warp Connect with an ARCnet driver from
  212. SMC. You need to use the 'arc0e' interface for this. If you get
  213. the SMC driver to work with the TCP/IP stuff included in the
  214. "normal" Warp Bonus Pack, let me know.
  215. ftp.microsoft.com also has a freeware "Lan Manager for OS/2" client
  216. which should use the same protocol as WfWg does. I had no luck
  217. installing it under Warp, however. Please mail me with any results.
  218. NetBSD/AmiTCP: These use an old version of the Internet standard ARCnet
  219. protocol (RFC1051) which is compatible with the Linux driver v2.10
  220. ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet"
  221. below.) ** Newer versions of NetBSD apparently support RFC1201.
  222. Using Multiprotocol ARCnet
  223. --------------------------
  224. The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
  225. "virtual network device":
  226. arc0 - RFC1201 protocol, the official Internet standard which just
  227. happens to be 100% compatible with Novell's TRXNET driver.
  228. Version 1.00 of the ARCnet driver supported _only_ this
  229. protocol. arc0 is the fastest of the three protocols (for
  230. whatever reason), and allows larger packets to be used
  231. because it supports RFC1201 "packet splitting" operations.
  232. Unless you have a specific need to use a different protocol,
  233. I strongly suggest that you stick with this one.
  234. arc0e - "Ethernet-Encapsulation" which sends packets over ARCnet
  235. that are actually a lot like Ethernet packets, including the
  236. 6-byte hardware addresses. This protocol is compatible with
  237. Microsoft's NDIS ARCnet driver, like the one in WfWg and
  238. LANMAN. Because the MTU of 493 is actually smaller than the
  239. one "required" by TCP/IP (576), there is a chance that some
  240. network operations will not function properly. The Linux
  241. TCP/IP layer can compensate in most cases, however, by
  242. automatically fragmenting the TCP/IP packets to make them
  243. fit. arc0e also works slightly more slowly than arc0, for
  244. reasons yet to be determined. (Probably it's the smaller
  245. MTU that does it.)
  246. arc0s - The "[s]imple" RFC1051 protocol is the "previous" Internet
  247. standard that is completely incompatible with the new
  248. standard. Some software today, however, continues to
  249. support the old standard (and only the old standard)
  250. including NetBSD and AmiTCP. RFC1051 also does not support
  251. RFC1201's packet splitting, and the MTU of 507 is still
  252. smaller than the Internet "requirement," so it's quite
  253. possible that you may run into problems. It's also slower
  254. than RFC1201 by about 25%, for the same reason as arc0e.
  255. The arc0s support was contributed by Tomasz Motylewski
  256. and modified somewhat by me. Bugs are probably my fault.
  257. You can choose not to compile arc0e and arc0s into the driver if you want -
  258. this will save you a bit of memory and avoid confusion when eg. trying to
  259. use the "NFS-root" stuff in recent Linux kernels.
  260. The arc0e and arc0s devices are created automatically when you first
  261. ifconfig the arc0 device. To actually use them, though, you need to also
  262. ifconfig the other virtual devices you need. There are a number of ways you
  263. can set up your network then:
  264. 1. Single Protocol.
  265. This is the simplest way to configure your network: use just one of the
  266. two available protocols. As mentioned above, it's a good idea to use
  267. only arc0 unless you have a good reason (like some other software, ie.
  268. WfWg, that only works with arc0e).
  269. If you need only arc0, then the following commands should get you going:
  270. ifconfig arc0 MY.IP.ADD.RESS
  271. route add MY.IP.ADD.RESS arc0
  272. route add -net SUB.NET.ADD.RESS arc0
  273. [add other local routes here]
  274. If you need arc0e (and only arc0e), it's a little different:
  275. ifconfig arc0 MY.IP.ADD.RESS
  276. ifconfig arc0e MY.IP.ADD.RESS
  277. route add MY.IP.ADD.RESS arc0e
  278. route add -net SUB.NET.ADD.RESS arc0e
  279. arc0s works much the same way as arc0e.
  280. 2. More than one protocol on the same wire.
  281. Now things start getting confusing. To even try it, you may need to be
  282. partly crazy. Here's what *I* did. :) Note that I don't include arc0s in
  283. my home network; I don't have any NetBSD or AmiTCP computers, so I only
  284. use arc0s during limited testing.
  285. I have three computers on my home network; two Linux boxes (which prefer
  286. RFC1201 protocol, for reasons listed above), and one XT that can't run
  287. Linux but runs the free Microsoft LANMAN Client instead.
  288. Worse, one of the Linux computers (freedom) also has a modem and acts as
  289. a router to my Internet provider. The other Linux box (insight) also has
  290. its own IP address and needs to use freedom as its default gateway. The
  291. XT (patience), however, does not have its own Internet IP address and so
  292. I assigned it one on a "private subnet" (as defined by RFC1597).
  293. To start with, take a simple network with just insight and freedom.
  294. Insight needs to:
  295. - talk to freedom via RFC1201 (arc0) protocol, because I like it
  296. more and it's faster.
  297. - use freedom as its Internet gateway.
  298. That's pretty easy to do. Set up insight like this:
  299. ifconfig arc0 insight
  300. route add insight arc0
  301. route add freedom arc0 /* I would use the subnet here (like I said
  302. to to in "single protocol" above),
  303. but the rest of the subnet
  304. unfortunately lies across the PPP
  305. link on freedom, which confuses
  306. things. */
  307. route add default gw freedom
  308. And freedom gets configured like so:
  309. ifconfig arc0 freedom
  310. route add freedom arc0
  311. route add insight arc0
  312. /* and default gateway is configured by pppd */
  313. Great, now insight talks to freedom directly on arc0, and sends packets
  314. to the Internet through freedom. If you didn't know how to do the above,
  315. you should probably stop reading this section now because it only gets
  316. worse.
  317. Now, how do I add patience into the network? It will be using LANMAN
  318. Client, which means I need the arc0e device. It needs to be able to talk
  319. to both insight and freedom, and also use freedom as a gateway to the
  320. Internet. (Recall that patience has a "private IP address" which won't
  321. work on the Internet; that's okay, I configured Linux IP masquerading on
  322. freedom for this subnet).
  323. So patience (necessarily; I don't have another IP number from my
  324. provider) has an IP address on a different subnet than freedom and
  325. insight, but needs to use freedom as an Internet gateway. Worse, most
  326. DOS networking programs, including LANMAN, have braindead networking
  327. schemes that rely completely on the netmask and a 'default gateway' to
  328. determine how to route packets. This means that to get to freedom or
  329. insight, patience WILL send through its default gateway, regardless of
  330. the fact that both freedom and insight (courtesy of the arc0e device)
  331. could understand a direct transmission.
  332. I compensate by giving freedom an extra IP address - aliased 'gatekeeper'
  333. - that is on my private subnet, the same subnet that patience is on. I
  334. then define gatekeeper to be the default gateway for patience.
  335. To configure freedom (in addition to the commands above):
  336. ifconfig arc0e gatekeeper
  337. route add gatekeeper arc0e
  338. route add patience arc0e
  339. This way, freedom will send all packets for patience through arc0e,
  340. giving its IP address as gatekeeper (on the private subnet). When it
  341. talks to insight or the Internet, it will use its "freedom" Internet IP
  342. address.
  343. You will notice that we haven't configured the arc0e device on insight.
  344. This would work, but is not really necessary, and would require me to
  345. assign insight another special IP number from my private subnet. Since
  346. both insight and patience are using freedom as their default gateway, the
  347. two can already talk to each other.
  348. It's quite fortunate that I set things up like this the first time (cough
  349. cough) because it's really handy when I boot insight into DOS. There, it
  350. runs the Novell ODI protocol stack, which only works with RFC1201 ARCnet.
  351. In this mode it would be impossible for insight to communicate directly
  352. with patience, since the Novell stack is incompatible with Microsoft's
  353. Ethernet-Encap. Without changing any settings on freedom or patience, I
  354. simply set freedom as the default gateway for insight (now in DOS,
  355. remember) and all the forwarding happens "automagically" between the two
  356. hosts that would normally not be able to communicate at all.
  357. For those who like diagrams, I have created two "virtual subnets" on the
  358. same physical ARCnet wire. You can picture it like this:
  359. [RFC1201 NETWORK] [ETHER-ENCAP NETWORK]
  360. (registered Internet subnet) (RFC1597 private subnet)
  361. (IP Masquerade)
  362. /---------------\ * /---------------\
  363. | | * | |
  364. | +-Freedom-*-Gatekeeper-+ |
  365. | | | * | |
  366. \-------+-------/ | * \-------+-------/
  367. | | |
  368. Insight | Patience
  369. (Internet)
  370. It works: what now?
  371. -------------------
  372. Send mail describing your setup, preferably including driver version, kernel
  373. version, ARCnet card model, CPU type, number of systems on your network, and
  374. list of software in use to me at the following address:
  375. apenwarr@worldvisions.ca
  376. I do send (sometimes automated) replies to all messages I receive. My email
  377. can be weird (and also usually gets forwarded all over the place along the
  378. way to me), so if you don't get a reply within a reasonable time, please
  379. resend.
  380. It doesn't work: what now?
  381. --------------------------
  382. Do the same as above, but also include the output of the ifconfig and route
  383. commands, as well as any pertinent log entries (ie. anything that starts
  384. with "arcnet:" and has shown up since the last reboot) in your mail.
  385. If you want to try fixing it yourself (I strongly recommend that you mail me
  386. about the problem first, since it might already have been solved) you may
  387. want to try some of the debug levels available. For heavy testing on
  388. D_DURING or more, it would be a REALLY good idea to kill your klogd daemon
  389. first! D_DURING displays 4-5 lines for each packet sent or received. D_TX,
  390. D_RX, and D_SKB actually DISPLAY each packet as it is sent or received,
  391. which is obviously quite big.
  392. Starting with v2.40 ALPHA, the autoprobe routines have changed
  393. significantly. In particular, they won't tell you why the card was not
  394. found unless you turn on the D_INIT_REASONS debugging flag.
  395. Once the driver is running, you can run the arcdump shell script (available
  396. from me or in the full ARCnet package, if you have it) as root to list the
  397. contents of the arcnet buffers at any time. To make any sense at all out of
  398. this, you should grab the pertinent RFCs. (some are listed near the top of
  399. arcnet.c). arcdump assumes your card is at 0xD0000. If it isn't, edit the
  400. script.
  401. Buffers 0 and 1 are used for receiving, and Buffers 2 and 3 are for sending.
  402. Ping-pong buffers are implemented both ways.
  403. If your debug level includes D_DURING and you did NOT define SLOW_XMIT_COPY,
  404. the buffers are cleared to a constant value of 0x42 every time the card is
  405. reset (which should only happen when you do an ifconfig up, or when Linux
  406. decides that the driver is broken). During a transmit, unused parts of the
  407. buffer will be cleared to 0x42 as well. This is to make it easier to figure
  408. out which bytes are being used by a packet.
  409. You can change the debug level without recompiling the kernel by typing:
  410. ifconfig arc0 down metric 1xxx
  411. /etc/rc.d/rc.inet1
  412. where "xxx" is the debug level you want. For example, "metric 1015" would put
  413. you at debug level 15. Debug level 7 is currently the default.
  414. Note that the debug level is (starting with v1.90 ALPHA) a binary
  415. combination of different debug flags; so debug level 7 is really 1+2+4 or
  416. D_NORMAL+D_EXTRA+D_INIT. To include D_DURING, you would add 16 to this,
  417. resulting in debug level 23.
  418. If you don't understand that, you probably don't want to know anyway.
  419. E-mail me about your problem.
  420. I want to send money: what now?
  421. -------------------------------
  422. Go take a nap or something. You'll feel better in the morning.