home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / IPX_HOWT.GZ / IPX_HOWT
Encoding:
Text File  |  1996-06-02  |  64.1 KB  |  1,618 lines

  1.   Linux IPX-HOWTO
  2.   Terry Dawson, terry@perf.no.itg.telecom.com.au
  3.   v2.0, 1 June 1996
  4.  
  5.   This document aims to describe how to obtain, install and configure
  6.   various tools available for the the Linux operating system that use
  7.   the Linux kernel IPX protocol support.
  8.  
  9.   1.  Introduction.
  10.  
  11.   This is the Linux IPX-HOWTO. You should read the Linux NET-2-HOWTO in
  12.   conjunction with this document.
  13.  
  14.   1.1.  Changes from the previous release.
  15.  
  16.   Additions:
  17.           FAQ section - thanks to Gregory Steuck, Volker Lendecke, Alan Cox
  18.           PPP section - thanks Gilbert, David, and Chad.
  19.           details of 'linware' list.
  20.           ipx_internal_net to router section - comments ?
  21.  
  22.   Corrections/Updates:
  23.           Copyright is now GNU GPL version 2.0
  24.           Updated location of Greg's IPX tools.
  25.           Suggest Volkers ipxd in place of old daemons.
  26.           Updated locations of Volkers ftp site location.
  27.           Updated versions of ncpfs and mars_nwe.
  28.  
  29.   1.2.  Introduction.
  30.  
  31.   The Linux Kernel has a completely new network implementation as
  32.   compared to other Unix like operating systems. The ability to take a
  33.   fresh approach to developing the kernel networking software has led to
  34.   the Linux kernel having support for a range of non tcp/ip protocols
  35.   being built. The IPX protocol is one of those that have been included.
  36.  
  37.   The Linux kernel supports the IPX protocol only. It does not yet
  38.   support protocols such as IPX/RIP, SAP or NCP, these are supported by
  39.   other software such as that documented elsewhere in this document.
  40.  
  41.   The IPX support was originally developed by Alan Cox
  42.   <ialan@iifeak.swan.ac.uk> and has been significantly enhanced by Greg
  43.   Page <greg@caldera.com>.
  44.  
  45.   2.  Disclaimer.
  46.  
  47.   I do not and cannot know everything there is to know about the Linux
  48.   network software. Please accept and be warned that this document
  49.   probably does contain errors. Please read any README files that are
  50.   included with any of the various pieces of software described in this
  51.   document for more detailed and accurate information. I will attempt to
  52.   keep this document as error-free and up-to-date as possible. Versions
  53.   of software are current as at time of writing.
  54.  
  55.   In no way do I or the authors of the software in this document offer
  56.   protection against your own actions. If you configure this software,
  57.   even as described in this document and it causes problems on your
  58.   network then you alone must carry the responsibility. I include this
  59.   warning because IPX network design and configuration is not always a
  60.   simple matter and sometimes undesirable interaction with other routers
  61.   and fileservers can result if you do not design or configure your
  62.   network carefully. I also include this warning because I was asked to
  63.   by someone unfortunate enough to have discovered this lesson the hard
  64.   way.
  65.  
  66.   3.  Related Documentation.
  67.  
  68.   This document presumes you understand how to build a Linux kernel with
  69.   the appropriate networking options selected and that you understand
  70.   how to use the basic network tools such as ifconfig and route.  If you
  71.   do not, then you should read the NET-2-HOWTO
  72.   <http://sunsite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html> in conjunction
  73.   with this document as it describes these.
  74.  
  75.   Other Linux HOWTO documents that might be useful are:
  76.  
  77.   The Ethernet-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-
  78.   HOWTO.html>, which describes the details of configuring an Ethernet
  79.   device for Linux.
  80.  
  81.   The PPP-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html> as IPX
  82.   support is available for version 2.2.0d and later of the Linux PPP
  83.   implementation.
  84.  
  85.   3.1.  New versions of this document.
  86.  
  87.   If your copy of this document is more than two months old then I
  88.   strongly recommend you obtain a newer version. The networking support
  89.   for Linux is changing very rapidly with new enhancements and features,
  90.   so this document also changes fairly frequently. The latest released
  91.   version of this document can always be retrieved by anonymous ftp
  92.   from:
  93.  
  94.   sunsite.unc.edu
  95.  
  96.        /pub/Linux/docs/HOWTO/IPX-HOWTO
  97.  
  98.   or:
  99.  
  100.        /pub/Linux/docs/HOWTO/other-formats/IPX-HOWTO{-html.tar,ps,dvi}.gz
  101.  
  102.   via the World Wide Web from the Linux Documentation Project Web Server
  103.   <http://sunsite.unc.edu/mdw/linux.html>, at page: IPX-HOWTO
  104.   <http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html> or directly from me,
  105.   <terry@perf.no.itg.telecom.com.au>. It may also be posted to the
  106.   newsgroups: comp.os.linux.networking, comp.os.linux.answers and
  107.   news.answers from time to time.
  108.  
  109.   3.2.  Feedback.
  110.  
  111.   Please send any comments, updates, or suggestions to me,
  112.   <terry@perf.no.itg.telecom.com.au>. The sooner I get feedback, the
  113.   sooner I can update and correct this document. If you find any
  114.   problems with it, please mail me directly as I now very rarely read
  115.   the newsgroups.  You might also catch me as terryd on the #linpeople
  116.   IRC channel on the undernet IRC network.
  117.  
  118.   3.3.  Mailing list support.
  119.  
  120.   There is a mailing list established for discussion of the various
  121.   Linux IPX software packages described in this document. You can
  122.   subscribe to it by sending a mail message to listserv@sh.cvut.cz with
  123.   add linware in the body of the message. To post to the list your send
  124.   your mail to linware@sh.cvut.cz.
  125.  
  126.   The mailing list is archived at www.kin.vslib.cz
  127.   <http://www.kin.vslib.cz/hypermail/linware/>.
  128.  
  129.   4.  Some of the terms used in this document.
  130.  
  131.   You will often see the terms client and server used in this document.
  132.   They are normally fairly specific terms but in this document I have
  133.   generalized their definitions a little so that they mean the
  134.   following:
  135.  
  136.      client
  137.         The machine or program that initiates an action or a connection
  138.         for the purpose of gaining use of some service or data.
  139.  
  140.      server
  141.         The machine or program that accepts incoming connections from
  142.         multiple remote machines and provides a service or data to
  143.         those.
  144.  
  145.   These definitions are not very reliable either, but they provide a
  146.   means of distinguishing the ends of peer to peer systems such as SLIP
  147.   or PPP which truly do not actually have clients and servers.
  148.  
  149.   Other terms you will see are:
  150.  
  151.      IPX
  152.         Internet Packet eXchange is a protocol used by the Novell
  153.         corporation to provide internetworking support for their
  154.         NetWare(tm) product.  IPX is similar in functionality to the IP
  155.         protocol used by the tcp/ip community.
  156.  
  157.      IPX network address
  158.         This is a number which uniquely identifies a particular IPX
  159.         network. The usual notation for this address is in hexadecimal.
  160.         An example might look like: 0x23a91002
  161.  
  162.      IPX Internal network
  163.         This is a virtual IPX network. It is virtual because it does not
  164.         correspond to a physical network. This is used to provide a
  165.         means of uniquely identifying and addressing a particular IPX
  166.         host. This is generally only useful to IPX hosts that exist on
  167.         more than one physical IPX network such as fileservers. The
  168.         address is coded in the same form as for a physical IPX network.
  169.  
  170.      RIP
  171.         Routing Information Protocol is a protocol used to automatically
  172.         propagate network routes in an IPX network. It is functionally
  173.         similar to the RIP used within the tcp/ip community.
  174.  
  175.      NCP
  176.         NetWare Core Protocol is a networked filesystem protocol
  177.         designed by the Novell Corporation for their NetWare(tm)
  178.         product. NCP is functionally similar to the NFS used in the
  179.         tcp/ip community.
  180.      SAP
  181.         Service Advertisement Protocol is a protocol designed by the
  182.         Novell Corporation that is used to advertise network services in
  183.         a NetWare(tm) environment.
  184.  
  185.      Hardware address
  186.         This is a number that uniquely identifies a host in a physical
  187.         network at the media access layer. Examples of this are Ethernet
  188.         Addresses. An Ethernet address is generally coded as six
  189.         hexadecimal values separated by colon characters eg.
  190.         00:60:8C:C3:3C:0F
  191.  
  192.      route
  193.         The route is the path that your packets take through the network
  194.         to reach their destination.
  195.  
  196.   5.  The IPX related files in the /proc filesystem.
  197.  
  198.   There are a number of files related to the Linux IPX support that are
  199.   located within the /proc filesystem. They are:
  200.  
  201.      /proc/net/ipx_interface
  202.         This file contains information about the IPX interfaces
  203.         configured on your machine. These may have been configured
  204.         manually by command or automatically detected and configured.
  205.  
  206.      /proc/net/ipx_route
  207.         This file contains a list of the routes that exist in the IPX
  208.         routing table. These routes may have been added manually by
  209.         command or automatically by an IPX routing daemon.
  210.  
  211.      /proc/net/ipx
  212.         This file is a list of the IPX sockets that are currently open
  213.         for use on the machine.
  214.  
  215.   6.  Greg Pages IPX tools.
  216.  
  217.   Greg Page <greg@caldera.com> of Caldera Incorporated has written a
  218.   suite of IPX configuration tools and enhanced the Linux IPX kernel
  219.   support.
  220.  
  221.   The kernel enhancements allow linux to be configured as a fully
  222.   featured IPX bridge or router. The enhanced IPX support has already
  223.   been fed back into the mainstream kernel distribution so you will
  224.   probably already have it.
  225.  
  226.   The network configuration tools provide you with the capability to
  227.   configure your network devices to support IPX and allow you to
  228.   configure IPX routing and other facilities under Linux. The Linux IPX
  229.   network tools are available from: sunsite.unc.edu
  230.   <ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/ncpfs/ipx.tgz>.
  231.  
  232.   6.1.  The IPX tools in more detail.
  233.  
  234.      ipx_interface
  235.         This command is used to manually add, delete or check ipx
  236.         capability to an existing network device. Normally the network
  237.         device would be an Ethernet device such at eth0. At least one
  238.         IPX interface must be designated the primary interface and the
  239.         -p flag to this command does this. For example to enable
  240.         Ethernet device eth0 for IPX capability as the primary IPX
  241.         interface using the IEEE 802.2 frame type and IPX network
  242.         address 39ab0222 you would use:
  243.  
  244.           # ipx_interface add -p eth0 802.2 0x39ab0222
  245.  
  246.      ipx_configure
  247.         This command enables or disables the automatic setting of the
  248.         interface configuration and primary interface settings. The
  249.         --auto_interface argument allows you to select whether new
  250.         network devices should be automatically configured as IPX
  251.         devices or not. The --auto_primary argument allows you to select
  252.         whether the IPX software should automatically select a primary
  253.         interface or not. A typical example of this commands use would
  254.         be to enable both automatic interface configuration and
  255.         automatic primary interface setting:
  256.  
  257.           # ipx_configure --auto_interface=on --auto_primary=on
  258.  
  259.      ipx_internal_net
  260.         This command allows you to configure or deconfigure an internal
  261.         network address. An internal network address is optional, but
  262.         when it is configured it will always be the primary interface.
  263.         To configure an IPX network address of ab000000 on IPX node 1
  264.         you would use:
  265.  
  266.           # ipx_internal_net add 0xab000000 1
  267.  
  268.      ipx_route
  269.         The command allows you to manually modify the IPX routing table.
  270.         For example to add a route to IPX network 39ab0222 via a router
  271.         with node number 00608CC33C0F on IPX network 39ab0108:
  272.  
  273.           # ipx_route add 0x39ab0222 0x39ab0108 0x00608CC33C0F
  274.  
  275.   7.  Configuring your Linux machine as an IPX router.
  276.  
  277.   If you have a number of IPX segments that you wish to internetwork you
  278.   need the services of a router. In the Novell environment there are two
  279.   pieces of information which are necessary to be propagated around the
  280.   network.  They are the network routing information propagated using
  281.   Novell RIP, and the service advertisement information propagated using
  282.   Novell SAP. Any router must support both of these protocols to be
  283.   useful in most situations.
  284.  
  285.   Linux has support for both of these protocols and can be fairly easily
  286.   made to function as a fully Novell compliant router.
  287.   The Linux kernel IPX support actually manages the IPX packet
  288.   forwarding across interfaces, but it does this according to the rules
  289.   coded into the IPX routing table. Linux needs a program to implement
  290.   the Novell RIP and SAP to ensure that the IPX routing table is built
  291.   correctly and updated periodically to reflect changes in the network
  292.   status.
  293.  
  294.   Volker Lendecke <lendecke@namu01.gwdg.de> has developed a routing
  295.   daemon that will do this for you.
  296.  
  297.   You can find ipxripd at:
  298.  
  299.   sunsite.unc.edu
  300.   <ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/ipxripd-0.7.tgz>
  301.  
  302.   or at Volkers home site at:
  303.  
  304.   ftp.gwdg.de <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/ipxripd-0.7.tgz>
  305.  
  306.   Configuring your Linux machine to act as a router is very
  307.   straightforward.  The steps you must take are:
  308.  
  309.   1. Build your kernel with IPX, Ethernet and /proc support.
  310.  
  311.   2. Obtain, compile and install the ipxd daemon program.
  312.  
  313.   3. Boot the new kernel and ensure that each of the Ethernet cards has
  314.      been properly detected and there are no hardware conflicts.
  315.  
  316.   4. Enable the IPX protocol on each of the interfaces using the
  317.      ipx_interface command described above.
  318.  
  319.   5. Start the ipxd daemon program.
  320.  
  321.   Consider the following simple network:
  322.  
  323.    IPX Addr: 0x01000000  802.2
  324.   |--------------------------|
  325.                 |
  326.                 \_________________________
  327.                                           \          Linux Router
  328.    IPX Addr: 0x02000000  802.2             \
  329.   |--------------------------|              \   eth0/-----------\
  330.                 |                            \--====|           |
  331.                 \_________________________          | IPX route |
  332.                                           \     eth1|  Table    |
  333.    IPX Addr: 0x03000000  etherII           \----====|    ^      |
  334.   |--------------------------|                      |    |      |
  335.                 |                               eth2|  IPXd     |
  336.                 \______________________________/====|           |
  337.                                                     |  SAPd     |
  338.    IPX Addr: 0x04000000  etherII                eth3|           |
  339.   |--------------------------|                 /====|           |
  340.                 |                              |    \___________/
  341.                 \______________________________/
  342.  
  343.   The configuration for the above network would look like:
  344.  
  345.   # ipx_interface add eth0 802.2 0x0100000000
  346.   # ipx_interface add eth1 802.2 0x0200000000
  347.   # ipx_interface add eth2 etherii 0x0300000000
  348.   # ipx_interface add eth3 etherii 0x0400000000
  349.   # ipxd
  350.  
  351.   You should then wait a moment or two and check your
  352.   /proc/net/ipx_route file and you should see it populated with the IPX
  353.   routes relevant to your configuration and any learned from any other
  354.   routers in the network.
  355.  
  356.   7.1.  Do I need to configure an internal network ?
  357.  
  358.   Novell has a feature called an internal network, which it uses to
  359.   simplify routing in situations where a host has more than one network
  360.   device connected.  This is useful in the case of a fileserver
  361.   connected to multiple networks as it means that only one route needs
  362.   to be advertised to reach the server regardless of which network you
  363.   are attempting from.
  364.  
  365.   In the case of a configuration where you are not running a fileserver
  366.   and your machine acting only as an IPX router the question is not as
  367.   simple to answer. It has been reported that configuring for IPX/PPP
  368.   works `better' if you also configure an internal network.
  369.  
  370.   In any case it is easy to do, but may require a rebuild of your
  371.   kernel.  When you are working through the kernel make config you must
  372.   answer Y when asked Full internal IPX network as illustrated:
  373.  
  374.         ...
  375.         ...
  376.        Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] y
  377.         ...
  378.         ...
  379.  
  380.   To configure the internal network interface, use the ipx_internal_net
  381.   command described earlier in the IPX tools section. The main
  382.   precaution to take is to ensure that they IPX network address you
  383.   assign is unique on your network and that no other machine or network
  384.   is using it.
  385.  
  386.   8.  Configuring your Linux machine as an NCP client.
  387.  
  388.   If you are a user of a mixed technology network that comprises both IP
  389.   and IPX protocols it is likely that at some time or another you have
  390.   wanted to have your Linux machine access data stored on a Novell
  391.   fileserver on your network. Novell have long offered an NFS server
  392.   package for their fileservers that would allow this, but if you are a
  393.   small site or have only a small number of people interested in doing
  394.   this it is difficult to justify the cost of the commercial package.
  395.  
  396.   Volker Lendecke <lendecke@namu01.gwdg.de> has written a Linux
  397.   filesystem kernel module that supports a limited subset of the Novell
  398.   NCP that will allow you to mount Novell volumes into your Linux
  399.   filesystem without requiring any additional products for your
  400.   fileserver. The software causes Linux to emulate a normal Novell
  401.   workstation for file services. It also includes a small print utility
  402.   that allows you to print to Novell print queues. Because this is a
  403.   limited subset it does not work very well with any of the Novell
  404.   fileserver emulators described later in this document.
  405.  
  406.   Volker has called the package ncpfs and derived the necessary
  407.   information mainly from the book "Netzwerkprogrammierung in C" by
  408.   Manfred Hill and Ralf Zessin (further details of the book are
  409.   contained within the README file in the ncpfs package). Volker also
  410.   used the IPX tools written by Greg Page <greg@caldera.com>.
  411.  
  412.   8.1.  Obtaining ncpfs.
  413.  
  414.   The latest ncpfs package was designed to be built against the version
  415.   1.2.13 kernel or kernels later than 1.3.71 so you if you are not using
  416.   a kernel in either of these categories it then you should obtain one
  417.   and use it.
  418.  
  419.   You can obtain the ncpfs package by anonymous ftp from Volker's home
  420.   site at: ftp.gwdg.de <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/> or
  421.   sunsite.unc.edu
  422.   <ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/ncpfs> or mirror
  423.   sites. The current version at the time of writing was: ncpfs-0.24.tgz
  424.  
  425.   8.2.  Building ncpfs for kernels 1.2.*.
  426.  
  427.      Build a kernel with Ethernet and IPX support
  428.         The first thing you need to do is ensure that your kernel has
  429.         been built with IPX support enabled.  In the 1.2.13 version
  430.         kernel you need only ensure that you have answered Y to the
  431.         question: 'The IPX protocol' as illustrated:
  432.  
  433.          ...
  434.          ...
  435.         Assume subnets are local (CONFIG_INET_SNARL) [y]
  436.         Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
  437.         The IPX protocol (CONFIG_IPX) [n] y
  438.         *
  439.         * SCSI support
  440.          ...
  441.          ...
  442.  
  443.      You will also need to ensure that you include an appropriate driver
  444.      for your Ethernet card. If you do not know how to do this then you
  445.      should read the Ethernet-HOWTO
  446.      <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>.
  447.  
  448.      You can then proceed to build your kernel. Make sure you remember
  449.      to run lilo to install it when you have finished.
  450.  
  451.      Untar the ncpfs software
  452.  
  453.         # cd /usr/src
  454.         # tar xvfz ncpfs-0.24.tgz
  455.         # cd ncpfs
  456.  
  457.      Make the ncpfs software
  458.         The software should compile cleanly with no configuration
  459.         necessary:
  460.  
  461.         # make
  462.  
  463.      Copy the IPX tools somewhere useful if you don't already have them.
  464.         After the make has completed you should find all of the tools
  465.         you need in the ncpfs/bin directory. You can use make install to
  466.         install the tools in Volkers choice of directories, but I prefer
  467.         to place them in different directories. I use the following
  468.         commands to copy them to my preferred directories:
  469.  
  470.         # cd bin
  471.         # cp ncp* pserver /usr/local/sbin
  472.         # cp nwmsg /sbin
  473.         # cp ../ipxdump/ipxdump ../ipxdump/ipxparse /usr/local/sbin
  474.         # cp ncopy nprint nsend nwfsinfo pqlist slist /usr/local/bin
  475.  
  476.      note: the nwmsg command must  be installed in the /sbin because it
  477.      is invoked by the kerneld daemon if you are running it. If you want
  478.      to change the location of it then you need to edit the
  479.      /usr/src/linux/include/linux/ncp_fs.h file and change the
  480.      NCP_MSG_COMMAND definition.
  481.  
  482.      If you do not already have Greg Pages IPX tools installed then you
  483.      should also do the following:
  484.  
  485.      # cp ipx* /usr/local/sbin
  486.  
  487.      Copy the ncpfs.o module somewhere useful if necessary.
  488.         If you are compiling for a 1.2.* kernel then you will find a
  489.         file called ncpfs.o in the ncpfs/bin directory after the make
  490.         has completed. This is the ncpfs kernel module.  You should copy
  491.         this somewhere useful. On my debian system I have copied it to
  492.         the /lib/modules/1.2.13/fs directory and added ncpfs to the
  493.         /etc/modules file so that it will be automatically started at
  494.         boot time. If you are using some other distribution you should
  495.         find where it keeps its modules and copy it there, or just copy
  496.         it to your /etc directory. To load the modules manually you need
  497.         to use the command:
  498.  
  499.         # insmod ncpfs.o
  500.  
  501.   8.3.  Building ncpfs for kernels 1.3.71++.
  502.  
  503.   For the latest version of ncpfs you must use kernel 1.3.71 or newer.
  504.   If you want to use older 1.3.* kernels then you must locate a version
  505.   of ncpfs like ncpfs-0.12.tgz.
  506.  
  507.   If you intend using a kernel that is version 1.3.71 or newer then the
  508.   ncpfs kernel code has been included in the standard kernel
  509.   distribution. You need only answer Y to:
  510.  
  511.    ...
  512.    ...
  513.   The IPX protocol ?
  514.    ...
  515.    ...
  516.   NCP filesystem support (to mount NetWare volumes) ?
  517.    ...
  518.    ...
  519.  
  520.   You will still need to follow the instructions for building for
  521.   kernels 1.2.* so that you can build the tools but there will not be a
  522.   module file for you to install.
  523.  
  524.   8.4.  Configuring and using ncpfs.
  525.  
  526.      Configure the IPX network software
  527.         There are two ways of configuring the IPX network software. You
  528.         can manually configure all of your IPX network information or
  529.         you can choose to let the software determine for itself some
  530.         reasonable settings. In most installations the automatic method
  531.         will work ok. If it doesn't work for you then read the 'IPX
  532.         tools' section below to configure your software manually:
  533.  
  534.         # ipx_configure --auto_interface=on --auto_primary=on
  535.  
  536.      Test the configuration
  537.         After your IPX network is configured you should be able to use
  538.         the slist command to see a list of all of the Novell fileserver
  539.         on your network:
  540.  
  541.         # slist
  542.  
  543.      If the slist command displays a message like: ncp_connect: Invalid
  544.      argument then your kernel probably does not support IPX. Check that
  545.      you have actually booted off the appropriate kernel.  If the slist
  546.      command does not list all of your fileservers then you may need to
  547.      use the manual network configuration method.
  548.  
  549.      Mount a Novell(tm) volume.
  550.         If your IPX network software is working ok you should now be
  551.         able to mount a Novell fileserver volume into your Linux
  552.         filesystem. The ncpmount command is used for this purpose and
  553.         requires that you specify at least the following information:
  554.  
  555.         1. The fileserver name
  556.  
  557.         2. The fileserver login id. If it has a password you will also
  558.            need that.
  559.  
  560.         3. The mount point ie. where you want the mount to go.
  561.  
  562.         An example command to mount fileserver ACCT_FS01, with a login
  563.         id of guest with no password, under the /mnt/Accounts directory
  564.         might look like the following:
  565.  
  566.         # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n
  567.  
  568.      Note the use of the -n option to indicate that no password is
  569.      required for the login. The same login specifying a password of
  570.      secret would look like:
  571.  
  572.      # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret
  573.  
  574.      If you don't specify either the -n or the -P options you will be
  575.      prompted for a password.
  576.  
  577.      Check the mount
  578.         If the mount is successful you will find the volumes accessible
  579.         to the userid used for login listed as directories under the
  580.         mount point. You should then also be able to traverse the
  581.         directory structure to find other files. Because NCP does not
  582.         provide uid or gid ownership of files, all of the files will
  583.         have the permission and ownership assigned to the mount point
  584.         directory, keep this in mind when sharing mounts between Linux
  585.         users.
  586.  
  587.      Test printing
  588.         You can test to see if printing works using the nprint command.
  589.         The nprint command allows you to print to a file to a NetWare
  590.         print queue. The pqlist command allows you the list the
  591.         available print queues on a NetWare server. Both commands
  592.         require that you supply username and password so you might
  593.         normally consider building some shell scripts to make the task
  594.         of printing easier.  An example might look like:
  595.  
  596.           # pqlist -S ACCT_FS01 -U guest -n
  597.           # nprint -S ACCT_FS01 -q LASER -U guest -n filename.txt
  598.  
  599.      The login syntax is similar to the ncpmount command. The examples
  600.      above assume that fileserver ACCT_FS01 has a guest account with no
  601.      password, that a print queue called LASER exists and that guest is
  602.      allowed to print to it.
  603.  
  604.      Configure mounts to be automatically performed.
  605.         If you have some need to permanently have an ncp mount then you
  606.         will want to configure the commands above into your rc files so
  607.         that they occur automatically at boot time. I recommend you
  608.         place them in your /etc/rc.local file if you have one. I have
  609.         placed them in a file called NetWare in my /etc/init.d directory
  610.         and created appropriate symbolic links into my /etc/rc2.d
  611.         directory to cause it to be started. You might use something
  612.         like:
  613.  
  614.      #
  615.      # Start the ncp filesystem
  616.      /sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o
  617.  
  618.      # configure the IPX network
  619.      ipx_configure --auto_interface=on --auto_primary=on
  620.  
  621.      # guest login to the Accounting fileserver
  622.      ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n
  623.  
  624.      #
  625.  
  626.      There is another means of configuring NCP mounts and that is by
  627.      building a $HOME/.nwclient file. This file contains details of tem¡
  628.      porary or user specific NCP mounts that would be performed regu¡
  629.      larly. It allows you to store the details of mounts so that you can
  630.      recreate them without having to specify all of the detail each
  631.      time.
  632.  
  633.      Its format is quite straightforward:
  634.  
  635.           # The first entry is the 'preferred server' entry and is
  636.           # used whenever you do not specify a server explicitly.
  637.           #
  638.           # User TERRY login to DOCS_FS01 fileserver with password 'password'
  639.           DOCS_FS01/TERRY password
  640.           #
  641.           # Guest login to the ACCT_FS01 fileserver with no password.
  642.           ACCT_FS01/GUEST -
  643.  
  644.      To activate these mounts you could use:
  645.  
  646.           $ ncpmount /home/terry/docs
  647.  
  648.      to mount: DOCS_FS01 with a login of TERRY under the
  649.      /home/terry/docs directory. Note that this entry was chosen because
  650.      no fileserver was specified in the mount command. If the following
  651.      command were used:
  652.  
  653.           $ ncpmount -S ACCT_FS01 /home/terry/docs
  654.  
  655.      then a GUEST login to ACCT_FS01 would be mounted there instead.
  656.  
  657.      Note: for this mechanism to work the permissions of the
  658.      $HOME/.nwclient file must be 0600 so you would need to use the
  659.      command:
  660.  
  661.           $ chmod 0600 $HOME/.nwclient
  662.  
  663.      If non-root users are to be allowed to use this mechanism then the
  664.      ncpmount command must be Set Userid Root, so you would need to give
  665.      it permissions:
  666.  
  667.           # chmod 4755 ncpmount
  668.  
  669.      Try out the nsend utility
  670.         a utility to send messages to Novell users is also included in
  671.         the package, it is called nsend and is used as follows:
  672.  
  673.         # nsend rod hello there
  674.  
  675.      would send the message "hello there" to a logged in user "rod" on
  676.      your "primary" fileserver (the first one appearing in your
  677.      .nwclient file. You can specify another fileserver with the same
  678.      syntax as for the ncpmount command.
  679.  
  680.   9.  Configuring your Linux machine as an NCP server.
  681.  
  682.   There are two packages available that allow Linux to provide the
  683.   functions of a Novell Fileserver. They both allow you to share files
  684.   on your linux machine with users using Novell NetWare client software.
  685.   Users can attach and map filesystems to appear as local drives on
  686.   their machines just as they would to a real Novell fileserver. You may
  687.   want to try both to see which best serves your intended purpose.
  688.  
  689.   9.1.  The mars_nwe package.
  690.  
  691.   Martin Stover <mstover@freeway.de> developed mars_nwe to enable linux
  692.   to provide both file and print services for NetWare clients.
  693.  
  694.   In case you are wondering about the name: mars_nwe is Martin Stovers
  695.   Netware Emulator.
  696.  
  697.   9.1.1.  Capability of mars_nwe.
  698.  
  699.   mars_nwe implements a subset of the full Novell NCP for file services,
  700.   disk based bindery and also print services. It is likely to contain
  701.   bugs but there are many people using it now and the number of bugs is
  702.   steadily decreasing as new versions are released.
  703.  
  704.   9.1.2.  Obtaining mars_nwe.
  705.  
  706.   You can obtain mars_nwe from ftp.gwdg.de
  707.   <ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/>. The current version at the
  708.   time of writing was: mars_nwe-0.97.pl6.tgz.
  709.  
  710.   9.1.3.  Building the mars_nwe package.
  711.  
  712.      Build a kernel with Ethernet and IPX Support
  713.         In the 1.2.13 version kernel you need only ensure that you have
  714.         answered Y to the question: 'The IPX protocol' and N to the
  715.         question:
  716.          ...
  717.          ...
  718.         The IPX protocol (CONFIG_IPX) [n] y
  719.          ...
  720.          ...
  721.         Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] n
  722.          ...
  723.          ...
  724.  
  725.      In newer kernels a similar process is adopted but the actual text
  726.      of the prompt may have changed slightly.
  727.  
  728.      You will also need to ensure that you include an appropriate driver
  729.      for your Ethernet card. If you do not know how to do this then you
  730.      should read the Ethernet-HOWTO
  731.      <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>.
  732.  
  733.      You can then proceed to build your kernel. Make sure you remember
  734.      to run lilo to install it when you have finished.
  735.  
  736.      Untar the mars_nwe package.
  737.  
  738.           # cd /usr/src
  739.           # tar xvfz mars_nwe-0.97.pl6.tgz
  740.  
  741.      Make mars_nwe.
  742.         To make the package is very simple. First you should look at and
  743.         edit the config.h file if necessary. It allows you to configure
  744.         items such as the installation directories that will be used and
  745.         the maximum number of sessions and volumes that the server will
  746.         support. The really important entries to look at are:
  747.  
  748.         FILENAME_NW_INI       the location of the initialisation file
  749.         PATHNAME_PROGS        where the executable support programs will be found.
  750.         PATHNAME_BINDERY      where the 'bindery' files will go.
  751.         PATHNAME_PIDFILES     the directory for the 'pid' files to be written.
  752.         MAX_CONNECTIONS       the maximum number of simultaneous connections allowed.
  753.         MAX_NW_VOLS           the maximum number of volumes mars_nwe will support.
  754.         MAX_FILE_HANDLES_CONN the maximum number of open files per connection.
  755.         WITH_NAME_SPACE_CALLS if you want to support ncpfs clients.
  756.         INTERNAL_RIP_SAP      whether you want mars_nwe to provide rip/sap routing.
  757.  
  758.      When this is done:
  759.  
  760.           # make
  761.           # make install
  762.  
  763.      will build the servers and install them in the appropriate
  764.      directory. The installation script also installs the configuration
  765.      file /etc/nwserv.conf.
  766.  
  767.      Configure the server.
  768.         Configuration is fairly simple. You need to edit the
  769.         /etc/nwserv.conf file. The format of this file may at first look
  770.         a little cryptic, but it is fairly straightforward. The file
  771.         contains a number of single line configuration items. Each line
  772.         is whitespace delimited and begins with a number that indicates
  773.         the contents of the line. All characters following a '#'
  774.         character are considered a comment and ignored. Martin supplies
  775.         an example configuration file in the package, but I'll present
  776.         what I consider to be a simplified example to offer an
  777.         alternative for you.
  778.  
  779.      # VOLUMES (max. 5)
  780.      # Only the SYS volume is compulsory. The directory containing the SYS
  781.      # volume must contain the directories: LOGIN, PUBLIC, SYSTEM, MAIL.
  782.      # The 'k' option converts all filenames in NCP requests to lowercase.
  783.      # The 'm' option marks the volume as removable (useful for cdroms etc.)
  784.      # The 'r' option set the volume to read-only.
  785.      # The 'o' option indicates the volume is a single mounted filesystem.
  786.      # The 'P' option allows commands to be used as files.
  787.      # The default is upper case.
  788.      # Syntax:
  789.      #    1 <Volumename> <Volumepath>   <Options>
  790.  
  791.      1   SYS         /home/netware/SYS/               # SYS
  792.      1   DATA        /home/netware/DATA/      k       # DATA
  793.      1   CDROM       /cdrom                   kmr     # CDROM
  794.  
  795.      # SERVER NAME
  796.      # If not set then the linux hostname will be converted to upper case
  797.      # and used. This is optional, the hostname will be used if this is not
  798.      # configured.
  799.      # Syntax:
  800.      #    2 <Servername>
  801.  
  802.      2   LINUX_FS01
  803.  
  804.      # INTERNAL NETWORK ADDRESS
  805.      # The Internal IPX Network Address is a feature that simplifies IPX routing
  806.      # for multihomed hosts (hosts that have ports on more than one IPX network).
  807.      # Syntax:
  808.      #    3 <Internal Network Address> [<Node Number>]
  809.      # or:
  810.      #    3 auto
  811.      #
  812.      # If you use 'auto' then your host IP address will be used. NOTE: this may
  813.      # be dangerous, please be sure you pick a number unique to your network.
  814.  
  815.      3   0x49a01010  1
  816.  
  817.      # NETWORK DEVICE(S)
  818.      # This entry configures your IPX network. If you already have your
  819.      # IPX network configured then you do not need this. This is the same as
  820.      # using ipx_configure/ipx_interface before you start the server.
  821.      # Syntax:
  822.      #    4 <IPX Network Number> <device_name> <frametype> [<ticks>]
  823.      #                         Frame types: ethernet_ii, 802.2, 802.3, SNAP
  824.  
  825.      4  0x39a01010  eth0  802.3  1
  826.  
  827.      # SAVE IPX ROUTES AFTER SERVER IS DOWNED
  828.      # Syntax:
  829.      #    5 <flag>
  830.      #       0 = don't save routes, 1 = do save routes
  831.  
  832.      5 0
  833.  
  834.      # NETWARE VERSION
  835.      # Syntax:
  836.      #    6 <version>
  837.      #      0 = 2.15, 1 = 3.11
  838.  
  839.      6 1
  840.  
  841.      # PASSWORD HANDLING
  842.      # Real Novell DOS clients support a feature which encypts your
  843.      # password when changing it. You can select whether you want your
  844.      # mars server to support this feature or not.
  845.      # Syntax
  846.      #    7 <flag>
  847.      #    <flag> is:
  848.      #        0 to force password encryption. (Clients can't change password)
  849.      #        1 force password encryption, allow unencrypted password change.
  850.      #        7 allow non-encrypted password but no empty passwords.
  851.      #        8 allow non-encrypted password including empty passwords.
  852.      #        9 completely unencrypted passwords (doesn't work with OS/2)
  853.  
  854.      7 1
  855.  
  856.      # MINIMAL GID UID rights
  857.      # permissions used for attachments with no login. These permissions
  858.      # will be used for the files in your primary server attachment.
  859.      # Syntax:
  860.      #    10 <gid>
  861.      #    11 <uid>
  862.      #    <gid> <uid> are from /etc/passwd, /etc/groups
  863.  
  864.      10  200
  865.      11  201
  866.  
  867.      # SUPERVISOR password
  868.      # May be removed after the server is started once. The server will
  869.      # encrypt this information into the bindery file after it is run.
  870.      # You should avoid using the 'root' user and instead use another
  871.      # account to administer the mars fileserver.
  872.      #
  873.      # This entry is read and encrypted into the server bindery files, so
  874.      # it only needs to exist the first time you start the server to ensure
  875.      # that the password isn't stolen.
  876.      #
  877.      # Syntax:
  878.      #    12 <Supervisor-Login> <Unix username> [<password>]
  879.  
  880.      12  SUPERVISOR  terry  secret
  881.  
  882.      # USER ACCOUNTS
  883.      # This associates NetWare logins with unix accounts. Password are
  884.      # optional.
  885.      # Syntax:
  886.           13 <User Login> <Unix Username> [<password>]
  887.  
  888.      13  TERRY  terry
  889.      13  MAR    mar
  890.  
  891.      # LAZY SYSTEM ADMIN CONFIGURATION
  892.      # If you have a large numbers of users and could not be bothered using
  893.      # type 13 individual user mappings, you can automatically map mars_nwe
  894.      # logins to linux user names. BUT, there is currently no means of making
  895.      # use of the linux login password so all users configured this way are
  896.      # will use the single password supplied here. My recommendation is not
  897.      # to do this unless security is absolutely no concern to you.
  898.      # Syntax:
  899.      #    15 <flag> <common-password>
  900.      #    <flag> is: 0  - don't automatically map users.
  901.      #               1  - do automatically map users not configured above.
  902.      #               99 - automatically map every user in this way.
  903.  
  904.      15  0  duzzenmatta
  905.  
  906.      # SANITY CHECKING
  907.      # mars_nwe will automatically ensure that certain directories exist if
  908.      # you set this flag.
  909.      # Syntax:
  910.      #    16 <flag>
  911.      #    <flag> is 0 for no, don't, or 1 for yes, do.
  912.  
  913.      16  0
  914.  
  915.      # PRINT QUEUES
  916.      # This associates NetWare printers with unix printers. The queue
  917.      # directories must be created manually before printing is attempted.
  918.      # The queue directories are NOT lpd queues.
  919.      # Syntax:
  920.      #    21 <queue_name> <queue_directory> <unix_print_cmd>
  921.  
  922.      21  EPSON  SYS:/PRINT/EPSON lpr -h
  923.      21  LASER  SYS:/PRINT/LASER lpr -Plaser
  924.  
  925.      # DEBUG FLAGS
  926.      # Syntax:
  927.      #    <debug_item> <debug_flag>
  928.      #
  929.      #    100 = IPX KERNEL
  930.      #    101 = NWSERV
  931.      #    102 = NCPSERV
  932.      #    103 = NWCONN
  933.      #    104 = start NWCLIENT
  934.      #    105 = NWBIND
  935.      #    106 = NWROUTED
  936.      #                 0 = disable debug, 1 = enable debug
  937.  
  938.      100 0
  939.      101 0
  940.      102 0
  941.      103 0
  942.      104 0
  943.      105 0
  944.      106 0
  945.  
  946.      # RUN NWSERV IN BACKGROUND AND USE LOGFILE
  947.      # Syntax:
  948.      #    200 <flag>
  949.      #        0 = run NWSERV in foreground and don't use logfile
  950.      #        1 = run NWSERV in background and use logfile
  951.  
  952.      200  1
  953.  
  954.      # LOGFILE NAME
  955.      # Syntax:
  956.      #    201 <logfile>
  957.  
  958.      201  /tmp/nw.log
  959.  
  960.      # APPEND LOG OR OVERWRITE
  961.      # Syntax:
  962.      #    202 <flag>
  963.      #        0 = append to existing logfile
  964.      #        1 = overwrite existing logfile
  965.  
  966.      202  1
  967.  
  968.      # SERVER DOWN TIME
  969.      # This item sets the time after a SERVER DOWN is issued that the
  970.      # server really goes down.
  971.      # Syntax:
  972.      #    210 <time>
  973.      #        in seconds. (defaults 10)
  974.  
  975.      210  10
  976.      # ROUTING BROADCAST INTERVAL
  977.      # The time is seconds between server broadcasts
  978.      # Syntax:
  979.      #    211 <time>
  980.      #        in seconds. (defaults 60)
  981.  
  982.      211  60
  983.  
  984.      # ROUTING LOGGING INTERVAL
  985.      # Set how many broadcasts take place before logging of routing
  986.      # information occurs.
  987.      # Syntax:
  988.      #    300  <number>
  989.  
  990.      300  5
  991.  
  992.      # ROUTING LOGFILE
  993.      # Set the name of the routing logfile
  994.      # Syntax:
  995.      #    301 <filename>
  996.  
  997.      301  /tmp/nw.routes
  998.  
  999.      # ROUTING APPEND/OVERWRITE
  1000.      # Set whether you want to append to an existing log file or
  1001.      # overwrite it.
  1002.      # Syntax:
  1003.      #    302 <flag>
  1004.      #        <flag> is 0 for append, 1 for create/overwrite
  1005.  
  1006.      302  1
  1007.  
  1008.      # WATCHDOG TIMING
  1009.      # Set the timing for watchdog messages that ensure the network is
  1010.      # still alive.
  1011.      # Syntax:
  1012.      #    310 <value>
  1013.      #        <value> =   0 - always send watchdogs
  1014.      #                  < 0 - (-ve) for disable watchdogs
  1015.      #                  > 0 - send watchdogs when network traffic
  1016.      #                        drops below 'n' ticks
  1017.  
  1018.      310  7
  1019.  
  1020.      # STATION FILE
  1021.      # Set the filename for the stations file which determine which
  1022.      # machines this fileserver will act as the primary fileserver for.
  1023.      # The syntax of this file is described in the 'examples' directory
  1024.      # of the source code.
  1025.      # Syntax:
  1026.      #    400 <filename>
  1027.  
  1028.      400  /etc/nwserv.stations
  1029.  
  1030.      # GET NEAREST FILESERVER HANDLING
  1031.      # Set how SAP Get Nearest Fileserver Requests are handled.
  1032.      # Syntax:
  1033.      #    401 <flag>
  1034.      #        <flag> is: 0 - disable 'Get Nearest Fileserver' requests.
  1035.      #                   1 - The 'stations' file lists stations to be excluded.
  1036.      #                   2 - The 'stations' file lists stations to be included.
  1037.  
  1038.      401  2
  1039.  
  1040.      Start the server
  1041.         If you've configured the server to expect external programs to
  1042.         configure your network and/or provide the routing function then
  1043.         you should start those before starting the server. Presuming you
  1044.         have configured the server so that itwill configure your
  1045.         interfaces for you and provide the routing services you need
  1046.         only issue the command:
  1047.  
  1048.           # nwserv
  1049.  
  1050.      Test the server
  1051.         To test the server you should first try to attach and login from
  1052.         a NetWare client on your network. You then set a CAPTURE from
  1053.         the client and attempt a print. If both of these are successful
  1054.         then the server is working.
  1055.  
  1056.   9.2.  The lwared package.
  1057.  
  1058.   Ales Dryak <A.Dryak@sh.cvut.cz> developed lwared to allow Linux to
  1059.   function as an NCP based fileserver.
  1060.  
  1061.   Ales has called the package lwared, an abbreviation for LinWare
  1062.   Daemon.
  1063.  
  1064.   9.2.1.  Capability of lwared.
  1065.  
  1066.   The lwared server is capable of providing a subset of the full
  1067.   function of the Novell NCP. It incorporates messaging but it does not
  1068.   provide any printing facilities at all. It does not currently work
  1069.   very well with either Windows95 or Windows NT clients. The lwared
  1070.   server relies on external programs to build and update the IPX routing
  1071.   and SAP tables.  Misbehaving clients can cause the server to crash.
  1072.   Importantly, filename translation facilities have not been included.
  1073.  
  1074.   The server does work for NETX and VLM NetWare shells.
  1075.  
  1076.   9.2.2.  Obtaining lwared
  1077.  
  1078.   The lwared package can be built for any kernel newer than 1.2.0, I
  1079.   recommend you use version 1.2.13 as no kernel patches are required if
  1080.   you do. Some of the IPX functionality has changed with the version
  1081.   1.3.* kernels and this means that patches are now required to make it
  1082.   work properly. Appropriate patches are included for the new kernels,
  1083.   so if you must use an alpha kernel you should still be able to get
  1084.   lwared to work properly for you.
  1085.  
  1086.   You can obtain the lwared package by anonymous ftp from:
  1087.   klokan.sh.cvut.cz <ftp://klokan.sh.cvut.cz/pub/linux/linware/>
  1088.  
  1089.   or from:
  1090.  
  1091.   sunsite.unc.edu
  1092.   <ftp://sunsite.unc.edu/pub/Linux/system/Network/daemons> or mirror
  1093.   sites. The current version at the time of writing was:
  1094.   lwared-0.95.tar.gz
  1095.  
  1096.   9.2.3.  Building lwared
  1097.  
  1098.      Untar the lwaredpackage
  1099.         Something like:
  1100.  
  1101.         # cd /usr/src
  1102.         # tar xvpfz lwared-0.95.tar.gz
  1103.  
  1104.      Build a kernel with Ethernet and IPX support
  1105.         If you are using an alpha 1.3.* kernel then you should try and
  1106.         use kernel version 1.3.17 or newer because the supplied patches
  1107.         were built against it. 1.3.* kernels older than 1.3.17 will
  1108.         require hand patching to install. (some information on how to do
  1109.         this is included in the INSTALL file in the package.). To
  1110.         install the patches against a 1.3.17 kernel or newer you should
  1111.         try:
  1112.  
  1113.         # make patch
  1114.  
  1115.      After applying the patches if necessary, the next thing you need to
  1116.      do is ensure that your kernel has been built with IPX support
  1117.      enabled. In the 1.2.13 version kernel you need only ensure that you
  1118.      have answered Y to the question: 'The IPX protocol' as illustrated:
  1119.  
  1120.       ...
  1121.       ...
  1122.      Assume subnets are local (CONFIG_INET_SNARL) [y]
  1123.      Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n]
  1124.      The IPX protocol (CONFIG_IPX) [n] y
  1125.      *
  1126.      * SCSI support
  1127.       ...
  1128.       ...
  1129.  
  1130.      In newer kernels a similar process is adopted by the actual text of
  1131.      the prompt may have changed slightly.
  1132.  
  1133.      You will also need to ensure that you include an appropriate driver
  1134.      for your Ethernet card. If you do not know how to do this then you
  1135.      should read the Ethernet-HOWTO
  1136.      <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>.
  1137.  
  1138.      You can then proceed to build your kernel. Make sure you remember
  1139.      to run lilo to install it when you have finished.
  1140.  
  1141.      Compile and install lwared.
  1142.         To compile lwared you should first check, edit if necessary, the
  1143.         server/config.h file. This file contains various settings that
  1144.         will govern the way your server will behave when it is running.
  1145.         The defaults are reasonable, though you might want to check that
  1146.         the directories specified for the log files and configuration
  1147.         files suit your system.
  1148.  
  1149.         # make depend
  1150.         # make
  1151.         # make install
  1152.  
  1153.      I found that the 'make depend' complained about not finding the
  1154.      float.h file on my system but appeared to work anyway.  I also
  1155.      found that when I tried compiling with gcc 2.6.3 I found I had to
  1156.      change the line:
  1157.  
  1158.      #include <net/route.h>
  1159.  
  1160.      to
  1161.  
  1162.      #include <net/if_route.h>
  1163.  
  1164.      in lib/ipxkern.c as this file changed name sometime.
  1165.  
  1166.      The 'make install' will attempt to install the server and routing
  1167.      daemon programs into your /usr/sbin directory, the lwpasswd program
  1168.      into your /usr/bin directory, the IPX utility programs will be
  1169.      installed into your /sbin directory and last but not least the
  1170.      manual pages will go into the /usr/man directory structure. If any
  1171.      of these locations are not suitable for your system then you should
  1172.      edit the relevant Makefile and change the target directories to
  1173.      suit.
  1174.  
  1175.   9.2.4.  Configuring and using lwared
  1176.  
  1177.   Now the fun bit!
  1178.  
  1179.      Configuring the IPX network
  1180.         The first thing you must do is configure your Ethernet
  1181.         interfaces to support the IPX networks your server will support.
  1182.         To do this you will need to know the IPX network addresses for
  1183.         each of your LAN segments, which Ethernet device (eth0, eth1
  1184.         etc.) is on which segment, what frame type (802.3, EtherII etc.)
  1185.         each LAN segment uses and what Internal Network address your
  1186.         server should use (this is really needed if your server will
  1187.         service more than one LAN segment).  A configuration for a
  1188.         server that is on two dis-similar segments with IPX network
  1189.         addresses 23a91300 and 23a91301 and internal network address
  1190.         bdefaced might look like:
  1191.  
  1192.         # ipx_internal_net add BDEFACED 1
  1193.         # ipx_interface add eth0 802.3 23a91300
  1194.         # ipx_interface add eth1 etherii 23a91301
  1195.  
  1196.      Start the routing daemons
  1197.         The kernel software itself actually does the IPX packet
  1198.         forwarding as it does for IP, but the kernel requires additional
  1199.         programs to manage the routing table updates. In the case of IPX
  1200.         two daemons are needed and both are supplied with lwared:
  1201.         ipxripd manages the IPX routing information and ipxsapd manages
  1202.         the SAP information.  To start the daemons you need only specify
  1203.         the location of where they should write their log messages:
  1204.  
  1205.         # ipxripd /var/adm/ipxrip
  1206.         # ipxsapd /var/adm/ipxsap
  1207.  
  1208.      Configure the lwared server
  1209.         There are two files that you must manually configure to allow
  1210.         user login to your lwared server.  They are:
  1211.  
  1212.         /etc/lwpasswd
  1213.            This is where LinWare user account information is kept. The
  1214.            lwpasswd program is to keep it up to date.  In its simplest
  1215.            form the /etc/lwpasswd file looks like:
  1216.  
  1217.            ales:
  1218.            terryd:
  1219.            guest:
  1220.  
  1221.         Its format is a simple list of login id followed by a ':' char¡
  1222.         acter and then the encrypted version of the login passwd. A cou¡
  1223.         ple of important caveats here: No encrypted password means no
  1224.         password, LinWare users must have Linux accounts, that is any
  1225.         user you place in /etc/lwpasswd must also appear in /etc/passwd
  1226.         and root is the only account that can change the password of
  1227.         another LinWare user. If you are logged in as root you can
  1228.         change the password of a LinWare user as this transcript demon¡
  1229.         strates:
  1230.  
  1231.         # lwpasswd rodg
  1232.         Changing password for RODG
  1233.         Enter new password:
  1234.         Re-type new password:
  1235.         Password changed.
  1236.  
  1237.         /etc/lwvtab
  1238.            This is the LinWare volume tables and it stores information
  1239.            about what directories should be made available to LinWare
  1240.            users (this file is similar in nature to the NFS /etc/exports
  1241.            file). A simple example of its format is as follows:
  1242.  
  1243.            SYS             /lwfs/sys
  1244.            DATA            /lwfs/data
  1245.            HOME            /home
  1246.  
  1247.         The format is simple: Volume name followed by whitespace fol¡
  1248.         lowed by Linux directory to export. You must have at least an
  1249.         entry for the SYS volume for the server to start. If you intend
  1250.         your DOS based users to be able use your LinWare server as their
  1251.         primary server then you must install a standard SYS volume
  1252.         directory structure underneath the directory you export as your
  1253.         SYS volume. Since these files are proprietary and copyright to
  1254.         the Novell corporation you should have a license for these. If
  1255.         you users will be using a Novell fileserver as their primary
  1256.         server then this will not be necessary.
  1257.  
  1258.      Start the lwared server.
  1259.         tada!
  1260.  
  1261.         # lwared
  1262.  
  1263.      It is almost an anticlimax isn't it ? Ok so you've got a question,
  1264.      right?  What is the fileserver name that is being advertised ? If
  1265.      you started the server as shown then the LinWare server name being
  1266.      advertised will be based on what is returned by the Linux hostname.
  1267.      If you'd like it to be something else then you can give the server
  1268.      the name when you start it, for example:
  1269.  
  1270.      # lwared -nlinux00
  1271.  
  1272.      would start the server with the name linux00.
  1273.  
  1274.      Test the lwared server.
  1275.         The very first thing to test is that your LinWare server appears
  1276.         in an slist from a DOS client on your network. The slist program
  1277.         is stored on the SYS volume of a Novell fileserver so you must
  1278.         do this from a machine that is already logged in somewhere. If
  1279.         this is not successful then check that ipxsapd and lwared are
  1280.         both running. If the slist is successful then you should try
  1281.         attaching to the server and mapping a volume:
  1282.  
  1283.         C:> attach linux00/ales
  1284.          ...
  1285.          ...
  1286.         C:> map l:=linux00/data:
  1287.         C:> l:
  1288.  
  1289.      You should then be able to treat the new map just like any other
  1290.      map. The file permissions you will have will be based on those
  1291.      allowed to the linux account that parallels your LinWare login.
  1292.  
  1293.   10.  Configuring PPP for IPX support.
  1294.  
  1295.   New versions of the pppd PPP daemon for Linux have support that allows
  1296.   you to carry IPX packets across a PPP serial link. You need at least
  1297.   version ppp-2.2.0d of the daemon. See the PPP-HOWTO
  1298.   <http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html> for details on where
  1299.   to find it. When you compile pppd you must ensure you enable the IPX
  1300.   support by adding the following two lines:
  1301.  
  1302.        IPX_CHANGE = 1
  1303.        USE_MS_DNS = 1
  1304.  
  1305.   to: /usr/src/linux/pppd-2.2.0f/pppd/Makefile.linux.
  1306.  
  1307.   The IPX_CHANGE is what configures the IPX support into PPP.  The
  1308.   USE_MS_DNS define allows Microsoft Windows95 machines to do Name
  1309.   Lookups.
  1310.  
  1311.   The real trick to getting it to work in knowing how to configure it.
  1312.  
  1313.   There are many ways of doing this, but I'm only going to describe the
  1314.   two that I've received any information on. I've tried neither yet, so
  1315.   consider this section experimental, and if you get something to work,
  1316.   please let me know.
  1317.  
  1318.   10.1.  Configuring an IPX/PPP server.
  1319.  
  1320.   The first thing you need to do is configure your Linux machine as an
  1321.   IP/PPP server. When you have this done there are a couple of simple
  1322.   modifications you need to make to get IPX working over the same
  1323.   configuration.
  1324.  
  1325.   10.1.1.  First steps.
  1326.  
  1327.   Unless all you want to do is connect to your linux machine supporting
  1328.   the ppp dialin, and even then perhaps, you must configure your linux
  1329.   machine as an IPX router as described earlier. You won't need to use
  1330.   the ipx_route command because pppd will configure these for you as it
  1331.   does for IP. When you have the ipxd daemon running it will
  1332.   automatically detect any new IPX interfaces and propogates routes for
  1333.   them.  This is what you will need so that other machines will know
  1334.   about the client machines that connect.
  1335.  
  1336.   10.1.2.  Design.
  1337.  
  1338.   When you are running as a server it will normally be your
  1339.   responsibility to assign network address to each of the PPP links when
  1340.   they are established.  This is an important point, each PPP link will
  1341.   be an IPX network and will have a unique IPX network address. This
  1342.   means that you must decide how you will allocate addresses and what
  1343.   what they will be. A simple convention is to allocate one IPX network
  1344.   address to each serial device that will support IPX/PPP. You could
  1345.   allocate IPX network addresses based on the login id of the connecting
  1346.   user, but I don't see any particularly good reason to do so.
  1347.  
  1348.   I will assume that this is what you have done, and that there are two
  1349.   serial devices (modems) that we will use. The addresses I've assigned
  1350.   in this contrived example are:
  1351.  
  1352.        device IPX Network Address
  1353.        ------ -------------------
  1354.        ttyS0  0xabcdef00
  1355.        ttyS1  0xabcdef01
  1356.  
  1357.   10.1.3.  Configure pppd.
  1358.  
  1359.   Configure your /etc/ppp/options.ttyS0 file as follows:
  1360.  
  1361.        ipx-network abcdef00
  1362.        ipx-node 2:0
  1363.        ipxcp-accept-remote
  1364.  
  1365.   and your /etc/ppp/options.ttyS1 file as:
  1366.  
  1367.        ipx-network abcdef01
  1368.        ipx-node 3:0
  1369.        ipxcp-accept-remote
  1370.  
  1371.   These will ask pppd to allocate the appropriate IPX network addresses
  1372.   to the link when the link is established, set the local node number to
  1373.   2 or 3 and will let the remote node overwrite what the remote node
  1374.   number with what it thinks it is. Note that each of the addresses are
  1375.   hexadecimal numbers but that no 0x is required.
  1376.  
  1377.   There are other places this information could be configured. If you
  1378.   have only one dialin modem then an entry could go into the
  1379.   /etc/ppp/options file. Alternatively this information can be passed on
  1380.   the command line to pppd.
  1381.  
  1382.   10.1.4.  Test the server configuration.
  1383.  
  1384.   To test the configuration you will need to have a client configuration
  1385.   that is known to work. When the caller dials in, logs in and pppd
  1386.   starts it will assign the network address, advise the client of the
  1387.   servers node number and negotiate the clients node number. When this
  1388.   has completed, and after ipxd has detected the new interface the
  1389.   client should be able to establish IPX connections to remote hosts.
  1390.  
  1391.   10.2.  Configuring an IPX/PPP client.
  1392.  
  1393.   In a client configuration, whether or not you configure your Linux
  1394.   machine as an IPX router depends on whether you have a local LAN that
  1395.   you wish to act as an IPX router for. If you are a standalone machine
  1396.   connecting to an IPX/PPP dialin server then you won't need to run
  1397.   ipxd, but if you have a LAN and wish all of the machines on the LAN to
  1398.   make use of the IPX/PPP route then you must configure and run ipxd as
  1399.   described.  This configuration is much simpler because you do not have
  1400.   multiple serial devices to configure.
  1401.  
  1402.   10.2.1.  Configuring pppd
  1403.  
  1404.   The simplest configuration is one that allows the server to supply all
  1405.   of the IPX network configuration information. This configuration would
  1406.   be compatible with the server configuration described above.
  1407.  
  1408.   Again you need to add options to your /etc/ppp/options file, they are:
  1409.  
  1410.        ipxcp-accept-network
  1411.        ipxcp-accept-remote
  1412.        ipxcp-accept-local
  1413.  
  1414.   These options tell pppd to act completely passively and accept all of
  1415.   the configuration details from the server. You could supply default
  1416.   values here for servers that don't supply details by adding ipx-
  1417.   network and ipx-node entries similar to the server configuration.
  1418.  
  1419.   10.2.2.  Testing the IPX/PPP client.
  1420.  
  1421.   To test the client you will need a known working server to dial into.
  1422.   After you have dialled in and pppd has run you should see the IPX
  1423.   details configured on your ppp0 device when you run the ifconfig
  1424.   command and you should be able to use ncpmount.
  1425.  
  1426.   I'm not sure whether you will have to manually add IPX routes so that
  1427.   you can reach distant fileserver or not. This seems likely. If anyone
  1428.   running this configuration could tell me I'd be grateful.
  1429.   11.  IPX tunnel over IP
  1430.  
  1431.   Many of you will be in a situation where you have two Novell Local
  1432.   Area Netorks with only an IP connection between them. How do you play
  1433.   multiplayer deathmatch DOOM for DOS via this arrangement you might ask
  1434.   ? Andreas Godzina <ag@agsc.han.de> has an answer for you in the form
  1435.   of ipxtunnel.
  1436.  
  1437.   ipxtunnel provides a bridge-like facility for IPX by allowing IPX
  1438.   packets to be encapsulated with tcp/ip datagrams so that they can be
  1439.   carried by a tcp/ip connection. It listens for IPX packets and when it
  1440.   hears one it wraps it within a tcp/ip datagram and routes it to a
  1441.   remote IP address that you specify. For this to work of course the
  1442.   machine that you route the encapsulated IPX must also be running a
  1443.   copy of the same version of ipxtunnel as you.
  1444.  
  1445.   11.1.  Obtaining ipxtunnel
  1446.  
  1447.   You can obtain ipxtunnel from sunsite.unc.edu
  1448.   <ftp://sunsite.unc.edu/pub/Linux/system/Network/daemons> or mirror
  1449.   sites.
  1450.  
  1451.   11.2.  Building ipxtunnel
  1452.  
  1453.   ipxtunnel built cleanly for me using the following commands:
  1454.  
  1455.        # cd /usr/src
  1456.        # tar xvfz .../ipxtunnel.tgz
  1457.        # cd ipxtunnel
  1458.        # make
  1459.  
  1460.   11.3.  Configuring ipxtunnel
  1461.  
  1462.   Configuration for ipxtunnel is easy. Lets say that your friends
  1463.   machine is gau.somewhere.com and your machine is called gim.sw.edu.
  1464.   ipxtunnel uses a configuration file called /etc/ipxtunnel.conf. This
  1465.   file allows you to specify the default UDP port to use for the tcp/ip
  1466.   connection, where to send the encapsulated data and which of your
  1467.   local interfaces ipxtunnel should listen on and deliver IPX packets
  1468.   to.
  1469.  
  1470.   A simple configuration file would look like the following:
  1471.  
  1472.        #
  1473.        # /etc/ipxtunnel.conf for gim.sw.edu
  1474.        #
  1475.        # The UDP port to use:                       (default 7666)
  1476.        port 7777
  1477.        #
  1478.        # The remote machine to send IPX packets to: (no default)
  1479.        remote gau.somewhere.com
  1480.        #
  1481.        # The local interfaces to listen for IPX on: (default eth0)
  1482.        interface eth0
  1483.        interface eth1
  1484.  
  1485.   Obviously the other machine would have a similar configuration file
  1486.   specifying this machine as a remote host.
  1487.  
  1488.   11.4.  Testing and using ipxtunnel
  1489.  
  1490.   ipxtunnel acts like an IPX bridge, so the IPX networks at either end
  1491.   of the link should probably be the same. Andreas has never tested the
  1492.   ipxtunnel in an environment that actually supports Novell file servers
  1493.   so if you do try this in a real environment let Andreas know if it
  1494.   works or not.
  1495.  
  1496.   If the ipxtunnel is working you should be able to start your DOOM
  1497.   machines up at each end of the link running IPX mode and they should
  1498.   see each other.
  1499.  
  1500.   Andreas has only used this code over good high speed lines and he
  1501.   makes no claim as to its performance when your link is low speed.
  1502.   Again, let him know what works for you and what doesn't.
  1503.  
  1504.   12.  Commercial IPX support for Linux.
  1505.  
  1506.   Caldera Inc., produce a Linux distribution that features a range of
  1507.   commercially supported enhancements including fully functional Novell
  1508.   NetWare client support. The base distribution is the well respected
  1509.   Red Hat Linux Distribution and Caldera have added their "Network
  1510.   Desktop" products to this.  The NetWare support provides a fully
  1511.   featured Novell NetWare client built on technology licensed from
  1512.   Novell Corporation. The client provides full client access to Novell
  1513.   3.x and 4.x fileservers and includes features such as NetWare
  1514.   Directory Service (NDS) and RSA encryption.
  1515.  
  1516.   You can obtain much more information and ordering details from the:
  1517.   Caldera Inc Web Server <http://www.caldera.com/>.
  1518.  
  1519.   If you work within a Netware 4.x and/or NDS environment then the
  1520.   Caldera Netware Client is the only solution available.
  1521.  
  1522.   If you have a business critical application for Novell support for
  1523.   Linux then the Caldera product should be something you take a close
  1524.   look at.
  1525.  
  1526.   13.  Some Frequently Asked Questions
  1527.  
  1528.      Where can I find commercially supported IPX software for Linux ?
  1529.         The Caldera Corporation offers a fully licensed and fully
  1530.         supported Netware 3.x and 4.x client. You can obtain information
  1531.         about it from the Caldera Inc Web Server
  1532.         <http://www.caldera.com/>.
  1533.  
  1534.      Does the IPX software work with Arcnet/Token Ring/etc. ?
  1535.         The Linux IPX software does work with ArcNet and Token Ring
  1536.         interfaces.  I haven't heard of anyone trying it with AX.25 yet.
  1537.         Configuration is the same as for configuring for ethernet except
  1538.         you will have to substitute appropriate device names in place of
  1539.         'eth0' and appopriate hardware addresses where necessary.
  1540.  
  1541.      How do I configure more than one IPX interface ?
  1542.         If you have more than one interface in your machine you should
  1543.         use the ipx_interface command to manually configure each one,
  1544.         you should not use the `plug n play' configuration.
  1545.  
  1546.      Why do I get the message `invalid argument' when I configure IPX ?
  1547.         You are probably not running a kernel that supports IPX, either
  1548.         recompile your kernel so it does, or double check that you have
  1549.         actually used lilo to install and run the new kernel.
  1550.  
  1551.      Why do I get the message `package not installed' when I configure
  1552.         IPX ?
  1553.         You are probably not running a kernel that supports IPX, either
  1554.         recompile your kernel so it does, or double check that you have
  1555.         actually used lilo to install and run the new kernel.
  1556.  
  1557.      How do I NFS export a mounted NCP filesystem ?
  1558.         To use NFS to export an NCP filesystem you must mount it using
  1559.         the ncpmount -V option. This option allows you to mount only one
  1560.         volume of a fileserver instead of the usual mounting of all of
  1561.         them.  When you do this your NFS daemon will allow you to export
  1562.         that filesystem in the usual way.
  1563.  
  1564.      Does ncpfs package work with mars_nwe ?
  1565.         Martin and Volker's code is slowly beginning to converge. Recent
  1566.         versions of mars_nwe have an option to enable it to work with
  1567.         ncpfs.  You must enable the WITH_NAME_SPACE_CALLS in the
  1568.         mars_nwe config.h file.
  1569.  
  1570.      Is there any free DOS software to work with mars_nwe ?
  1571.         A contrived question deserves a contrived answer. I'm glad you
  1572.         asked, Martin has a package that he distributes alongside his
  1573.         mars_nwe package that offers free DOS client support for the
  1574.         mars_nwe server.  You can find it at the same sites as the
  1575.         server, and it will be called mars_dosutils-0.01.tgz. It
  1576.         includes C source code for programs such as slist.exe,
  1577.         login.exe, map.exe etc. The source is compilable with
  1578.         Borland(tm) C.
  1579.  
  1580.   14.  Copyright Message.
  1581.  
  1582.   The IPX-HOWTO, a guide to software supporting the IPX protocol for
  1583.   Linux.  Copyright (c) 1995 Terry Dawson.
  1584.  
  1585.   This program is free software; you can redistribute it and/or modify
  1586.   it under the terms of the GNU General Public License as published by
  1587.   the Free Software Foundation; either version 2 of the License, or (at
  1588.   your option) any later version.
  1589.  
  1590.   This program is distributed in the hope that it will be useful, but
  1591.   WITHOUT ANY WARRANTY; without even the implied warranty of
  1592.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1593.   General Public License for more details.
  1594.  
  1595.   You should have received a copy of the GNU General Public License
  1596.   along with this program; if not, write to the:
  1597.  
  1598.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  1599.   USA.
  1600.  
  1601.   15.  Miscellaneous and Acknowledgements.
  1602.  
  1603.   David E. Storey <dave@tamos.gmu.edu> and Volker Lendecke
  1604.   <lendecke@namu01.gwdg.de> both assisted greatly by supplying me with
  1605.   information for this document.  Gilbert Callaghan
  1606.   <gilbert@pokey.inviso.com>, David Higgins <dave@infra.com> and Chad
  1607.   Robinson <chadr@brtgate.brttech.com> each contributed information on
  1608.   configuring IPX/PPP.
  1609.  
  1610.   "NetWare" is a registered trademark of the Novell Corporation
  1611.   <http://www.novell.com/>.  "Caldera" is a registered trademark of the
  1612.   Caldera Corporation <http://www.caldera.com/>.
  1613.  
  1614.   regards Terry Dawson, vk2ktj.
  1615.  
  1616.   <terry@perf.no.itg.telecom.com.au>
  1617.  
  1618.