home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / kernel-2.0 / networki / arcnet.txt < prev    next >
Encoding:
Text File  |  1996-07-11  |  20.0 KB  |  474 lines

  1.  
  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.  <sigh>
  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 'n' to "arcnet support" if
  121. you want to use the loadable module.
  122.  
  123. Actually, with Linux 1.3.24 and higher, you should answer 'm' to build the
  124. module.
  125.  
  126.     make config
  127.     make dep
  128.     make clean    
  129.     make zImage
  130.     make modules
  131.     
  132. If you're using a loadable module, you need to use insmod to load it, and
  133. you need to specify various characteristics of your card on the command
  134. line.  For example:
  135.     cd /usr/src/linux/modules
  136.     insmod arcnet.o io=0x300 irqnum=2 shmem=0xd0000
  137. You can also add a num=1, num=2 etc for additional arcnet cards that will
  138. use arc1, arc2 etc for their device names (instead of the default, arc0).
  139.  
  140. ** NEWS FLASH!  Starting with 2.30 ALPHA, the ARCnet driver can autoprobe
  141.    even as a module.  So "insmod arcnet.o" by itself should work.
  142.     
  143.  
  144. Using the Driver
  145. ----------------
  146.  
  147. If you build your kernel with ARCnet support included, it should probe for
  148. your card automatically when you boot.
  149.  
  150. Go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be
  151. available where you picked up this driver.  Think of your ARCnet as a
  152. souped-up (or down, as the case may be) ethernet card.
  153.  
  154. By the way, be sure to change all references from "eth0" to "arc0" in the
  155. HOWTOs.  Remember that ARCnet isn't a "true" ethernet, and the device name
  156. is DIFFERENT.
  157.  
  158.  
  159. How do I get it to work with...?
  160. --------------------------------
  161.  
  162. NFS: Should be fine linux->linux, just pretend you're using ethernet cards. 
  163.         oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients.  There
  164.         is also a DOS-based NFS server called SOSS.  It doesn't multitask
  165.         quite the way Linux does (actually, it doesn't multitask AT ALL) but
  166.         you never know what you might need.
  167.         
  168.         With AmiTCP (and possibly others), you may need to set the following
  169.         options in your Amiga nfstab:  MD 1024 MR 1024 MW 1024
  170.         (Thanks to Christian Gottschling <ferksy@indigo.tng.oche.de>
  171.     for this.)
  172.     
  173.     Probably these refer to maximum NFS data/read/write block sizes.  I
  174.     don't know why the defaults on the Amiga didn't work; write to me if
  175.     you know more.
  176.  
  177. DOS: If you're using the freeware arcether.com, you might want to install
  178.         the driver patch from my web page.  It helps with PC/TCP, and also
  179.         can get arcether to load if it timed out too quickly during
  180.         initialization.  In fact, if you use it on a 386+ you REALLY need
  181.         the patch, really.
  182.     
  183. Windows:  See DOS :)  Trumpet Winsock works fine with either the Novell or
  184.     Arcether client, assuming you remember to load winpkt of course.
  185.  
  186. LAN Manager and Windows for Workgroups: These programs use protocols that
  187.         are incompatible with the internet standard.  They try to pretend
  188.         the cards are ethernet, and confuse everyone else on the network. 
  189.         
  190.         However, v2.00 and higher of the Linux ARCnet driver supports this
  191.         protocol via the 'arc0e' device.  See the section on "Multiprotocol
  192.         Support" for more information.
  193.  
  194.     Using the freeware Samba server and clients for Linux, you can now
  195.     interface quite nicely with TCP/IP-based WfWg or Lan Manager
  196.     networks.
  197.     
  198. Windows 95: Tools are included with Win95 that let you use either the LANMAN
  199.     style network drivers (NDIS) or Novell drivers (ODI) to handle your
  200.     ARCnet packets.  If you use ODI, you'll need to use the 'arc0'
  201.     device with Linux.  If you use NDIS, then try the 'arc0e' device. 
  202.     See the "Multiprotocol Support" section below if you need arc0e,
  203.     you're completely insane, and/or you need to build some kind of
  204.     hybrid network that uses both encapsulation types.
  205.  
  206. OS2: I've been told it works under Warp Connect with an ARCnet driver from
  207.     SMC.  You need to use the 'arc0e' interface for this.  If you get
  208.     the SMC driver to work with the TCP/IP stuff included in the
  209.     "normal" Warp Bonus Pack, let me know.
  210.  
  211.     ftp.microsoft.com also has a freeware "Lan Manager for OS/2" client
  212.     which should use the same protocol as WfWg does.  I had no luck
  213.     installing it under Warp, however.  Please mail me with any results.
  214.  
  215. NetBSD/AmiTCP: These use an old version of the Internet standard ARCnet
  216.     protocol (RFC1051) which is compatible with the Linux driver v2.10
  217.     ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet"
  218.     below.)  ** Newer versions of NetBSD apparently support RFC1201.
  219.  
  220.  
  221. Using Multiprotocol ARCnet
  222. --------------------------
  223.  
  224. The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
  225. "virtual network device":
  226.  
  227.     arc0  - RFC1201 protocol, the official internet standard which just
  228.         happens to be 100% compatible with Novell's TRXNET driver. 
  229.         Version 1.00 of the ARCnet driver supported _only_ this
  230.         protocol.  arc0 is the fastest of the three protocols (for
  231.         whatever reason), and allows larger packets to be used
  232.         because it supports RFC1201 "packet splitting" operations. 
  233.         Unless you have a specific need to use a different protocol,
  234.         I strongly suggest that you stick with this one.
  235.         
  236.     arc0e - "Ethernet-Encapsulation" which sends packets over ARCnet
  237.         that are actually a lot like Ethernet packets, including the
  238.         6-byte hardware addresses.  This protocol is compatible with
  239.         Microsoft's NDIS ARCnet driver, like the one in WfWg and
  240.         LANMAN.  Because the MTU of 493 is actually smaller than the
  241.         one "required" by TCP/IP (576), there is a chance that some
  242.         network operations will not function properly.  The Linux
  243.         TCP/IP layer can compensate in most cases, however, by
  244.         automatically fragmenting the TCP/IP packets to make them
  245.         fit.  arc0e also works slightly more slowly than arc0, for
  246.         reasons yet to be determined.  (Probably it's the smaller
  247.         MTU that does it.)
  248.         
  249.     arc0s - The "[s]imple" RFC1051 protocol is the "previous" internet
  250.         standard that is completely incompatible with the new
  251.         standard.  Some software today, however, continues to
  252.         support the old standard (and only the old standard)
  253.         including NetBSD and AmiTCP.  RFC1051 also does not support
  254.         RFC1201's packet splitting, and the MTU of 507 is still
  255.         smaller than the internet "requirement," so it's quite
  256.         possible that you may run into problems.  It's also slower
  257.         than RFC1201 by about 25%, for the same reason as arc0e.
  258.         
  259.         The arc0s support was contributed by Tomasz Motylewski
  260.         and modified somewhat by me.  Bugs are probably my fault.
  261.  
  262. You can choose not to compile arc0e and arc0s into the driver if you want -
  263. this will save you a bit of memory and avoid confusion when eg. trying to
  264. use the "NFS-root" stuff in recent Linux kernels.
  265.  
  266. The arc0e and arc0s devices are created automatically when you first
  267. ifconfig the arc0 device.  To actually use them, though, you need to also
  268. ifconfig the other virtual devices you need.  There are a number of ways you
  269. can set up your network then:
  270.  
  271.  
  272. 1. Single Protocol.
  273.  
  274.    This is the simplest way to configure your network: use just one of the
  275.    two available protocols.  As mentioned above, it's a good idea to use
  276.    only arc0 unless you have a good reason (like some other software, ie.
  277.    WfWg, that only works with arc0e).
  278.    
  279.    If you need only arc0, then the following commands should get you going:
  280.        ifconfig arc0 MY.IP.ADD.RESS
  281.        route add MY.IP.ADD.RESS arc0
  282.        route add -net SUB.NET.ADD.RESS arc0
  283.        [add other local routes here]
  284.        
  285.    If you need arc0e (and only arc0e), it's a little different:
  286.        ifconfig arc0 MY.IP.ADD.RESS
  287.        ifconfig arc0e MY.IP.ADD.RESS
  288.        route add MY.IP.ADD.RESS arc0e
  289.        route add -net SUB.NET.ADD.RESS arc0e
  290.    
  291.    arc0s works much the same way as arc0e.
  292.  
  293.  
  294. 2. More than one protocol on the same wire.
  295.  
  296.    Now things start getting confusing.  To even try it, you may need to be
  297.    partly crazy.  Here's what *I* did. :) Note that I don't include arc0s in
  298.    my home network; I don't have any NetBSD or AmiTCP computers, so I only
  299.    use arc0s during limited testing.
  300.  
  301.    I have three computers on my home network; two Linux boxes (which prefer
  302.    RFC1201 protocol, for reasons listed above), and one XT that can't run
  303.    Linux but runs the free Microsoft LANMAN Client instead.
  304.  
  305.    Worse, one of the Linux computers (freedom) also has a modem and acts as
  306.    a router to my internet provider.  The other Linux box (insight) also has
  307.    its own IP address and needs to use freedom as its default gateway.  The
  308.    XT (patience), however, does not have its own internet IP address and so
  309.    I assigned it one on a "private subnet" (as defined by RFC1597).
  310.  
  311.    To start with, take a simple network with just insight and freedom. 
  312.    Insight needs to:
  313.        - talk to freedom via RFC1201 (arc0) protocol, because I like it
  314.       more and it's faster.
  315.     - use freedom as its internet gateway.
  316.     
  317.    That's pretty easy to do.  Set up insight like this:
  318.        ifconfig arc0 insight
  319.        route add insight arc0
  320.        route add freedom arc0    /* I would use the subnet here (like I said
  321.                     to to in "single protocol" above),
  322.                        but the rest of the subnet
  323.                        unfortunately lies across the PPP
  324.                        link on freedom, which confuses
  325.                        things. */
  326.        route add default gw freedom
  327.        
  328.    And freedom gets configured like so:
  329.        ifconfig arc0 freedom
  330.        route add freedom arc0
  331.        route add insight arc0
  332.        /* and default gateway is configured by pppd */
  333.        
  334.    Great, now insight talks to freedom directly on arc0, and sends packets
  335.    to the internet through freedom.  If you didn't know how to do the above,
  336.    you should probably stop reading this section now because it only gets
  337.    worse.
  338.  
  339.    Now, how do I add patience into the network?  It will be using LANMAN
  340.    Client, which means I need the arc0e device.  It needs to be able to talk
  341.    to both insight and freedom, and also use freedom as a gateway to the
  342.    internet.  (Recall that patience has a "private IP address" which won't
  343.    work on the internet; that's okay, I configured Linux IP masquerading on
  344.    freedom for this subnet).
  345.    
  346.    So patience (necessarily; I don't have another IP number from my
  347.    provider) has an IP address on a different subnet than freedom and
  348.    insight, but needs to use freedom as an internet gateway.  Worse, most
  349.    DOS networking programs, including LANMAN, have braindead networking
  350.    schemes that rely completely on the netmask and a 'default gateway' to
  351.    determine how to route packets.  This means that to get to freedom or
  352.    insight, patience WILL send through its default gateway, regardless of
  353.    the fact that both freedom and insight (courtesy of the arc0e device)
  354.    could understand a direct transmission.
  355.    
  356.    I compensate by giving freedom an extra IP address - aliased 'gatekeeper'
  357.    - that is on my private subnet, the same subnet that patience is on.  I
  358.    then define gatekeeper to be the default gateway for patience.
  359.    
  360.    To configure freedom (in addition to the commands above):
  361.        ifconfig arc0e gatekeeper
  362.        route add gatekeeper arc0e
  363.        route add patience arc0e
  364.    
  365.    This way, freedom will send all packets for patience through arc0e,
  366.    giving its IP address as gatekeeper (on the private subnet).  When it
  367.    talks to insight or the internet, it will use its "freedom" internet IP
  368.    address.
  369.    
  370.    You will notice that we haven't configured the arc0e device on insight. 
  371.    This would work, but is not really necessary, and would require me to
  372.    assign insight another special IP number from my private subnet.  Since
  373.    both insight and patience are using freedom as their default gateway, the
  374.    two can already talk to each other.
  375.    
  376.    It's quite fortunate that I set things up like this the first time (cough
  377.    cough) because it's really handy when I boot insight into DOS.  There, it
  378.    runs the Novell ODI protocol stack, which only works with RFC1201 ARCnet. 
  379.    In this mode it would be impossible for insight to communicate directly
  380.    with patience, since the Novell stack is incompatible with Microsoft's
  381.    Ethernet-Encap.  Without changing any settings on freedom or patience, I
  382.    simply set freedom as the default gateway for insight (now in DOS,
  383.    remember) and all the forwarding happens "automagically" between the two
  384.    hosts that would normally not be able to communicate at all.
  385.    
  386.    For those who like diagrams, I have created two "virtual subnets" on the
  387.    same physical ARCnet wire.  You can picture it like this:
  388.    
  389.                                                     
  390.           [RFC1201 NETWORK]                   [ETHER-ENCAP NETWORK]
  391.       (registered internet subnet)           (RFC1597 private subnet)
  392.   
  393.                              (IP Masquerade)
  394.           /---------------\         *            /---------------\
  395.           |               |         *            |               |
  396.           |               +-Freedom-*-Gatekeeper-+               |
  397.           |               |    |    *            |               |
  398.           \-------+-------/    |    *            \-------+-------/
  399.                   |            |                         |
  400.                Insight         |                      Patience
  401.                            (Internet)
  402.  
  403.  
  404.  
  405. It works: what now?
  406. -------------------
  407.  
  408. Send mail describing your setup, preferably including driver version, kernel
  409. version, ARCnet card model, CPU type, number of systems on your network, and
  410. list of software in use to me at the following address:
  411.     apenwarr@foxnet.net
  412.  
  413. I do send (sometimes automated) replies to all messages I receive.  My email
  414. can be weird (and also usually gets forwarded all over the place along the
  415. way to me), so if you don't get a reply within a reasonable time, please
  416. resend.
  417.  
  418.  
  419. It doesn't work: what now?
  420. --------------------------
  421.  
  422. Do the same as above, but also include the output of the ifconfig and route
  423. commands, as well as any pertinent log entries (ie. anything that starts
  424. with "arcnet:" and has shown up since the last reboot) in your mail.
  425.  
  426. If you want to try fixing it yourself (I strongly recommend that you mail me
  427. about the problem first, since it might already have been solved) you may
  428. want to try some of the debug levels available.  For heavy testing on
  429. D_DURING or more, it would be a REALLY good idea to kill your klogd daemon
  430. first!  D_DURING displays 4-5 lines for each packet sent or received.  D_TX,
  431. D_RX, and D_SKB actually DISPLAY each packet as it is sent or received,
  432. which is obviously quite big.
  433.  
  434. Starting with v2.40 ALPHA, the autoprobe routines have changed
  435. significantly.  In particular, they won't tell you why the card was not
  436. found unless you turn on the D_INIT_REASONS debugging flag.
  437.  
  438. Once the driver is running, you can run the arcdump shell script (available
  439. from me or in the full ARCnet package, if you have it) as root to list the
  440. contents of the arcnet buffers at any time.  To make any sense at all out of
  441. this, you should grab the pertinent RFC's. (some are listed near the top of
  442. arcnet.c).  arcdump assumes your card is at 0xD0000.  If it isn't, edit the
  443. script.
  444.  
  445. Buffers 0 and 1 are used for receiving, and Buffers 2 and 3 are for sending. 
  446. Ping-pong buffers are implemented both ways.
  447.  
  448. If your debug level includes D_DURING and you did NOT define SLOW_XMIT_COPY,
  449. the buffers are cleared to a constant value of 0x42 every time the card is
  450. reset (which should only happen when you do an ifconfig up, or when Linux
  451. decides that the driver is broken).  During a transmit, unused parts of the
  452. buffer will be cleared to 0x42 as well.  This is to make it easier to figure
  453. out which bytes are being used by a packet.
  454.  
  455. You can change the debug level without recompiling the kernel by typing:
  456.     ifconfig arc0 down metric 1xxx
  457.     /etc/rc.d/rc.inet1
  458. where "xxx" is the debug level you want.  For example, "metric 1015" would put
  459. you at debug level 15.  Debug level 7 is currently the default.
  460.  
  461. Note that the debug level is (starting with v1.90 ALPHA) a binary
  462. combination of different debug flags; so debug level 7 is really 1+2+4 or
  463. D_NORMAL+D_EXTRA+D_INIT.  To include D_DURING, you would add 16 to this,
  464. resulting in debug level 23.
  465.  
  466. If you don't understand that, you probably don't want to know anyway. 
  467. E-mail me about your problem.
  468.  
  469.  
  470. I want to send money: what now?
  471. -------------------------------
  472.  
  473. Go take a nap or something.  You'll feel better in the morning.
  474.