home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / NetBSD / docs-netbsd / 386BSD-FAQ / BSD-FAQ-part08 < prev    next >
Text File  |  1994-11-27  |  10KB  |  260 lines

  1. Archive-name: 386bsd-faq/part8
  2.  
  3. Section 7.    (System Communication and Network Information)
  4.  
  5. 7.0    Communications
  6.  
  7.     386bsd and its kith support a wide range of communications methods.
  8.     
  9. 7.1    SLIP
  10.  
  11.     Serial Line I/P is supported in all versions of Net/2 derived BSD.
  12.  
  13.     Brian <brian@awfulhak.demon.co.uk> provides us with a rather
  14.     good explanation of some of the hurdles that must be overcome
  15.     for a working slip interface.
  16.  
  17.     The idea is (overview) that you make a serial line connection to 
  18.     the host, set the line discipline, and tell your router to use 
  19.     this interface as your gateway.  You also should set the gateway 
  20.     up as a nameserver.
  21.  
  22.     Sounds easy ? - well it is if you've done it before.
  23.  
  24.     The _usual_ way of doing this is as follows:
  25.  
  26.     Both server and client must know eachothers inet addresses.  Set 
  27.     these up in /etc/hosts with lines saying
  28.         11.22.33.44 host.my.domain.name host
  29.         11.22.33.55 client.my.domain.name client
  30.  
  31.     where 11.22.33.?? is your inet number, and the following name is 
  32.     the full machine name (and is followed by any number of aliases).
  33.  
  34.     SERVER:
  35.        Create a login - usually Sclientname - and run `sliplogin` as 
  36.        its shell.  I've looked at the docs for sliplogin, and it seems
  37.        fairly straightforward.  [Ed.Note - I have; it is.]
  38.        A fairly common problem on the server is an error that is 
  39.        caused by the lack of a 'sliplogin' entry in the /etc/shells
  40.        file.  Be sure to add sliplogin to your shells file.
  41.  
  42.     CLIENT:
  43.       Set up /etc/resolv.conf to say the following (for the nameserver)
  44.         domain client.my.domain.name
  45.         nameserver 11.22.33.55
  46.  
  47.       ** traditional method **
  48.       - Log on to the server.  This is usually done via kermit or some
  49.       such program.
  50.       - Exit the program (or backround it if your line wants to drop 
  51.       once the device is closed).
  52.       - Run `slattach /dev/comport` for whatever "comport" is.  On most
  53.         Net/2 derived systems, this may be either com0, or cua01, or
  54.         whatever the correct name is for your site.
  55.  
  56.       If you run into an error that says 'not configured' in it, your 
  57.       kernel either does not recognize your port (dmesg will verify that)
  58.       or your kernel does not have the slip interface built in.  See 
  59.       below for the latter.  The former could be caused by any one of 
  60.       a dozen problems, including conflicting or incorrectly identified 
  61.       IRQs or port addresses.
  62.  
  63.       - Run `ifconfig inet sl0 clientname servername netmask 0xffffff00`
  64.       - Run `route add default servername`.
  65.       
  66.         "servername" is your server and "clientname" is your client.
  67.         
  68.       It should now be possible to `ping host`
  69.  
  70.     ** my method **
  71.       Configure /etc/remote
  72.       Configure /etc/host.dial
  73.       Run `slip host`.
  74.  
  75.     /etc/remote contains an extended `tip` entry.  /etc/host.dial 
  76.     contains a login script (and is named in /etc/remote).
  77.  
  78.     Oh yes, don't forget to have a line in your kernel config saying
  79.  
  80.     pseudo-device sl 2
  81.  
  82.     Without this line, you may get a 'device not configured' or 
  83.     'TIO...' error because the slip driver is not built into the 
  84.     kernel.
  85.  
  86.     I uploaded the slip package a while ago (to several archives), but 
  87.     was unaware of needing to notify the postmaster.  They've probably 
  88.     all been removed now.  Slip packages are available from many FTP 
  89.     sites; use archie to find the site nearest you.
  90.  
  91.  
  92. 7.2    CSLIP
  93.  
  94.     SLIP is included in the NetBSD-0.9 stock kernel and in the source
  95.     tree.  It is also available in FreeBSD.
  96.  
  97.  
  98. 7.3    PPP
  99.  
  100.     Implementations of Point to Point Protocol are also available.  PPP
  101.     should be available in the next major release (0.9+) of NetBSD and 
  102.     in the current release of FreeBSD.
  103.  
  104.     It should also be noted that there is a newsgroup that covers the 
  105.     PPP protocol exclusively.  It is comp.protocols.ppp.
  106.  
  107.  
  108. 7.4    TCP/IP
  109.  
  110.     TCP/IP is an integral part of Net/2 BSD.  There are at least five
  111.     different network card drivers.  TCP/IP is fully supported and is
  112.     available to all users of Net/2 derived BSD systems.  In fact,
  113.     many people believe that this area is one of the primary advantages
  114.     that Net/2 has over Linux.
  115.  
  116.  
  117. 7.5    UUCP
  118.  
  119.     There is an excellent document included in the UUCP directory
  120.     that describes in detail, what needs to be done to get a working
  121.     UUCP for Net/2 BSD systems.  Look in the /usr/src/gnu/libexec/uucp
  122.     directory for more information.  You can also look in the 
  123.     /usr/share/doc/smm/09.uucpimpl and /usr/share/doc/smm/21.uucpnet
  124.     if yours are populated.
  125.  
  126.     
  127. 7.5.1    TIP/CU
  128.  
  129.     First thing you need to do is...
  130.  
  131.         vi /etc/remote
  132.  
  133.     Then remove the two lines at the bottom of the file that mention 
  134.     com1, and com2.  Now add the following lines:
  135.  
  136.         com0:dv=/dev/com0:br#9600:
  137.         com1:dv=/dev/com1:br#9600:
  138.  
  139.     That tells tip/cu where to find your com ports.  Next you need 
  140.     to be logged in as root and do a:
  141.  
  142.         chown uucp.dialer /dev/com0
  143.         chown uucp.dialer /dev/com1
  144.         touch /var/log/aculog
  145.         chown uucp.dialer /var/log/aculog
  146.  
  147.     Make sure that, if you are running newsyslog, you change the 
  148.     owner.group entry in the newsyslog.conf file so that the file
  149.     ownership is maintained correctly.
  150.  
  151.     Then you should be all set, remember "DOS Com1" = com0, and 
  152.     "DOS Com2" = com1.  So, if your modem is at 0x2F8/IRQ=3 and you
  153.     access it as the COM2: port from DOS, you would do..
  154.  
  155.         tip com1
  156.  
  157.     To exit, type <RETURN>~.<RETURN>
  158.  
  159.     Many people have a problem with the lock open: procedure.   
  160.     If you receive the error:
  161.  
  162.     lock open: no such file or directory
  163.     all ports busy
  164.  
  165.     You need to create a directory: /var/spool/lock, owned by uucp.  If
  166.     this file already exists and is owned correctly, make sure that the
  167.     lock file in the directory is deleted.
  168.  
  169.     This answer thanks to (crt@tiamat.umd.umich.edu).
  170.  
  171.  
  172. 7.5.2    What is the magic incantation that allows the modem to dial?
  173.  
  174.     Try 'stty -f /dev/tty0? clocal'.  Change the '?' for whatever 
  175.     character is appropriate for your tty port.  Remember, DOS COM1 = 
  176.     /dev/tty00 and DOS COM2 = /dev/tty01...
  177.  
  178.     Some other things that might cause some problems are the entries
  179.     in the /etc/remotes file.  Try 'com?:dv=/dev/tty0?:br#19200:pa=none'
  180.     and see if that helps.  Remember to replace the '?' with '[01234]'
  181.     as appropriate.
  182.  
  183.  
  184. 7.6    Terminals
  185.  
  186.     Since the target machine for most Net/2 machines is a 386 with 
  187.     no more than a couple of serial ports, most people do not bother 
  188.     with serial terminals.  For most problems, a quick perusal of the 
  189.     man pages for the ttys file and getty are enough to get them 
  190.     started.  Other than that, most terminal problems are limited to
  191.     peculiarities of particular terminals.
  192.  
  193.     One common problem that appears to crop up from time to time is
  194.     which wires need to be connected at each end of the cable.  Most
  195.     cables do not, in fact, pass through all lines.  If your terminal 
  196.     uses XON/XOFF (DC1/DC3) protocol, a cable of the appropriate 
  197.     twist, either straight through or null modem, can have as few as
  198.     three lines connecting the two devices.  Assuming DB-25 connections
  199.     at each end, the lines need to go from 2 to 3, 3 to 2, and 7 to 7.
  200.     These lines are Rx, Tx, and gnd.  Other lines that may or may not
  201.     be required include 4 and 5; and 6, 8, and 20.  Normally, these 
  202.     lines would be connected within the 'hood' of the cable (4 to 5 
  203.     and 6 and 8 to 20) to simulate the functionality of the full 
  204.     blown cable.  While full support for CTS/RTS is not available 
  205.     (yet), other support for the remainder of these lines is available 
  206.     or is being worked on in all Net/2 derived systems.  Without this
  207.     handshaking (particularly pins 6, 8, and 20) your ports may appear
  208.     to be dead.  This is because most of the tty driver for *BSD 
  209.     systems require a Data Carrier Detect to be active before the
  210.     port will work.
  211.  
  212.     For those folks that have hardware flow control working, you need
  213.     to look in the man page for 'stty' and look around for the 
  214.     -clocal and -ctrcrts options.
  215.  
  216.     Once the cable is set up, you will need to make sure that your
  217.     system is ready.  The first thing you will need to do is make all
  218.     of the devices in the /dev/ directory.  A program, called MAKEDEV,
  219.     is available in the /dev directory.  Running this program with 
  220.     the argument 'tty' will make all of the physical tty devices.
  221.  
  222.     With that done, arranging for a 'getty' on the port is the next 
  223.     order of business.  You will need to edit the '/etc/ttys/' file
  224.     and make one of the tty devices available.  If you have 
  225.     connected your terminal to DOS COM1, you will be enabling /dev/tty00.
  226.     Similarly, if you are connected to COM2:, you will be enabling
  227.     /dev/tty01 (see the pattern?).  There are other names for those
  228.     ports as well, but when you are talking about terminals, be sure
  229.     to use the /dev/tty* names.  If not, you will be completely 
  230.     ignored and treated as an outcast because you obviously have not
  231.     done any of your homework.
  232.  
  233.     One of the other common problems with the SIO driver is that 
  234.     people will often disable all handshaking, and then complain that
  235.     they cannot get a reliable connection above 9600 baud.  Handshaking 
  236.     is the solution to most of these problems.
  237.  
  238.  
  239.  
  240. 7.7    Can network attached assets be used by/from NetBSD?
  241.  
  242.     Yes, they can, assuming the machine at the other end of the 
  243.     connections is reasonably cooperative.  The specifics are up to the
  244.     remote machine, but a couple of things that you can start looking
  245.     for that will help are provided below:
  246.  
  247.         -  Ask the system administrator of the machine in question
  248.            if it is OK for you to use whatever it is you need.  This
  249.            is more a matter of manners than a technical issue.
  250.  
  251.         -  For NFS mounted disk drives, make sure that you are not
  252.            prevented from using the assets by the /etc/exports
  253.            (or equivalent) file.  This goes for CD-ROMs as well as
  254.            regular mounted disks.
  255.  
  256.         -  There are a completely different set of concerns for
  257.            tapes and printers.  Each system implements these in
  258.            slightly different ways.  Check with your system manager
  259.            or documentation for more information.
  260.