OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [Documentation/] [networking/] [arcnet.txt] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.