:


     Origin: http://www.linux.org.ru/books/
 From: Ultracom 
====================================================================
                                                           1992-1994

     (Olaf Kirch)





.
                                - 2 -



     1. 

           Internet        
,         " 
".       ,
        .  Inetrnet    
      ,     Usenet 
      "Internet  ."    
     ,  ATM,  
            , 
.

     ,           .  
            ,    
   ,     
.      ,        ,
              
     .  
Internet-           ,      
,        ,      ISDN  ,
,   .

                 
UNIX.  ,  UNIX -      
        ,       . 
        
UNIX        PC  (386BSD,  FreeBSD  Linux).
, Linux -  UNIX. Unix -   , 
          ,     Linux -
o  ,     
,   POSIX-  UNIX- 
.

       Linux       Linus Torvalds,
,      ,     Intel
i386    MINIX. MINIX -- ,    

                                - 3 -

   PC,           Unix, 
  A...

     Linux      GNU  ,     
    (    GPL     20.3,
,            "    
").    ,   
,                
    ,     
  .   C    ,
       
    ,            Unix  e,  
  Linux       
    .


     1.1.   Linux

         ,             Linux (
      )  --   
    .     ,  
                
README-.         
        ,  
  .

         1992,  Lars  Wirzenius    Michael  K. Johnson 
            Linux,     LDP  (Linux
Documentation  Project),      
  .      "
?  ",  "?",    "  -    ,  ,    
?",                  
      Linux  ,     
    Unix.    LDP -  
,  Matt Welsh,    , Michael
K.  Johnson,        man-,   Rik
Faith,        Linux  450    
      C .  

                                - 4 -

  ,  Lars Wirzenius,   
  .    .

     ,   LDP -      Linux.
      ,          HOWTOs,  
     comp.os.linux.announce   
  FTP .

     HOWTOs  -    ,     ,
                
Ethernet   Linux,   Usenet  ,
         .   
      ,    .
    HOWTO      " " 
  .

     1.2.   

         LDP  1992,     
  UUCP    smail,            "  
  ".   TCP/IP   , 
    " "  ,  ,    
        ,     
  ,      1993.

             ,    
,            ,    
 Linux    .

             ,    
  ,           
.          , 
,    TCP/IP,  .     
  TCP/IP        
     rlogin    ,      , 
    .         , 
      UUCP-.     
,          TCP/IP,     UUCP:

                                - 5 -

   .

     Email          
  ,    ,    
.          smail,
  ,     
,    sendmail,    ,  
          
.  Sendmail   Vince Skahan.

        News              Usenet
,         
           NNTP 
    newsreader     .  
     newsreaders  Linux.


     1.3.   

      1993, Andy Oram,       LDP
   ,      
   O'Reilly  .    ;    
,          .    
O'Reilly     "    
  ",              
    ,        .  
                :      LaTeX   
     ( DVI  PostScript ),  
.            O'Reilly,
       .

     ,         -, 
      ?       Tim O'Reilly  , 
            ?
      ?

       --  "  ",  ",   ,"  "  ."
O'Reilly      ,   ,   

                                - 6 -

    .      ,  ,   
             
    ,   -
    .   , O'Reilly   
Linux    (           
)   ,        Linux  
-  ,            
 UNIX    PC.

                 
?  Andy  Oram       
      ,   . (    
        LDP,     
  ).

              Andy            
  ,       ,   
,          .           
              
 ,    ,   
              
O'Reilly        .        
        .    ,    O'Reilly  
  :   ,  O'Reilly  
             
      TEX      ,   
,    .

     1.4.  

               ,    -  
,      .      
  -   ,     
      .    
     comp.os.linux.help.     
            ,  
   .        ,      
                  

                                - 7 -

          Linux  FTP  ,  
   BBS.

              
    ,         
   .

         ,        
      HOWTO.      Terry  Dawson  HOWTOs
        comp.os.linux.announce     , 
      .    
   tsx-11.mit.edu,  /pub/linux/doc.   
        ,       
              . , ,
            .    
     Linux.

     1.5.  

     1.  Olaf    UNIX      
  .      UNIX  
  .          
      sed       perl. 
            
    .

      2.
  1987        sendmail+IDA  
300  UNIX      2000 .  , 
       sendmail.cf  
  sendmail+IDA    1990.      ,    
     perl  sendmail,    
(. 4).

      3.     Terry    Dawson                    
terryd@extro.ucc.su.oz.au.

      4.          sed, Vince?

                                - 8 -


     Olaf      :

     Olaf Kirch
     Kattreinstr. 38 64295 Darmstadt 
     okir@monad.swb.de

     Vince    :

     Vince Skahan
     vince@victrola.wa.com

            , , ,  ...
,          .

     1.6. 

     Olaf   ,    
,         
  .      Andy Oram.

         Andres Seplveda, Wolfgang Michaelis, Michael
K.  Johnson,               
  ,     .   
                 
        .      
    Thanks.  ,     
  Holger Grothe.

                   ,
          
 ,  LDP  .

        + Linux  , Erlangen, 

        + S.u. S.E. GmbH, Fuerth, 

        + Linux  , ,  

                                - 9 -


     Vince  Neil Rickert  Paul Pomes     
  sendmail+IDA  Rich Braun   sendmail+IDA  Linux.
     Susan        
.

     1.7.  

                    
,  ,  ...    .

                   
,      .

     Italics            , UNIX
      .   
   .

            
               .  
      ,       , 
   - .

     Typewriter    Slanted              
meta-    ,     .
:

               $ Ls -l foo

                foo --  ,  /tmp.

''    ,    .  
     :

                Press 'return' to continue.

     <>  -      ,     a  ,
   ""      "."     

                                - 10 -

    .


     $    #      . "$"
               
;   "#"            
 root.


     1.8.  linux 

       linux  ,  LDP,   
    ,      ,    
      Linux    .  
    -  Matt  Welsh,      Lars Wirzenius 
Michael K. Johnson.

           LDP,  
  "Linux  ", " 
",  "   ",  " 
".       LaTeX, .dvi  Postscript 
 FTP ic.funet.fi,   /pub/OS/Linux/doc/doc-project, 
 tsx-11.mit.edu,   /pub/linux/docs/guides.

                   Linux
.           ,  
    DOC    linux- 
  linux-activists-request@niksula.hut.fi

 :
  X-Mn-Admin:  join DOC

              .  ,
    ,  mail-server   
.      ,         
,  

   X-Mn-Admin: leave DOC

                                - 11 -


     1.9.    

       ,            Linux  
      ,          
    .     
        
        .

           ,      1993  
          Linux,  
FSSTND        ,    ,
                
      .

       ,    ,     
Linux      .          ,   
         
;         
            
.

             Linux        
  Linux  FTP    ; ,   
   sunsite.unc.edu  /pub/linux/docs. Daniel Quinlan, 
 FSSTND,      quinlan@bucknell.edu.lex
.
                                - 12 -



     2.    .

     2.1. .

           ,        .
 ,    ,    
     .    
       ,    
     ,    .   
    ?   )    , )  
 ,  )          
.     .

                
.          
        ,  , 
  ,  . . ,     
    .  ,      ,  
   .

              :     UUCP
,         TCP/IP.    
,       
  .               
   .

               ,  
        ,      
       
  .

       --      ,   ,  
  -,    .  
   (site).

              .  

                                - 13 -

      (protocols).   , 
              -   
,             
,       .  ,
,    ,   
,              
.

     2.2. UUCP .

     UUCP   (Unix-to-Unix  copy)          
          ,    
          .  
                   
,             .  
       .

     UUCP        Bell   1977  
    Unix .   1978 .   
 80 .       
.  UUCP    Unix . 
         
 ,  AmigoOS, DOS, Atari's TOS,  .

            UUCP  --   
.      ,   
        .   ,
UUCP   --   ;    
         .  ,  
        UUCP    
    ,      
.

           ,      UUCP
,                
,             
.    UUCP  ,     
    ,    Intrnet. 

                                - 14 -

     UUCP ,       ,
  UUCP       UUCP , 
     .


     2.2.1.   UUCP

       UUCP    :      ,  
         ,   
     .

              
     swim,     lpr   . 
           ,  
   

     $ Uux -r swim! Lpr! Netguide.dvi

     Uux,      UUCP  ,   swim.  
    , netguide.dvi,     
  lpr.  -r      uux       
,               . 
 spooling ().

         UUCP,      
  .   swim,    ,
  UUCP    groucho,          Unix
.      tripwire-1.0.tar.gz   ,
   

   $  uucp  -mr  swim!groucho!~/security/tripwire-1.0.tar.gz trip.tgz

          swim    groucho,   
 ,  UUCP    trip.tgz     
   .     . ,  
    swim.    swim    groucho 
  ,   .   -  
 swim  .

                                - 15 -


         ,  UUCP    ,
--        .     ,  
     .

        (email)    
          
    .            
           
.    UUCP ,      
rmail,                .  Rmail
      ,      ,     
    .         
 14 ..

     (News)         
  .  ,    
Usenet  ,          
         120,000    .
 Usenet   1979 , ,   UUCP  
Unix  V7,          
  Unix  .       , 
    news  .   1980,    duke, unc 
phs,           .  Usenet  
     .     uucp- ,  
     .

           -   (article),  
             newsgroup(  )
    .    
    newsgroup,          
 60 .

        UUCP,     UUCP , 
               ,
      ,      
rnews     .


                                - 16 -

     ,   UUCP            
,       .    
               UUCP, 
,           
.              
uucp/nuucp.

     2.3. TCP/IP 

       UUCP          
,         
-      ,   
   (LANs).                 
         ,  
    .      
    ,           
.

             .
       ,  
      ,      
  ,     .    
packet-switched()   .      ,     
        .  , ,
    .

     ,    Unix       -Unix 
   TCP/IP.   ,    
 .

     2.3.1.   TCP/IP-.

     TCP/IP   ,   DARPA (
       )    1969.    
   ,   ARPANET,         
  1975,  ,     .

       1983,     TCP/IP       

                                - 17 -

         .  ARPANET 
  Inetrnet (ARPANET     
1990),    TCP/IP      Inetrnet.
  -- Unix  ,  -  
   ,  ISDN,    
      .

             TCP/IP   
,      Groucho Marx 
(GMU),     -    Fredland,    
        ,   
    .      ,     Inetrnet 
  .

         Linux     Unix   
,         erdos.      
,  quark,   :

     $ rlogin quark.physics
     Welcome to the Physics Department at GMU
     (ttyq2) login:

            ,  andres,   .
   shell()  quark,      
            quark.      
  ,        
.          ,
  TCP/IP: remote login.

             quark,     11
.          
   ,    :

     $ export DISPLAY=erdos.maths: 0.0

             ,    
      X-    quark,     
 . ,      X11. TCP/IP 

                                - 18 -

quark    erdos    X11           
,           .   
.

                    TCP/IP    -  NFS,
     .  -  
    ,      
  ,  ,          
  .  ,     
        ,         
         .    
              
 .

     ,           
        (    TeX )    , 
       .    NFS 
 12 ..

     ,       ,    
 TCP/IP .    .

                 TCP/IP.   
            
  .       ,  
 .

     2.3.2. Ethernet

                
     Ethernet.    
  

             connector,  tap  transceivers.
  Ethernet    ,  ,      
  10   .

     Ethernet     :   , , 

                                - 19 -

  .    Ethernet   ,
          . 
Ethernet    "BNC"  connector      ,   
              
  .  Ethernet ,    
    ,     transceiver " ".  
         transceiver.  
    Ethernet            200   500
,  ,      10base-2  10base-5.
         
   ,     
.     10base-T.

          Ethernet   ,  
    .        Ethernet 
           
       -connector.

            Ethernet,   
 :  PC   $50,     
      .  ,   , 
Ethernet      ,       
 Ethernet,          
,      .

           Ethernet  --  
,        .
,  Ethernet        
   repeaters   (),  bridges  ()    routers
().  Repeaters       
  ,        
  Ethernet.              
    repeaters.  Bridges    Routers    .  
           , 
     Ethernet.

     Ethernet     ,    
    1500          Ethernet. 

                                - 20 -

  ,       Ethernet
         .            
      
,   aa: bb: cc: dd: ee: ff.

                  
,           
.                 ,
  ,        
       .

     2.3.3.    

         ,   Groucho Marx , Ethernet
      .  Groucho Marx
,         
,     FDDI. FDDI 
        ,   
    ,       
,      .  
FDDI  - ,  100 Mbps,     
200 .

            ,
            X.25.    
  "    ",    Tymnet  , 
Datex-P  ,   ,    .
X.25            ,      
Assembler/Disassembler    PAD.  X.25     
,         
TCP/IP      .   IP     
    X.25  (      ),     X.25
    .

     ,         
      ;         ham
.      ham    AX.25 (  
X.25).

                                - 21 -


       ,         , 
    .      
,  SLIP  PPP,    .

     2.3.4. Internet (IP)

     ,            
Ethernet. ,        ,
    .

       ,      Groucho Marx ,
     Ethernet,    
  .    GMU,      
Ethernets:                
  ,          (
  FDDI).

         ,   gateway,
             
 Ethernets  FDDI. ,   -   , 
       quark     ,
                quark
,       Ethernet.

     ,      gateway. Gateway (  sophus)
     gateway (niels)   , niels 
       .    erdos  quark
   2.3.4 (   L. Steele).

                   
routing(),      datagram().
   ,             c
  ,        
  :  IP,    Internet .   3.  
 IP  routing  .

        IP  ,     

                                - 22 -

       .   internetworking, 
  "-"  intrnet.  
       inetrnet    Inetrnet  .    -  
     inetrnet.

     ,  IP       .
            
  32 ,  IP . IP    
    ,      8- , 
.  ,  quark      IP  0x954C0C04, 
      149.76.12.4.     dotted quad
notation.

                 :  , 
quark,  IP  ,   ,    , 
  Ethernet  6 .       
,  ,        rlogin quark,  
    IP ;   IP    Ethernet 
,     IP   Ethernet .

                   , 
    3.       
hostname  resolution,    IP        ,   address
resolution,     IP.

     2.3.5. IP   

         ,  "de facto"  SLIP
 IP   .   SLIP -- CSLIP, 
   SLIP,         IP    
  IP          
  .  PPP,  Point-to-Point  --  
      .  PPP      
   SLIP,      . 
       SLIP,     
    IP  ,      
  .


                                - 23 -

     2.3.6.    (TCP)

       ,           
     quark,       
 rlogin  erdos     quark.  ,
             
,            .  
  ,        
.

             IP,      .  
    Ethernet     
XFree86    GMU  FTP .     
        gateway  ,    
,    .     
  quark,    sophus           
   . IP      
    .           .      
                   
  .

             c    , TCP, 
    ,        IP  
       .   TCP
,        IP,       
          , ,   
               
. A TCP   ,  
     .   .

       TCP      IP   ,  
              .      
          .   
        ,    IP   
,        .    rlogin,
-  (rlogin)      erdos,   
  513    quark,      rlogind  . 
      TCP  .      , rlogind

                                - 24 -

       ,   .
  /       TCP ,
    ,        rlogin    
  TCP     .

     2.3.7.   (UDP)

     ,  TCP           TCP/IP
.               rlogin,  
        NFS. ,   
  UDP,    .  TCP,
UDP                 ,
          ,      
      .  ,   
       .

     ,      TeX   NFS
,  galois,        ,  
 LaTeX.    ,   
   .   ,          
  TCP    galois,   ,    .
  ,      galois,     
UDP   ,          .  ,  UDP  
      .   
NFS.

     2.3.8.   

                 
.      ()        
,          ( 
 ). ,      
              
.

           ,      
   ,       
      .  , ,

                                - 25 -

         , 
      513 . TCP    
    ,          
.  ,          quark  erdos, 
  rlogin        1023,  
   1022. ,      
 513  quark.

                 , 
                  
  .      
,            
        .        
,      rlogin,          
.       IETF  (    
Internet ),    RFC . , 
,            .  Linux
  ,         
      ,      ,
  /etc/services.     10.3.

       ,       TCP  UDP   , 
        .    TCP  513,
,      UDP  513. ,   
         ,   rlogin (TCP) 
rwho (UDP).

     2.3.9.  (socket)

        Unix        ,
          ,  
 ,    Linux.   
      Unix  -   Berkeley.   
  -         
().   (bind(2)) ,  
 ,  ,  ,   
     ( connect(2), listen(2), and
accept(2)).

                                - 26 -


            ,  
      TCP/IP    (AF INET ),  
,         (AF UNIX ).
          XNS (
    ) ,  X.25.

      Linux,   --   libc C .
    ,    AF INET  AF UNIX ,
       Novell , ,
             
.

     2.4. Linux 

            ,
Linux        .    ,
      ,    
    .  UUCP      Linux   
,     tcp/ip-     1992,
  Ross  Biro     ,     
Net-1.

     Ross         1993, Fred van Kempen
     ,    . 
      Net-2.     , Net-2d, 
   1992 (  0.99.10 ),     
      ,      Alan  Cox,  
Net-2Debugged.                      
  ,     Net-3.   
       .

     Net-3       Ethernet,
    SLIP (     ),  PLIP
(     ).  Net-3, Linux  TCP/IP ,
               
      .       ,
     Linux.  

                                - 27 -

PPP    (       point-to-point,            
  ),      Beta   
,    AX.25      -  Alpha . Alan Cox 
  Novell's IPX ,     
      Novell      -    Novell
      .        -  samba,
 NetBIOS ,  Andrew Tridgell.

     2.4.1.    

         ,    ,  Fred   Net-2e, 
        .  
    ,  Net-2e    Beta  .
      Net-2e  -  DDI,  
.  DDI       
    .

          TCP/IP      Matthias  Urlichs,
  ISDN     Linux  FreeBSD.  ,  
BSD     Linux.

        , Net-3   . Alan
           AX.25  ,  
  .  ,       "" 
,                       
 .

              
      ,         
.  ,      
Net-2e     Net-2d  Net-3,  .  
    ,        ;   
   rlogin  telnet     .

     ,            .
       ,    
   TCP/IP.     
         ,     

                                - 28 -

     .

     2.4.2.   

                   
      FTP.     FTP      Net-3 -
sunacm.swan.ac.uk,  sunsite.unc.edu  system/Network/sunacm.
      Net-2e    ftp.aris.com. Matthias
Urlichs'    bsd                     ftp.ira.uka.de 
/pub/system/linux/netbsd.

                    nic.funet.fi 
/pub/OS/Linux/PEOPLE/Linus;  sunsite    tsx-11.mit.edu    
.

     2.5.   

        ,        
  . , ,  --
   ,      
    ,      ,  
    ,        ,   
.         .

          --   
    log            .  
          
    .       
,    smail  C news,   .  
     .

              
  .    ,      
    ,  ,   logfile
  root.             
root;    ,      root     , 
   15.


                                - 29 -

                 , 
     . ,  
            .   ,      
            email
  root,     ,   
            .
,               
    postmaster,        
    newsmaster    usenet.   hostmaster 
          
 DNS.

     2.5.1.  

                --
          ,   
        ,    
        .    y
         ,  
 ,      .

                
    .  ,    
      ,       ; 
   ,   . ,
              ,  
    .  Simon  Garfinkel " UNIX
" ( . [ GETST ""]) --  .

               
.          
            ,     
  ,    ...  COPS  ,  ,  
                 
           .      
         , 
       . , 
          ,    

                                - 30 -

     .

             ,   
" ,"       
,       . ,   
    root ,    
   .  ,            
      ,    TFTP (
    )  ,          
         /boot.   ,    
  TFTP,         
      .      ,   ,   
 TFTP   /boot?

         ,       
     .   10.,
    tcpd,        
.

              --    ""  
.   ,      ,    
      ,      
   ,         
    .      
   .     , 
     . , , 
      , 
            .   
          
    ,      
.      ,    
  ,         .
      ,    
        .   --  log 
,          ,   
        .  ,    
  tripwire,          
          

                                - 31 -

.  Tripwire        
              .    
           
 .

     2.6.   

                
Linux      TCP/IP   ,           
.           
     IP  3 .    
  IP  ,    address resolution,
    .

      4.    ,  
            Ethernet   .      
          ,   
     TCP/IP ,    UUCP.

       6.        TCP/IP.
     ,   
           
     hostname resolution   
  .

           
 SLIP  PPP.  8.    SLIP 
        ,  
      .  9. 
PPP  pppd.

       10.          
    ,    rlogin,  rcp,    ..,   
      inetd            
    - .

               NIS,    
,    NFS,    . NIS -  

                                - 32 -

               
      . NFS    
     .

       13.          Taylor
UUCP,  UUCP .

                
      Usenet  .    14.      
  ,      
        

      15.  16.   smail  sendmail,  
  ,         Linux. 
        ,      smail     
 ( ),     sendmail  .

       17.    18.      Usenet 
       C news,    
 Usenet .

       19.    NNTP daemon,  
      .

        20.               
  newsreader.
.
                                - 33 -


     3.  TCP/IP 

                
Linux        TCP/IP,     IP , 
,  -  .     ,
    ,     ,  
           ,  
  .


     3.1.  

               ,      
         ,  TCP/IP    
,         .
         
            
 .

              ,       
,       
,   Ethernet       Linux    eth0    eth1, 
   SLIP  --  sl0,  sl1,    ...      
    ,       
      .            
  .

           TCP/IP  ,     
  IP  ,          
  .              
   ;      ,
     ,   .

     ,        
;       -    
          ,    
Maximum  Transfer  Unit,   MTU.    

                                - 34 -

.

       3.2. IP 

     K            ,       
 c IP --  32- .     
    .

         ,        TCP/IP    
   ,               
  .  ,      Inetrnet, 
 NIC.

        , IP     8 
,   octets. , quark.physics.groucho.edu  IP
  0x954C0C04,      149.76.12.4.  
  dotted quad notation.

           ,  IP   
  ,       octets,   , 
  .      NIC  ,   
      ,    .
  ,    ,    
 IP      .

          ,      
.           
 ,    IP .

 A    1.0.0.0  127.0.0.0.    
           octet,   24   , 
            1.6  .

 B    128.0.0.0  191.255.0.0;    
            octets.   16320   65024 
          .

 C    192.0.0.0  223.255.255.0,   

                                - 35 -

              octets.    2 
            254 .

 D, E,  F      224.0.0.0  254.0.0.0
            ,    
              - .

                 ,   
149.76.12.4,    quark,      12.4   149.76.0.0
 B.

       ,       octet
      .      
  octets  0  255    . 
         --     ,  
    1  broadcast () . 
                .    ,
149.76.255.255        ,      
  149.76.0.0.

            , 0.0.0.0  127.0.0.0.
    default  route(   ),  loopback
()  .  default route    IP
,       .

       127.0.0.0      IP    . ,
 127.0.0.1       ,
        loopback,      
  .   IP     TCP  UDP
                
.          
  ""  .      ,    
           .
,     UUCP    IP  ,
     INN  .   
  Linux, INN   loopback.

       3.3. Address Resolution(  ).

                                - 36 -


     ,            IP  ,  
         Ethernet   
?        Ethernet       
  ,               IP
.

        ,  IP   
Ethernet.        Address Resolution Protocol (
  ),    ARP. , ARP   Ethernet, 
          .  ,    ARP
       ,   
  X.        .   
,  .

       ARP    Ethernet   
IP   ,            Ethernet    
"broadcast"(),          
         .    
 ARP    IP .    
    ,    ,  ARP- 
  .         Ethernet
    .

                 
  Ethernet            , 
              Ethernet.      
Routing(),      
  .      .

            ARP.    Ethernet
,          ARP  ,  ,    
     ,  
        .  ,       
  ;  ,         
Ethernet  ,         . 
                  
 .

                                - 37 -


     ,        IP    
Ethernet  .    ,        
     ,      
   .     ,  ,      
        Ethernet  !    
        
  IP  .          ,  
Reverse  Address  Resolution  Protocol  ( ARP),  RARP. 
   BOOTP  ,          
    .

     3.4. IP 

     3.4.1. IP 

     <>    ,      
:  ,  ,    ,    ...  ,  
    ,      :
      ,    
      ,  ...    
  : ,      , 
         ,   
,            ,        
.

     IP        .   Inetrnet  
  ,      .    
           ,  
                
.    ,       
       ,   
 .

     3.4.2. 

             IP     
,       .    ,      

                                - 38 -

         IP  .    ,   
  IP          
,  . (2)

                , 
              ,  
      Ethernets. ,
IP    IP    .

                 
    IP  .    A, B,  C, 
      IP  .  ,  
  ,        . 
               
  subnet() ,  netmask.  - 32 
,                IP
.

       Groucho  Marx    -   .  
  B        149.76.0.0,    netmask    
255.255.0.0.

     ,    GMU          , 
    .    IP  
  254  ,    149.76.1.0    149.76.254.0.  ,  
            149.76.12.0.  
          149.76.1.0.
       IP ,     
octet  ,         .  
     255.255.255.0.

        3.4.2         149.76.12.4,    quark,
  -       
 B,     .

           subnetting  (     
)  --       .   
  (    ).  ,    

                                - 39 -

    ,     ( Ethernets),
  (    )  . ,
            , 
    .

     3.4.3. Gateways

     Subnetting  -        ,     
        .     
       ,    Ethernet,    
:    ,      
,  ,           .   
             gateways.
Gateway  --          
      ,     
.

     IP              
   ,           
  IP  .      149.76.4.0  
       .     quark,
        erdos       IP
,  149.76.12.4,           
  ,         gateway
(sophus  ).

     Sophus             :
  ,    .   
   (eth0  fddi0 ).   IP 
  ? 149.76.1.0  149.76.4.0?

     :   .                 
,  sophus  IP  149.76.4.1,    
  ,    149.76.1.4.

       ,  gateway      IP   
,     .   (  netmask) 
     ,      .    ,

                                - 40 -

   sophus  :

----------------------------------------
+-------+-------------+----------------+
| |        |        Netmask |
+-------+-------------+----------------+
+-------+-------------+----------------+
| Eth0  | 149.76.4.1  | 255.255.255.0  |
| fddi0 | 149.76.1.4  | 255.255.255.0  |
| Lo    | 127.0.0.1   | 255.0.0.0      |
+-------+-------------+----------------+
+-------+-------------+----------------+

   loopback  lo.

  3.4.3      Groucho Marx 
(GMU). ,            
 .

     ,         
    .        ,  
     ,      ,   
  Ethernet     IP . ,   
,     gateway.

     3.4.4.  

          ,  IP  gateway
     .

         erdos,     quark,
    ,      . 
     gateway, sophus,      
  .  Sophus  ,  quark    , 
    ,      
 gateway,     .   
  niels  (gateway    ).   sophus   
    gateway.

                                - 41 -


                IP  ,  
                 gateways.
             (the default
route),                 
  .    gateway    0.0.0.0..  sophus,
     :

-----------------------------------------
+------------+-------------+------------+
|        | Gateway     |   |
+------------+-------------+------------+
+------------+-------------+------------+
| 149.76.1.0 | -           | Fddi0      |
| 149.76.2.0 | 149.76.1.2  | fddi0      |
| 149.76.3.0 | 149.76.1.3  | fddi0      |
| 149.76.4.0 | -           | Eth0       |
| 149.76.5.0 | 149.76.1.5  | fddi0      |
|...         | ...         | ...        |
| 0.0.0.0    | 149.76.1.2  | fddi0      |
+------------+-------------+------------+
+------------+-------------+------------+

         ,      sophus    
 "-"   gateway.

           .
      ,            
  IP,      
.   (.      6.).       ,     
     ;  
        
  ""    .

               
.                 (
  ),      RIP, Routing Information
Protocol  (    ),     BSD

                                - 42 -

.          
      EGP ( Gateway ),
  BGP  (    Gateway  );   (   RIP) 
  gated ( University of Cornell's).

     3.4.5.  

             RIP    
           ,   
"hops"(),      gateways  ,    
    .    ,  
RIP    .      16   
    .

             RIP            ,
    ,    gated  
.        gated        
.              ( 
  loopback  ),         
   ,              
.  ,         RIP  
   .

               , gated
            
        .     
              
            .
,        ,    
,            ,       
    gateways    . ,
      ,      
,     RIP  gated.

     3.5. The Internet Control Message Protocol
       (   )

     IP   -,         

                                - 43 -

.                 (ICMP) 
        ,     
     .  .    .  ,      
    erdos    telnet  12345  
quark,        .  
  TCP        ,       ICMP
.

         ICMP ,     
-   .   ,        
         (Redirect   message).  
    ,     
     gateway,     .
,         sophus  
:      ,  FDDI ,
    gateway Groucho   (gcc1).

     ,        quark     gcc1, 
      niels (gateway   ).  
  ,  gcc1        --  , 
        niels,       ICMP
  sophus,    .

           ,    
     .   , 
         ,        RIP    ICMP
   ,            .  ICMP
    RIP       
,                  
     ,   -
.

     3.6.     (Domain Name System)

     3.6.1    (Hostname Resolution)

< >     ,   TCP/IP    32
       . ,       

                                - 44 -

      .  ,     "",   gauss 
      strange.      IP   
          Hostname resolution.

     ,     IP     ,
          , 
    ,     , 
  gethostbyname  (3)  gethostbyaddr (3). ,  
                
 resolver;  Linux,    libc.

        ,  Ethernet,    , 
      ,      IP
.              /etc/hosts. 
    ,    , 
        --      hosts   .
,                    
 .

               -- NIS,  
    Sun  Microsystems,    YP,  
.  NIS  hosts  (  )   
    ,        
    .   ,      
  ,            
    ,     .

       Internet,           
   HOSTS.TXT.     NIC,  
        .    ,
      .        
    HOSTS.TXT       ,
    ,       . 
            (  
) .

       ,   1984 ,    -- DNS, 
Paul Mockapetris     .

                                - 45 -


       3.6.2.    DNS

     DNS       (domain).  --
  -  ,       (
     ,     BITNET),
                   (
  ),        .
,           edu  ,    
     ,      , 
         . Groucho Marx  
  groucho.edu  ,    -- maths.groucho.edu.
            
          Internet  erdos       
erdos.maths.groucho.edu.

      3.6.2   .    
,      ,   
  ,             . 
                ,   
    ,     . 
,       .

             ,  
          top-level,    second-level,        third-level
(,      ,      ).  
    .    ,
    :

      edu (    )   
           ,  ...

      com  , .

      org  .   UUCP    
          .

      net Gateways      .

                                - 46 -


      mil   .

      gov   .

      uucp ,       UUCP 
             ,     .

     ,         
Internet,         .  
   net . , mil  gov   
.

       ,         ,
                
ISO-3166.  , ,  fi , fr 
,   de   ,   au         ...     
 , NIC     
  .  ,  ,        
      ,  com.au, edu.au, 
   .   ,      ,         
  ,       , 
         
. ,   ftp.informatik.uni-erlangen.de.

     ,             
         ;  
        NIC   . 
                ,      
    se .

     ,          
        ;  DNS,   
          , 
        .    DNS  
  :          
.  ,      Groucho  
                ;    

                                - 47 -

      .   , 
         ,   
   ,       physics.groucho.edu
     .    ,
          IP     
 .

     ,      ,  
  .        :
   groucho.edu               Groucho  Marx
,        groucho.edu   
         ,  
  .          , 
  physics.groucho.edu.     3.6.2,   
     .

     3.6.3     DNS

         ,           
         .   ,  
              
,   -     ?!

             DNS.
        IP   erdos, , DNS ,  
 ,   ,    .

     ,  DNS  -       . 
        (name server),
             
  .           
,         .
   IP  erdos,      -- 
        groucho.edu,      
.

       ,        ,  .   
   Groucho Marx ?      

                                - 48 -

 address-resolving oracle, DNS   . 
       erdos,  
         ,    
 .        
,      erdos.maths.groucho.edu.   
,           ,  
   edu .  ,     
         edu    
,            edu   
.                 ,
  a.isi.edu.     , a.isi.edu  
  groucho.edu        ,      
.         ,  
 ,     ,   IP .

     ,       IP    
.          ,         
HOSTS.TXT.               
.

             ,  
       .     ,
           
groucho.edu  ,         ,  
     groucho.edu.

     ,           , 
      .     time
to  live( ),  TTL. TTL   
.

     3.6.4    (Domain Name Servers)

      ,      
             
  master name servers.     
                  
.

                                - 49 -


         ,    
  .         
  ,         
,             
     .

            o  , 
    ,   -- .    
   ,      .
,           ,   
       DNS,    
 .

     ,        ,   
     .     
         . 
  caching-only .

     3.6.5   DNS

       ,  DNS      IP  , 
      .  DNS 
       .

           DNS      resource record
(  ),    RR.        ,
    ,      ,   
,            .      
  ,  IP  (IN ),  
  Hesiod   (  MIT),  .   
 ,       IP .

     ,          . ,  
         ,  
  ,       .  
  ,        ,   
             CNAME,      

                                - 50 -

  .

                  ,   
,   ,     . 
3.6.5               
    physics.groucho.edu.

       A  CNAME ,    , 
  ,      .    -  SOA  ,
  Start of Authority ( ),  
     ,     
.  , ,     .

                ,  
            groucho.edu
.    "@",   SOA   
   .

      ,     groucho.edu    
       -        ,  
       .        
: NS   FQDN,   ,     IP
.         ,   
  .   --    , 
            
  .         
physics.groucho.edu    3.6.5.

      ;
       ; Authoritative Information on physics.groucho.edu
      @                     IN    SOA          {
                           niels.physics.groucho.edu.
                           hostmaster.niels.physics.groucho.edu.
                           1034             ; serial no
                           360000           ; refresh
                           3600             ; retry
                           3600000          ; expire
                           3600             ; default ttl

                                - 51 -

                         }
      ;
      ; Name servers
                            IN    NS       niels
                            IN    NS       gauss.maths.groucho.edu.
      gauss.maths.groucho.edu. IN A        149.76.4.23
      ;
      ; Theoretical Physics (subnet 12)
      niels                 IN    A        149.76.12.1
                            IN    A        149.76.1.12
      nameserver            IN    CNAME    niels
      otto                  IN    A        149.76.12.2
      quark                 IN    A        149.76.12.4
      down                  IN    A        149.76.12.5
      strange               IN    A        149.76.12.6
      ...
      ; Collider Lab. (subnet 14)
      boson                 IN    A        149.76.14.1

      muon                  IN    A        149.76.14.7
      bogon                 IN    A        149.76.14.12
      ...

 5.   amed.hosts   .

     3.6.6.  .

           IP  ,    ,  
       ,  
.         reverse  mapping(  ) 
     ,      
.      hosts ,  
           .    DNS,    
    .  , 
  , inaddr.arpa,   IP   .
    dotted-quad    ,  IP   149.76.12.4
    4.12.76.149.in-addr.arpa.      ,
    ,  PTR.

                                - 52 -


      ;
      ; Zone data for the groucho.edu zone.
      @                   IN       SOA          {
                           vax12.gcc.groucho.edu.
                           hostmaster.vax12.gcc.groucho.edu.
                           233              ; serial no
                           360000           ; refresh
                           3600             ; retry
                             3600000          ; expire
                           3600             ; default ttl
                         }
      ....
      ;
      ; Glue records for the physics.groucho.edu zone
      physics             IN     NS        niels.physics.groucho.edu.
                          IN     NS        gauss.maths.groucho.edu.
      niels.physics       IN     A         149.76.12.1
      gauss.maths         IN     A         149.76.4.23
      ...

 6.   named.hosts  GMU.

              
           . 
       IP   , 
DNS      IP .  , ,
  149.76.8.0, 149.76.12.0,  149.76.14.0.

       ,          in-addr.arpa
:        8.76.149.in-addr.arpa,       12.76.149.in-addr.arpa, 
14.76.149.in-addr.arpa.  ,          Collider
              
     in-addr.arpa .     
12    3.6.6.     
      3.6.6.

      ;

                                - 53 -

      ; the 12.76.149.in-addr.arpa domain.
      @                IN     SOA   {
                           niels.physics.groucho.edu.
                           hostmaster.niels.physics.groucho.edu.
                           233 360000 3600 3600000 3600
                         }
      2                IN     PTR       otto.physics.groucho.edu.
      4                IN     PTR       quark.physics.groucho.edu.
      5                IN     PTR       down.physics.groucho.edu.
      6                IN     PTR       strange.physics.groucho.edu.

 7.   named.rev   12.

      ;
      ; the 76.149.in-addr.arpa domain.
      @                   IN       SOA          {
                           vax12.gcc.groucho.edu.
                           hostmaster.vax12.gcc.groucho.edu.
                           233 360000 3600 3600000 3600
                         }
      ...
      ; subnet 4: Mathematics Dept.
      1.4              IN     PTR      sophus.maths.groucho.edu.
      17.4             IN     PTR      erdos.maths.groucho.edu.
      23.4             IN     PTR      gauss.maths.groucho.edu.
      ...
      ; subnet 12: Physics Dept, separate zone
      12               IN     NS       niels.physics.groucho.edu.
                       IN     NS       gauss.maths.groucho.edu.
      niels.physics.groucho.edu. IN  A 149.76.12.1
      gauss.maths.groucho.edu. IN  A   149.76.4.23
      ...

 8.   named.rev   

         ,     
    IP  ,  ,    ,      
netmasks    8.    Groucho Marx 

                                - 54 -

  netmask  255.255.255.0,      in-addr.arpa   
      .  ,   netmask 255.255.255.128,
       149.76.12.128  ,  
        DNS,    12.76.149.in-addr.arpa
               ,         
  1  127,  128  255, .
.
                                - 55 -



     4.    .

     4.1. , ,   

         ,          
        TCP/IP,          , 
,    "  "          
.    ,           
  .

     -,  ,    ,
  Ethernet  :        , 
              , 
        PC.    -          
.

                 Ethernet   ,  
  ,     Linux,  
          .        
.  ,  Linux      
  Ethernet       . 
    "Becker  Series  Drivers" ,     
,  Donald  Becker.      -  D-link  ,  
      D-link ,   
.

     ,     ,     ""
?        Ethernet  ,      
.            
:       ,     
    .

      PC,       -
          ..   
           .
  -     ( )

                                - 56 -

     Ethernet  0x300,  0x360.

     ,        
,      ,        
          .    
autoprobing(  ),      
          
    ,      ,   Ethernet. ,
   Ethernet  ,          
;      Ethernet .

     ,     ,     
  Ethernet  .       ,
       .

       ,        -- interrupt
request  channel  (    ).   
                ,
      ,     .  PC,
      15  (0, 1, 3   15).
       
interrupt request channel  IRQ.

           3.,      
 .     ,
        , 
   .

              .      
    ,         /dev.
        Ethernet.  -  eth0,  eth1,    ..
          
,         ;      
  Ethernet      eth0,  -- eth1,  
.           -  SLIP  ,  
  ;       ,  
SLIP ,    


                                - 57 -

               ,
   .

       ,     , 
        .   
:

     This processor honours the WP bit even when in supervisor mode. Good.
     Floppy drive(s): fd0 is 1.44M
     Swansea University Computer Society NET3.010
     IP Protocols: ICMP, UDP, TCP
     PPP: version 0.2.1 (4 channels) OPTIMIZE FLAGS
     TCP compression code copyright 1989 Regents of the University of California
     PPP line discipline registered.
     SLIP: version 0.7.5 (4 channels)
     CSLIP: code copyright 1989 Regents of the University of California
     dl0: D-Link DE-600 pocket adapter, Ethernet Address: 00:80:C8:71:76:95
     Checking 386/387 coupling... Ok, fpu using exception 16 error reporting.
     Linux version 1.1.11 (okir@monad) #3 Sat May 7 14:57:18 MET DST 1994

            TCP/IP,   
  SLIP,  CSLIP,    PPP.      c   ,  
   d-link,      dl0.  
  Ethernet  ,      ,  
eth0,          .     
Ethernet  ,        ,    
   .     .

     4.2.  

        Linux           
,          
PC.             ,
        ,   
             . , 
      ,    
.


                                - 58 -

          Linux  ,          
  .      "Installation and Getting
Started"   Matt Welsh,     
Linux . ,        
  Linux,    .

         make  config,      
,               
    ,    ...        --   
  TCP/IP  .        y,   
   .

     4.2.1.    Linux 1.0  

       ,         , 
       SCSI
,  ...

            .
                ,   -
   .           
      (     1.0 1.1)   (
  italics ):
     *
     * Network device support
     *
     Network device support? (CONFIG ETHERCARDS) [y]

                 ,    
        y,        
  ,       Ethernet, SLIP,
   PPP.       y,        Ethernet-
   .            
   :

     SLIP (serial line) support? (CONFIG SLIP) [y]
     SLIP compressed headers (SL COMPRESSED) [y]
     PPP (point-to-point) support (CONFIG PPP) [y]

                                - 59 -

     PLIP (parallel port) support (CONFIG PLIP) [n]

              
Linux.   SLIP        IP    
 .     
CSLIP,      TCP/IP          .
         CSLIP ,
      .

     PPP  -        
.           SLIP,     IP, 
    IPX.     PPP   
,         .

     PLIP   IP    .
              PC 
 DOS.

          Ethernet   
.        ,      
.         ,
      .

     NE2000/NE1000 support (CONFIG NE2000) [y]
     WD80*3 support (CONFIG WD80x3) [n]
     SMC Ultra support (CONFIG ULTRA) [n]
     3c501 support (CONFIG EL1) [n]
     3c503 support (CONFIG EL2) [n]
     3c509/3c579 support (CONFIG EL3) [n]
     HP PCLAN support (CONFIG HPLAN) [n]
     AT1500 and NE2100 (LANCE and PCnet-ISA) support (CONFIG LANCE) [n]
     AT1700 support (CONFIG AT1700) [n]
     DEPCA support (CONFIG DEPCA) [n]
     D-Link DE600 pocket adaptor support (CONFIG DE600) [y]
     AT-LAN-TEC/RealTek pocket adaptor support (CONFIG ATP) [n]
     *
     * CD-ROM drivers
     *

                                - 60 -

      ...

     ,      ,   
          NFS.  NFS   
      ,      
   .

        NFS filesystem support (CONFIG NFS FS) [y]

     4.2.2.    Linux 1.1.14  

         Linux  1.1.14,        IPX,
      .      
                .    
     .

     *
     * Networking options
     *
     TCP/IP networking (CONFIG INET) [y]

       TCP/IP ,      
y.        n,        
 IPX.

    IP forwarding/gatewaying (CONFIG IP FORWARD) [n]

             Y,       
gateway    Ethernet,   Ethernet  SLIP,  ... 
                  ,      
     firewall,   
  .  Firewalls  --          
,         .    
       Internet  
   .     firewall 
  Internet,        
,         firewall.
     *

                                - 61 -

     * (it is safe to leave these untouched)
     *
     PC/TCP compatibility mode (CONFIG INET PCTCP) [n]

                  
PC/TCP,   TCP/IP   DOS.   
  ,              Unix
,      .

     Reverse ARP (CONFIG INET RARP) [n]

             RARP.  RARP    
    X-          IP
.  RARP            . 
     (net-0.32d)   
rarp       RARP .

      Assume subnets are local (CONFIG INET SNARL) [y]

             TCP ,    IP, 
     .    
      Ethernet,   ,  
  -  .        SNARL,   
        ,     
.  ,          B  Groucho Marx
,           
  .     SNARL,    
           
   .

                
     ( , ,  
   SLIP  ),      c      mtu  
,       .

      Disable NAGLE algorithm (normally enabled) (CONFIG TCP NAGLE OFF) [n]

       Nagle        IP

                                - 62 -

,        tinygrams.  Tinygrams    
   ,    ,
  telnet    rsh.  Tinygrams     
      .  Nagle     
     TCP .  
  Nalge ,        
 .

     The IPX protocol (CONFIG IPX) [n]

                 IPX,    
  Novell  .              
.      --    IPX  DOS 
     novell   PPP . 
        Novell      
,      .

        1.1.16, Linux     , dummy
driver  (  ).         
  .

     Dummy net driver support (CONFIG DUMMY) [y]

             ,  
      SLIP .    
loopback .      ,  
SLIP    Ethernet,    ,   
  IP .       6.7.7  
6 ..

     4.3.     Linux

     Linux         
.               
,   ,   .

      Linux     ,  
.          ,

                                - 63 -

     eth0, eth1,  ...

     lo    loopback.    , 
             .     ,
            ,  ,    
          .       loopback ,  
                 .

     ethn n- Ethernet .     
           Ethernet .

      dln     D-Link  DE-600   (
          Ethernet ).   ,  DE-600
             .

      sln n- SLIP .      SLIP
           sl0,  ...      SLIP
          .

     pppn n- PPP .  SLIP , PPP 
             ,     
          PPP.      
          .

     plipn n- PLIP . PLIP  IP  
           .    PLIP .
            PLIP    ,
             .

          ,     
,  ISDN  AX.25,    .

         ,        
  .


     4.4.  Ethernet


                                - 64 -

       Linux     Ethernet . 
        Donald Becker (becker@super.org). 
                    National
Semiconductor  8390  ;            Becker
.          D-Link, 
  D-Link  ,          Ethernet  
   .               Bjrn  Ekwall
(bj0rn@blox.se).   DEPCA            David  C.  Davies
(davies@wanton.lkg.dec.com).

     4.4.1.  Ethernet .

         Ethernet    , 
            .  Ethernet  -  
        .    
   50      .  
      T- BNC ,  
     .

            ,    
  transceiver.    transceiver 
AUI    ,      .

     4.4.2.  

                Ethernet HOWTOs
  comp.os.linux.announce Paul Gortmaker.

          ,  Linux.
    HOWTO     . , 
             ,   HOWTO;
            . 
,    DMA-  Ethernet      
  DMA        Adaptec  1542  SCSI  .    
       DMA ,  ,  
Ethernet              
.


                                - 65 -

3Com EtherLink    3c503  3c503/16,  - 3c507  3c509. 3c501
           ,   ,   .

Novell Eagle NE1000  NE2000,   . NE1500  NE2100 
          .

Western Digital/SMC WD8003  WD8013 (      SMC Elite  SMC Elite
          Plus)      SMC Elite 16 Ultra.


Hewlett Packard HP 27252, HP 27247B  HP J2405A.


D-Link DE-600 pocket adaptor, DE-100, DE-200,  DE-220-T..  
            DE-650-T,   PCMCIA . (4)


DEC DE200 (32K/64K), DE202, DE100,  DEPCA rev E.


Allied Teliesis AT1500 and AT1700.

          ,    
      Linux .     
   . ,        
 ,     .


     4.4.3.    Ethernet

        , Linux      
 .         :

------------------------------------------------------
+--------------+-------------------------------------+
|         |                         |
+--------------+-------------------------------------+
|WD/SMC        | 0x300, 0x280, 0x380, 0x240          |

                                - 66 -

|SMC 16 Ultra  | 0x300, 0x280                        |
|3c501         | 0x280                               |
|3c503         | 0x300, 0x310, 0x330, 0x350, 0x250,  |
|              | 0x280, 0x2a0, 0x2e0                 |
|NEx000        | 0x300, 0x280, 0x320, 0x340, 0x360   |
|HP            | 0x300, 0x320, 0x340, 0x280, 0x2C0,  |
|              | 0x200, 0x240                        |
|DEPCA         | 0x300, 0x320, 0x340, 0x360          |
+--------------+-------------------------------------+
+--------------+-------------------------------------+

           autoprobing.    ,    
          .      
          ,    
WD80x3 .   o  ,     
  .            ,  
autoprobe            ,     
      .

      Net-3,         
  o    ,         
drivers/net/Space.c         ,      
    .   ,  
     .   o  ,  
        .      lilo 
  ,     , 
           lilo.conf.          Ethernet
,     :

     ether=irq,base addr,param1,param2,name

         ,      - 
.    ;    
  ,            
    .

           IRQ    .   
,      IRQ  . 3c503 

                                - 67 -

      ,         
   IRQ   (   5,  9,  3,  4)        
  .

     addr      - ; 
        .

                    -
 .       WD80x3, 
           .
        param1    
  .    1   7   
,          8  ; 0  
    .  3c503     param2 
     transceiver  (    )  
 transceiver (  1).   BNC;  --
AUI .

              Ethernet  ,        
  ,          lilo.
,      ,        
  ,         .
    ,   lilo   
-   .

     ,    Linux    Ethernet   0x300
 eth1,       :

    Reserve=0x300,32 ether=0,0x300, eth1

     reserve              
     -    .  
        :

     Reserve=0x340,32 ether=0,0x340, eth0

         autoprobing ,    addr 
-1:

                                - 68 -


     Ether=0,-1, eth0

     4.5. PLIP 

     PLIP      IP     , 
      .      
          10/c 
20/.

     PLIP          Crynwr. 
  :      
  PC        ;    
            PC   
      .  PLIP ,   ,
             ,    
    -        .   
   mode   zero   PLIP   (0      PLIP).   ,  
       . ,
  PLIP ,   1  
 8  .

        ,  Linux  0 .  
        PLIP,      
PLIP    Crynwr,   PLIP   NCSA telnet. 
        PLIP,    
 -- "Null Printer"  "Turbo Laplink" .   
  .  20.3  .

     LIP    .    
 Niibe Yutaka.

        PLIP       ,      
                  ,  plip0
      lp0,  plip1  --  lp1,    ... 
       :



                                - 69 -

--------------------------------
+-----------+-----------+------+
|  | I/O   | IRQ  |
+-----------+-----------+------+
|plip0      | 0x3BC     | 7    |
|plip1      | 0x378     | 7    |
|plip2      | 0x278     | 5    |
+-----------+-----------+------+
+-----------+-----------+------+

           -,  
    drivers/net/Space.c    Linux, 
  .

              ,  ,        
            .  PLIP  
           ,         
.

     4.6. SLIP  PPP 

     SLIP (Serial Line IP),  PPP ( Point-to-Point  ) - 
      IP   
.      SLIP  PPP  
        Internet,     IP
 .

       SLIP  PPP,    
.          . 
      5.
.
                                - 70 -



     5.    

      ,  -   ,   
  PC         T1 Internet .  
       ,    SLIP ,
UUCP  ,       (BBS),  
 .

            ,    .
,      ,     
,      .    
      Serial HOWTO Greg Hankins,  
    comp.os.linux.announce.


     5.1.      

            Linux. 
    --   ,   
           
 .

           Unix -- kermit. 
     ,        
,              
  ,    ...    -- minicom,   
     DOS.   -
 ,  seyon.

     ,   linux- BBS   ,
        .  
                        sunsite.unc.edu 
/pub/Linux/system/Network.

            ,         
,                 

                                - 71 -

               
.         ,   
    ,               
,                
            
     BBS.   ,  
            -      
,    .

               --
UUCP.  UUCP --   ,    
      ,     , 
...           
  .  Ian  Taylor's UUCP ,    Linux,
         .              
     ,  ,   
Fido.  Fido   ifmail  .

     SLIP    -     
    -  .     SLIP
            - 
 SLIP ,   FTP ,  ... SLIP
           
-,     ISDN.


     5.2.   

     Unix       ,
  ttys.    -      Teletype(tm),
        . 
                
      .        ,    
            
.

       Linux    tty: () , 
  (    ,   

                                - 72 -

  X11)   .   
  ttys,              
   ;      -    
       .

     Ttys            
    ioctl .     
    ,           
  ,      .

               --     
.             
      ,      ..  Tty      
     ,    
      .  , SLIP   Linux 
    .

            
    .   - bit rate( ),
           (
bps    ).  ,      (Baud),  
.      ,  ,   .   
      , 
      .  
      
  ,           .
                 ,  
           
.

     5.3.    

          Unix ,  
     ,    /dev.
     ,   
,        ,          
.          , 
   -.

                                - 73 -


             ,      
;          4,    ttyS0, ttyS1, 
...       ;   cua0,  .., 
      5.        
.             COM1  COM4,
        COM      63.    
         ,         
   ,  
 Serial Howto.

     ,            COM2.  
      65,       5.
,        cua1     
.       ttys   /dev.
  5    6           ,
:

     $ ls -l /dev/cua*
     crw-rw-rw-   1 root     root       5,  64 Nov 30 19:31  /dev/cua0
     crw-rw-rw-   1 root     root       5,  65 Nov 30 22:08  /dev/cua1
     crw-rw-rw-   1 root     root       5,  66 Oct 28 11:56  /dev/cua2
     crw-rw-rw-   1 root     root       5,  67 Mar 19  1992  /dev/cua3

             ,        :  
-  

     # mknod -m 666 /dev/cua1 c 5 65
     # chown root.root /dev/cua1

           /dev/modem
   , ,     
        cua1. ,   
  modem      ,       
    .    -      
       (lock  files)      ,  
 .    ,   
 cua1, ,  LCK..cua1.   

                                - 74 -

            ,  
          , 
            .  ,
     .

     5.4.     .

     Linux                    
  ,     RS-232. RS-232 
                
   PC.

            handshake  ,    
.                
          ,      
            .  
    "Clear to Send" (   
CTS)    "Ready  to  Send"(    RTS), ,
,        handshake  , 
 "RTS/CTS".

       PC,  RS-232   UART , 
 16450 ,     , NSC 16550A.  
(          Rockwell)
    ,    ,  
    16550-.

        16450  16550 ,    FIFO
  16 ,       1 

        16450     9600 ,   
           16550. 
  ,  Linux      8250 ,   
  PC-AT.

           ,         
   COM1  COM4.    
    64  67,    .

                                - 75 -


                
-,         Ted  Tso's  setserial   
rc.serial  .       /etc/rc  
   .      setserial    
 .  rc.serial   :

     # /etc/rc.serial - serial line configuration script.
     #
     # Do wild interrupt detection
     /sbin/setserial -W /dev/cua*

     # Configure serial devices
     /sbin/setserial /dev/cua0 auto irq skip test autoconfig
     /sbin/setserial /dev/cua1 auto irq skip test autoconfig
     /sbin/setserial /dev/cua2 auto irq skip test autoconfig
     /sbin/setserial /dev/cua3 auto irq skip test autoconfig

     # Display serial device configuration
     /sbin/setserial -bg /dev/cua*


        ,   
 setserial   .

          ,  setserial -bg
         ,        
        ,         .
        Rockwell 
      . , , UART 
  NSC  16450,          NSC 16550, 
                  
 

/sbin/setserial  /dev/cua1  auto irq skip test autoconfig uart 16550


                  

                                - 76 -

,    IRQ  COM  .        man ,
setserial(8).

               handshake, 
  ,         . 
        .
          .       
rc.serial ,   stty:

     $ Stty crtscts < /dev/cua1

     handshake

  $ Stty -a < /dev/cua1

                      
;          -crtscts
   .
.
                                - 77 -



     6.  TCP/IP  

       ,        TCP/IP
      .         IP   
      TCP/IP ,  
      ,     
    .

             ,     
    .  ,     
         ,  
        .  
    TCP/IP, ,    
  .    /etc/rc .

     ,         
    rc.net  rc.inet. ,    
     rc.inet1  rc.inet2,   
    ,      
   .      
.

     ,            rc.inet1,  
              . 
   ,     ,
    TCP/IP    .
             rc.inet1    ,
      rc.inet1         , 
    .    rc ,   
   Linux    .

     6.1.    proc

           Net-2    
      proc.  proc  --  , 
          

                                - 78 -

  .   ,    
            .
        loadavg,   
          meminfo,  
       .  , 
    e  .     , 
     ARP , TCP ,  
.            
    .

     Proc      (  procfs)    
      /proc.        o  , 
    /etc/fstab:



    # procfs mont point:
     none            /proc           proc    defaults

       "mount /proc"   /etc/rc .

     Procfs            
    .   procfs    ,  
      "mount:  fs  type  procfs  not supported by
kernel".           ""
     procfs.

     6.2.  

           - Linux , 
              
   .    ,         
    ,  ,      
  .             
,               
.         , 
             .  
          

                                - 79 -

netXXX.tar.gz,    XXX  -  .   Linux
1.0 -- 0.32b,    ( 1.1.12   )  0.32d.

               TCP/IP 
 ,      
Linux  FTP  .          
   Net-BSD   .  , 
Xmosaic,  xarchie,    Gopher  IRC    .
    ,     .

        FTP         Net-3  --  sunacm.swan.ac.uk,
  sunsite.unc.edu    system/Network/sunacm.  
Net-2e         ftp.aris.com. Matthias
Urlichs   bsd                ftp.ira.uka.de 
/pub/system/linux/netbsd.


     6.3.  

          ,     ,
     Groucho Marx ,   
,           . 
  ,   ,   . 
       ,    
  ,    PC,  Linux 1.0.

          ,   ,  
,          .  
  Ethernet.    ,       
   .   ,    gateway, 
     . ,   
   UUCP    .   ,  
 SLIP      Internet.

     6.4.   

     ,      ,       
  ,          

                                - 80 -

.     


     # hostname name

             
,        . , 
                vale.vbrew.com,
vlager.vbrew.com,        ...          ,   
    .    --  
    ,    vale.  ,   
            IP      ,    
   resolver    IP  
.          /etc/hosts ( .
 ).

           domainname, 
          FQDN.
   ,               hostname 
domainname        FQDN.  ,    
         .  domainname      
  NIS  ,     
DNS ,     . NIS    11 ..


     6.5.  IP 

                  
    (,       INN netnews
   ),          
,              IP     
 loopback,    127.0.0.1.

             ,  
       IP .   
,    IP     .

             

                                - 81 -

          IP  .        
 ,        ,
    ,      IP  
 .

             Internet,    
  .    ,  
      A, B,  C,     
   . ,     
      Internet,      IP .
      o    ,     
   .        
          Internet,    
   hostmaster@internic.net.

          Ethernet (  ), 
       .  , 
        ,       
;  Point-to-point     . ,   
  Ethernet     SLIP    ,  
  .      8..

       ,       NIC  
  ,   191.72.0.0.    Ethernet,
            
  .       ,  
  254        .         1
    2 -- .     
 191.72.1.0  191.72.2.0.   255.255.255.0.

     Vlager,      gateway     , 
  ,   1    ,    IP  
191.72.1.1    191.72.2.1,  .      
,  gateway.

                  B
  ;  C     .   
,       ,   

                                - 82 -

  C        . , 
     2      ,  
     64   .

     6.6.  hosts  networks 

       ,             ,  
               
  /etc/hosts.      DNS
 NIS  ,       hosts .

              DNS  NIS,   
       /etc/hosts. ,   
                 
    ,       .   
  ,         
    rc.inet .  ,   IP
,         
  ,           rc
.  ,             
hosts,          gateways    NIS ,  
.

     ,      ,     ,  
resolver      hosts.  DNS  NIS
           , 
        .  
        /etc/hosts   IP
   ,             /etc/host.conf.
    ,        order 
 

   order hosts

      resolver      7.

     hosts          ,   IP
,         . 

                                - 83 -

   ,      
  . ,     (#),  
  .

                   
    .    vale,       
  , vale.vbrew.com  vale   , , 
        .

               .
   , vlager-if1  vlager-if2,    
   vlager.



     #
     # Hosts file for Virtual Brewery/Virtual Winery
     #
     # IP            local       fully qualified domain name
     #
     127.0.0.1       localhost
     #
     191.72.1.1      vlager      vlager.vbrew.com
     191.72.1.1      vlager-if1
     191.72.1.2      vstout      vstout.vbrew.com
     191.72.1.3      vale        vale.vbrew.com
     #
     191.72.2.1      vlager-if2
     191.72.2.2      vbeaujolais  vbeaujolais.vbrew.com
     191.72.2.3      vbardolino   vbardolino.vbrew.com
     191.72.2.4      vchianti     vchianti.vbrew.com

            IP  ,   
   . ,     
/etc/networks         .
   ,       
:


                                - 84 -

     # /etc/networks for the Virtual Brewery
     brew-net      191.72.1.0
     wine-net      191.72.2.0


     6.7.    IP

              ,       
  ,         
.         
,        .    
      rc.inet1  ,     . 
    ifconfig (  ""    ), 
route.

     fconfig       ,
          IP        
  ,     "taking up". 
,              IP datagrams 
.    

   # ifconfig interface ip-address

         ip-      . 
      ,  
       IP , 
255.255.0.0   B . ifconfig     
 .

     route          
.     

     route [add|del] target

       add  del      
 .



                                - 85 -

       6.7.1.  loopback

             
--  loopback:

   # ifconfig lo 127.0.0.1

     ,                  localhost
    IP  .  ifconfig       hosts
,    ,      127.0.0.1:

     # Sample /etc/hosts entry for localhost localhost     127.0.0.1

          ,  
 ifconfig     :


     $ ifconfig lo
     lo        Link encap Local Loopback
               inet addr 127.0.0.1  Bcast [NONE SET]  Mask 255.0.0.0
               UP BROADCAST LOOPBACK RUNNING  MTU 2000  Metric 1
               RX packets 0 errors 0 dropped 0 overrun 0
               TX packets 0 errors 0 dropped 0 overrun 0

          ,  loopback  netmask 
255.0.0.0,      127.0.0.1  --    A  .   
,           ,
 -   loopback. ,   
rwhod        ,      
    loopback     rwho 
  .         " 
ifconfig".

     ,                   -"".
       --     ,
   IP,        
127.0.0.1.      


                                - 86 -

     # route add 127.0.0.1

     ,    localhost  IP .

     ,            ,  ,
  ping. ping -   (sonar) 
               IP , 
           
.       roundtrip time.

     # ping localhost
     PING localhost (127.0.0.1): 56 data bytes
     64 bytes from 127.0.0.1: icmp seq=0 ttl=32 time=1 ms
     64 bytes from 127.0.0.1: icmp seq=1 ttl=32 time=0 ms
     64 bytes from 127.0.0.1: icmp seq=2 ttl=32 time=0 ms
     ^C

     --- localhost ping statistics ---
     3 packets transmitted, 3 packets received, 0% packet loss
     round-trip min/avg/max = 0/0/1 ms



         ping,         
  . ^C      Ctrl-C.

           ,        
127.0.0.1     ping  .    
      .

            ping    
,       .    
.       ifconfig      ,
      ,         ,    
  ,  ,       
(            /proc/net  ).    
    ,  "Network unreachable" ,
         route. 

                                - 87 -

      ,    ifconfig.

                  
    .    
 rc.inet1  ,   rc.inet    /etc/rc,
                
  .  , "telnet localhost"  
telnet    .

     ,   loopback       
    ,        ,      
          .  , 
    ,     
     .


     6.7.2. Ethernet 

         Ethernet,        
  loopback,           
 .

       ,     IP , 
     B.     
 :

      # ifconfig eth0 vstout netmask 255.255.255.0

              eth0      IP     vstout
(191.72.1.2).       netmask, ifconfig   netmask
     ,          netmask  255.255.0.0.  
 :

     # ifconfig eth0
     eth0      Link encap 10Mps Ethernet HWaddr  00:00:C0:90:B3:42
               inet addr 191.72.1.2 Bcast 191.72.1.255 Mask 255.255.255.0
               UP BROADCAST RUNNING  MTU 1500  Metric 1
               RX packets 0 errors 0 dropped 0 overrun 0

                                - 88 -

               TX packets 0 errors 0 dropped 0 overrun 0

               ifconfig    
  ( Bcast)   , 
          1. , 
      (       
      Ethernet   )         
    1500  .         
  ,    .

            loopback  ,        
  ,     ,  
    eth0.   ,   
 

     # route add -net 191.72.1.0

                 ,        
         route  ,    
        .  ,   
:        
    (   191.72.1.0)  
        .       ,   
  , -- eth0.

     ,    -net ?  ,   route
             
(     localhost).  route    dotted quad
,         
,        .       - ,
 ,    ,   , 
  .

     , route  ,  191.72.1.0 -  ,  
          .    
,    ,   -net .

     ,  ,     

                                - 89 -

  .    --   ,
       /etc/networks.     
;     -net     ,  
route  ,  191.72.1.0  .

     # route add brew-net

     ,            , 
      Ethernet      
     Ethernet,  vlager,  

   # ping vlager
     PING vlager: 64 byte packets
     64 bytes from 191.72.1.1: icmp seq=0. time=11. ms
     64 bytes from 191.72.1.1: icmp seq=1. time=7. ms
     64 bytes from 191.72.1.1: icmp seq=2. time=12. ms
     64 bytes from 191.72.1.1: icmp seq=3. time=3. ms
     ^C

       ----vstout.vbrew.com PING Statistics----
     4 packets transmitted, 4 packets received, 0% packet loss
     round-trip (ms)  min/avg/max = 3/8/12

               ,  -  .
        , 
    ,    
terminator,    ...         ,  
             netstat.  
,    ifconfig,       
 - .        , 
             .
 ,    ,   .  ,
           route,
                  
.  route    ,   
  (  -n          
):


                                - 90 -

     # route -n
     Kernel routing table
     Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
     127.0.0.1       *               255.255.255.255 UH    1      0      112 lo
     191.72.1.0      *               255.255.255.0   U     1      0       10 eth0

                  6.9.
  Flags           
.  U  -       ,  H
,         .  H  -
   ,     , 
    -net    route. ( ,
    ,     ,    Use,
         ping.) To check whether a
route  you  have entered is used at all, check if the Use field in the
second to last column increases between two invocations of ping.

     6.7.3.   Gateway

         ,         
  Ethernet.    ,  ,   
,        gateway.   gateway  
     Ethernet,      
,  (    Internet).   gateway , 
               
.

     , Ethernet     
      gateway,    vlager. , 
vlager    ,      
      vstout,     
               vlager.
        ;  gw  
,       gateway.

    # route add wine-net gw vlager

     ,          ,     

                                - 91 -

       
   ,         
vstout  vbardolino,     .

           gateway   
      Ethernet.    vlager
       Internet (   
SLIP  ).              ,
      ,    vlager.      
    gateway    vstout:


 # route add default gw vlager

        default( )    0.0.0.0, 
     .    
   /etc/networks,      route.

     ,    ping,          
        gateway,    
      .     
   -      ,        
         ,    -  
     .

     6.7.4.  Gateway

                   
Ethernet   .   vlager,   
Ethernet  ,          . ,
         , 
   IP ,   .

           
        ,     
 :



                                - 92 -

     191.72.1.1      vlager      vlager.vbrew.com
     191.72.1.1      vlager-if1
     191.72.2.1      vlager-if2

          :



    # ifconfig eth0 vlager-if1
    # ifconfig eth1 vlager-if2
    # route add brew-net
    # riute add wine-net


     6.7.5. PLIP 

           PLIP           ,
        ,     
     Ethernet.              
point-to-point(   ) ,     
  (""),    .

        ,        laptop    
      ,      vlager 
PLIP.  Laptop      vlite,        
   .            ,         
    plip1.      ,    
  plip1,   :

     # ifconfig plip1 vlite pointopoint vlager
     # route add default gw vlager

           ,   ,  
point-to-point ,      vlager. 
     ,  vlager  gateway. 
vlager,    ifconfig    
  vlager:


                                - 93 -

     # ifconfig plip1 vlager pointopoint vlite

     ,       plip1    vlager      
 IP ,        191.72.1.1.

     ,          laptop  
;              
    vlite.        o    ,  
        ,
      vlager  gateway  vlite:

     # route add vlite gw vlager

                 , 
  .         o 
  gated ,       
  ,          .
    ,  ,  o  ,   proxy
ARP.   proxy ARP, vlager     ARP pf  vlite
  Ethernet .   ,   
  vlite     vlager,     
laptop.     proxy ARP   6.10.

          Net-3        
plipconfig,         IRQ  .
,        ifconfig.


     6.7.6. SLIP  PPP 

       SLIP   PPP  --    point-to-point
   PLIP ,      
. ,   SLIP   
                ,      
      SLIP  . PPP  
.       SLIP  PPP  
   8.  9.


                                - 94 -

     6.7.7. Dummy() 

               ,  
  .      ,  ,
     . ,  
    .

             ,       
    ,  loopback  ,   
    127.0.0.1.     ,   
      ""  IP      .  ,
  laptop vlite,       
vlite          
      .    vlite    /etc/hosts    IP  
191.72.1.65,          
.      loopback    
    ,      
  !    ,        , 
  .

            .  
      loopback.   vlite,    
  191.72.1.65         . 
      191.72.1.65     .
 :

     # ifconfig dummy vlite
      # route add vlite

      6.8.   ifconfig

             ifconfig,    
 .   :


     ifconfig interface [[-net|-host] address [parameters]]

     interface  -    ,   address - IP  

                                - 95 -

      .       IP  
dotted  quad    ,    ,    ifconfig    
/etc/hosts    /etc/networks.  -net    -host   ifconfig
                   ,
.

        ifconfig          ,  
      .      
,                ,        
;    -a     .
   Ethernet  eth0   :

     # ifconfig eth0
     eth0      Link encap 10Mbps Ethernet  HWaddr 00:00:C0:90:B3:42
               inet addr 191.72.1.2 Bcast 191.72.1.255 Mask 255.255.255.0
               UP BROADCAST RUNNING  MTU 1500  Metric 0
               RX packets 3136 errors 217 dropped 7 overrun 26
               TX packets 1752 errors 25 dropped 0 overrun 0

     MTU    Metric    MTU   
    .     
      .
Linux    ,     .

     RX    TX            
    ,    ,   
,    -    ,     
-  .         
         .
   ,      ifconfig,      
           ;   
.

                       ifconfig 
    ,    .  
          ,
    (-).


                                - 96 -

     up          IP .  
          ,   IP .

(     UP RUNNING )

     down     IP .  
            IP   .   , 
               ,   
          .      ,  
             ,  , 
          .

     netmask mask      .
                  32 ,
            0x,   dotted quad  .


     Pointopoint adress     point-to-point IP
          .      , ,
          SLIP  PLIP .


( point-to-point   , ifconfig  POINTOPOINT
          .)

      broadcast address      
               .  IP 
           ;       
          .

( broadcast address  , ifconfig  BROADCAST .)


      metric number       
                . 
             RIP,    .
               .    
          RIP ,       ;  ,

                                - 97 -

                 .


      mtu bytes    Maximum Transmission Unit
          (   )  Ethernets, MTU 
           1500;  SLIP  296.


      arp        
            Ethernet.    ARP,  
          ,      
            .   ,  
          .


( ARP  , ifconfig   NOARP. )

     -arp   ARP   .


     promisc    promiscuous .  
          ,      ,  
                   . 
           ,   ,   .
          ,         
            .   ,   
                   
          .        
               .   
             ,  Kerberos,
           SRA login.  (    PROMISC.)


     -promisc   promiscuous .


     allmulti Multicast  --    
              ,    

                                - 98 -

               .  Multicast   
           .

(      ALLMULTI. )

    -allmulti  Multicast .

     6.9.    netstat

     ,              
      .   netstat  ,,
      .  
      .

     6.9.1.   

           netstat      -r  ,      
.  vstout,  :

     # netstat -nr
     Kernel routing table
     Destination     Gateway         Genmask         Flags Metric Ref Use    Iface
     127.0.0.1       *               255.255.255.255 UH    1      0       50 lo
     191.72.1.0      *               255.255.255.0   U     1      0      478 eth0
     191.72.2.0      191.72.1.1      255.255.255.0   UGN   1      0      250 eth0

     -n      netstat    dotted quad IP
       .   
           (  DNS
 NIS ).

                   netstat        gateway
  .    gateway   , 
.    "" .   IP ,
     ,    
  ,        genmask   
     .


                                - 99 -

           ,  
:

        G   gateway.

        U ,   , .

        H         .
          ,  loopback  127.0.0.1.

        D ,       
          ICMP   ( .  3.5 ).

        M ,      ICMP
           .

     Ref            ,  
      (    gateways)   
   .     , 
    ,  , 
  .

     6.9.2.   

          -i , netstat   
  .  ,    ,    -a ,  
     ,    , 
    .  vstaout,   netstat
  :

     $ netstat -i
     Kernel Interface table
     Iface   MTU Met  RX-OK RX-ERR RX-DRP RX-OVR  TX-OK TX-ERR TX-DRP TX-OVR Flags
     lo        0   0   3185      0      0      0   3185      0      0      0 BLRU
     eth0   1500   0 972633     17     20    120 628711    217      0      0 BRU

     MTU   Met    MTU    
  .  RX    TX      

                               - 100 -

               (RX-OK/TX-OK),  
(RX-ERR/TXERR),     (RX-DRP/TX-DRP),   
 -  (RX-OVR/TX-OVR).

           ,      
.       , 
 ifconfig.

B     .

        L   -- loopback 

        M     ( promiscuous  ).

        N  .

        O ARP    .

        P  - point-to-point .

        R  .

        U  .


     6.9.3.  

     Netstat         
 .  -t, -u, -w,  -x   TCP, UDP,
RAW  ,   UNIX .    -a ,   
  (   )  .    
         .

      netstat -ta  vlager :

     $ netstat -ta
     Active Internet connections
     Proto Recv-Q Send-Q Local Address    Foreign Address    (State)

                               - 101 -

     tcp        0      0 *:domain         *:*                LISTEN
     tcp        0      0 *:time           *:*                LISTEN
     tcp        0      0 *:smtp           *:*                LISTEN
     tcp        0      0 vlager:smtp      vstout:1040        ESTABLISHED
     tcp        0      0 *:telnet         *:*                LISTEN
     tcp        0      0 localhost:1046   vbardolino:telnet  ESTABLISHED
     tcp        0      0 *:chargen        *:*                LISTEN
     tcp        0      0 *:daytime        *:*                LISTEN
     tcp        0      0 *:discard        *:*                LISTEN
     tcp        0      0 *:echo           *:*                LISTEN
     tcp        0      0 *:shell          *:*                LISTEN
     tcp        0      0 *:login          *:*                LISTEN

     ,        . ,
       SMTP   vstout,   
  telnet   vbardolino.

         -a        
.


     6.10.  ARP 

       ,      
  ARP  , ,   ,  
        . rp   
  .

     Arp [-v] [ -t hwtype ] -a [hostname] arp [-v] [ -t hwtype ] -s hostname
     hwaddr arp [-v] -d hostname [ hostname ... ]

     hostname        ,   IP
  dotted quad .

         ARP   IP   
       ,  hostname  . ,
 arp  vlager  


                               - 102 -

     # arp -a
     IP address      HW type                 HW address
     191.72.1.3      10Mbps Ethernet         00:00:C0:5A:42:C1
     191.72.1.2      10Mbps Ethernet         00:00:C0:90:B3:42
     191.72.2.4      10Mbps Ethernet         00:00:C0:04:69:AA

       Ethernet  vlager, vstout  vale.

         -t         
   ,   .    ethernet,
ax25net,    pronet,    10Mbps Ethernet, AMPR AX.25,  IEEE
802.5 token ring , .

     -s       Ethernet    ARP
. hwaddr     , 
      Ethernet  ,    
  ,    .      
           
, ,  -t .

         ,      ,   
  IP      ARP  ,      ARP
         ,    ARP
           
  IP      .   IP   ARP 
 ( )        
Ethernet,   - .

       arp        -d     ARP 
    .     ,  
   Ethernet    IP.  
     ARP .

     -s        proxy ARP. 
   ,  gate,   gateway 
    fnord,       
    ,    gate.   :  gate 
ARP      fnord,        Ethernet

                               - 103 -

.       ARP   fnord, gate 
      Ethernet . 
      gate,   
 fnord.

             ,  ,     
    fnord    DOS     TCP,  
   .    proxy ARP, DOS 
    ,  fnord    ,  
   -     gateway.

         proxy ARP --    
   gateway      ,
    .      ,     
laptop  vlite,       vlager  PLIP   
  . ,    , 
  ,     proxy ARP,  
      IP ,    gateway. , vstout  
  proxy ARP       (191.72.1.0), 
      (191.72.2.0).

             proxy ARP  fnord 
; , Ethernet     gate.

     # arp -s fnord 00:00:c0:a1:42:e0 pub

proxy ARP      :

    # arp -d fnord

     6.11. 

     Linux      .       
    ,    
      . ,  ifconfig 
  ,   IRQ   DMA .

         --   mtu    route,

                               - 104 -

                  
 .  - MTU  MTU 
.              
gateway,        gateway     
    MTU. ,    wanderer  
vlager    SLIP  .      vstout  wanderer,
      wanderer       1500 ,
          Ethernet. SLIP ,  
,   MTU 296,      vlager 
         IP        ,  
    296  .    ,   
    vstout  ,        MTU  296, 
    :

   # route add wanderer gw vlager mtu 296

           mtu      
   " "  (SNARL).  
--         4.

.
                               - 105 -


     7.       .

           3., TCP/IP     
 ,       .    
,         ,   
      , -  ,  
  /etc/hosts.          LAN,    
   ,     IP  
 .         6.
        ,     BIND  -  Berkeley  Internet
Name Domain Service -     IP .  BIND
   ,           , 
        .  Linux,   
   Unix- c,   
,   named.  ,    
       ,       
  .   ,  
         .
          ,    
      .     BIND 
         LAN      Internet
uplink,         BIND,  
  "DNS  and  BIND" (. [GETST "liu-dns"]).    
  ,     BIND .   
 newsgroup   DNS  comp.protocols.tcp-ip.domains.

      7.1   .

          "   ",    
  ,      
    -    ,      
      C.   
gethostbyname(2)  gethostbyaddr(2),        IP  
  ,   .     
    ,    ,  
    NIS() (Network Information Service).
  ,    smail,      

                               - 106 -

  ,     .

      7.1.1   .

       ,          -
host.conf.        ,  
 .

        host.conf     .  
    (spaces  tabs).  (#) 
,      .

        :

      Order:            
                . Valid  -       
                    /etc/hosts,  nis   NIS  .  
                          . ,  
                       
                 .

      Multi:       .    ,
                   /etc/hosts   IP ,
                  "multi - homed".   
                 DNS  NIS .

      Nospoof:       , DNS  
                   IP ,  inaddr.arpa
               .          
                  "spoofing".    ,
                     
               ,        IP   
                     .  ,   
                        .  
                    nospoof.

      Alert:             .    
                ,    spoof (. )  

                               - 107 -

                ,      
                 syslog .

      Trim:          ,   
                    .   
                ,       
                    .    
                   ,        ,
                     /etc/hosts.

       Trim         
.



         vlager  :

                 # /etc/host.conf
                 # We have named running, but no NIS (yet)
                 order   bind hosts
                 # Allow multiple addrs
                 multi   on
                 # Guard against spoof attempts
                 nospoof on
                 # Trim local dooain"(not really necessary).
                 trim    vbrew.com.

      7.1.2     .

         host.conf   ,  
  .  :

      RESOLV  HOST  CONF.      ,      
 /etc/host.conf.

      RESOLV SERV ORDER  order ,   host.conf.  ,
  , bind,   nis,    ,  ,
,     .

                               - 108 -


      RESOLV SPOOF CHECK  ,   
spoofing.       off. 
  spoof  ,        logging,
.    *  spoof ,   logging
   host.conf.

      RESOLV MULTI    (   .  .), 
     multi   tt host.conf.

      RESOLV OVERRIDE TRIM DOMAINS        
trim ,   ,    host.conf.

      RESOLV ADD TRIM DOMAINS      trim
,    host.conf.



      7.1.3    --- resolv.conf

              ,
        BIND      
,       ,    
.   ,   
,  resolv.conf.             ,
     ,   
 .        ,  
      ,   ,  
   .        
     ,    
.
             resolv.conf - nameserver,  
  IP     .      
   nameserver   ,   
   .        
   . ,     
.
        nameserver  ,    

                               - 109 -

     .
        , domain  search          
 ,     ,  BIND  
    .  search    
,   .     
.
        search  ,     
     ,   
 ,       root.
        
;          ,     
 getdomainname(2)  .

           ,   resolv.conf
   Virtual Brewery:

                 # /etc/resolv.conf
                 # Our domain
                 domain         vbrew.com
                 #
                 # We use vlager as central nameserver:
                 nameserver     191.72.1.1



         vale,      
  , vale.vbrew.com,  vale.com.

      7.1.4   .

           LAN   ,   
  ,     .    
  ,        ,        
  .    :     
   ,            LAN
 ,         -
 .   login  X-terminals,      , 
..

                               - 110 -

            ,   ,
        ,     
 .
      One -   ,   hostnames 
  ,           
hostnames    . ,    , 
    .
        ,      
      LAN  /etc/hosts.  /etc/host.conf 
   "order bind hosts"  ,   
    ,       
.

                            7.2  named.

      ,      
 Unix    named.  
      BSD   ,  ,,
    .          
 Linux    ,     BIND-
4.8.3.  , BIND-4.9.3,     ,  
    Linux.
             Domain
Name  System.            ,  
     3.,      
   DNS.



      Named      ,    
    .    
   /etc/named.boot,    ,
       .   
  zone files.        
 .
        named,     :

      # /usr/sbin/named

                               - 111 -


       named,   named.boot      zone  file,
  .               id    
/var/run/named.pid   ASCII,     zone  files    
,      listening      53  
 DNS. (1)

                       7.2.1  named.boot.

       named.boot        
,        ,  zone
,     .    
               
 . ,       named.boot  
,      vlager    
7.2.1. (2)

         ,      
   named.      ,
     .       
DNS    ,    .

      1.   named  binaries    Linux  FTP  sites,
    ,         .  
   pid ,     /tmp  /var/tmp.
      2. ,         
.    named     named.boot 
,   . BIND-4.9.3,   ,  .



      ;
      ; /etc/named.boot file for vlager.vbrew.com
      ;
      directory     /var/named
      ;
      ;             domain                   file
      ;---------------------------------------------------

                               - 112 -

      cache         .                        named.ca
      primary       vbrew.com                named.hosts
      primary       0.0.127.in-addr.arpa     named.local
      primary       72.191.in-addr.arpa      named.rev

                      9. Named.boot   vlager.

        ,   named        
 ,         .
    , ,  named  
    vbrew.com,  zone     named.hosts.
     ,   zone files  
/var/named.

                
,  .   - :  
named    ,     hints      
(named.ca    ).     hints .

                ,    

       named.boot:

      directory -  ,   zone files 
.            
.            
 directory.   Linux filesystem,  
  /var/named.

      primary  -               ,
          named  . 
 , named  zone     .



         ,         
    boot-,        
127.0.0.0,      .

                               - 113 -


      secondary  -   ,  ,    
.        
 .    
    ,       ,  
      . IP ,    
  ,      named()   . 
         ,      
  ,          
,        .         
    ,         
  .named       
  .     SOA  .

      cache -        .  
   hints,     ,
   .   NS     . 
,   ,-   .  :  
     boot-, named    
    .        
 ,           
.  ,  named         , 
             , 
.        -    
   (       ).

      forwarders -      .  IP
       ,     named
   ,        .  
   ,        .

      slave -       . 
          , 
         forwarders
.




                               - 114 -

        ,      ,  sortlist
  domain.  ,         ,        
  zone   .  -  $INCLUDE    $ORIGIN.
     ,       .

      7.2.2 DNS   .

         named,  named.hosts,   
   ,      origin.    -  
        . 
               
   . ,    , 
,           ,     
     origin.  rigin  
,    "@".

       ,       
,  Rrs(resource records)  .   
     DNS.      
.  ,      IP ,  CNAME 
        . ,
   7.2.3   116,   named.hosts
   virtual brewery.

                  :

      [domain] [ttl] [class] type rdata

          .    

       ,  "    
 ,       .
-        .

      domain       .   
  , RR       RR.

      ttl       

                               - 115 -

     ,  RR
  "time to live'',    ttl  .  ttl
   .



      information    ,       .
 -     .

       ttl   ,       
       SOA .

      class  -  ,  IN  IP ,  HS 
   Hesoid .  TCP/IP ,     IN.
     ,     RR.

      type     RR.      :  A,  SOA,  PTR,
  NS.      RR.

      rdata      RR.   
    RR. ,      RR .

      following -   RR,        
DNS   .          ,      
 .      ,  , 
.

      SOA

           (SOA    "  Start  of
Authority'').         SOA RR 
    .      ,  
      SOA    .  
     :

      origin  -       
.     .


                               - 116 -



      contact  - email      
,   "@"   .  ,     
Virtual Brewery - janet,       janet.vbrew.com.

      serial  -     ,    
  .  ,    
  ,       .

          ,  ,
    .      
 ,    SOA 
       ,  
       SOA  .      ,  
           .

      refresh   ,    ,    
     SOA   .
 -       .

       ,        ,
          
,       .

      retry          
        ,       
   .      
,         
        .  ,  
,         .

      expire -             
 -    ,    
      .     
   . Craig Hunt (GETS "hunt - tcpip"])  42
.


                               - 117 -

      minimum -      ttl      
,        .     ,
  RR     - .



                   
   .

      minimum     ,      LANs,  
     .      .
 ,   Rrs   ,    
    ttl.

      A

       IP   hostname.     
 dotted quad notation.

             . Hostname
            
hostname.    hostnames -         
 hostname  CNAME .

      NS

           .    ,
,    NS  ,      3.6.
     hostname .  
 hostname  A ,   glue,     IP
 .

      CNAME

                  hostname.
 hostname -  ,      ;
      CNAME ,     
 .

                               - 118 -


      PTR



         ,  ,       
Addr.arpa   hostnaoes.     
IP    hostnames.  hostname    hostname.

      MX

       RR     .      
  ,    14.4.1   14..
 MX  :

      [domain] [ttl] [class] MX preference host

      host      .  
    ,    .
  ,       , 
   ,      MX      ,  
      .       ,  
  ,            (
 -preference value).

      HINFO       
    .   :

      [domain] [ttl] [class] HINFO hardware software

           ,  
 .   ,     .
     "Assigned Numbers'' (RF 1340).  
 ,          .  
        .
  ,       "Assigned Numbers'' RFC.

      7.2.3   .

                               - 119 -


       7.2.3, 7.2.3, 7.2.3,  7.2.3        
   brewery,   vlager.  
   (      ),  
-   .     ,     
   named,    "DNS and BIND'' by Cricket Liu  and
Paul  Albitz  ([GETST "liu-dns"]).

                  &   "

        named.ca,      7.2.3,  
 hint   root name .    
   ,   .    
   root ,  nslookup,   
  .(3)

              ;
              ; /var/named/named.ca          Cache file for the brewery.
              ;                We're not on the Internet, so we don't need
              ;                any root servers. To activate these
              ;                records, remove the semicolons.
              ;
              ; .                99999999   IN    NS  NS.NIC.DDN.MIL
              ; NS.NIC.DDN.MIL   99999999   IN    A   26.3.0.103
              ; .                99999999   IN    NS  NS.NASA.GOV
              ; NS.NASA.GOV      99999999   IN    A   128.102.16.10

                            10.  named.ca.

      7.2.4   (Name Server Setup).

      3. ,              
  root ,      - root server  hints:
  22!     ,    
 nslookup   ,    
      7.2.3,     
 .


                               - 120 -



            ;
            ; /var/named/named.hosts       Local hosts at the brewery
            ;                               Origin is vbrew.com
            ;
            @                   IN  SOA   vlager.vbrew.com. (
                                          janet.vbrew.com.
                                          16         ; serial
                                          86400      ; refresh: once per
day
                                          3600       ; retry:   ong howr
                                          3600000    ; expire:  42 days
                                          604800     ; minimum: 1 week
                                          )
                                IN  NS    vlager.vbrew.com.
            ;
            ; local mail is distributed on vlager
                                IN  MX    10 vlager
            ;
            ; loopback address
            localhost.          IN  A     127.0.0.1
            ; brewery Ethernet
            vlager              IN  A     191.72.1.1
            vlager-if1          IN  CNAME vlager
            ; vlager is also news server
            news                IN  CNAME vlager
            vstout              IN  A     191.72.1.2
            vale                IN  A     191.72.1.3
            ; winery Ethernet
            vlager-if2          IN  A     191.72.2.1
            vbardolino          IN  A     191.72.2.2
            vchianti            IN  A     191.72.2.3
            vbeaujolais         IN  A     191.72.2.4

                           11.  named.hosts.

                 

                               - 121 -

 (server setup).   nslookup,   
        .  
,     

      nslookup hostname

           ,   resolv.conf,  
hostname. (       , nslookup 
- )



             ;
             ; /var/named/named.local       Reverse mapping of 127.0.0
             ;                               Origin is 0.0.127.in-
addr.arpa.
             ;
             @                   IN  SOA   vlager.vbrew.com. (
                                           joe.vbrew.com.
                                           1          ; serial
            "   "                          360000     ; refresh: 100 hrs
                                           3600       ; retry:   one hour
                                           3600000    ; expire:  42 days
                                         ; minimum: 100 hrs
                                           )
                                 IN  NS    vlager.vbrew.com.
             1                   IN  PTR   localhost.

                           12.  named.local.

       ,      .  
    ,          
  DNS ,      .

          , nslookup   
 ,     .  " > "
(prompt),           
  .   ,    A ,    IP

                               - 122 -

      .

           ,    "set  type=type",  
type()      ,   
  7.2,  ANY.

      ,       :



            ;
            ; /var/named/named.rev         Reverse mapping of our IP
addresses
            ;                               Origin is 72.191.in-addr.arpa.
            ;
            @                   IN  SOA   vlager.vbrew.com. (
                                          joe.vbrew.com.
                                          16         ; serial
                                          86400      ; refresh: once per
day
                                          3600       ; retry:   one hour
                                          3600000    ; expire:  42 days
                                          604800     ; minimum; 1 week
                                          )
                                IN  NS    vlager.vbrew.com.
            ; brewery
            1.1                 IN  PTR   vlager.vbrew.com.
            2.1                 IN  PTR   vstout.vbrew.com.
            3.1                 IN  PTR   vale.vbrew.com.
            ; winery
            1.2                 IN  PTR   vlager-if1.vbrew.com.
            2.2                 IN  PTR   vbardolino.vbrew.com.
            3.2                 IN  PTR   vchianti.vbrew.com.
            4.2                 IN  PTR   vbeaujolais.vbrew.com.

                            13.  named.rev.



                               - 123 -

      $ nslookup
                 Default Name Server:  rs10.hrz.th-darmstadt.de
                 Address:  130.83.56.60

                 > sunsite.unc.edu
                 Name Server:  rs10.hrz.th-darmstadt.de
                 Address:  130.83.56.60

                 Non-authoritative answer:
                 Name:    sunsite.unc.edu
                 Address:  152.2.22.81


                ,      
  IP ,          DNS  
,  nslookup   : "No type A records found''. ,
          ( ), 
"set  type" . ,   SOA  unc.edu,  
:



      > unc.edu
                 *** No address (A) records available for unc.edu
                 Name Server:  rs10.hrz.th-darmstadt.de
                 Address:  130.83.56.60

                 > set type=SOA
                 > unc.edu
                 Name Server:  rs10.hrz.th-darmstadt.de
                 Address:  130.83.56.60

                 Non-authoritative answer:
                 unc.edu
                         origin = ns.unc.edu
                      &  mcil addr = shava.ns.unc.edu
                         serial = 930408
                         refresh = 28800 (8 hours)

                               - 124 -

                         retry   = 3600 (1 hour)
                         expire  = 1209600 (14 days)
                         minimum ttl = 86400 (1 day)

                 Authoritative answers can be found from:
                 UNC.EDU nameserver = SAMBA.ACS.UNC.EDU
                 SAMBA.ACS.UNC.EDU       internet address = 128.109.157.30

             MX ,  ..
  ANY    ,   
.

      > set type=MX
                 > unc.edu
                 Non-authoritative answer:
                 unc.edu preference = 10, mail exchanger =
lambada.oit.unc.edu
                 lambada.oit.unc.edu     internet address = 152.2.22.80

                 Authoritative answers can be found from:
                 UNC.EDU nameserver = SAMBA.ACS.UNC.EDU
                 SAMBA.ACS.UNC.EDU       internet address = 128.109.157.30

        nslookup,  , -  
 root    named.ca.      ,
    NS ,   root :



                 > set typ=NS
                 > .
                 Name Server:  fb0430.mathematik.th-darmstadt.de
                 Address:  130.83.2.30

                 Non-authoritative answer:
                 (root)  nameserver = NS.INTERNIC.NET
                 (root)  nameserver = AOS.ARL.ARMY.MIL
                 (root)  nameserver = C.NYSER.NET

                               - 125 -

                 (root)  nameserver = TERP.UMD.EDU
                 (root)  nameserver = NS.NASA.GOV
                 (root)  nameserver = NIC.NORDU.NET
                 (root)  nameserver = NS.NIC.DDN.MIL

                 Authoritative answers can be found from:
                 (root)  nameserver = NS.INTERNIC.NET
                 (root)  nameserver = AOS.ARL.ARMY.MIL
                 (root)  nameserver = C.NYSER.NET
                 (root)  nameserver = TERP.UMD.EDU
                 (root)  nameserver = NS.NASA.GOV
                 (root)  nameserver = NIC.NORDU.NET
                 (root)  nameserver = NS.NIC.DDN.MIL
                 NS.INTERNIC.NET internet address = 198.41.0.4
                 AOS.ARL.ARMY.MIL        internet address = 128.63.4.82
                 AOS.ARL.ARMY.MIL        internet address = 192.5.25.82
                 AOS.ARL.ARMY.MIL        internet address = 26.3.0.29
                 C.NYSER.NET     internet address = 192.33.4.12
                 TERP.UMD.EDU    internet address = 128.8.10.90
                 NS.NASA.GOV     internet address = 128.102.16.10
                 NS.NASA.GOV     internet address = 192.52.195.10
                 NS.NASA.GOV     internet address = 45.13.10.121
                 NIC.NORDU.NET   internet address = 192.36.148.17
                 NS.NIC.DDN.MIL  internet address = 192.112.36.4

        ,   nslookup      
  help  nslookup.

      7.2.5    

         ,      
   BIND .       .
    ,       
    ,   .



      hostcvt - ,               

                               - 126 -

BIND ,   /etc/hosts      
named.      (A)    (PTR), 
     ..  ,          
    ,        
    SOA  , ,   MX 
 ..          .
Hostcvt -  BIND  ,      
    Linux FTP .

           ,        
   .  (,       )
      dnswalk, perl-based  
   DNS   ,       
    . Dnswalk   
comp.sources.misc ,       FTP, 
  .



      8.   IP

            ,  SLIP    PPP,  
Internet connectivity      .          
    FIFO ,  
   .   -    
 mailbox,       ,
           IP   
 .

           Linux-  SLIP    PPP.  SLIP  
     ,     .   PPP
      MIchael Callahan    Al  Longyear.
        .

      8.1  .

       ,    SLIP    PPP,    
       ,      

                               - 127 -

  .      looback  interface,  
    name resolution.    Internet,  
  DNS.       -    
     resolv.conf ;      
SLIP     .

      ,    ,      
     SLIP/PPP .   
  ,   ,     
cache-only .    ,   
      DNS ,    .
    - ,     ,  ,  
          
  . Named.boot    cache-only ,  :

      ; named.boot file for caching-only server
                 directory                            /var/named

                 primary       0.0.127.in-addr.arpa   db.127.0.0 ; loopback
net
                 cache         .                      db.cache   ; root
servers

          ,    



      db.cache     root .  
     "  ".

      8.2 SLIP .

        IP        SLIP  
   account().  login   account,
     ;    script  -
 SLIP                
   interface.     
      .

                               - 128 -


         , SLIP  --  user-space
;  Linux,  -   ,        
. , ,      
    SLIP .    tty line
discipline,  SLIPDISC.    tty    line discipline
(DISC0),          , 
normal read (2)  write(2) ,  SLIP  -      
      tty,      ,    ,
  SLIP .

      SLIP            
SLIP .      SLIP,         CSLIP,
    Van Jacobson header compression 
  IP .(1) ,  -  
    .

              SLIP  
-   slattach. ,        /dev/cua3,  
    SLIP .    :

      #slattach /dev/cua3 &

        line discipline cua3  SLIPDISC,    
   interface SLIP .      SLIP ,
      sl0;      sl1, 
 .        SLIP .

      1. Van Jacobson header compression   RFC 1441.



          ,   slattach  -
CSLIP.       ,  -p  .
  ,   normal SLIP (no compression),  


      # slattach -p slip /dev/cua3 &

                               - 129 -


        - cslip, slip6, cslip6 ( - 
Slip()),   adaptive   SLIP.       
,   ,     SLIP  remote
end.

      ,       , 
   peer. ,  cowslip  CSLIP,    
  .    ,   ping
       .    pings
,           "Can't build ICMP header'' 
  .        - 
 adaptive SLIP.

      , slattach        SLIP,  
      ,   
  ,   PPP  KISS ( ,
    ham radio).  ,   
slattach  . 8.

         SLIP  ,      
 interface.  ,        ifconfig    route
. ,   vlager    crowslip.
   :

      # ifconfig sl0 vlager pointopoint cowslip
                 # route add cowslip
                 # route add default gw cowslip

         interface  point-to-point  
cowslip,           route  
cowslip        ,  cowslip  .

        SLIP ,       
cowslip,  route c del ,  interface,  
slatch   hangup( ).    hangup
,     :


                               - 130 -



                 # route del default
                 # route del cowslip
                 # ifconfig sl0 down
                 # kill -HUP 516

      8.3  dip

          .  ,           
   ,      
 ,     ,  .  - ,
   dip. (2)     -  3.3.7.
  ,      
  dip   .     
""    .

      Dip    ,   
  ,    SLIP ,      interface.
    ,     
  .   dip()    
     .

           SLIP  interface,  dip  
root .       ,   
dip setuid  root,        
 SLIP         root
.    ,     
interface()        dip  
      .   ,    
        SLIP ,    
    .  ,        
 SLIP ,      
 SLIP  ,      dip   
script(),   .     
  setuid root. (3)

      8.3.1   Script().

                               - 131 -


       script    8.3.1.    
  cowslip,  dip  script   :

      2. Dip  Dialup IP.    Fred van Kempen.
      3. Diplogin  ( )    setuid(). .  
  .



                  # Sample dip script for dialing up cowslip

                  # Set local and remote name and address
                  get $local vlager
                  get $remote cowslip

       "          port cua3                # choose a serial port
                  speed 38400              # set speed to max
                  modem HAYES              # set modem type
                  reset                    # reset modem and tty
                  flush                    # flush out modem response

                  # Prepare for dialing.
                  send ATQ0V1E1X1\r
                  wait OK 2
                  if $errlvl != 0 goto error
                  dial 41988
                  if $errlvl != 0 goto error
                  wait CONNECT 60
                  if $errlvl != 0 goto error

                  # Okay, we're connected now
                  sleep 3
                  send \r\n\r\n
                  wait ogin: 10
                  if $errlvl != 0 goto error
                  send Svlager\n
                  wait ssword: 5

                               - 132 -

                  if $errlvl != 0 goto error
                  send hey-jude\n
                  wait running 30
                  if $errlvl != 0 goto error

                  # We have logged in, and the remote side is firing up
SLIP.
                  print Connected to $remote with address $rmtip
                  default                  # Make this link our default
route
                  mode SLIP                # We go to SLIP mode, too
                  # fall through in case of error

                 error:
                  print SLIP to $remote failed.

                      14.  dip script.



      # dip cowslip.dip
                 DIP: Dialup IP Protocol Driver version 3.3.7 (12/13/93)
                 Written by Fred N. van Kempen, MicroWalt Corporation.

                 connected to cowslip.moo.com with addr 193.174.7.129
                 #

         cowslip   SLIP, dip  
       SLIP .    "
        SLIP . 
  ,   dip c  -k.    hangup
  dip  ,  id dip   /etc/dip.pid: (4)

      # kill -k

       dip script ,       $
  . Dip   
,         .  $remote    $local,

                               - 133 -

,    hostnames    ,
  SLIP .

           script -  , 
 dip      .  ,    
 hostname   vlager  cowslip, .

                 .
Reset  reset     ;    Hayes-  ,
  ATZ.     ,    
login chat    .  hat  -   :  
      41988,      cowslip,   
  account  Svlager      hey-jude.  Wait    dip
 ,      ;  ,    
  wait time,      . If 
     ,   ,   
     .

      (final) ,    logging,    
,   SLIP          
   ,  ,   SLIP    
 interface   (routing tables)  .

      4. . newsgroup alt.tla     
   .



      8.3.2 Dip .

     "  , dip            .
,            dip  .  
     ,  dip    test  ,  
 help  .    ,        
,      - ;      
  ,     .

                  $ dip -t

                               - 134 -

                 DIP: Dialup IP Protocol Driver version 3.3.7 (12/13/93)
                 Written by Fred N. van Kempen, MicroWalt Corporation.

      DIP> help
                 DIP knows about the following commands:

                         databits default  dial     echo     flush
                         get      goto     help     if       init
                         mode     modem    parity   print    port
                         reset    send     sleep    speed    stopbits
                         term     wait

                 DIP> echo
                 Usage: echo on|off
                 DIP>

        , ,   DIP> prompt
,         test  ,      output
.    ,    prompt 
  script .

      8.3.2.1  .

        r,    dip   
     .      -  ,
    ,     , 
,    ,   ,  , 
   .

              .      ,
   - HAYES.    dip 
,          reset . Reset
   reset   ;    
    .  Hayes- ,  - ATZ.

      Flush code    ,     ,
   so far.  chat script     ,
      OK     .

                               - 135 -




       init  initialization ,   
  .     Hayes  - "ATE0 Q0 V1
X1'',        long result code,  
   (   ).

       dial    initialization       
  .    dial   Hayes
 - ATD.

      8.3.2.2 echo  term.

       ECHO     ,   
ECHO  ON  dip ECHO         
.      ,  ECHO OFF.

      Dip        script      
   terminal .   ,    dip 
      terminal ,     
      .    ,  " Ctrl-] ".

      8.3.2.3 Get .

      Get  - dip      .    
  -    ,        
 .    ,         
     :

      DIP> get $local ask
      Enter the value for $local:

              ,      
    . ,   ,   
   :  SLIP    
   IP   SLIP  ,    
             ,    

                               - 136 -

  ,    ,    
       .    -    -
      ``Your address: 193.174.7.202'',  
 dip       :

      wait address: 10
      get $locip remote



      8.3.2.4 Print 

         ECHO   dip .      dip  
   print ,  :

      DIP> print Using port $port at speed $speed
      Using port cua3 at speed 38400

      8.3.2.5  (Variable Names)

      Dip     .
            
  .

      $local  $locip       
  IP .  hostname  dip  
hostname  $local,        $locip  
IP  .      $locip.

      $remote  $rmtip        
 . $mtu  MTU   .

           - ,          
   get .   
      ,   
  print ;  - $modem, $port,  $speed.

      $errlvl - ,           

                               - 137 -


        .   0     ,
  
           .

      8.3.2.6 If  Goto 

      If  -   ,         

      if. :

      if var op number goto label

                  
 $errlvl, $locip,  $rmtip.     
;  op     ==,!=, <,>, < =,  > =.



       goto    script  continue  ,  
 .        ,  
  .

      8.3.2.7 send, wait  sleep

             chat  scripts    dip.  Send
      .      
,     C-style backslash character  sequences  
\n    \b.    (~)     
return/newline.

      wait        ,             
  ,       .    
      .    
 wait timeout value    ;        
     ,   
 $errlvl  1.


                               - 138 -

      Sleep         ,    
   ,   , patiently        
login   .  ,   
.

      8.3.2.8 mode  default

          ,   
  SLIP    interface.

      Mode  -  ,  dip      
daemon .    ,    .

      Mode     . Dip  
SLIP  CSLIP   .   dip   adcptive
SLIP.

        SLIP        ,  dip
 ifconfig    ,      interface  
 (point-to-point  link),        
     .

      ,  , script         
 mode,  dip  c      SLIP .

      8.4   server 

          SLIP             .
 ,        
,     SLIP , -  .



          -  dip  server ,
     ,        diplogin.    
  - /etc/diphosts,    login    
   .      ,      
 sliplogin, BSD- ,   

                               - 139 -

   ,      shell  scripts
  ,     .    
   .

        ,     login  account  
 SLIP . ,      SLIP
 Arthur Dent  Dent.beta.com,      account
  dent,       (passwd
file):

      dent:*:501:60:Arthur Dent's SLIP account:/tmp:/usr/sbin/diplogin

      ,       Dent(), 
passwd.

      ,  dent , dip   . 
,           SLIP,  
       /etc/diphosts.    &
        SLIP .
   dent     :

      dent::dent.beta.com:Arthur Dent:SLIP,296

           -   
    .       
  (. ).  -  hostname    IP      .
           (
).      .  - ,
  ,   (     SLIP
 CSLIP),     MTU.

       dent   ,  diplogin    
   diphosts , ,       ,
  "    ''. ,   -
   ()   diphosts.   
,        .



                               - 140 -


         ,     
,       . Diplogin   
  discipline line  .

      Diplogin      -.   
  dip setuid root,       diplogin  
  dip()    . Diplogin    
setuid,      dip .



      9.  (point-to-point protocol)

      9.1  P's

          SLIP, PPP -   ,    
   ,     
.      ,  
IP          , 
  .     ,  PPP
    . ,          
    PPP.         ;      
  -    PPP,      
     RFC 1548,     dozen 
companion RFCs. (1)

         PPP          
,   HDLC(High-Level  Data  Link  Control  Protocol),(2),
       PPP,  
  16     .      
  SLIP , PPP     
   IP  IPX Novell's,   Appletalk.  PPP
  ,       HDLC.

      LCP(Link Control Protocol),      ,
    HDLC   ,     
  ,   Maximum Receive Unit (MRU),  

                               - 141 -

     .

            PPP  .
    ,         dial-
up  .  ,       
, ,          .    
  ,     .    PPP,  
  ;         ,
    .        
     .      
,       .      "
    ",   PAP(Password Authentication
Protocol ),   CHAP(Challenge  Handshake Authentication Protocol).

        ,     ,  
  IP, AppleTalk,  .,    ,  
 Network Control Protocol  (NCP).  ,    
IP   

      1.  RFCs    Annoted  Bibiliography    
 .
      2. ,  HDLC-          ,
                



      ,  PPPs   ,   IP 
     .    ,    
  -  IPCP,  the Internet Protocol Control Protocol.

            IP      ,    PPP
  Van Jacobson header compression IP .  -
   ,    TCP     .
     CSLIP,    -        VJ  header
compression.         
   IPCP.

      9.2 PPP  Linux

                               - 142 -


       Linux, PPP      ,
low-level HDLC ,    ,    
  pppd  daemon,    
.     PPP  Linux - linux-ppp-1.0.0, 
    PPP  ,  pppd,   ,    chat
    ,    .

      PPP kernel       Michael  Callahan. Pppd  
   PPP   Sun  386BSD ,    
Drew Perkins  ,   Paul Mackerras.  
  Linux Al Longyear. (3) chat   Karl Fox.(4)

               SLIP,  PPP      
line discipline.  ,        
PPP ,         
,       PPP .   ,
         PPP  ,    
   HDLC       (  HDLC  
   16      ).   ,   
,    Van Jacobson header compression.   Linux
 IPX, PPP     ,  
IPX .

      Kernel      pppd,  PPP  daemon,    
    ,   
 ,           
.  Pppd  ,   . PPP -
,        .

      3.   ,        
,  .    -   PPP
  ,                NET
  Linux activists mailing list..
      4. Karl@morningstar.com.




                               - 143 -

       , ,           pppd,  
    .    ,   
      README  pppd  ,
        ,  
      .       
  ,      newsgroup
omp.protocols.ppp    ,        
  pppd.

      9.3  pppd

            c    Internet    PPP  ,  

                
,     .          "
.     ,    
 DNS    ;   
SLIP   .

         ,   PPP     pppd,
,   -  vlager .      
,  c3po,      ppp  account.  C3po  
    PPP .     ,
      ,   
 :

      # pppd /dev/cua3 38400 crtscts defaultroute

          cua3   PPP    
  IP   c3po.  ,    
    38400bps.  crtscts    
    ,        9600
\.

       ,  pppd    -   
   ,    LCP.  ,    
  ,   pppd  ,  
      .     LCP  

                               - 144 -

   .

        ,   ,    c3po    
-    ,      
   .

      Pppd      IP      peer  
IPCP,  IP  .       IP



        pppd ,         ,
     ,    
hostname.         .

      ,        . 
     Ethernet,      
IP    .   Ethernet,   PPP  interface.      
,  pppd     ,    
   peer  ,   
 .      .

         IPCP    ,  pppd    
host's networking layer  ,     PPP  .  
  PPP  interface  point-to-point ,
 ppp0   PPP c,   , ppp1  
,    . ,     ,  
         .    ,    ,
pppd           c3  
defaultroute.  (5)              
           C3po.      
,       pppd ,      
.

      9.4   

        pppd    , 
       ,      .  

                               - 145 -

         ,
       .  
      .

         - /etc/ppp/options,   
,   pppd.        
     -  ,     
       ,
      . ,  pppd  
     ( PAP  CHAP)  peer,  
   auth     .        ,
     PPP       ,  
       .

          ,        /etc/ppp/options -
pprc     .    
         .

         /etc/ppp/options     :

      5.        
,       .



      # Global options for pppd running on vlager.vbrew.com
                 auth                 # require authentication
                 usehostname          # use local hostname for CHAP
                 lock                 # use UUCP-style device locking
                 domain vbrew.com     # our domain name

                   
  .     pppd 
 UUCP   .   , 
,     , 
/dev/cua3,     ,  LCK.. cua3  UUCP ,
 ,        . 
       minicom    uuci  

                               - 146 -

           PPP.

             
 - ,    ,       
,         .  
,         ;   
- .

      9.5    chat

        ,         
  - ,       ,
       pppd.    dip, pppd  
 script        ,
       shell script  ,
    .  ,        
pppd    connect    line option. Pppd       
    .       - expect,
  Don  Libes.          Tcl, 
          .

      Pppd           called  chat,
    UUCP-style chat script.   ,  chat
script         ,    
    ,  ,    
.     expect    send  ,  .  
   chat script;

      ogin: b1ff ssword: s3kr3t



        chat         ,
   login prompt,   login  b1ff.    ogin:
       login prompt     
  I,    .      -  expect
string ,   chat  ,     
.

                               - 147 -


            ,      chat  scripts.
 script        PPP  ,     
     . ,      
  Hayes ,          318714.  
  chat      c3po  :

      $ chat -v '' ATZ OK ATDT318714 CONNECT '' ogin: ppp word: GaGariN

       ,       expect ,  
       -  ,    ,  
  chat ,    ,     .  
    ATZ, reset   Hayes- , 
   (OK).    dial   
  chat,    CONNECT  .     
    ,      ,   
     .   chat script   ,
  .

       -v  caht log all activities  syslog daemon's local2
facility. (6)

       chat script      ,
           
      ps .    , 
chat script   ,  dial-c3po.    chat 
script       ,    -f,
    .    pppd 
   :

      # pppd connect "chat -f dial-c3po" /dev/cua3 38400 -detach \
                         crtscts modem defaultroute

      6.      syslog.conf  ,    
  log   , ,     
,    chat    chat script 
  -     .


                               - 148 -



        ,   dial-up script, 
         : - detach,    
ppd         . 
             -
       ,    "  "
     .       , pppd 
  DCD ,     .

      ,      ;  chct  
    chat script.    
  -        
  chat   .    - BUSY,    NO
CARRIER,       ,   
,       .  ,   chat
    ,      ,  
  script,     ABORT.

      $ chat -v ABORT BUSY ABORT 'NO CARRIER' '' ATZ OK ...

        ,       
    chat scripts,   TIME  OUT  .  
,     chat(8) .

      ,         
  chat script. ,        
 end'slogin prompt,      BREAK,
  .     ,  sub-script 
expect .       send-  expect- ,
         script ,  
.  Sub-script    ,  expected  
   .     ,   
chat script  :

      ogin:-BREAK-ogin: ppp ssword: GaGariN

      ,  chat  ,     

                               - 149 -

     , sub-script    BREAK, 
        .    prompt    ,
  script     ,     .



      9.6   PPP 

       , pppd          
     syslog's  daemon  facility.            "
 syslog.conf,     ,      ,
 syslog        .    
     /var/log/ppp-log:

      daemon.*                /var/log/ppp-log

        PPP   ,    log ,
      ,  -  .   
,       , 
  .    pppd log      
,       syslog.     
daemon facility.

       ,      - 
kernel-level ,    pppd      kdebug.  
    ,     
  :  1      ,  2    
      HDLC ,  4  ,  
      HDLC .  ,   
kernel    ,      syslogd daemon,
  klogd daemon.      kernel   syslog's
kernel facility.

      9.7 IP  

      ICP      ,        IP
     . ,   peer  
  IPCP  , ,     

                               - 150 -

      ,        .
  ,  end   ,  
  .

      Pppd    ,  IPCP , 
   .         
  ,    .



      9.7.1  IP 

        ,    pppd,   c3po 
  IP .      , 
   IP    . ,   
vlager's      IP,   c3po  
.         ,  
           . Pppd 
  .

          ,      pppd

      :

      local addr:remote addr

       local addr  remote addr            dotted
quad notation,   hostnames.(7)   pppd  
        IP,      
peer.    peer       IPCP  ,
    IP    . (8)

             ,      
,     peer,          remote  addr
part. ,  ,  vlager  IP    130.83.4.27
 ,      130.83.4.27:      .
  remote  ,      
 .

                               - 151 -

         , pppd   ,
    hostname.

       PPP ,    ,
  :          
       ,      
 .          
,         ,  pppd   -
 IP   ,         ,
      .   ,     
,       noipdefault,   pppd
 pegr,    IP   
 .

      7.   hostnames              
CHAP  .      CHAP.
      8.    peer PPP     IP
,   pppd  ipcp-accept-local    ipcp-accept-remote  .
      .



      9.7.2    PPP

         interface, pppd    
    peer.  remote      LAN,  
       
""   peer;       .

        ,  pppd       
 ,   defaultroute.     
  PPP ,        
Internet .

       ,         
 ,      , 
 . ,       Virtual
Brewery,       loner.    vlager

                               - 152 -

 PPP,        Brewery.    vlager,    
    pppd   proxyarp,        ARP
    loner.       loner   
  Winery.

      ,         , 
    LAN.     
 ,               
   .  ,   peer   PPP
            ,      
     peer   time-to-live
.

        ,  ,    Virtual  Brewery  
     -  .   
  Ethernet  IP    191.72.3.0,  
    3   Brewery  B .    
Brewery's main Ethernet  via PPP  ,    
,    ..  , vlager   ; peer 
sub-etha        IP 191.72.3.1..

       sub-etha    vlager,        
   vlager  .  vlager,   
     3,    sub-etha. 
,      pppd,        -  ip-
 .  shell script  ,   
/etc/ppp,     ,   PPP  interface  
.     ,     



      ip-up iface device speed local addr remote addr

       iface    interface  ,  device - 
      (/dev/tty,  
stdin/stdout ),  speed -  .  Local
addr    remote addr  IP ,         
  dotted  quad notation.   , ip-up script,  

                               - 153 -

   :

      #!/bin/sh
                 case $5 in
                 191.72.3.1)            # this is sub-etha
                         route add -net 191.72.3.0 gw 191.72.3.1;;
                 esac
                 exit 0

        , /etc/ppp/ip-down   ,  
   ip-up  ,   PPP  
.

      ,     .    
   PPP ,  ,         
     PPP.        ,    
     ,      sub-
etha,      Brewery   vlager  .   
  ,        daemon 
  .        
        .

      9.8   

      ,        LCP,      ,
   ,     ,  
 .

         ,          LCP -
         .
   LCP  ,     
     .    RFC
1548   .



         ,  
  async ,     

                               - 154 -

         ,  
        (    
). ,          XON    XOFF,
          ,   
          -
. Ctrl-] (telnet  ESC). PPP     
   ASCII   0  31,     sync
.

      Async   -     32  ,      
,  ASCII NUL ,     31
ASCII.   ,     , 
        .  ,  async
  -   0xffffffff,     
 esaped.

       ,    peer,        
escaped    ,     ,  
    asyncmap  pppd   asyncmap. ,
  ^S   ^Q  (ASCII  17    19,      
-(XON)     -(XOFF))   escaped,  
   :

                 Asyncmap 0x000A0000

        ,  MRU,  peer  
HDLC ,    .     
 MTU (  ),         
.  MTU  -  kernel        ,  
    inerface     .
MRU ,    remote end  ,    
      MRU; interface     1500 .

       MRU          
,  ,        throughput.    
        ,    MRU  
  296 -  , ,     
(,   FTP )      "jump''.  

                               - 155 -

pppd      MRU 296,         mru  296.  
MRUs,  ,   ,       (
  ).



      Pppd    LCP ,   
  ,      
,         
.
    &
"      ,   ,    LCP ECHO
. PPP    ,  ECHO   ECHO.
Pppd   ,  ,     
.             lcp-echo-interval
       .      
     ,  pppd   ECHO,
    ,    ECHO  peer .   peer  
 ,           
  .            
lcp-echo-failure.  ,     .

      9.9   

        PPP daemon    
.       ,      
        Ethernet (   ).
  ,      ,      
   PPP     .

         pppd - ,      
       root.      
     ,   setuid  root.  ,  pppd
     - .
       ,   
 ,             
         /etc/ppp/options,     
9.4.      ,   ,   

                               - 156 -

 ,        
.

      ,      ,   PPP 
.   ,          
    peer. ,   
      IP    
,         .    
    .



      9.10    PPP
      .10.1 CHAP  PAP

       PPP,    ,  peer    
       .   - (PAP), 
(CHAP).      ,     , 
 ,   ,     caller  callee. 
    " "  "  "     
        authenticator.  PPP daemon  
peer  ,       LCP  ,
  .

      PAP              
   .   ,    
  ,       .  
    eavesdroppers,     
,    ,      
.

      CHAP        .    CHAP,  authenticator    (
 )       "  challenge''
    ,   hostname.     hostname  
,     ,    challenge,  
  ,   hashing function. 
        hostname .    
       ,   .

                               - 157 -


        CHAP - ,      
       ,   challenges  
    ,     
  "  ",  ,   
.

      Pppd       CHAP    PAP      
,   /etc/ppp/chap-secrets    pap-secrets  .
       ,    
 CHAP  PAP   ,     
peer,  .

       , pppd      remote,



            remote.   CHAP
    PAP, pppd   
  ,   .  peer   ,  
pppd    CHAP   remote     chap, 
   PAP.      PAP      peer  ,    
   ,   ,  .

               . ,
  auth  , pppd ,  peer  
. Pppd    CHAP  PAP  ,   
      peer  CHAP      PAP
.     ,        
     ,       .
   pppd (8)  .

        ,     PPP,  
     ,          auth      
 /etc/ppp/options            
 chap.     CHAP,     
pap .  ,        ,    
      .

                               - 158 -


               PPP    ,  pap-
secrets   chap-secrets.     "  /etc/ppp      
,   ,      
  IP.        CHAP 
PAP,      ,       peer,
       .

      9.10.2   CHAP

             ,   CHAP,
ppd    PAP         
 hostname,        remote  hostname
    CHAP Challenge.   peer   , 
  : pppd           
      hostname (  CHAP 
)      .

        -    chap  vlager: (9)



      # CHAP secrets for vlager.vbrew.com
       #
       # client          server            secret                addrs
       #-------------------------------------------------------------------
---
       vlager.vbrew.com  c3po.lucas.com    "Use The Source Luke"
vlager.vbrew.com
       c3po.lucas.com    vlager.vbrew.com  "riverrun, pasteve"
c3po.lucas.com
       *                 vlager.vbrew.com  "VeryStupidPassword"
pub.vbrew.com

        PPP   c3po, c3po  vlager  
,  CHAP,  CHAP challenge. Pppd   chap
     ,   vlager.vbrew.com 
       c3po.lucas.com,  (10)    

                               - 159 -

  ,  .   CHAP   challenge
string    (  Luke),    c3po.

          , pppd  CHAP challenge    c3po,
   challenge  string,      
hostname vlager.vbrew.com. C3po  CHAP  ,  
   ,       vlager.  Pppd    
 hostname (c3po.vbrew.com)  ,     chap
 ,  c3po  ,  vlager  . 
     pppd  CHAP  challe  pasteve,    ,
     3po CHA .

           IP, 
   ,    .   
    dotted quad notation   hostnames,    
   . ,   c3po,  
IP    IPCP ,     ,  
,    IPCP  .  ,  , 3po
         
,      ,      -
    IP   .

            chap   
  PPP  vlager          
 hostname.   - ,     ,
    pub.vbrew.com.       hostnames
   -   ,   pppd  
    ,    
 / .

      9.   -   ,        ,
     .
      10.  hostname   CHAP challenge.



        ,        
,  pppd    hostnames:          .

                               - 160 -

     ,    hostncme    
peer    CHAP Challenge   Response packet.   hostname  
,    gethostname  (2)  .  
      hostname,  
   pppd .

      # pppd ...domain vbrew.com

         Brewery   vlager   
  .  ,  
progpppd's  idea   hostname -  usehostname    name.
      IP    , 
"local:varremote",   local -   dotted quad,  pppd
       hostname.  , 
 pppd   (8).

      9.10.3   PAP.

        PAP    ,   CHAP.
         
;      PAP.  remote 
 , ppd   ,      
       hostname,      
       ,   . 
   peer , pppd   ,   
            , 
    remote hostname.

         PAP     :

      # /etc/ppp/pap-secrets
       #
       # user          server          secret          addrs
       vlager-pap      c3po            cresspahl       vlager.vbrew.com
       c3po            vlager          DonaldGNUth     c3po.lucas.com

          ,     
   3.

                               - 161 -




        ,      c3po,  
    .

       vlager-pap  ,    , 
  c3po.  , pppd   hostname  
,       ,  
,   .

               PAP    
   peer, pppd    remote .
       ,    
      ,  remotename  
,   hostname peer.  ,    
        c3po,  
      pppd's:

      \#{} pppd ... remotename c3po user vlager-pap

         (   ),    
   IP     ,  
     CHAP. Peer       
.    ,  ,  c3po   
IP.

      ,  PAP    ,  
  ,    CHAP,      .
       PAP     ;    
    PAP,      pppd
   (8).

      9.11  PPP 

          pppd,       -     
       .    
,        account,   ppp,  

                               - 162 -

    script         ,
    pppd     . ,   
   /etc/passwd:


"
      ppp:*:500:200:Public PPP Account:/tmp:/etc/ppp/ppplogin

      ,             
 uids  gids  ,   .     
     account,  
passwd.

      Ppplogin script     :

      #!/bin/sh
                 # ppplogin - script to fire up pppd on login
                 mesg n
                 stty -echo
                 exec pppd -detach silent modem crtscts

        mesg      ,      
tty, ,    ,    .    stty  
-  .  ,    peer 
     .     pppd,
   -detach,     pppd   
   tty.       ,    
  ,  shell script exit.    . Silent
   pppd ,           
,      .        
  ,           PPP  
DTR  ,   ,   peer ,  crtscts 
 .

        ,        
, ,   auth    pppd's,  
  .     
  .  .   .

                               - 163 -




                    10.   

         IP   ,  
             .  
       , 
Inetd ,      rlogin  .  
    ,     ,    
      (NFS).   
(NIS)         ,    briefly.  NFS
 NIS,     ,     
.          netnews .

      ,          .
     ,     ,  
, gopher,  xmosaic     
.

                           10.1 Inetd -

      ,         daemons. Daemon
 ,    ,  .  
,    ,     ,    
       .   
     ,  daemon  
  ,     ,      
      

       ,    Un*x      "  -
  ",      ,     
           (2).
        , - 
       ,     .

      -,   - inetd, Internet Daemon. 
      ,        ,  

                               - 164 -

      ,  /etc/inetd.conf.  
     ,     ,
     inetd,   
  .   chargen        
,    daytime   system's idea

                   ,
    :



      service type protocol wait user server cmdline

         :

      Service   . Service name      
 ,    services.     
 10.3.

      type      ,        (    -
 )   dgram  (    ).  TCP
   ,          ,  
      UDP-     dgram.

      Protocol   ,  
.       ,  
  ,   .

      wait      dgram .     
 wait  nowait.  wait ,  inetd   
            .  ,  
       .

         " -   "  ,  
    ,   .  RPC 
            wait.
  , " " ,   
  ,     ;    

                               - 165 -

.      nowait.

           nowait.

      User        ,
 .    root user,   "   
   account.    -        
       , 
         
account        . 
,  NNTP       ,   
 ( tftp,  finger)     nobody.



      server     ,   .

      cmdline -  ,       
.     0,     .
,        ,    
  -,     .

           .

        inetd.conf           10.1. Finger
service       .   
   ,      
  ,        .

      Tftp   . Tftp  
   ,       
  -       .   
    /etc/passwd,   ,     
.

      TFTP       X  
       .   
  tftpd   , ,    

                               - 166 -

          ,
        tftpd's .    
  tftp     .

                       10.2 Tcpd   
  "
                   
,   ,         
.     ,  ,      flawed  (
  RTM Internet  worm),      
    ,          
   ,   ,      
.       finger  tftp  .



       #
       # inetd services
       ftp       stream tcp nowait root   /usr/sbin/ftpd    in.ftpd -l
       telnet    stream tcp nowait root   /usr/sbin/telnetd in.telnetd -
b/etc/issue
       #finger    stream tcp nowait bin    /usr/sbin/fingerd in.fingerd
       #tftp      dgram  udp wait   nobody /usr/sbin/tftpd   in.tftpd
       #tftp      dgram  udp wait   nobody /usr/sbin/tftpd  in.tftpd
/boot/diskless
       login     stream tcp nowait root   /usr/sbin/rlogind in.rlogind
       shell     stream tcp nowait root   /usr/sbin/rshd    in.rshd
       exec      stream tcp nowait root   /usr/sbin/rexecd  in.rexecd
       #
       #       inetd internal services
       #
       daytime   stream tcp nowait root internal
       daytime   dgram  udp nowait root internal
       time      stream tcp nowait root internal
       time      dgram  udp nowait root internal
       echo      stream tcp nowait root internal
       echo      dgram  udp nowait root internal
       discard   stream tcp nowait root internal

                               - 167 -

       discard   dgram  udp nowait root internal
       chargen   stream tcp nowait root internal
       chargen   dgram  udp nowait root internal

                     . 15.   /etc/inetd.conf file.

           "   "  ,
    ,  inetd    
   .

     &    - tcpd, (1),   daemon
wrapper.  P       ,
    . Tcpd        syslog
daemon,     remote    ,  
          . ,
     udp- .

      ,   finger daemon,    
corresponding   inetd.conf

            1.  Wietse Venema, wietse@wzv.win.tue.nl.



       # wrap finger daemon
       finger  stream  tcp     nowait  root    /usr/sbin/tcpd   in.fingerd

        - access ,      
        finger,      ,  
     syslog's auth facility.

                  ,
 /etc/hosts.allow    /etc/hosts.deny.      
    , ,     .
 tcpd         finger  
    ,  Biff.foobar.com,  
hosts.allow  hosts.deny  (  )    
    .      

                               - 168 -

,        hosts.deny.    
    hosts.deny,         ..
     ,   .

            :

                 Servicelist: hostlist [: shellcmd]

      Servicelist -     /etc/services,    
 ALL.           finger  
tftp,  "ALL"EXCGPT finger, tftp''.

      Hostlist -      IP,    ALL,
LOCAL,   UNKNOWN.  ALL      ,        
LOCAL   ,      .(2)  UNKNOWN
             .
Name    string,          ,  
       .  ,.foobar.com    -
Biff.foobar.com.         IP      
       (5)  .

       ,      finger  tftp , 
 ,        /etc/hosts.deny,      
 /etc/hosts.allow:

      2.     ,    
/etc/hosts    .



      in.tftpd, in.fingerd: ALL EXCEPT LOCAL, .your.domain

       shellcmd         ,
 ,   .    
,     :

                 in.ftpd: ALL EXCEPT LOCAL, .vbrew.com : \
                       echo "request from %d@%h" >> /var/log/finger.log; \

                               - 169 -

                       if [ %h != "vlager.vbrew.com" ]; then \
                           finger -l @%h >> /var/log/finger.l  .
            
        .

      ,      ,  



             Linux  .
,        .

       # The services file:
       #
       # well-known services
       echo           7/tcp                 # Echo
       echo           7/udp                 #
       discard        9/tcp  sink null      # Discard
       discard        9/udp  sink null      #
       daytime       13/tcp                 # Daytime
       daytime       13/udp                 #
       chargen       19/tcp  ttytst source  # Character Generator
       chargen       19/udp  ttytst source  #
       ftp-data      20/tcp                 # File Transfer Protocol (Data)
       ftp           21/tcp                 # File Transfer Protocol
(Control)
       telnet        23/tcp                 # Virtual Terminal Protocol
       smtp          25/tcp                 # Simple Mail Transfer Protocol
       nntp         119/tcp  readnews       # Network News Transfer
Protocol
       #
       # UNIX services
       exec         512/tcp                 # BSD rexecd
       biff         512/udp  comsat         # mail notification
       login        513/tcp                 # remote login
       who          513/udp  whod   "       # remote who and uptime
       shell        514/tcp  cmd            # remote command, no passwd
used

                               - 170 -

       syslog       514/udp                 # remote system logging
       printer      515/tcp  spooler        # remote print spooling
       route        520/udp  router routed  # routing information protocol


      , , ,  ECHO      
7     TCP  UDP,    512    
,             daemon  (
    ,  xbiff(1x)), 
UDP,     remote execution (rexec(1)),  TCP.



       #
       # Internet (IP) protocols
       #
       ip      0       IP              # internet protocol, pseudo protocol
number
       icmp    1       ICMP            # internet control message protocol
       igmp    2       IGMP            # internet group multicast protocol
       tcp     6       TCP             # transmission control protocol
       udp     17      UDP             # user datagram protocol
       raw     255     RAW             # RAW IP interface

            10.4  

            -    
RPC,   . RPC    Sun
Micrsystems,     -     
.  ,    RPC - NFS, Network
Filesystem,   NIS, Network Information System,    
     .

      RPC      ,     
,  RPC     ,      
.             ,
      ,   .  
-,  ,        

                               - 171 -

            
(XDR)    ,         - 

      ,      RPC      
    call interface. ,   
    ,     original
behavior.  , RPC    , 
 ,    1,      RPC  
   . ,     
  ;        
 .

            RPC       - . RPC
      ;   
 ,        
.            ,
       /etc/rpc, 
       10.4



       TCP/IP ,   RPC   
       .        -     
, ,  TCP  UDP          
. , RPC      UDP    ,  
   TCP ,  ,      
    UDP .

      ,       
      .    
   ,    ;       RPC
        ,      
,               
 "  . , RPC      
  ,     ,       
  por    -    broker   RPC
,   : ,      
          

                               - 172 -

portmapper        ,     .

          ,      
 ,    inetd daemon. ,     
,    portmapper ,  RPC  
;   ,       RPC  
,     .

        Linux,  portmapper    rpc.portmap    
   /usr/sbin.   ,     rc.inet2,
ortmapper       .

      10.5  r 

                remote  .  -
rlogin, rsh, rcp  rcmd.       remote    
   . ,     
account   ,     .     
     . ,  
        , 



       #
       # /etc/rpc - miscellaenous RPC-based services
       #
       portmapper      100000  portmap sunrpc
       rstatd          100001  rstat rstat svc rup perfmeter
       rusersd         100002  rusers
       nfs             100003  nfsprog
       ypserv          100004  ypprog
       mountd          100005  mount showmount
       ypbind          100007
       walld           100008  rwall shutdown
       yppasswdd       100009  yppasswd
       bootparam       100026
  "    ypupdated       100028  ypupdate


                               - 173 -

                         . 16.   A sample /etc/rpc file.

         ,    .

      , ,          
 . ,       
        ,   
        .

               ,  
   ,     
  ,         
          .   ,    
             
            ,
,         -
.

          ,    
r    .  -     ,    
            .  
      /etc/hosts.equiv.  
    ,    
       .   -
   -        
      .rhosts    . 
 ,     
  ,     symbolic link,   




         r ,      
    /etc/hosts.equiv,    .rhosts
.  - ,  ,       janet     "
           joe's account  euler. 
,      Janet   ,   Joe  
  .

                               - 174 -

      ,   Janet

      $ Rlogin -l joe euler

       ,       hosts.equiv  (4),
   Janet  ,   ,    
.Rhosts     joe's.

       hosts.equiv  euler   :

                 gauss
                 euler
                 -public
                 quark.physics.groucho.edu     andres

            ,    
 .           ,    
             acount
   .        ,    Janet    
    account janet     ,    
         root
,  Janet    joe ,    .

                ,  
         ,    
   -    accont  
  accony\t root.

                  "",    
 "-".      account    ,
   ,       
.rhosts.

      3.  NFS  ,         444,
             
,   NFS.
      4. ,   hosts.equiv     - 
    root.

                               - 175 -


                                   "   / 165 -

      .rhosts     hosts.equiv,    
 .  Joe's.rhosts   Euler:

      chomp.cs.groucho.edu
                 gauss      janet

        ,   joe    acess  
   Chomp.cs.groucho.edu,      
 account  euler  chomp.    -    
,      janet    account  Joe
     .

      ,           .
    ,  ,      
failed         .      
          
     :

      +     (  )  
    .

      +     -  ,  
 (   ,   
 DNS),       , 
      ,    
.



                      11.   

           ,     -
    ,   
.   stepping  stone          
         

                               - 176 -

.        ,    ,  
  ,  DNS.   , 
     .  ,   
     no Internet activity,  DNS
         .

       - ,  Sun  NIS,  
. NIS           ,
        ,
    passwd         . 
             ,    
    account     .       ,    
    NIS,      hostname  
/etc/hos .

      NIS   RPC,   , client-side , 
    .  ,  NIS
  ,    YP,        
,        .  
,    -    ,
   Sun     .   , 
   ,     YP       
 ypserv, ypbind,  .. , NIS     
Un*ces         .  -  BSD 
 -2 ,         
 Sun.         GNU
Libc     ,     
         Linux Swen Thmmler. (1)  NIS
  -      . Tobias Reber  
NIS ,    ;    yps. (2)

        (),    NIS, 
NYS,  Peter Eriksson, (3),    ,    plain
NIS   Sun's much  NIS.

      1. swen@uni-paderborn.de. NIS      yp-
linux.tar.gz   sunsite.unc.edu   / . 2.   *
 ) - yps-0.21           ftp.lysator.liu.se 

                               - 177 -

/pub/NYS . 3. pen@lysator.liu.se.



      +. NYS       NIS  
   ,           
  ,      , 
   libc   .   
     hostname ,    
          host.conf.   
  .

          NYS          
,        "  " NIS  .  
     ,  ,     
     .     ,
      NIS,  NFS Hal Stern's  NIS
(. [GETST " - nfs"]).

        , NYS -   ,   
 Linux        
,      NYS  .  NYS   
mainstream  libc       binaries,    
      NYS.       
  ,    -lnsl    libc 
.         libnsl, NYS
   C.

                            11.1   NIS

      NIS        ,         
 ,    keyvalue  pairs.  
      ,  NIS  ,    
           RPC  .
   ,     DBM. (4)

                   
 /etc/hosts  /etc/passwd.   , 

                               - 178 -

  - ,     . ,  
                IP.
,    NIS     ,  
hosts.byname    hosts.byaddr, .  11.1  
      .

      4. DBM -          
  ,    . 
 DBM    GNU      Gdbm,  
   Linux  .



              -----------------------------------------------------------
              +-----------------+---------------------------------------+
              |Master File      | Map(s)                                |
              +-----------------+---------------------------------------+
              +-----------------+---------------------------------------+
              |/etc/hosts       | hosts.byname       hosts.byaddr       |
              |/etc/networks    | networks.byname    networks.byaddr    |
              |/etc/passwd      | passwd.byname      passwd.byuid       |
              |/etc/group       | group.byname       group.bygid        |
              |/etc/services    | services.byname    services.bynumber  |
              |/etc/rpc         | rpc.byname         rpc.bynumber       |
              |/etc/protocols   | protocols.byname   protocols.bynumber |
              |/usr/lib/aliases | mail.aliases                          |
              +-----------------+---------------------------------------+
              +-----------------+---------------------------------------+

       1.   NIS   
.

          ,       
  NIS    .          
        ,    bootparams  ,
     BOOTP ,  
              Linux
(Ethers.byname    ethers.byaddr ).

                               - 179 -


          ,        ,
     .      
   NIS    ,  
 :

                 $ ypcat -x
                 NIS map nickname translation table:
                         "passwd" -> "passwd.byname"
                         "group" -> "group.byname"
                         "networks" -> "networks.byaddr"
                         "hosts" -> "hosts.byname"
                         "protocols" -> "protocols.bynumber"
                         "services" -> "services.byname"
                         "aliases" -> "mail.aliases"
                         "ethers" -> "ethers.byname"
                         "rpc" -> "rpc.bynumber"
                         "netmasks" -> "netmasks.byaddr"
                         "publickey" -> "publickey.byname"
                         "netid" -> "netid.byname"
                         "passwd.adjunct" -> "passwd.adjunct.byname"
                         "group.adjunct" -> "group.adjunct.byname"
                         "timezone" -> "timezone.byname"



      NIS    ypserv.     
   ;     
        ,  
        .  
,       ,  
 .       master
server's host. ,    slaves/

       ,     "  " 
   ;       NIS,
      ,       
           NIS:  NIS

                               - 180 -

.    ,  NIS           
,         DNS.  
    ,        
 

      NIS        . 
   ,     
  . , ,    NIS  
   . ,     
         NIS    
    . ,   Virtual Brewery 
   NIS  ,   Brewery ,    
      brewery   winery, . 
        ,     DNS
      NIS.        NIS 
    ,  domainname.       
,    NIS  ;   
,      :

      # domainname brewery

      NIS    ,    NIS  -  
. ,        Winery  ,
  NIS  Winery (   ,    
)    ;      
Brewery  host     Brewery'.

       ,       ,    ,  
      .      
     ,   ,  
. ,       ,    
             (  
     , ),     .
,   NIS implementations   
d    NIS    NIS . 
   NIS



                               - 181 -


      ,    ,        ypbind  
 .

      Ypbind  ,     IP  ;  
  ,       
     NIS.  , 
   ,     , ypbind,
    .

      ,       - ,
      ,          :
ypbind   ,    ,     NIS  
     "".     
  -          NIS.
    , NYS   ypbind  , 
      .

      11.2 NIS  NIS +

      NIS  NIS +         
. NIS +    .  
    NIS  ,    
 ,      DNS.
 ,      ,  
    ,       NIS + 
,          +   
 .         NIS  +  -  
     .  ,    
          .    
     .

       NIS  RPC   2,     NIS + -
  - 3.

      NIS +  ,    ,   
       . (,  ).
    ,       .   

                               - 182 -

     ,     NIS  Sun  +
   ([GETST "nisplus"]).

      11.3   NIS



              , 
 ,   NIS ,  
         C.  ,  
   passwd ,   getpwnam (3)    getpwuid
  (3)     ,    
       . 
  ,           
      ,    /etc/passwd.

      Nis-   , ,  , 
  RPC  ,   NIS    
  .        .
    " " NIS   "    "
   . ,     
  ,    ,     
        .

          NIS  ,      
,    ,   
   . ,   passwd
,   kludgy modifications  passwd, ,
  ,   .   
pitfalls,  NYS           ,
           
        .      .

                             11.4  NIS 

              techno-babble,   - ,
        .   
,     NIS .     NIS  

                               - 183 -

    ,       
;     ,       .

      <>   Note  that  if  you are just going to experiment with the
           server, make sure you don't set it up for  a  NIS  domain
           name  that  is  already  in use on your network. This may
           disrupt the entire network service and make a lot of peo-
           ple very unhappy, and very angry.

            NIS  ,  
   Linux,    yps    Tobias  Reber's,  
    Peter Erikson's  ypserv  package.        
,     , 



       ,    NYS  NIS  , 
   libc   .      ,    
  NIS  , ,    yps.  ,
        , yps    
.

          (ypserv)  /usr/sbkn,   
 ,        ,  
   .   NIS   brewery domain,
    /var/yp/brewery.     
 NIS  ,     .  
      NIS ,  
  .

           DBM,  
.      ,      ,
 makedbm ( Tobias' )  dbmload  (  
Peter's).         .      
      parseable dbmload      awk
  sed,     ,     
.  ,  Peter Eriksson's Ypserv   
      .     

                               - 184 -

    ,    ,  
            .   
        Ypserv.    ,    -
  :

      all: ethers hosts networks protocols rpc services passwd group netid

           ethers.byname    ethers.byaddr
, ,            
.   ,      ,
          ,  . *
.

         ,       
    ,    "make".    
    .   ,  
   ,      ,
      .

        ,   NIS    .
    ,      
     .      
  -D,    NYS ,      
       NIS,   
.        ,  
.  Tobias'      



                    11.5  NIS   NYS

          ,    NIS .

           -  NYS   
   NIS ,     
/etc/yp.conf.        Winery's  
   :


                               - 185 -

      # yp.conf - YP configuration for NYS library.
           #
           domainname winery
           server vbardolino

          NIS  ,    
   Winery NIS .     ,  NYS
   ,         
  domainname.    NIS . ,
IP     vbardolino,       ; 
  ,     IP  
 .

       ,  ,   ,   NYS
    NIS    . ,
,            NIS  
,          
     yp.conf.     
   NIS   Yp.conf,  NIS 
    .  ,    "
   ,      :

      # yp.conf - YP configuration for NYS library.
           #
           server vbardolino winery
           server vstout     brewery

                ,



          NIS    
  .

            ,    
    -   -  ,          ,
 ,         .
,     , 

                               - 186 -

hosts.byname,    ,  ,  ypcat .
Ypcat,        NIS 
,    /usr/sbin.

           # ypcat hosts.byname
           191.72.2.2      vbeaujolais  vbeaujolais.linus.lxnet.org
           191.72.2.3      vbardolino   vbardolino.linus.lxnet.org
           191.72.1.1      vlager       vlager.linus.lxnet.org
           191.72.2.1      vlager       vlager.linus.lxnet.org
           191.72.1.2      vstout       vstout.linus.lxnet.org
           191.72.1.3      vale         vale.linus.lxnet.org
           191.72.2.4      vchianti     vchianti.linus.lxnet.org

      ,   ,      .
      ,    "Can't
bind  to server which serves domain"    -    ,  
  NIS  ,        ,
   yp.conf,    -  unreachable    
.     ,   ,  ping 
  ,        
    ,  rpcinfo,   
 :

      # rpcinfo -u serverhost ypserv
           program 100004 version 2 ready and waiting

      11.6   

        ,     NIS ,   
     ,          
NIS .  ,        NIS  
     .     ,
       BIND.           
    account     NIS
;        /    
       11.7 .  , 
services.byname,      ,   


                               - 187 -



         ,      
     ,     
  .

      ,               -
   ,         NIS
.  NYS    ,   
   .        
/etc/nsswitch.conf,        ,  
        .      
        ,  ,  .

               .     
,   services.byname          
       ;     . 
   ,      , 
  NIS         .  Hostname
,    ,    , ,  DNS
 NIS       accoun   
,   DNS  NIS  .   ,   
      .

          ,          gethostbyname
(2), gethostByaddr (2),  getservbyname  (2)   . 
     ;     ,  
  ,    .

      # small sample /etc/nsswitch.conf
           #
           hosts:     nis dns files
           services:  files nis

        ,      
Nsswitch.conf    .    ,  ,
    ,       .


                               - 188 -

      Nisplus  nis +  NIS +       .
     /etc/nis.conf.

      Nis   NIS   .   
 ,    yp.conf     
 .     ,    Hosts.byname  
hosts.byaddr  .

      -176 -

      dns  DNS .       
 .   ,      
c  resolv.conf .

       files   ,   /etc/hosts   
.

      dbm    DBM ,   /var/dbm. ,
   -  NIS .

        , NYS   nsswitch.conf :
hosts,
      networks, passwd, group, shadow, gshadow, services, protocols, rpc, 
.      .

       11.6    ,  

     & nsswitch.conf:   [NOTFOUND=return]  
   NYS - ,        NIS
  DNS  .   NYS    , 
   NIS  DNS     - 
.        
   backup,  NIS  .

      11.7  passwd   Maps

          NIS    
 account      NIS .  , 

                               - 189 -

      /etc/passwd,  
 site-wide   NIS . , 
  NIS     
nsswitch.conf   .

         ,  NIS,   
,      ,
       passwd   NIS
   .   
     ,   NFS  
    .



                # /etc/nsswitch.conf
                #
                hosts:      nis dns [NOTFOUND=return] files
                networks:   nis [NOTFOUND=return] files

                services:   files nis
                protocols:  files nis
                rpc:        files nis

                 17.  nsswitch.conf .

            /etc/passwd  /etc/group
  ,   maps,     
ownerships   ,    . 
    uids  gids  passwd      ;
   ,      
 ,      ownerships.  
  ,       9, 
okir     103,    
  ;       :

      # find / -uid   9 -print >/tmp/uid.9
      # find / -uid 103 -print >/tmp/uid.103
      # cat /tmp/uid.9   | xargs chown news

                               - 190 -

      # cat /tmp/uid.103 | xargs chown okir

       ,       ,  passwd
,        ,   
ownership   .  ,   ownerships 
,     .

       ,  uid's  gid's     
 ,     NIS .   
-     nsswitch.conf,   NIS 
    :



      # /etc/nsswitch.conf - passwd and group treatment
           passwd: nis files
           group:  nis files

           ,     
  NIS maps,    log in,   
   -     . , 
       ,  
   root  generic accounts  .  , 
       map uids 
  . ,  cron job 
  su,      ,  UUCP
            .   
uucp       passwd,   jobs ,  ,
   &NIS"brownout.


         :   , ,  
   ,        
  ,     ,  , 
  util-linux .      
NIS   .   ,     - 
,     passwd  -    ls,
     .

                               - 191 -

         , ls    
    ;     uid  gid 
   ,      NIS ,
  .    ,     -
clogged, ,   ,  NIS       , 
      .

            . ,   
    . ,   passwd,
        passwd. 
   NIS,         
,      NIS ,  
  ,   ,    . ,
NIS      passwd,  yppasswd, 
     NIS.     
,     yppasswdd daemon       RPC, 
    . , 
 yppasswd   ,    -  
:

      # cd /bin
      # mv passwd passwd.old
      # ln yppasswd passwd





              rpc.yppasswdd   
   rc.inet2.      NIS 
 .

      11.8  NIS  Shadow Support

         NIS   ,   
    . John F. Haugh,   
,      , 
GNU  GPL  comp.sources.misc.     

                               - 192 -

 NIS,      ,       
   C.   ,    
/etc/shadow  NIS      .

       NYS      shadow.byname map 
 -  ,  NYS   
/etc/shadow .  NYS  getpwnam   
,     login , ,  
passwd   nsswitch.conf  . Nis   
   passwd.byname map  NIS .  , ,
,   /etc/shadow,   ,  
 .       ,   
   root,       
   /etc/passwd. ,    
   ,   NYS     shadow.
Getpwuid   .   , binaries,
  NYS,        
 .

      11.9   NIS .

          ,     libc,
  NIS   .   , 
 ypbind daemon  ,     
        . 
    ,    ypbind 
 .       NIS ,
 RPC portmapper    .  ypcat   ,
     ,    (. ).

      ,    bug reports,  , 
NIS  ,   : "clntudp create: RPC: portmapper
failure - RPC: unable  to receive''.



        -    ,  ypbind
   .     NIS

                               - 193 -

    ,     . (5)

      ,   NIS  ,    NIS
         NYS.
,   NIS  ,   
  -   /etc/passwd map:

           +: *:0:0:::

              "" NIS
.    (   ) 
/etc/group      group. * maps.  , 
 hosts.* maps,  NIS,  order line 
host.conf . ,     NIS, DNS,  
/etc/hosts (  ),        :

      order yp bind hosts

       NIS     
   .

      5.   yp-linux     ftp.uniaderborn.de 
 /pub/Linux/LOCAL.



      12.    (NFS)

       NFS, the network file system,    
 ,  RPC.      
  
         ,      "
 .    kernel 
    (   
)  NFS     (  
).        ,   
     .


                               - 194 -

      NFS   :


      + ,     ,   
  ,      
 . ,     accounts
   ,        mount
/home   .        NIS,   
     ,       
.

      + ,     
     . ,    
  LaTeX  METAFONT      
 .

      + -     
 .    rcp  ,  
      20  .


      Linux NFS -     Rick Sladkey, (1), 
 NFS
      kernel     NFS . ,    unfsd
  NFS ,   Mark Shand,
 hnfs Harris NFS ,  Donald Becker.

         ,  NFS :  
         
 ,      . ,
,   ,     
 . ,  mount /home  vlager  /users 
vale,       vale: (2)
   "
      1. Rick     jrs@world.std.com.


      # mount -t nfs vlager:/home /users

                               - 195 -


      mount     mountd,   daemon 
vlager  RPC.  ,   vale  , 
 ,     file handle.  handle   
       /users.

        -     NFS, kernel  RPC 
nfsd (NFS daemon)   .    handle , 
,   ,  user's user    
.        
 .      
 ,       
    .

        Un*x  , NFS   
     kernel  daemons,   
     .  - NFS daemon
(nfsd)   ,     -  Daemon (biod) 
  .   , biod 
  - ,   -   -; ,
 nfsd daemons   .

      NFS  Linux,       ,
     (VFS)     
   biod.     
    , ,   
             -
 . Linux NFS,      
 -   -,  Rick Sladkey   
   . (3)


          Linux NFS  - ,  Linux kernel
 1.0         4k; 
,        
 3500       .. 
,       NFS daemons   , 
  UDP    ( 8k  SunOS)

                               - 196 -

     .   
    . (4)   
  Linux-1.1 ,    
        ,     .

      2. ,     -t nfs ,   mount
   ,    NFS .
      3.   write-behind - ,  kernel   
 device/inode,       nfs-
  .





      12.1  NFS

      ,     NFS,     ,
  ,     NFS , 
.          proc 
,  /proc/filesystems,     
cat:

      $ cat /proc/filesystems
                   minix
                   ext2
                   msdos
           nodev   proc
           nodev   nfs

       nfs    ,    
     NFS.  kernel 
    " Kernel  "  4 ..

           1.1 Linux,    
     NFS  -  
 NFS  .  ,     
 /tmp, &      :

                               - 197 -


      # mkdir /tmp/test
      # mount localhost:/etc /tmp/test

              , "fs
type nfs no supported by kernel'',        
 NFS.       , 
      NFS daemons   .

      12.2  NFS 

      4.    Alan Cox: NFS    
      ,    
.   BSD    ,   
,  (4K),   4   1k   bsd-based
NFS,     4    4k .



      NFS  (5)    ,   
 
      .   mount,   :

      # mount -t nfs nfs volume local dir options

      Nfs     :  .  
         NFS 
,       nfs  -t.

         ,     
  mounting NFS .      -o
   ,     /etc/fstab 
 .   ,      
. ,        ,
     fstab.

         /etc/fstab    :


                               - 198 -

      # volume              mount point       type  options
      news:/usr/spool/news  /usr/spool/news   nfs   timeo=14,intr

             

      # mount news:/usr/spool/news

        fstab , NFS   
 uglier. , ,    home
  
       ,  moonshot,    
    4k    - .   
    2k,     Linux()
   :

      # mount moonshot:/home /home -o rsize=2048,wsize=2048

      5.    " ",    
   .



              
Nfs(5),     Rick Sladkey's NFS-aware  mount  tool,
     Util-linux  Rik Faith).  -
  ,      :

      rsize=n  wsize=n -     ,
 NFS
     , . 
       - 1024 ,
-   UDP  ,  .

      timeo=n -    (  ),   NFS
          ,
  .    - 0.7 .

      hard -      hard-mounted.   

                               - 199 -

.

      soft - soft-mount  (  hard-mounted).

      intr -    ,    NFS .
                   ,   
.

       rsize  wsize,      ,  
  .     : 
,      NFS ,  ,   
    (    
 ).       
 ,     minor  timeout
(   ),   ,   
     .  
    - 60 ,  
  .

       ,      
       .    
 . ,       
    ,  hard-mounted. 
 , soft-mounted     -
     ,    
  . - ,  write-behind  
,         
,      2   ,   
          soft-mounted
   .



         hard-  soft-mount  -    
,    ,        ,
      . ,  
     NFS,     ,   X
   ""  ,   -    ,

                               - 200 -

   xv     ,  ,  Ethernet
   .  hard-mounting,   
,     ,     
    nfs-.   , non-critical
,  nfs-mounted news partititons  FTP    
soft-mounted,         ,  
    "",    .
      - flakey    
,        
,   timeo,  hard-mount ,  
   NFS,      
hanging  file access.

      , mountd daemon    ,  
 ,   .     
   showmount,     NFS 
. Linux mountd   .

      12.3 NFS daemon()

          NFS   ,   
  nfsd  mountd daemons   .  rpc-
,    inetd,     ,
      portmapper. , 
   ,      , 
rpc.portmap . ,       
 rc.inet2 script:

      if [ -x /usr/sbin/rpc.mountd ]; then
                   /usr/sbin/rpc.mountd; echo -n " mountd"
      fi
      if [ -x /usr/sbin/rpc.nfsd ]; then
                  /usr/sbin/rpc.nfsd; echo -n " nfsd"
      if

          NFS daemon 
 ,      
 .         

                               - 201 -

        ,  
       uid/gid.  ,
   NIS,   passwd    
  LAN.


     &
 "      ,    . 
 uid's  gid's ,   
,    ugidd  mapping  daemon,   
 .  map daemon   ,  
 nfsd  uid/gid     
uid/gid    ugidd  .

      ugidd - rpc- ,    rc.inet2   
 nfsd  mountd.

      if [ -x /usr/sbin/rpc.ugidd ]; then
                   /usr/sbin/rpc.ugidd; echo -n " ugidd"
      fi

      12.4  

              NFS 
,
              

      per-client.       /etc/exports .

       , mountd       
  ,     .  ,
        nfs
,     ,     
  .      :

      # exports file for vlager
           /home             vale(rw) vstout(rw) vlight(rw)
           /usr/X386         vale(ro) vstout(ro) vlight(ro)

                               - 202 -

           /usr/TeX          vale(ro) vstout(ro) vlight(ro)
           /                 vale(rw,no root squash)
           /home/ftp         (ro)

         ,  ,  
 .   -    
,    *  ?  ,  
       Bourne . ,
lab*.foo.com  lab01.foo.com    laber.foo.com. 
    ,     /home/ftp   , 
     .



            , mountd 
 hostname   gethostbyaddr(2) .  DNS,  
  hostname ,     
       .   DNS,
  -
       hostname,    ,  
 .

         ,  , 
,   .     
:

      insecure -  -    .

      unix-rpc -  unix- RPC    
.           
,      
internet  (        1024). 
   .

      secure-rpc -  secure RPC    
.                   
 . .  Sun's   Secure RPC.


                               - 203 -

      kerberos -  Kerberos     
 .               
   .  . MIT   Kerberos
 .

      root squash -   ,   super user 

     , 
          uid
0    uid 65534 (-2)  .  uid                     
     .

      no root squash -      uid 0.  
 
.

      ro -   read-only   . 
            .


      rw -   rgad-write   .



      link relative -     ( link
contents     )    
  ../,        root
 .      ,   
  ,          ,
  ,       .

          .

      link absolute        
(   Sun-supplied NFS ).

      map identity - map identity   ,   
 ,     uid's  gid's   . 

                               - 204 -

   .

      map daemon    NFS  ,   
       uid/gid. nfsd  
      ,  client's
ugidd daemon.

      ,      daemon syslogd's
   ,  nfsd  mountd .

      ,      IP   
,        
.    BIND   security-conscious,   
  spoof    host.conf .

      12.5 Linux Automounter

      ,      NFS 
,     .;    - 
     ,  - , 
   .    - 
 automounter.  - daemon,    
  NFS   ,    ,
        .   
  automounter - ,    
   . ,      
         ,  



          NFS.   automounter,
       ,    
/usr/X386; automounter       ,  
    .

      Automounter,    Linux  amd.  
  Jan-Simon Pendry     Linux Rick Sladkey. 
 amd-5.3.

                               - 205 -


       amd -   ;   , ,
  ;    texinfo   
.




                        13.  Taylor UUCP

                             13.1 

      UUCP      Mike Lesk  AT&T Bell
Laboratories,      .  
 ,    email   Usenet  
      , UUCP  
.    ,   
    ,     
.
      ,       ,
     ""   ,   UUCP,
      UUCP.    
     ,    
1976.      , 
       . 
   ,   
.
        -    "  2 UUCP ", 
 1977    Mike Lesk, David A. Novitz,  Greg
Chesson.    ,   .  
 2       
UUCP.
           1983,   
 BNU (Basic Networking Utilities(    )),
HoneyDanBer UUCP,  HDB  .     ,
P. Honeyman, D. A.Novitz,  B. E. Redman. HDB  ,  
    2  UUCP. ,   
 ,      ,   

                               - 206 -

   ,      UUCP.
       UUCP,      Linux - Taylor
UUCP 1.04, (1),  ,   .  Taylor
UUCP 1.04     1993.   
, Taylor UUCP     ,  
  - a.k.a. " Taylor " -  .
       1.05   ,     
 .      
,      ,    
 Taylor UUCP 1.05     .


                    1.  Ian Taylor, 1993.



         Linux, Taylor UUCP  
  BNU,  Taylor  ,   .  
   , , ,   , 
     BNU,    
 Taylor.
           ,      
    UUCP,   ,     
      UUCP.      , 
UUCP      .    
 UUCP,          13.3, 
  ,    UUCP.
       ,       
 UUCP - uucp  uux.      
.
           - uux  uucp,   UUCP
  ,     . 
    UUCP   ,  
 ,    .    
,        UUCP.  , 
      . , 
 ,     UUCP.  
uucico ( cico  copy-in copy-out),  uuxqt,  

                               - 207 -

,    .

                       13.1.1    UUCP

             ,  , 
,   .   texinfo ,
     Taylor  .
Texinfo     DVI  GNU  , 
tex  makeinfo, .
            BNU (  
2),     - "  UUCP  Usenet " ([GETST
"reilly-uucp"]).      UUCP  Linux -
Vince Skahan's UUCP-HOWTO ,      comp.os.linux.announce.
        newsgroup   UUCP - comp.mail.uucp.  
     Taylor UUCP,     
,    comp.os.linux.



                           13.2 

                13.2.1    UUCP   

         UUCP -  .  , 
    uucp  uux,   .
   ,     , 
 ,     .   
  .
      ,,        ,
  UUCP   netguide.ps   pablo, 
  lpr,   .

      #     $ Uux -r pablo! Lpr! Netguide.ps

      UUCP     ,   
(     kermit).     
    .    .
,    ,   

                               - 208 -

    /var/spool/uucp.   ,  
     ,  
 (lpr), ,   ,   
.     , UUCP   
 (netguide.ps).
             
        . HDB- UUCP
     , 
/var/spool/uucp/site,  site -   .  
Taylor , UUCP    /var/spool/uucp/site 
   .
         UUCP    .
  , UUCP  ,  , 
  .      ,  
    .    uuxqt,  
    ,     
.
             , UUCP  
    .  -  ,    0 
9,    Z,   z,   .  
      B  C,     
   N.      
.       -g   uucp
 uux.
                
 .       ,
     (    z).   
  :   ,   
    .

                     13.2.2   uucico

       ,  uucico    , 
  ,      
.
           uucico -s    ,  
  .    
 . ,    , 

                               - 209 -

  ,   .  TCP, uucico 
  gethostbyname (3),      ,
,   ,     
(socket).
       ,    ,  
  .     
,  , , , .   "login chat".
     getty/login 
,  -   TCP -  uucico .  
  ,    uucico.  
uucico,   ,  , 
- .
         (handshake phase):  
c hostname   .   ,  
hostname    ,    ,  ... 
 (  )   
 .  ,  ,   
   .   , 
   ,  .   
,  e .     
.
       , uucico     .
     ,  
,      . 
    -   
. ,    "  " ,
      ,     
TCP         ,
      .




       ,  ,  
 .      . ,
,     .
           ,   
    ,    

                               - 210 -

 .   ,    
 ,       
.  -  ():   
 ,    .   
 .   ,   
 ,   .
            :    
         UUCP  . 
  ,  ,  David A.
Novitz,      UUCP. Taylor UUCP
FAQ     UUCP.    
comp.mail.uucp.

      13.2.3    uucico

              
uucico.   ,     
uucico(1).
         -s      ,    
              c   .

         -S       .

         -r1  uucico   .   
             , -s  -S  .   -r1 
             uucico      sys",  
                  
              .


         -r0  uucico   .  -  
             , -s  -S  .  
             ,    -   
              ,  TCP     -p
             .




                               - 211 -


         -x typy, -X type    . 
               .  :
            abnormal, chat,handshake,uucp-proto, proto, port, config, spooldir,
            execute,incoming, outgoing.  all   
                 UUCP,  
             ,      n " 
             .


              DEBUG 
/var/spool/uucp.

              13.3   UUCP

             , UUCP 
,     .  
 ,    
.      
,      /usr/lib/uucp.
       .

            13.3.1    Taylor UUCP

      ,   UUCP  ,  
. -   ,     
     (  Talyor   
       HDB   2).
               , 
  ,        
.      ;     
  .         UUCP,
      ,   
.     , ,  
  Linux.
       ,      /usr/lib/uucp   
.  Linux  UUCP binaries, 
   HDB  Taylor ,  

                               - 212 -

     .  README 
 /usr/lib/uucp.
       UUCP  ,    
  uucp.       
,       600. (2)
         UUCP - /usr/lib/uucp/config
,    .    (
, ),   UUCP   .  
 ,   vstout    UUCP:

       # /usr/lib/uucp/config -     UUCP
hostname vstout
          - sys .  
-    ,    .
  (),   
,     
. c ( -   - script,
)     pablo:
                 # /usr/lib/uucp/sys -   UUCP
                 #system pablo
                 system pablo
                 time            Any
                 phone           123-456
                 port            serial1
                 speed           38400
                 chat            ogin: vstout ssword: lorca
      Port  ,  ,time   
   .hat      -
 ,  , uucico
  pablo.    .  
     /dev/cua1,    
 port.     .
        2. ,     UUCP 
 setuid  uucp,   ,   
uuchk - .       , 
   600.



                               - 213 -


       port     .  
     ,   ,
,  ,   .  
/dev/cua1 (a.k.a. COM 2),   NakWell   
     38400bps.   
,   "sys".
                 # /usr/lib/uucp/port - UUCP ports
                 # /dev/cua1 (COM2)
                 port            serial1
                 type            modem
                 device          /dev/cua1
                 speed           38400
                 dialer          nakwell
      ,     
c   , dial.   
     , ,
     .    chat
script(  ).   NakWell 
   :
                       # /usr/lib/uucp/dial - per-dialer information
                 # NakWell modems
                 dialer          nakwell
                 chat            "" ATZ OK ATDT\T CONNECT
      ,   chat   
,   ,   
 ,      , 
."\T"       uucico.
          ,  uucico    
, ,    :

                 $ Uucico -s pablo



            18.     Taylor UUCP.

        uucico   pablo  "sys" .    "

                               - 214 -

sys"  pablo  ,   serial1   
. port  ,  serial1   , 
   NakWell .
      Uucico    , NakWell , 
, /dev/cua1     "
"   .   "ATZ",  "OK " 
, ...     "\T",     
(123 - 456)    .
       ,   ,Uucico   
 "sys"       (login chat).
      "login: "   
 (neruda),     "password:" , 
 "lorca".
        ,   
 uucico.   (handshake phase),
  .

                  
13.3.1.
          13.3.2      UUCP

      ,       UUCP,  
   .    
,      .
 (DOS) COM1 - COM4      /dev/cua0
- /dev/cua3. , . Slackware, /dev/modem
     cua *  , 
kermit,seyon  ..    .  ,
   /dev/modem    UUCP.
         ,      
 , ,  
.    -   LCK .. 
  , LCK .. cua1.   
    ,     
   . ,    
     . -   , 
   UUCP   crontab. 
  .   5 ..

                               - 215 -

                 Linux 
     
.       
   .
      ,        
2400bps (  ).     V.
42bis,     9600bps.
      ,  , UUCP c -,  
   .       
      . (3)
          ,   . ,
   BREAK ,     
?  : "login:"  "user:"?   
   (chat script),  uucico,
 .    , 
    kermit  minicom, 
,   .

          13.3.3  

            TCP/IP ,  (host)  
    UUCP .      UUCP 
      ,   ,
      . (4)
        3.       UUCP,   
 .     -  . 
       -   /uucp uucp 
nuucp/uucp.
      4.   - ,       
7 ,        , 
     .



      ,    UUCP    ,  
  b ,   UUCP Mapping project . UUCP
Mapping psoject    14 ..,     ,  
   UUCP    .

                               - 216 -

      ,    UUCP ,   
   . ,      -
swim.twobirds.com,     UUCP   swim. 
  .,      UUCP .
                 
,           UUCP. (5)
         ,      UUCP 
  (big black bit bucket).    , 
   ,       
,        
.
       ,   UUCP   hostname   UUCP .
      /etc/rc.local.    UUCP
  ,      ,   
 hostname   ,   uucico   
UUCP.   .


            13.3.4 Taylor  

            . Taylor UUCP 
   :

      config -    .    
 UUCP .

      sys  -    ,  .  
,   ,     ,  
 ,   ,   .

      port -      ,   
   ,   .


      5. UUCP  Mapping  Project    UUCP hostnames  
     .     UUCP,
 maintainers ,    ;   
  .

                               - 217 -





      dial  -      , , 
                  .

      Dialcode       
                (dialcodes).


      call             ,  
                    .  .


      Passwd         ,   
                    .   
                 ,  uucico    .

      Taylor     ,    
  - .     , 
  .       ,   
    ( with a backslash).
         ,       
.       ,   
 .       
UUCP.    , ,  
  UUCP  TCP /IP   
.     Texinfo , 
      Taylor  UUCP.
         ,     UUCP ,
   ,  uuchk ( 
/usr/lib/uucp). Uuchk    ,  
    ,    .

            13.3.5    - config 

              , 

                               - 218 -

  UUCP hostname.  , UUCP  ,  
  "hostname,       -
  UUCP .  config   :



                 # /usr/lib/uucp/config - UUCP  main configuration file
                 Hostname vstout

            13.3.6   UUCP    - sys 

       sys  ,     . Anentry
   ;     
  ,  ,   
. ,        
    .
              
,    . ,   
paramters  ..     .

              .

            13.3.6.1  
              .  
         
(    uucico,    ), 
  .   .
      6.   2 UUCP      
 ;      (   Taylor UUCP)
 .



            13.3.6.2  

              , 
  ,      .  
  ,    uucico's.

                               - 219 -

  '='  "     ", '_'  
   . ,    ,
            
.
      [         ,  
,          
  0  9,    .]
           ,  
- (  ).   
     dialcode. ,   
 dialcode :


                 # /usr/lib/uucp/dialcode - dialcode translation
                 Bogoham                           024881
                 Coxton                               035119


              
Bogoham7732   sys,     .

            13.3.6.3  Port   Speed

       Port  Speed ,   ,
    ,   
. (7)       ,
    .       port,
   ,  ,    
()   .
      ,   speed  .  
    ,   port, uucico
   ,   ,     
   .     ,
   ,       .

      7.     tty ()    
   ,     .


                               - 220 -



        ,  ,  uucico , 
  ,      ,  
  .

          13.3.6.4 Login chat (    )

                
(login chat script),   uucico,   
 .     (),  ,
     uucico.    ,
  uucico ,      
  ,      , ,  
     ,   .  
  . Uucico    \r
  ,   .  , 
     :


                login: vstout Password: catch22


       ,        .
,      ,     Login
 login.
      Uucico      , 
 ,   getty       
.       -(sub-chat)
   ,  . Sub-chat 
     ,     
.         , 
 BREAK,        
.       ,
      ,     Enter  ,
   .   ("")   UUCP     
    .


                               - 221 -

                  "" \n\r\d\r\n\c login:-BREAK-login: vstout password:
catch22

            ESC-,  
    .  -  
,   :    ,  uucico 
 ,   .

                   \t C .


                   \r   .


                   \s .     ,    
  .


                   \n  .


                   \\   ( Backslash).

        ,  ESC-  
    :




                  EOT -    (^D).


                   BREAK -  .


                   \c       .



                               - 222 -

                   \d    1 .


                   \E     - ., 
uucico  ECHO ,   ,     
 ,      .  
        (  
 ).    .
                   \e   .


                   \K   ,   BREAK.





                   \p    .

            13.3.6.5 

               ,
,          .
 Taylor UUCP     ,    
.
             , 
   ,       
 ,    .  -    
,     altgrnave.

            pablo,   
sys    :

                 system       pablo
                 phone        123-456
                 alternate
                 phone        123-455


                               - 223 -


        pablo, uucico    123-456,  ,
    .   
     ,     
.

            13.3.6.6    
      Taylor UUCP   , 
     .      -
 ,        
  ,        
.  ,      
,   uucico   -S  -f.
       , Taylor UUCP     ,  
          sys.
        ,  
     ny ()      sys.
            -  ,
  ,      . 
    Mo, Tu , We, Th, Fr, Sa, Su  Any(),
Never(),  Wk   .     24-
 ,  .   ,  
  .     
.         
   . ,  MoWe0300-0730, Fr1805-2000
       3   7.30 ,   
 18.05  20.00.     ,   Mo1830-
0600,  & ,    6.00 , 
 18.30   ().
        Any   Never    .
       time  ,     
.      , uucico 
       
.  , uucico    
backoff ,         .
,   ,    5 , uucico
     5-   
.

                               - 224 -

       timegrade   a   
  . ,      timegrade 
 :



                 Timegrade N Wk1900-0700, SaSu
                 Timegrade C Any

           (spoolgrade) C  
(    B  C),      , 
 ,      (  
   N)        .
           time,  timegrade  
      .
            :
 timegrade    ,    ;
      ,  .  
  calltimegrade,     
      ;    ,
    . (8)
      , timegrade   ,   
 ,   ,      
  . ,      
uucico,      .


            13.3.7   (Devices) -  port

       port  uucico   .    
,         TCP.
         sys, port    ,  
  port,   .   
      sys.    
 ;         , uucico
    ,     ,   
  .
       port     , 

                               - 225 -

    .   - modem, direct  
,  tcp   TCP.   port ,  
   - modem.
        ,     ;  TCP  
   .
      8.     Talyor UUCP,  
.



           ,     
   .        
  /dev(  /dev/cua1). (9)


         , port  ,  
  .       -
.  ,  ,   Hayes  
      . , 
  uucico,        
 . Taylor UUCP      
  dial.     ,    
  ,   dialer.


            ( 
 ,   . ,  
  ,      
 14400bps;      ,  
    9600bps.   ,   
  "" ,       
 .        port ...    ,
     .    
   ,  serial1-slow,    port
        sys.
                
,   . ,    
    :

                               - 226 -


               #NakWell modem; connect at hight speed
               port      serial1                  # port name
               type      modem                 #modem port
               device  /dev/cua1            # this is COM2
               speed  38400                  #support speed
               dialer   nakwel                #normal dialer


               # NakWell modem; connect at low speed
               port            serial1                # port name
               type            modem               # modem port
               device          /dev/cua1        # this is COM2
               speed           9600                # supported speed
               dialer          nakwell-slow  # don't attempt fast connect

      T      serial1   ,  
 9600bps . Uucico   
      9.    ttyS *  , 
    (dial-in).



          .   ,  
 38400bps ,  ,     port/


            13.3.8    -  dial

       dial  ,    
  . ,  UUCP    
 ,           ()
  ,    .
       ,   
   .
               
 .         dial.  
 dial    dialer,    

                               - 227 -

 .
         -   (modem chat),
  chat.      (login
chat),       uucico, 
    ,   .  
,      ,  
.   Hayes- :


       # NakWell modem; connect at high speed
                 dialer          nakwell         # dialer name
                 chat            "" ATZ OK\r ATH1E0Q0 OK\r ATDT\T CONNECT
                 chat-fail       BUSY
                 chat-fail       ERROR
                 chat-fail       NO\sCARRIER
                 dtr-toggle      true

           "",   .
C uucico   (ATZ)  . ATZ -  Hayes 
 .   uucico ,     OK,  
 ,    ECHO,  ...  ,
   OK , uucico    (ATDT).
Escape- \T        ,
    sys. Uucico  ,    
COONECV,    ,      
 .




               ,
,       -    .  
,      ,    .
        ; uucico
        .  
 UUCP(log file)   "timed  out in chat script"
  .
      , Taylor UUCP    uucico   ,

                               - 228 -

 chat-fail     .  uucico 
chat-file      (modem chat), 
 ,        
 UUCP( log).
         ,    UUCP 
DTR      .   
   ,   -  
  DTR ,     . (10)

            13.3.9 UUCP   TCP

            ,    UUCP
 TCP     ,    
   Usenet .  TCP -  ,
   ,  NNTP ,  
    ,    
.          
 (newsfeeds),        ,
        ISDN.  
  TCP      
,          
  .        ,
  UUCP  TCP.
        sys,   ,     TCP.

      10.          
  DTR.   , ,      
.



                 system          gmu
                 address         news.groucho.edu
                 time            Any
                 port            tcp-conn
                 chat            ogin: vstout word: clouseau

       address   IP  ,    

                               - 229 -

(domain name).    port  :

                 port            tcp-conn
                 type            tcp
                 service         540

        ,   TCP  , 
 sys   tcp-conn,   uucico    
  TCP  540    .  -    
  UUCP.   ,    
    service .  , 
     /etc/services.     UUCP-
- uucpd.

            13.3.10   

       ,         vstout
  tiny.      ,      
  sys.  port    tiny,
 .

                system          tiny
                 time            Any
                 port            direct1
                 speed           38400
                 chat            ogin: cathcart word: catch22

        port        
.       ,     
   .



                 port            direct1
                 type            direct
                 speed           38400



                               - 230 -

                  13.4   UUCP,    -  

                  13.4.1  
       UUCP   ,       
,         .
,      ,   
   -      -
      .
        Taylor UUCP        
rmail  rnews,      email  Usent  
UUCP.     ,  uuxqt - 
 ,    /bin,/usr/bin,  /usr/local/bin.
      ,  
   commands   sys. ,  
      . ,  
  pablo   rsmtp    rmail 
rnews: (11)

                 system             pablo
                 commands      rmail rnews rsmtp


                  13.4.2  

      Taylor UUCP      
.          .
  request  no,       , 
,      .

      11.rsmtp ,      SMTP. 
     .



      ,       
  ''  '' ,   transfer  no. 
     .
      

                               - 231 -

  "    ,     ''  '' 
   .        
 ,        
   . ,   
      UUCP, /var/spool/uucppublic.  -
  ,       ; 
   FTP   Internet.      
.
      , Taylor UUCP    
      :local-send,
        
 ; local-receive,    ,  
   UUCP    ;remote-recive  remote-
send,         
.  :

                 system          pablo
                 local-send      /home ~
                 local-receive   /home ~/receive
                 remote-send     ~ !~/incoming !~/receive
                 remote-receive  ~/incoming



        local-send      
    /home       UUCP  
pablo.  local-receive      
    uucppublic,      
 /home.  remote-send  pablo   
/var/spool/uucppublic        . 
  uucico  ,  
.  ,     pablo   
   incoming.
                 UUCP -
 ,       .  
       
,  ...         ,
    UUCP .

                               - 232 -





                       13.4.3 

       UUCP   ,     
     . ,  , 
  seciretrieve   uchile  ,     .
    :

                $ Uucp -r seci! Uchile! ~/find-ls.gz ~/uchile.files.gz

             
.       
  ,  seci  UUCP-   uchile,    
. ,      UUCP,   
   ,  ,   
 ,   -      
   X11R6.
       , Taylor UUCP   .  
   ,    
forward.     ,  
   . ,  UUCP seci
        sys,   pablo
   uchile:

                 ####################
                 # pablo
                 system          pablo
                 forward         uchile
                 ####################
                 # uchile
                 system          uchile
                 forward-to      pablo




                               - 233 -

        forward-to   uchile  ,    
    pablo.  UUCP   .  
 uchile    pabno  seci;   
 .
           ,  
  ANY (  ).

                  13.5    .

              ,  
      ,   
 ,    UUCP(accounts).  
    .

                  13.5.1  getty

           ,  dialin ,
    getty   . , 
 getty      ,     
     ''  ''.,
  ,   getty,  
       ( uucico, 
minicom).     -   uugetty  getty ps .
  Linux-a  ;   uugetty 
 /sbin.  ,    - mgetty (. Gert
Doering-),     .   
     sunsite.unc.edu (    
).
               uugetty  mgetty
-      ;   
   Serial HOWTO (Grag Hankins),  
,    getty ps  mgetty.

                  13.5.2  UUCP (account)

      ,     ,  
        
UUCP. ,       , 

                               - 234 -

  .      pablo, 
()     Upablo,   .
       ,     , 
        , /etc/passwd. 
     UUCP    
uuguest.
               
/var/spool/uucppublic;     -  uucico.



             ,  
    useradd:

      # Useradd -d /var/spool/uucppublic -G uuguest -s /usr/lib/uucp/uucico
uablo

             ,  
 /etc/passwd     , 
 ,  5000  150 -  uid  gid, 
 Upablo   uuguest, .

                 Upablo: x: 5000:150: UUCP
Account:/var/spool/uucppublic:/usr/lib/ uucp/uucico


        ,    ,  
  passwd.
        UUCP     TCP,  
 inetd,      uucp.  
,      /etc/inetd.conf: (12)

      uucp   stream  tcp   nowait  root  /usr/sbin/tcpd
/usr/lib/uucp/uucico -l

        -l  uucico       
.     ,     login,
        /etc/passwd.   

                               - 235 -

  /usr/lib/uucp/passwd      
  :

                  Upablo IslaNegra
                  Ulorca co'rdoba

      12.  ,    tcpd   700,   
    ,  uucp,    
.


      ,     uucp    600.

              ,   
      , , 
 ,  ,       
  .  ,    Taylor UUCP 1.05 
,    ,  getty     
   uucico   -u. (13) ,  
 getty,      uucico  
/bin/login.  getty ps,    ,    LOGIN 
 . ,       
(). Mgetty,   ,   , 
,        , 
   . ,   , 
mgetty  uucico   ,   
  ,    U,    
     .
         UUCP   , 
   snarfing   ,    
 -          .
    13.5.3 .

                  13.5.3   

            UUCP - ,    
   ;      
 ,      .  ,

                               - 236 -

      UUCP, ,    -
,   .   ,    
    UUCP,   .
         ,      , 
 ,       /"
 ,        
,   called-login  sys.:

                 system              pablo
                 called-login      Upablo

      13.  -u    1.04 ,    .





           ,    ,   -
pablo, uucico ,      Upablo.   ,
  ,   .    
    -      
,       . ,  
    sytems,   ,    -
    .   ,     ,
     -     
   ,  neverlogsin.


            13.5.4   -   

              , 
   .  
,     " ",
      ,     
  UUCP.
          ,  
   ,   .    
 .  ,    

                               - 237 -

 ,      .   
,    .   
 ,     
  .
                :
  q        
    ,  pfvtnbnt  .  
   UUCP,    ,  
     .      
    ,  uucico   ,
    () anymore!
           ,  
        ,
    .    
  ,    , , uucico
    ,   -    "
  ,  ''.    
,       , 
     "  
 (RBADSEQ) ''.
           ,  
     :

                 # enable call sequence checks
                 sequence        true

          ,   . Taylor UUCP
    ,  ".Sequence"   spool
 .    uucp,    600 ( 
      uucp).    
 ,   .  
  ,     , , 60.
             # cd /var/spool/uucp/pablo
             # echo 94316 > .Sequence
             # chmod 600 .Sequence
             # chown uucp.uucp .Sequence



                               - 238 -

      ,      
  ,       
,    .

                  13.5.5  UUCP

  "        UUCP-    ,
       (. ). 
          uucp.  ,
        .
,          
. ,          sys,  
    ,    . Taylor UUCP 
    unknown. unknown    
 ,    ,   
   :


                 unknown         remote-receive ~/incoming
                 unknown         remote-send ~/pub
                 unknown         max-remote-debug none
                 unknown         command-path /usr/lib/uucp/anon-bin
                 unknown         commands rmail

             
pub        /var/spool/uucppublic. 
  uucico       ,
   .     
  rmail;      uucico  
rmail   ,   anon-bin.    
  rmail, , ,     
-  .  ,  
  maintainer ,      
       .
          UUCP,    
      .  uucico
   .


                               - 239 -

                  13.6 UUCP   

             , uucico
   .    
   .      
      . ,   
 ,     , 
     () .   
 ,     , .

                  13.6.1   



       UUCP     , 
 , TCP,   X. 25,  
  .  ,   UUCP
  ,      
().
            :   
.     ,     
  .   ,   
,        . 
     TCP,    
   .     
 ,        
.
        ,      
  .      ,
  ,    . 
   ,     ,
    ()  
acknoledgements   .      
uucico   .   ,  
 (      ), 
      TCR.
           .   
    , , 

                               - 240 -

    .   ,  
      .   
      ,   
     ,   
,   ,  ,  
   . ,   
  ,    
.       TCP,   
  .

          Taylor UUCP 1.04:

      g -         
          uucico's.      
               . g 
            . - -
          ,     .

      i -    ,  
              .  
               .   
            Taylor UUCP.


      t - ,      TCP,
           ,    .    1024
               .

      e -  t,   .

      f -      X. 25 . 
           ,    .
            ,     
          .

      G -  g-  System V Relgase"4.   
             UUCP.


                               - 241 -

       -   similiar  ZMODEM.   
          ,      XON
           XOFF.

                 13.6.2   

             ,
  ,  ...     ,
    ,   
 .  g, ,     1  7, 
    2    64  4096. (14),  
    ,     5%  
,        .  
,       
      128   
,          512 
 1024.
      Taylor UUCP       
protocol-parameter    sys. ,    
g  512     pablo:

                  system          pablo
                  protocol-parameter g  packet-size  512


      14.  binaries    Linux
     7 ,   128  .



              
.    . ,  Taylor UUCP.

            13.6.3   

         uucico   ,   
   ,     
 . uucico    

                               - 242 -

,   Pprotlist, #   .
           (, TCP,  ),
uucico       .   
 ,     i, a, g, G,  j  f. 
 TCP,  - t, e, , a, , G, j,  f.  
       protocols, 
         . , 
      port  :

                   port serial1
                   protocols      igG

              
,   i,g,  G.,    
   ,   .

            13.7  




              
UUCP,      .      
    .
        ,    -xall,     
 Debug   spool.      , 
 . ,       ,
   .  Hayes-   
,  " ATL1M1 OK "        dial.


               
  . Uucico   uucp,    
/usr/lib/uucp, /var/spool/uucp  /var/spool/uucppublic  
uucp.      (15)   spool, 
    uucp.

      Uucico     "Wrong time to  call "("  

                               - 243 -

 ").   ,   sys ,    
time,  ,     , 
     .     
, uucico ,      .
      Uucico ,    .   ,
uucico        /var/spool/uucp.
       ,   
  .    ,   
 uucico,        
  ,  ...    uucico   
   ,  ,    
,   .
           ,    
 :  ,     
.   ,      . ,
,    ,  ,   
  . ,     
   .      
,   ,     , 
    ,    . 
      .
         :     ,  DTR 
 ,  uucico ,   
 uucico.     DTR,   a
      15.   ,     .    
  ls.



       ,      .  
,      \E    
.     ECHO      
, ,       
    .    ECHO, ,  
  ,      . , 
    .  ,  
     ,    .
         ,   :    

                               - 244 -

.         
 .      ,
.         
   .
      log  ,       : 
   .     
    (     
)?      ,   
    ?  NSC 16550A chipset  
 , 38kbps   ; ,  FIFOs
( 16450 ), 9600 \ -   .   
 ,     
 .
         -     
. Taylor UUCP 1.04       RTS/CTS
.       rc.serial 
 :

               $ Stty crtscts < /dev/cua3

         ,    : , 
  .       
.  ,     
(   Pprotlist   ).   
    (       ?).
          RLCK,   lockfile
    .        
      .
         RBADSEQ,      ,
  ,    .    RLOGIN,
         .



            13.8  

          UUCP   
taylor-,       ,

                               - 245 -

    spool.     Log 
      
 .  Log-   
      uucico pablo - (1994-05-28 17:15:01.66 539) Calling system pablo
(port cua3)
      uucico pablo - (1994-05-28 17:15:39.25 539) Login successful
      uucico pablo - (1994-05-28 17:15:39.90 539) Handshake successful
      protocol 'g' packet size 1024 window 7)
      uucico pablo postmaster (1994-05-28 17:15:43.65 539) Receiving
D.pabloB04aj
      ucico pablo postmaster (1994-05-28 17:15:46.51 539) Receiving
X.pabloX04ai
      uucico pablo postmaster (1994-05-28 17:15:48.91 539) Receiving
D.pabloB04at
      uucico pablo postmaster (1994-05-28 17:15:51.52 539) Receiving
X.pabloX04as
      uucico pablo postmaster (1994-05-28 17:15:54.01 539) Receiving
D.pabloB04c2
      uucico pablo postmaster (1994-05-28 17:15:57.17 539) Receiving
X.pabloX04c1
      uucico pablo - (1994-05-28 17:15:59.05 539) Protocol 'g' packets:
sent 15,
       resent 0, received 32
      uucico pablo - (1994-05-28 17:16:02.50 539) Call complete (26
seconds)
      uuxqt pablo postmaster (1994-05-28 17:16:11.41 546) Executing
X.pabloX04ai
       (rmail okir)
      uuxqt pablo postmaster (1994-05-28 17:16:13.30 546) Executing
X.pabloX04as
        (rmail okir)
       uuxqt pablo postmaster (1994-05-28 17:16:13.51 546) Executing
X.pabloX04c1
        (rmail okir)


      "   - Stats,  
  .  Stats  

                               - 246 -

   :



      postmaster pablo (1994-05-28 17:15:44.78)
      received 1714 bytes in 1.802 seconds (951 bytes/sec)
      postmaster pablo (1994-05-28 17:15:46.66)
      received 57 bytes in 0.634 seconds (89 bytes/sec)
      postmaster pablo (1994-05-28 17:15:49.91)
      received 1898 bytes in 1.599 seconds (1186 bytes/sec)
      postmaster pablo (1994-05-28 17:15:51.67)
      received 65 bytes in 0.555 seconds (117 bytes/sec)
      postmaster pablo (1994-05-28 17:15:55.71)
      received 3217 bytes in 2.254 seconds (1427 bytes/sec)
      postmaster pablo (1994-05-28 17:15:57.31)
      received 65 bytes in 0.590 seconds (110 bytes/sec)


        - Debug.     .  
 ,   ,     
 600.     ,   ,  
       ,    
   .
       UUCP binaries    Linux-
,    HDB-. HDB UUCP
    ,  
/var/spool/uucp/.Log.      , 
 uucico, uuxqt,  uux.    , 
   ,      
.  ,   uucico    pablo  
.Log/uucico/pablo,      uuxqt   .Log/uuxqt/pablo.
,    lofiles -       
Taylor.
           HDB-,    .Admin 
/var/spool/uucp.     ,   
   Admin/audit.locan,        uucico  
     .Admin/audit.


                               - 247 -









      14.  

              
 -   .    
,       , 
   mailbox  .   email
  ,      
      
 .
           . 
     " -  '',
       .
            
   Un*x.      - sendmail
 Berkeley.   Eric Allman 
   sendmail .   Linux 
  sendmail-5.56c,        16
..,      sendmail - 8.6.5.
       ,    Linux - smail-3.1.28,
      Curt Landon Noll 
Ronald S. Karr.      Linux. 
,        smail, 
  ,   ,    
 .
        sendmail, smail  .   
   ,   - 
.   , , sendmail  ,
       .
       smail  sendmail    ,
   .  , 

                               - 248 -

      (  hostname),
   ,    .
  sendmail     ,
          
SHIFT. Smail       
  sendmail,        
  mailer'. ,   UUCP  Internet
,       -   
.



        ,     ,  email   
  ,      .
 15.  16.     smail  sendmail .
              
   Unix- ,  Linux.
           
   Linux,    Electronic Mail
HOWTO Vince Skahan,   comp.os.linux.announce
.

     14.1   -  ?

            , 
 ,  ,   ,
 ,  ,  ..,  ,
       .
       -   
 ;    -  ,  
   ,   
 .      .
     
,   .
       -  ,    
,  -     , 
  ,   ,  . 
 ,       

                               - 249 -

,     .   
   . (1)
1.     .sig   , 
   ,    
.      ,  "--".



            
 Unix   ,   RFC 822. 
  -     
ARPANET.
      RFC 822  -   .  
  ,    
 , ,  ,  
 ,  -  
(MIME).
        ,     ,
   .
            :
From brewhq.swb.de!ora.com!andyo Wed Apr 13 00:17:03 1994 Return-Path:

Received: from brewhq.swb.de by monad.swb.de with uucp
(Smail3.1.28.1 #6) id m0pqqlT-00023aB; Wed, 13 Apr 94 00:17 MET DST
Received: from ora.com (ruby.ora.com) by brewhq.swb.de with smtp
(Smail3.1.28.1 #28.6) id ; Tue, 12 Apr 94 21:47 MEST
Received: by ruby.ora.com (8.6.8/8.6.4) id RAA26438; Tue, 12 Apr 94 15:56 -
0400 Date: Tue, 12 Apr 1994 15:56:49 -0400
      Message-Id: <199404121956.PAA07787@ruby>
      From: andyo@ora.com (Andy Oram)
      To: okir@monad.swb.de
      Subject: Re: Your RPC section
       ,      
mailer`,  elm ( ), pine, mush,  mailx.
  ,    
.  , ,  
   .
From:    email ,   "

                               - 250 -

''.



To:  -  email .
Subject:      .  
 .
Date:   .
Reply-To:     .   
,     ,   
     ,    
.   .
Oranization: ,      
.   .
Message-ID: ,   . 
   .
Received:  ,      (
   )     ,
  ,  ,    
,     ,   
  .    
    .
X-: mail-     ,
   X-.  ,  
 ,      RFC.
           -   . 
    From,   
 .   ,   ,  
   ,   , 
 , ,     
 .



       From      
 mailer',     ,  
  .


                               - 251 -

     14.2   ?

      ,   ,   
mailx;     elm, mush,  pine.  
   ,  MUA  .
    ,    
     , 
   ,  MTA.  
,      
   ,  ,   .
     rmail,   - lmail
(  ).
        , ,   
   mailxbox . ,  MTA
   (   ,
   ),   ( 
    ). , ,
    ,    bounced,  
      .
         ,  
    .    
  ,  TCP/IP,   SMTP. SMTP
    ,    RFC 788 
821 RFC. SMTP     
.
       UUCP ,      ,
        
 .     UUCP, MTA
   rmail   ,  uux, 
     .
             , 
      
,     , 
   . (2)
 MTA     
       .
    SMTP,   
   ,     SMTP

                               - 252 -

.   BSMTP,   SMTP. 
  rsmtp  bsmtp   , 
  ,     SMTP
.



     14.3 Email 

        ,       
,    , 
 ,   . 
      ,      -
 .    ,  X.400,
    "  "  ,
      X.500.
            , 
  .
       Internet   RFC 822 ,
   user@host.domain,  host.domain - 
    .    "".
          ,
  () hostname ,   
.
        UUCP ,   
path!host!user (! !),   
      
.      ,  
   "". ,  uucp-
   RFC822,     .



      ,     RFC822-
 : < @hostA,@hostB: user@hostC > 
   hostC,                  HostC  
  hostA  hostB (  ).
         -    .

                               - 253 -

       ,  " % "  : user%hostB@hostA 
  hostA,       "@".
 -  user@hostB,  Mailer    
  hostB,    .  
    "Ye Olde ARPANET Kludge''. ,
       .
           . Decnet-
 , ,     
,    -  ::. X.400
    ,  
  ,    .
        FidoNet,    
 2:320/204.9,    , : 
(2 -  ),  (320  ),  (  ),
  (PC  ). Fidonet  
   RFC 822;    
Thomas.Quinot@p9.f204.n320.z2.fidonet.org.

     14.4   ?

            
 .      
 ,       
  .



          UUCP  
 ,  ,    Internet. 
Internet,       
 (    IP)  IP 
  ,      UUCP ,   
 ,    
.

     14.4.1    Internet

       Internet      ,

                               - 254 -

      .
       
 ,    
 IP  .
             
  ,     
.    ,   
  MX      DNS  .
MX       , 
       
       . MX  
 ,      ,
    Internet ,  UUCP ,
     ,  
.
      MX    ,   .  -
  ,   
  .
      ,   Foobar Inc,    
  ,  mailhub.    
MX    DNS  :
      foobar.com        IN   MX      5    mailhub.foobar.com



        mailhub.foobar.com     foo-
bar.com    5.  ,  
  joe@greenhouse.foobar.com,   DNS 
foobar.com,    MX,   mailhub.  
  MX     5,  
  mailhub.

     14.4.2     UUCP

         UUCP     
 Internet,      
   .   
,      ,  

                               - 255 -

.        
,   ,   
 .    Janet  
,  moria,    
eek!swim!Moria!Janet.         
eek,   swim     moria.
            ,  ,
      ,  ..
 ,       --- 
      ---  
         
.   ,  ,     
,        .
    hostname   UUCP
 .    Rutgers , 
   UUCP hostname,   
   UUCP    ,
 ,   hostname   .
,      
Usenet,     Usenet. (4) 
    (  )   :
4. Maps  for  sites registered with The UUCP Mapping Project
are distributed  through  the  newsgroup  comp.mail.maps;
other  organizations  may publish separate maps for their network.



      moria
      bert(DAILY/2),
      swim(WEEKLY)
        ,  moria    bert,  
   ,   swim,   
.       .
        ,   , 
       
    .    
  ,   pathalias  .  
,     bert  ernie,  pathalias

                               - 256 -

  moria,      
 :
      moria           ernie!bert!moria!%s
      ,       janet@moria.uucp, 
MTA,   ,  ,    ernie 
  bert! Moria! Janet.
            Usenet -  
 . ,     , 
 . ,     
  UUCP  ,   
 .
         
     (),  
 ,          
      
.     - 
.

     14.4.3  UUCP  RFC 822

            
 UUCP  -      UUCP .
,         
UUCP. ,  UUCP    ,
    .  , 
          ,
,           .
   ,      . 
      
.



            -  
,  .  ,
   ; 
        ,
     ,    

                               - 257 -

.       
    UUCP    . 
         . ,
pathalias ,        
sub.org   smurf:
      .sub.org        swim!smurf!%s
       ,  claire@jones.sub.org   swim 
  smurf! Jones! Claire.
          , 
       
. ,     
    fr,   
           .
 ,, -  (  
)      
     
.
            UUCP   
  RFC 822,     UUCP  
Internet.  UUCP       
 Internet,      -
.    Internet ,  
   ,    
Internet   DNS   Usenet.
          Internet, uucp- 
    Internet,    MX   (MX
   ). , ,  moria
 orcnet.org . Gcc2.groucho.edu   
 Internet. Moria    gcc2 
 -  (smart-host), ,    
     Internet.   ,
gcc2    MX  orcnet.org,    
  orcnet   moria.
           ,  UUCP
       
 .  UUCP   ,
       , 
 --    -

                               - 258 -

  .



     ,    RFC 822  
UUCP hostname' .    
FQDN   UUCP   ,   pathalias 
 :
      moria.orcnet.org  ernie!bert!moria!%s
          uucp-  , 
    . 
mailer'     ; sendmail,
,  uucpxtable.
             
UUCP   Internet.     
      , 
         
    smart-host. ,   
 UUCP ,  -     . 
-  ,     uucp.

     14.5 Pathalias    

      Pathalias    , 
  uucp- .     
( ,     ):
      moria.orcnet.org  ernie!bert!moria!%s
      moria             ernie!bert!moria!%s
           moria  ernie  bert. moria
     UUCP   ,  mailer
       .



               
    ,      
pathalias  ,     , 
 . ,      sub.org

                               - 259 -

    swim!smurf, pathalias    
 :
      \&.sub.org        swim!smurf!%s
        pathalias    ,  
       . 
       
,   -  pathalias ,  
   .     ,
        ,
   ,     . 
,  Usenet     
, UUCP    
     .
             , 
   .     
,      .
       , 
     .   
  ,  ,   .
 -  ,    
 . ,   
.
      ,  moria,   swim .tobirds.com
   ,  bert.sesame.com    .  ,
  bert   2400bps . Moria  
  :
      moria.orcnet.org
        bert.sesame.com(DAILY/2),
        swim.twobirds.com(WEEKLY+LOW)
      moria.orcnet.org = moria
              UUCP.
 ,     DAILY/2,   
        .



           , pathalias
      

                               - 260 -

,    ,   pathalias 
  ,      
 .
      Pathalias     
  (  ,   
)  .. .   pathalias  ,   
   .
            
  ,   . 
 ,    , ,    
()  . , , 
uuwho   ,    , 
     .
            , 
  ,      
.
 -    (,  -    ):
      #N        monad, monad.swb.de, monad.swb.sub.org
      #S        AT 486DX50; Linux 0.99
      #O        private
      #C        Olaf Kirch
      #E        okir@monad.swb.de
      #P        Kattreinstr. 38, D-64295 Darmstadt, FRG
      #L        49 52 03 N / 08 38 40 E
      #U        brewhq
      #W        okir@monad.swb.de (Olaf Kirch); Sun Jul 25 16:59:32 MET
DST 1993
      #
      monad     brewhq(DAILY/2)
      # Domains
      monad = monad.swb.de
      monad = monad.swb.sub.org
            -
 .    
;       ,
   . L   :  
    lati-tude/longitude  , 
  postscript,     

                               - 261 -

 .



     14.6  elm

      Elm  "   "     
   Unix.  
    .   
,    elm,     
.
      ,     elm, 
   ---,    .  
 ,    .
        elm      elm.rc
  /usr/lib/elm. ,      .elm/elmrc 
  .       
.      " " 
  elm.
          elmrc     
elm .rc .      elmrc 
   .

     14.6.1   elm

  elm .rc ,    , 
    host. ,  
 ,    :
      #
      # The local hostname
      hostname = vlager
      #
      # Domain name
      hostdomain = .vbrew.com
      #
      # Fully qualified domain name hostfullname = vlager.vbrew.com
          elm  
hostname.     ,  

                               - 262 -

  .



 ,       
 ;       elmrc, 
 .

     14.6.2   

          RFC 822 , 
   ,   ,
 ,  Postscript,  ..    RFC,
  ,    MIME, 
   Internet.  ,  
  ,    
   ASCII,    . 
 elm   .
       ,  Linux ,  
    ISO-8859-1,   
,   .    
 -1.        
     :
      Content-Type: text/plain; charset=iso-8859-1
             
    .  
    -  charset us-ascii.
             
ASCII, elm  ,    .  ,
 elm    charset    us-ascii, 
  ,  , 
metamail. ,  ,    ,
  " M "        .
        Linux   - ISO-8859-1,  metamail 
   ,   
.  lm ,    ISO-8859-1,  
  metamail,    .
   ,     

                               - 263 -

 elm .rc:



      displaycharset = iso-8859-1
       ,       ,
        ,
      ASCII.  -
  ,     
  mailer',    
:      ,   
  ascii .
      ,     elm .rc  . 
  ,    , elm 
    ,  
     .  ,  
   ASCII,     
 "^?".    ,    
LC CTYPE  ISO-8859-1,  ,   
 Latin-1  .     
    libc-4.5.8.
        ,    
 ISO-8859-1,   ,    
  elm .rc :
      charset = iso-8859-1
      textencoding = 8bit
        elm     ISO-8859-1 
 ,     8   ( 
 -   7 ).
      ,         
 elmrc   .



     15.  smail  

              smail,  
  ,   . 

                               - 264 -

smail      sendmail  , 
   .
         - /usr/lib/smail/config.  
   ,   ,
   .  , 
    ,  
.
       , smail     .
     ,   
 smail,       , 
   .
          TCP/IP , smail - 
  daemon :    , 
  rc.inet2,     ,    TCP
  SMTP  (  25).   
 ,     ,   smail
      .
      Smail   ,   
.  , smail    
- ,  ,    
  ,  rmail,  smtpd. 
      
 smail.
          smail,      
;   /usr/bin/rmail  /usr/sbin/sendmail.  
      
 elm,     rmail  . 
    ,    UUCP. 
 elm, ,  /usr/sbin/sendmail  rmail,   
  . ,    smail  /usr/local/bin,
  :



      # ln -s /usr/local/bin/smail /usr/bin/rmail
      # ln -s /usr/local/bin/smail /usr/sbin/sendmail

      ,       

                               - 265 -

 smail, ,    smail.
        Linux,  
    .

     15.1 UUCP 

        smail  uucp ,   
. ,   ,    
   rmail  sendmail,  .  
  SMTP    ,  
  rsmtp   smail.
       smail  Vince Skahan,    
.   config.sample    
/usr/lib/smail.       
 ,   ,   
.
      ,     swim .tobirds.com, 
   UUCP  swim.  smarthost - ulysses. 
      :
      #
      # Our domain names
      visible domain=two.birds:uucp
      #
      # Our name on outgoing mails
      visible name=swim.twobirds.com #
      # Use this as uucp-name as well uucp name=swim.twobirds.com
      #
      # Our smarthost
      smart host=ulysses
         smail  ,
   .    , 
.        UUCP,
    uucp.



       ()  , smail  
 host,  hostname   (2),   

                               - 266 -

   hostname.     
,   hostname, ,
 ,  smail   
.
          , 
    ,   
   .    
     .  
,   ,  smail 
  host (  hostname    ,
   ).
         ,  
 smart-host (   14.4).   
, smail      
  host. ,   
       
host.       UUCP,  
 ,   UUCP 
.     13.   ,
 UUCP.
        ,    ,
   ;  -  uucp.  
:  , smail  , 
hostname (2)  uucp-   
,    From .   hostname 
  UUCP ,   ,  smail
      .
   ,     uucp  
.
          /usr/lib/smail,  paths.sample.  -
  . ,      ,  
        .  , 
    ,  
   Usenet.        .





                               - 267 -

     15.2    

               ,
   (LAN),    
 host,    UUCP   
. ,      
,  vstout   UUCP .
          ,   
 mailbox    ,  nfs-
    .   
    ,    
 (  ,     
      ). ,
        .
  -  ,   , 
hostname. Janet, ,   janet@vbrew.com 
janet@vale.vbrew.com.   ,   
        .
          mailbox   host  
,   POP  IMAP. POP  
    ,   
mailbox  TCP/IP. IMAP,    
 POP,   .      IMAP  POP
   Linux,    sunsite.unc.edu 
/pub/Linux/system/Network.

     15.2.1   

           
:        vstout
     , 
 smart host. Vstout    
 smart host,     
;  host  moria.
             
 vstout   :

      #

                               - 268 -

      # Our domain:
      visible domain=vbrew.com
      #
      # What we name ourselves
      visible name=vbrew.com
      #
      # Smart-host routing: via SMTP to vstout
      smart path=vstout
      smart transport=smtp
          ,     uucp .
  - ,  , ,  
 smart host, , SMTP.    smail
     hostname   .
       UUCP  vstout,    :
      #
      # Our hostnames:
      hostnames=vbrew.com:vstout.vbrew.com:vstout
      #
      # What we name ourselves
      visible name=vbrew.com
      #
      # in the uucp world, we're known as vbrew.com
      uucp name=vbrew.com
      #
      # Smart transport: via uucp to moria
      smart path=moria
      smart transport=uux
      #
      # we're authoritative for our domain
      auth domains=vbrew.com
           , 
 smail,   host .  , 
      hostname 
,    .  
,     
hostname,  .   smail  janet@vbrew.com 
 ,    janet.


                               - 269 -



      Auth    ,   vstout
 .    smail   ,
 host .vbre.com,  host   
 ,      
.     ,   
  smart-host,     vstout,   ,
     -   
   .

     15.2.2  smail

      ,   ,   , smail  
daemon,   SMTP   smail   
,  SMTP     .
,    daemon   , 
        smail 
    .   
    
,    inetd   
 .
         ,     
 host,   ,   
     /etc/services:
smtp            25/tcp          # Simple Mail Transfer Protocol
        TCP  ,  smail 
  SMTP . 25 - , 
  RFC.
       daemon , smail   ,    
 SMTP .   ,    
SMTP    . Smail daemon  ,
  rc.inet2,   :
      /usr/local/bin/smail -bd -q15m
      -bd   daemon ,  -q15m  
    15 .



                               - 270 -


          inetd ,   /etc/inetd.conf,
  :
      smtp    stream  tcp nowait  root  /usr/sbin/smtpd smtpd
      Smtpd      smail . 
,     inetd - inetd.conf,
   HUP    .
      Daemon   inetd   .  
 smail  deamon ,   , 
    inetd.conf  smtp .
  inetd  smail, ,  rc.inet2 
 smail daemon.

     15.3    ...

       -     ,  
,       .
 ,    -  
smail.    /var/spool/smail/log,   logfile 
paniclog, .
         logfile   :
      04/24/94 07:12:04: [m0puwU8-00023UB] received
      |            from: root
      |         program: sendmail
      |            size: 1468 bytes
      04/24/94 07:12:04: [m0puwU8-00023UB] delivered
      |             via: vstout.vbrew.com
      |              to: root@vstout.vbrew.com
      |         orig-to: root@vstout.vbrew.com
      |          router: smart host
      |       transport: smtp



       ,    root  root@vstout.vbrew.com
   host vstout  SMTP.
       smail    ,   
 ,     :

                               - 271 -

      04/24/94 07:12:04: [m0puwU8-00023UB] received
      |            from: root
      |         program: sendmail
      |            size: 1468 bytes
04/24/94 07:12:04: [m0puwU8-00023UB] root@vstout.vbrew.com ... deferred
(ERR 148) transport smtp: connect: Connection refused
    ,   smail
 ,       vstout, 
     SMTP   vstout. 
 ,     ,  
TCP    smail binaries.
     ,    . 
  smail binaries,     Linux, 
     TCP/IP.    , 
  smail .  smail, 
 ,    TCP     telnet 
SMTP    .    SMTP ,
 :
      $ telnet localhost smtp
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.
      220 monad.swb.de Smail3.1.28.1 #6 ready at Sun, 23 Jan 94
      19:26 MET
      QUIT
      221 monad.swb.de closing connection
           SMTP  (,
  220 ),  ,  
   ,  
smail ,   .



            smail,   
    smail,   
 .      -d ,
  ,  
. Smail     ,   

                               - 272 -

      ,  
.

     15.3.1  smail

         ,  smail   TCP
 ,    .  
   ,      CD-ROM,
        FTP.
        smail,      
  newspak  Vince Skahan's. 
  TCP    ,  
     conf/EDITME
   bsd-  arpa-.   
 LAN,  Internet  arpa-.   
 -  ,        BIND
,     MX.

     15.4   

        , smail   
,        . ,
   , smail     
  /var/spool/smail.



             ,
       
, ,    .
          ,  
,     ;  
10  15 .    smail  daemon , 
   -q10m   .  
,    runq  cron   .
Runq     smail.
           ,   smail  -bp
.  ,    mailq   smail,   mailq:

                               - 273 -

      $ mailq -v
      m0pvB1r-00023UB From: root  (in /var/spool/smail/input)
                Date: Sun, 24 Apr 94 07:12 MET DST
        Args: -oem -oMP sendmail root@vstout.vbrew.com Log of transactions:
Xdefer:  reason: (ERR 148) transport smtp: connect:
Connection refused
         ,   . 
 ( ,    mailq -v )
   ,     
.
         ,      , smail
     ,   
     . 
SMTP ,     host;  
   ,    .



     15.5   

          ,   
   , ,   ,  
   smail,      
. ,    ,    
   :
 error copy postmaster -   , 
,      .
,    ,   -
 .    ,  
   ,    (+).
max hop count      (   
,  )     , 
     ,  
.  ,    
  .     
 Received:    ,    
   -h    .
         20.

                               - 274 -

postmaster   .    - root.

     15.6    

      Smail       ,
 , ,   .
           
,    host,     
,     . 
   ,   
UUCP  SMTP  .



       ,  ,   
  ,   .   
,        , 
     .
       smail,        .
   ,   ,    
 ,    .    smail  
,   routers, directors,  transports  /usr/lib/smail.  
  ,     .
     smail,  
,       smail 
,     /usr/lib/smail,  
   .    
  () 20.3.

     15.7  

        , smail ,   - 
host,   .    host   
 hostname,   , 
   . , smail   
  ,    host'
 .       routers; 
   ,     

                               - 275 -

 .
      Host      
,       .
 ,  joe@foo.bar.com. 
       
      bar.com ,     
   foo.bar.com .   - 
 ,   "
'',        
.



           ,
  ,  UUCP,   
 .        host. 
 , smail   ,  foo.bar.com
    UUCP   ernie!Bert.
     bert!Foo.bar.com!user,  
UUCP ,     ernie.
           , 
  :
+  ,   host    , 
gethostbyname  gethostbyaddr   , , 
  SMTP.   -   ,
    host.
      Smail    IP,    
,   hostname,      
 gethostbyaddr . , scrooge@ [149.76.12.4] 
 ,       scrooge 
quark.physics.groucho.edu.
           Internet,  
 -  ,   ,    
  MX. .      .
+   pathalias   (/usr/lib/smail/paths) , smail 
  host (   .uucp)   . 
 ,     
  UUCP,   ,    .

                               - 276 -

+  host (   .uucp)   
  uuname,      host
  UUCP.    ,  
  UUCP .
+ ,         
,    smart host.  smart host  
,      
.

             
,      .  
    ,  ,   
    .
          ,   host 
  ,       IP   
UUCP. smail       SMTP.  -
 ,   ,  ,    SLIP
 , SMTP -    
  UUCP.     ,  
    smail.
              
    ,   
     .     
  SMTP -,    
    .
          ,    
      Internet,
       
MX.      
 Internet,    , 
    BIND . , ,
smail binaries     Linux,  
  BIND.     BIND, 
   paniclog ,  "
 inet hosts:    '',   
    smail (.  15.2 ).
       ,       - 
uuname .

                               - 277 -




     15.7.1   

      Smail   pathalias      
/usr/lib/smail.   ,      
 pathalias ,     
.
      Paths     ASCII,  
,      UUCP. 
 ,   smail   
.      ,   
   ,   . Pathalias
      14 ..
           ,  
,       .
,        UUCP  
  ,     
  .     
   sort.
            ,   
paths,     :   
smart host    ,    
  .

     15.8    

      ,   -     
,      mailbox,
/var/spool/mail/user.       
,    .   , 
     ,    
  .
        "" , smail   
   ,   , 
 .  -  ,     
   /etc/passwd@vbrew.com.

                               - 278 -

        - -,      
(/)   (~).     
,   ,      a
.forward      mailbox (. ).  
, smail    ,    
.



            Unix, 
   (|).   smail 
    ,    " | ". 
       .
      ,      newsgroup, 
    ,  gateit, 
  ,    
    ,  " | gateit ".
          ,   
   . -    
,      
 (,  ,    , 
 ).

     15.8.1  

            -  mailbox
.  mailbox -  /var/spool/mail,   
.    ,   smail.
       , ,  /var/spool/mail -   
 ,   mailbox , 
      paths,
 ,  /usr/spool/mail.
           smail: mailer - daemon 
.       undeliverable,
      (
,      -  ). Mailer -
daemon       .
               ,

                               - 279 -

smail   mailer - daemon  postmaser,   
root, .      
   ,     
  .



     15.8.2 

            
 ,     ,
 smail.    
      Forward to recipient,...
    mailbox .     
  .   ,   
 a .forward     ,  
   .   
,      .
       ,      .
 ,   .forward    
      janet, "|vacation"
           mailbox janet,   
  vacation    .

     15.8.3  
      Smail    ,   
  sendmail Berkeley.     
 
      alias: recipients
      recipients -    ,  
 .     
   ,     
 .
        ,   smail
       : 
  ":include:filename"  , smail  
 ,      .


                               - 280 -



           - /usr/lib/aliases.
      - , smail 
    ,    .
   :
# vbrew.com /usr/lib/aliases file hostmaster: janet
      postmaster: janet
      usenet: phil
# The development mailing list. development: joe, sue, mark, biff
/var/mail/log/development
      owner-development: joe
# Announcements of general interest are mailed to all # of the staff
announce: :include: /usr/lib/smail/staff, /var/mail/log/announce
      owner-announce: root
# gate the foobar mailing list to a local newsgroup ppp-list: "|/usr/local/lib/gateit
local.lists.ppp"
           ,
   , smail  
      " ''.
    ,  
     .

     15.8.4    

       ,    , 
        
   /usr/lib/smail/lists.    ,
 nag-bugs   lists/nag-bugs,  
 ,  .     
 ,  .



           ,  
 - listname  ;   
      .  
       

                               - 281 -

  Sender:  .

     15.9 UUCP-

        ,   smail, 
 UUCP  .  UUCP ,  
,   rmail   host,    
       .  
host, rmail      smail.
          UUCP , smail
      UUCP. ,
user@host   host!user.   " % "
  ,   user%host@gateway 
gateway!User%host. , smail     
 .
        , smail     BSMTP
  UUCP.  BSMTP    
    ,  
,   mailer  ,    SMTP
  . BSMTP    
,    .  
   20.3   dubbed bsmtp
   BSMTP    .
       , 
  ,  
  HELO  QUIT.
         bsmtp   
 UUCP,       
(   smail   
).       UUCP,  
  smart host,    
SMTP ,    
   bsmtp  uux.
        SMTP   UUCP,  
,     . 
   smail,    rsmtp  smail.
    sendmail,  
   , 

                               - 282 -

/usr/bin/bsmtp,    " rsmtp".



     15.10 SMTP-
      Smail     SMTP , 
   TCP .    
      host,  hostname,
      
      
 ,     ,   
. , ,   BIND, gethostbyname 
gethostbyaddr      
SMTP .
      SMTP       host
  smtp     /etc/services.   
  ,   ,  
     .
        Internet ,    host 
    -,    14,  
  . smail   
user%host@gateway,  gateway   host1!host2!host3, 
   < @host2,@host3:user%host@gateway >,
    ,  host1.  
   (   
BIND),      smtp   
transports.   transports    20.3.



     15.11  Hostname

          hostname (
 ,     )   
  ,     
,      
.  Internet -UUCP ,  hostname  
  uucp   .   

                               - 283 -

.
       /usr/lib/smail/qualify  smail,   
   hostname.    qualify   hostname 
 ,   . ,
      
.    ,    .
         qualify  ,  hostname
    .
       hostname *   hostname, 
      ,  
     .   
   .
         ,    
 ,    
    .  
,  ,   uucp ,  
      qualify.
      # /usr/lib/smail/qualify, last changed Feb 12, 1994 by janet
      #
      *            uucp



     16. Sendmail + IDA

     16.1   Sendmail + IDA

       ,      
Unix,     sendmail.cf .    
,       :-)
      Sendmail -   .   
      .  , 
  (Sendmail,  O'Reilly and Associats)
  792 ,   .
      Sendmail + IDA -  .    
  sendmail.cf    
 -   
      

                               - 284 -

,  . sendmail + IDA  
     .
            , 
 ,         
sendmail + IDA.  ,  , 
 UUCP  Internet ,    .
,     ,
   .
        ,   sendmail5.67b + IDA1.5 
  FTP  vixen.cso.uiuc.edu.   
  ,   Linux.
        , ,   
sendmail + IDA,  , ,   
 Linux   newspak-2.2.tar.gz,  
   FTP  sunsite.unc.edu  
/pub/Linux/system/Mail.

     16.2   ---  

       sendmail    
 ( /etc/sendmail.cf  /usr/lib/sendmail.cf),  - 
   ,    .
 sendmail.cf ,   
    .

      Sendmail + IDA       
    ,  
      ,  
.   ,   m4
( )  dbm (  )  
   Make-,  .
      Sendmail.cf      
 .     
        
sendmail.cf .




                               - 285 -

     16.3 Sendmail.cf 

      Sendmail.cf   sendmail + IDA  
,    m4  ,
   .  ,
      sendmail.m4.
             
  ,    . ,
  :
+     ,    .
+    .
+     mailer (  smart host)
.
         ,   
,      . 
     ida/cf/OPTIONS 
 .
       sendmail.m4    (UUCP 
SMTP   - ,   
 smart-host)    10  15 , 
.



Mailertable      
  .
Uucpxtable    UUCP   , 
   DNS.
Pathtable  UUCP      
.
Uucprelays  pathalias    
 .
Genericfrom     ,
  .
Xaliases    \ 
.
Decnetxtable  RFC-822    DECnet-.


                               - 286 -

     16.3.1   Sendmail.m4

       sendmail.m4  vstout    
 . Vstout  SMTP,   
    LAN  ,   
     moria, host  Internet,  UUCP.

     16.3.2   sendmail.m4 

          sendmail.m4  ; 
 ,      
  .     
   sendmail.m4   .



dnl #------------------ SAMPLE SENDMAIL.M4 FILE ------------------
dnl # (the string 'dnl' is the m4 equivalent of commenting out a line)
dnl # you generally don't want to override LIBDIR from the compiled in paths
dnl #define(LIBDIR,/usr/local/lib/mail)dnl      # where all support files go
      define(LOCAL MAILER DEF, mailers.linux)dnl        # mailer for local delivery
      define(POSTMASTERBOUNCE)dnl       # postmaster gets bounces
      define(PSEUDODOMAINS, BITNET UUCP)dnl     # don't try DNS on these
dnl #-------------------------------------------------------------
      dnl #
      define(PSEUDONYMS, vstout.vbrew.com  vstout.UUCP vbrew.com)
      dnl               # names we're known by
      define(DEFAULT HOST, vstout.vbrew.com)dnl # our primary 'name' for
mail
      define(UUCPNAME, vstout)dnl       # our uucp name
      dnl #
dnl #-------------------------------------------------------------
      dnl #
      define(UUCPNODES, |uuname|sort|uniq)dnl   # our uucp neighbors
      define(BANGIMPLIESUUCP)dnl        # make certain that uucp
      define(BANGONLYUUCP)dnl   #  mail is treated correctly
      define(RELAY HOST, moria)dnl      # our smart relay host
      define(RELAY MAILER, UUCP-A)dnl   # we reach moria via uucp

                               - 287 -

      dnl #
dnl #--------------------------------------------------------------------dnl #
      dnl # the various dbm lookup tables
      dnl #
      define(ALIASES, LIBDIR/aliases)dnl        # system aliases
      define(DOMAINTABLE, LIBDIR/domaintable)dnl        # domainize hosts
      define(PATHTABLE, LIBDIR/pathtable)dnl    # paths database
      define(GENERICFROM, LIBDIR/generics)dnl   # generic from addresses
      define(MAILERTABLE, LIBDIR/mailertable)dnl        # mailers per host or
domain
      define(UUCPXTABLE, LIBDIR/uucpxtable)dnl  # paths to hosts we feed
      define(UUCPRELAYS, LIBDIR/uucprelays)dnl  # short-circuit paths
      dnl #
dnl #--------------------------------------------------------------------dnl #
      dnl # include the 'real' code that makes it all work
      dnl # (provided with the source code)
      dnl #
      include(Sendmail.mc)dnl     # REQUIRED ENTRY !!!
      dnl #
      dnl #------------ END OF SAMPLE SENDMAIL.M4 FILE -------



     16.3.2.1 ,   

      dnl #define(LIBDIR,/usr/local/lib/mail)dnl  # where all support files go

      LIBDIR  ,  sendmail + IDA  
 ,  dbm ,  
 .    , 
  sendmail binary       
 send-mail.m4.
        dnl,    
 -       .
            ,
 dnl   ,   
 ,  ,   
sendmail.cf .

                               - 288 -


     16.3.2.2   Mailer'

      define(LOCAL MAILER DEF, mailers.linux)dnl  # mailer for local delivery
           
   .    
    Unix    sendmail binary.
       Linux,     
mailer,        
 ,   .   LOCAL
MAILER DEF   sendmail.m4.
      ,   LOCAL MAILER DEF  mailers.linux.
             mailers.linux 
,  LIBDIR.      Mlocal
mailer   ,  sendmail 
 ,    .



          sendmail,     
 .
   # -- /usr/local/lib/mail/mailers.linux --
   #     (local mailers for use on Linux )
Mlocal, P=/usr/bin/deliver, F=SlsmFDMP, S=10, R=25/10, A=deliver $u
Mprog,  P=/bin/sh,         F=lsDFMeuP,   S=10, R=10, A=sh -c $u
             deliver 
Sendmail.mc ,     sendmail.cf. 
 ,     mailers.linux   
     sendmail.m4:
      dnl --- (in sendmail.m4) ---
      define(LOCAL MAILER DEF, DELIVER)dnl       # mailer for local delivery
       , Sendmail.mc ,  deliver   /bin,
    Slackware1.1.1 (    /usr/bin).  
         deliver
   /bin.




                               - 289 -



     16.3.2.3  Bounced-

      define(POSTMASTERBOUNCE)dnl                # postmaster gets bounces
        ,   ,   
     100 %.   sys-logd
      
,     -   
      .
       POSTMASTERBOUNCE    
  ,    .



       ,      
  ,   .

     16.3.2.4   

      define(PSEUDODOMAINS, BITNET UUCP)dnl       # don't try DNS on
these
         ,    
    ,     
 DNS.  PSEUDODOMAINS 
 DNS  ,    
.

     16.3.2.5   

define(PSEUDONYMS, vstout.vbrew.com  vstout.UUCP vbrew.com)dnl      #
names we're known by
define(DEFAULT HOST, vstout.vbrew.com)dnl   # our primary 'name' for mail
      ,      ,  
  ,     , 
 "  " .
      PSEUDONYMS    hostname,  
   .

                               - 290 -

      DEFAULT HOST  hostname,   
    host.



     16.3.2.6 Uucp- 

define(UUCPNAME, vstout)dnl                 # our uucp name
define(UUCPNODES, |uuname|sort|uniq)dnl     # our uucp neighbors
define(BANGIMPLIESUUCP)dnl                  # make certain that uucp
define(BANGONLYUUCP)dnl                     #  mail is treated correctly
      ,        DNS 
   UUCP. UUCPNAME   
 hostname,      
UUCP.
      UUCPNODES  ,   
hostnames  ,      
 UUCP .
      BANGIMPLIESUUCP  BANGONLYUUCP ,  ,
  UUCP    UUCP, 
   DNS,    Internet.

     16.3.2.7 Relay-  Mailer'

define(RELAY HOST, moria)dnl     # our smart relay host
define(RELAY MAILER, UUCP-A)dnl             # we reach moria via UUCP
RELAY HOST  UUCP hostname  
 (      ).
RELAY MAILER  mailer, ,   
.
        ,    
         , 
     . ,  
     ,  
  ,     
 relay host.



                               - 291 -


     16.3.2.8   

define(ALIASES, LIBDIR/aliases)dnl      # system aliases
define(DOMAINTABLE, LIBDIR/domaintable)dnl  # domainize hosts
define(PATHTABLE, LIBDIR/pathtable)dnl  # paths database
define(GENERICFROM, LIBDIR/generics)dnl # generic from addresses
define(MAILERTABLE, LIBDIR/mailertable)dnl          # mailers per host or
domain
define(UUCPXTABLE, LIBDIR/uucpxtable)dnl        # paths to hosts we feed
define(UUCPRELAYS, LIBDIR/uucprelays)dnl        # short-circuit paths
        ,    , 
sendmail + IDA   dbm ,  
 .      LIBDIR.

     16.3.2.9   Sendmail.mc

      include(Sendmail.mc)dnl   # REQUIRED ENTRY !!!
       sendmail + IDA   Sendmail.mc, 
 "" ,    sendmail.cf.
   ,   
       
 sendmail  .
          .

     16.3.2.10     ?

         dbm , sendmail + IDA  
 DEFAULT MAILER (  RELAY HOST  RELAY
MAILER)    sendmail.m4, , 
 sendmail.cf.      
  domaintable  uucpxtable.
           DEFAULT HOST,
 PSEUDONYMS,    
,  DEFAULT MAILER.      -  relay host 
relay mailer,        ,
    .


                               - 292 -



      UUCP       
UUCPNAME     UUCP.   
 RELAY MAILER,  RELAY HOST,  
  smart-host  relay . 
,      RELAY MAILER 
   UUCP-A  UUCP .
          SMTP   "Domain Name Service ",
   DEFAULT MAILER  TCP-A  
  RELAY HOST  RELAY MAILER.

     16.4  Sendmail + IDA 

      Sendmail + IDA   ,   
     sendmail (  
sendmail.m4)      
,  ,  .   
dbm  Make-,  .
             
.       ,   ,
,      ( touch) 
    Make-  LIBDIR,  
 Make- .

     16.4.1 Mailertable

      Mailertable     
   ,    host 
 .      Internet, 
  relay host    gateway, 
  ,    
(UUCP  SMTP). UUCP     
 .
       . Sendmail  ,   
   ,   . 
         
   .

                               - 293 -




      ,        
   Groucho Marx  UUCP relay host ada.
  ,     mailertable,   
:
      # (in mailertable)
      #
# forward all mail for the domain .cs.groucho.edu via UUCP to ada UUCP-
A,ada         .cs.groucho.edu
      ,        groucho.edu
    relay host - bighub.   mailertable
  :
      # (in mailertable)
      #
# forward all mail for the domain cs.groucho.edu via UUCP to ada UUCP-A,ada
.cs.groucho.edu
      #
# forward all mail for the domain groucho.edu via UUCP to bighub UUCP-
A,bighub      .groucho.edu
        ,  .   
 ,        
.cs.groucho.edu    bighub    ada
,   .
      # (in mailertable)
      #
# forward all mail for the domain .groucho.edu via UUCP to bighub UUCP-
A,bighub     .groucho.edu
      #
      # (it is impossible to reach the next line because
      #    the rule above will be matched first)
      UUCP-A,ada        .cs.groucho.edu
      #
        mailertable , UUCP-A mailer  sendmail
 UUCP    .



                               - 294 -


        mailer'     
   ada  .
      Mailertable ()  :
      mailer delimiter relayhost             host or domain
         mailer'.  -   ,  
 .  mailer' - TCP-A (TCP/IP   -
 Internet), TCP-U (TCP/IP   uucp-),  UUCP-A
(UUCP   - Internet).
      ,   mailer  host    mailertable,
,    mailertable.
!    hostname   
 mailer'.   ,      
  .
,     .    
  mailer  relay host.
:   hostname  ,  
      .  
 foo!bar!Joe   foo,     xyzzy!Janet 
.

     16.4.2 Uucpxtable

      ,      
      Internet
(SMTP),  Domain Name Service (DNS),   relay host.
Uucpxtable     UUCP,
    hostname UUCP-.


        ,      
           
     UUCP,      
   mailer      .
       UUCP,      UUCP, 
      ,  
  ,       UUCP
    ,     

                               - 295 -

   RELAY MAILER  RELAY HOST   DEFAULT
MAILER.
       Internet,     UUCP   
uucpxtable.
      ,       
,  sesame.com  DNS  sesame   UUCP. 
     uucpxtable,      host
     UUCP.

      #============== /usr/local/lib/mail/uucpxtable ============
      # Mail sent to joe@sesame.com is rewritten to sesame!joe and
      # therefore delivered via UUCP
      #
      sesame          sesame.com
      #
      #----------------------------------------------------------

      16.4.3  pathtable

      Pathtable ,     
    .  pathtable    
pathalias-,    .     
    .
              pathtable.

      #=============== /usr/local/lib/mail/pathtable ================
      #
      # this is a pathalias-style paths file to let you kick mail to
      # UUCP neighbors to the direct UUCP path so you don't have to
      # go the long way through your smart host that takes other traffic
      #
      # you want real tabs on each line or m4 might complain
      #
      # route mail through one or more intermediate sites to a remote
      # system using UUCP-style addressing.
      #
      sesame!ernie!%s        ernie
      #

                               - 296 -

      # forwarding to a system that is a UUCP neighbor of a reachable
      # internet site.
      #
      swim!%s@gcc.groucho.edu    swim
      #
      # The following sends all mail for two networks through different
      # gateways (see the leading '.' ?).
      # In this example, "uugate" and "byte" are specific systems that serve
      # as mail gateways to the .UUCP and .BITNET pseudo-domains respectively
      #
      %s@uugate.groucho.edu           .UUCP
      byte!%s@mail.shift.com          .BITNET
      #
      #=================== end of pathtable =======================

      16.4.4  domaintable

      Domaintable  ,    
 ,   DNS .    
        ,
     .   
,    host     "
 ".
              domaintable.
  ,     
 :

      #============= /usr/local/lib/mail/domaintable =================
      #
      #
      brokenhost.correct.domain         brokenhost.wrong.domain
      #
      #
      #=================== end of domaintable ========================

      16.4.5  aliases

      Aliases( )   :

                               - 297 -


+         , 
       .

+          .

+     .

         aliases  .
            aliases, 
     ,   sendmail 
 setuid-root.
         aliases,    

      # /usr/lib/sendmail -bi

,    dbm .   
 ,    newaliases,   cron.

      #--------------------- /usr/local/lib/mail/aliases ------------------
      #
      # demonstrate commonly seen types of aliases
      #
      usenet:           janet           # alias for a person
      admin:            joe,janet       # alias for several people
      newspak-users:  :include:/usr/lib/lists/newspak
      # read recipients from a file changefeed: | /usr/local/lib/gup
      # alias that invokes a program
      complaints:       /var/log/complaints
      # alias that writes mail to a file
      #
      # The following two aliases must be present to be RFC-compliant.
      # It is important to have them resolve to 'a person'
      # who reads mail routinely.
      #
      postmaster:       root            # required entry
      MAILER-DAEMON:  postmaster        # required entry
      #

                               - 298 -

      #-------------------------------------------------------------------

      16.4.6   

        ,    .
  ,    sendmail + IDA 
.

Uucprelays     uucprelays    "  " 
UUCP     ,      
host   , ,    UUCP 
pathalias.

Genericfrom  xaliases     genericfrom   usernames  
  ,   () 
usernames    ,   
 usernames.
        xalparse    genericfrom 
 aliases ,      username 
    xaliases.

Decnetxtable        
decnet-,    domaintable,  , 
         
   smtp-.

      16.5  sendmail

        ,      
 sendmail + IDA,     ,  
   .
         sendmail + IDA  Linux  
  sunsite.unc.edu  /pub/Linux/system/Mail.     
  sendmail,   ,   
sendmail5.67b + IDA1.5.
         sendmail  ,   
   README,    . 
 sendmail + IDA   vixen.cso.uiuc.edu.  

                               - 299 -

sendmail + IDA  Linux,     Linux - 
  newspak-2.2.tar.gz,     sun-
site.unc.edu   /pub/Linux/system/Mail.
          smail    
,     ( )    smail
 .

      16.5.1   

      ,        
:

$ gunzip -c sendmail5.65b+IDA1.5+mailx5.3b.tgz | tar xvf -

         "" tar,    Slackware, 
   tar -zxvf filename.tgz      .
         ,  sendmail5.65b +IDA1.5+
mailx5.3b.   ,     sendmail +
IDA  mailx.  paths      ,
    ,     
tar:

      # cd sendmail5.65b+IDA1.5+mailx5.3b
      # tar cf - . | (cd /; tar xvvpoof -)

      16.5.2  sendmail.cf

         sendmail.cf,    , 
   sendmail.m4,     m4.  /usr/local/lib/mail/CF,
     sample.m4.   
yourhostname.m4,  ,     .
        ,       ,
   .    ,   ,
,      sendmail.m4.

LOCAL MAILER DEF  ,   mailer 
  . .  "   Mailer' "
.

                               - 300 -


PSEUDONYMS   ,   host.

DEFAULT HOST      
.      hostname    .

UUCPNAME     hostnmae.

RELAY HOST  RELAY MAILER    UUCP smart-host
 RELAY HOST  UUCP   " 
 " uucp .  UUCP-A mailer,   
    .

DEFAULT MAILER     Internet   DNS, 
    TCP-A.  ,  sendmail 
TCP-A mailer,     SMTP   RFC
  .  Internet    
RELAY HOST or RELAY MAILER.

         sendmail.cf,  

      # make yourhostname.cf

         yourhostname.m4   yourhostname.cf  .
      ,   ,    ,  
,  ,   .      .
          ,    
:

      # cp yourhostname.cf /etc/sendmail.cf

         sendmail   .  
     ( /etc/rc.inet2).  
   ,    .

      # /usr/lib/sendmail -bd -q1h

      16.5.3   sendmail.cf

                               - 301 -


        "  " ,   sendmail  -bt
.      -  sendmail.cf,
   .     ,
 -Cfilename .
        ,   vstout.cf  ,
   vstout.m4.

      # /usr/lib/sendmail -bt -Cvstout.cf
      ADDRESS TEST MODE
      Enter  
[Note: No initial ruleset 3 call] > , sendmail . mailer'. , . # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > 3,0 me rewrite: ruleset 3 input: me rewrite: ruleset 7 input: me rewrite: ruleset 9 input: me rewrite: ruleset 9 returns: < me > rewrite: ruleset 7 returns: < > , me rewrite: ruleset 3 returns: < > , me rewrite: ruleset 0 input: < > , me rewrite: ruleset 8 input: < > , me rewrite: ruleset 20 input: < > , me rewrite: ruleset 20 returns: < > , @ vstout . vbrew . com , me rewrite: ruleset 8 returns: < > , @ vstout . vbrew . com , me rewrite: ruleset 26 input: < > , @ vstout . vbrew . com , me rewrite: ruleset 26 returns: $# LOCAL $@ vstout . vbrew . com $: me - 302 - rewrite: ruleset 0 returns: $# LOCAL $@ vstout . vbrew . com $: me sendmail . ruleset, , ruleset , . , ruleset 3 0 ( - 3,0 ). ruleset 0. , UUCP. # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > 3,0 vstout!me rewrite: ruleset 3 input: vstout ! me [...] rewrite: ruleset 0 returns: $# LOCAL $@ vstout . vbrew . com $: me > , , Internet hostname. # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > 3,0 me@vstout.vbrew.com rewrite: ruleset 3 input: me @ vstout . vbrew . com [...] rewrite: ruleset 0 returns: $# LOCAL $@ vstout . vbrew . com $: me > , PSEUDONYMS DEFAULT NAME sendmail.m4. , relay host. # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE - 303 - Enter
[Note: No initial ruleset 3 call] > 3,0 fred@moria.com rewrite: ruleset 3 input: fred @ moria . com rewrite: ruleset 7 input: fred @ moria . com rewrite: ruleset 9 input: fred @ moria . com rewrite: ruleset 9 returns: < fred > @ moria . com rewrite: ruleset 7 returns: < @ moria . com > , fred rewrite: ruleset 3 returns: < @ moria . com > , fred rewrite: ruleset 0 input: < @ moria . com > , fred rewrite: ruleset 8 input: < @ moria . com > , fred rewrite: ruleset 8 returns: < @ moria . com > , fred rewrite: ruleset 29 input: < @ moria . com > , fred rewrite: ruleset 29 returns: < @ moria . com > , fred rewrite: ruleset 26 input: < @ moria . com > , fred rewrite: ruleset 25 input: < @ moria . com > , fred rewrite: ruleset 25 returns: < @ moria . com > , fred rewrite: ruleset 4 input: < @ moria . com > , fred rewrite: ruleset 4 returns: fred @ moria . com rewrite: ruleset 26 retu rns < @ moria . com > , fred rewrite: ruleset 0 returns: $# UUCP-A $@ moria $: < @ moria . com > , fred > 16.5.4 - sendmail.cf . , dbm , . , , , dbm make , . UUCP , , README.linux . , Make- . UUCP smart-host, uucpxtable - 304 - ( smart host) dbm uucpxtable. , RELAY HOST, RELAY MAILER. # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > 3,0 fred@sesame.com rewrite: ruleset 3 input: fred @ sesame . com rewrite: ruleset 7 input: fred @ sesame . com rewrite: ruleset 9 input: fred @ sesame . com rewrite: ruleset 9 returns: < fred > @ sesame . com rewrite: ruleset 7 returns: < @ sesame . com > , fred rewrite: ruleset 3 returns: < @ sesame . com > , fred rewrite: ruleset 0 input: < @ sesame . com > , fred rewrite: ruleset 8 input: < @ sesame . com > , fred rewrite: ruleset 8 returns: < @ sesame . com > , fred rewrite: ruleset 29 input: < @ sesame . com > , fred rewrite: ruleset 29 returns: < @ sesame . com > , fred rewrite: ruleset 26 input: < @ sesame . com > , fred rewrite: ruleset 25 input: < @ sesame . com > , fred rewrite: ruleset 25 returns: < @ sesame . com > , fred rewrite: ruleset 4 input: < @ sesame . com > , fred rewrite: ruleset 4 returns: fred @ sesame . com rewrite: ruleset 26 returns: < @ sesame . com > , fred rewrite: ruleset 0 returns: $# UUCP-A $@ moria $: < @ sesame . com > , fred > UUCP RELAY HOST, , . , UUCP host, UUCP, ( domaintable). , swim host - UUCP . swim!Fred sendmail : - 305 - # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > 3,0 swim!fred rewrite: ruleset 3 input: swim ! fred [...lines omitted...] rewrite: ruleset 0 returns: $# UUCP $@ swim $: < > , fred > uucpxtable, UUCP UUCP , Internet , . # /usr/lib/sendmail -bt -Cvstout.cf ADDRESS TEST MODE Enter
[Note: No initial ruleset 3 call] > 3,0 dude@swim.2birds.com rewrite: ruleset 3 input: dude @ swim . 2birds . com [...lines omitted...] rewrite: ruleset 0 returns: $# UUCP $@ swim . 2birds $: < > , dude > 16.6 , , , sendmail + IDA, , , . . , DNS - . . , , , , , , . , " ". - 306 - 16.6.1 host , mailertable. , backwood.org GATEWAY UUCP, mailertable: UUCP-A,backdoor backwood.org 16.6.2 , Internet - . , - . , ( , , ). , . - , . , , - . , , . + , , -, ..., - . domaintable host, , : braindead.correct.domain.com braindead.wrong.domain.com - 307 - ! mailertable , . , , . TCP!braindead.correct.domain.com braindead.wrong.domain.com 16.6.3 , UUCP ( Internet), Domain Name Service (DNS) . , , UUCP , UUCP, mailer " " hostname uucpxtable. UUCP sesame.com, uucpxtable: # un-domainize sesame.com to force UUCP delivery sesame sesame.com - sendmail, ( UUCPNODES sendmail.m4) , UUCP. 16.6.4 UUCP . UUCP, mailer relay host. , Seattle , Linux UUCP, . UUCP , ( ) . UUCP host, . - 308 - , domaintable: # prevent mail delivery via UUCP to a neighbor snorkel.com snorkel UUCP FQDN, UUCPNODES sendmail.m4. - RELAY MAILER RELAY HOST ( DEFAULT MAILER). 16.6.5 Sendmail , "/usr/lib/runq ". sendmail , . 16.6.6 ( ) , , , . . + Sendmail , mailstats, /usr/local/lib/mail/sendmail.st , mailer' sendmail.cf. sendmail. , sendmail.st . , : # cp /dev/null /usr/lib/local/mail/sendmail.st + , , , , , syslogd (8). , /etc/syslogd daemon ( ), /etc/syslog.conf (5) : mail.debug /var/log/syslog.mail - 309 - mail.debug , syslog . syslogd crond (8). , syslogd. - syslog-stat.pl, perl, sendmail + IDA. 16.7 " . " , , (USENET , , TCP/IP) (lmail, deliver, ..), (rmail), (sendmail smail). , , . - , . + NET-2 TCP/IP , , umail sendmail. + elm mailx, /usr/bin/smail sendmail. + Sendmail + IDA mailer deliver, , /bin, Linux /usr/bin. 16.8 , sendmail. . Linux MAIL Howto comp.answers. FTP rtfm.mit.edu. , sendmail + IDA. - 310 - ida/cf DBM-GUIDE, OPTIONS, Sendmail.mc. 17. Netnews 17.1 Usenet 1979 Tom Truscott Jim Ellis UUCP Unix. . , ( C), . "" , . "" , . , ark Horton Matt Glickman, "B" (a.k.a. Bnews). Bnews - 2.1 1982. , . - Bnews 2.11. . 1987 Geoff Collyer Henry Spencer; - " "C", C. - C, Linux. " " C " " UUCP, . TCP/IP, DECNet . , 1986 " '', NNTP. , , . nntp- , . - nntpd Brian Barber Phil Lapsley, NNTP - INN, Internet. , . 17.2 Usenet, ? - 311 - Usenet - , , . , - Usenet , . , , . , Usenet , Usenet . Usenet - . . , Internet, RFC 822, , , , . (1) newsgroups. newsgroup . newsgroups , , . , newsgroup, comp.os.linux.announce Linux. 17.3 Usenet ? , Usenet . , netnews - . (2) . , Unix Usenet . transports. UUCP, Internet. : . , . , Usenet ID ( Message-ID:), " ''. , ID , . - 312 - , . UUCP, , . , . , Internet TCP/IP , , NNTP. Usenet . 18. "C" Netnews - C. , UUCP. C, . C (C News) /usr/lib/news, binaries /usr/lib/news/bin. /var/spool/news. , . , C. , , su , - . - setnewsids, , id . root setuid . C News , , , . 18.1 C News . , newsreader inews, . , , rnews, /var/spool/newsin.coming, newsrun. , , relaynews. - 313 - , relaynews , , id . . , relaynews Newsgroups: , , . , , relaynews . , . Id . , relaynews . relaynews , , , , junk. relaynews . , , /var/spool/news/in.coming/bad, . 18.2 C News 'tar' , , , . /usr/lib/news. . ( ), , . - moria, : ME:all/all:: moria/moria.orcnet.org:all/all,!local:f: organization . , " ". , " '', - , , . , . newsgroups ... - 314 - mailname , vbrew.com. whoami . UUCP, vbrew. explist , newsgroups. . newsgroups, active newsgroups , , /usr/lib/news. to.* active , to.mysite to.feedsite, junk control. To.* ihave/sendme , , ihave/sendme . , active, : # cp active active.old # sed 's/ [0-9]* [0-9]* / 0000000000 00001 /' active.old > active # rm active.old - sed (1), Unix. 000001, . , , : # cd /var/spool # mkdir news news/in.coming news/out.going # chown -R news.news news # chmod -R 755 news C News, out.master . newsreaders C News, , /usr/spool/news /var/spool/news. newsreader , , /usr/spool/news /var/spool/news. , . , - 315 - , C News , , . C News , . , - usenet. , . , NEWSMASTER . 18.3 sys /usr/lib/news, . , addfeed delfeed, , . sys , , . site[/exclusions]:grouplist[/distlist][:flags[:cmds]] , (\). (*) . site . UUCP . sys, . ME . C News Path: , , . , news.site.domain. , . , moria, , moria/moria.orcnet.org. Grouplist - . , ( comp.os , - 316 - ), all ( comp.os.all). , . newsgroup , , . , grouplist !comp,comp.os.linux,comp.folklore.computers comp comp.folklore.computers comp.os.linux . , , grouplist. Distlist - grouplist , , . , , . all. distlist . , all,!Local, . : world, , local. , , , , .. , , C News; - sendme ihave, sendme/ihave . feed. , : F . f F , C News . I C News , ihave/sendme. sys batchparms - 317 - , ihave/sendme. n active NNTP nntpxmit (. 19.). id . L , C News , . n, C News , n . C News Path:. u C News unmoderated. m C News . F, f, I, n. cmds , , . . ; . uux - -r -z system!rnews rnews , . , - /bin:/usr/bin:/usr/lib/news/bin/batch. , via; . , F f, I n , C News , . (/), /var/spool/news/out.going. , system/togo. C News, sys. , vbrew.com , , . - 318 - # We take whatever they give us. ME:all/all:: # We send everything we receive to moria, except for local and # brewery-related articles. We use batching. moria/moria.orcnet.org:all,!to,to.moria/all,!local,!brewery:f: # We mail comp.risks to jack@ponderosa.uucp ponderosa:comp.risks/all::rmail jack@ponderosa.uucp # swim gets a minor feed swim/swim.twobirds.com:comp.os.linux,rec.humor.oracle/all,!local:f: # Log mail map articles for later processing usenet- maps:comp.mail.maps/all:F:/var/spool/uumaps/work/batch 18.4 active active /usr/lib/news , , . , . : newsgroup high low perm Newsgroup, , . Low high - , . , low = high + 1. Perm - , . : y . n . , . x . , - 319 - ( ) , . , , , . m . , newsreader , . /usr/lib/news. =real-group newsgroup , real-. , newsgroup . C News, . , addgroup delgroup (. 18.10). Usenet, , newgroup rmgroup , . ! , newsgroup, news.announce.newusers. , active - active.times. , , C News , , , c , . - newsreaders, . NEWGROUPS NNTP. 18.5 Newsbatches , Bnews, C News, INN. : #! rnews count count - . , , c , . - , - 320 - #! cunbatch , , , , , , c7-encoding; c7unbatch. rnews , . , gzip, zunbatch . C News ; , . C News, /usr/lib/news/bin/batch/sendbatches, site/togo , newsbatches. , . batchparms /usr/lib/news. , , , , . , , . , # su news -c "/usr/lib/news/bin/batch/sendbatches site" , sendbatches . " " batchparms. , /var/spool/news/out.going , , batchparms. , sendbatches, out.going, , (@) . C News, batchparms , , . - 321 - , . , : site size max batcher muncher transport : site - , . Togo out.going/togo. /default/ . size - ( ). , C News . max - , . C News , queulen /usr/lib/news/bin. newspak Vince Skahan' bnu- UUCP. spool , , Taylor UUCP, . batcher , togo . - batcher. . , ihave/sendme , ihave sendme, newsgroup to.site. batchih batchsm. muncher , . , - compcun, , . , muncher, gzip, gzipcun ( : ). , , , gzip. , nocomp, . , transport, , . transports, via. Sendbatches . batchparms /default/, site, , - 322 - . /default/, out.going. , uux, rnews ; viauux viauuxz. -z ( ) uux, . , viamail, rnews . out.going/site /usr/lib/news/bin/batch. - , , . . , . muncher, . . # batchparms file for the brewery # site | size |max |batcher |muncher |transport #-------------+--------+-------+---------+-----------+----------- /default/ 100000 22 batcher compcun viauux swim 10000 10 batcher nocomp viauux 18.6 Bnews, expire, newsgroups , . , , ; , , comp.sources.unix. . Explist . explist : grouplist perm times archive Grouplist - newsgroups, . , . , , comp.os, comp.os - 323 - comp.os.all grouplist. , explist . . , comp , comp.os.linux.announce, , , - , comp, . perm , , . m, u, x, , , . , times, . - , , Expires . , - , . times , , . , . , , . . - , . - , , Expires . , . , /bounds/ , . , archive, , newsgroup , . , . , ( ), (@). , doexpire, -a . news. doexpire , comp.sources.unix, comp/sources/unix , . , , . explist , doexpire . newsgroups, /bounds/ /expired/. /bounds/ - 324 - , . /expired/ , C News . , C News , , , . explist : # keep history lines for two weeks. Nobody gets more than three months /expired/ x 14 - /bounds/ x 0-1-90 - # groups we want to keep longer than the rest comp.os.linux.announce m 10 - comp.os.linux x 5 - alt.folklore.computers u 10 - rec.humor.oracle m 10 - soc.feminism m 10 - # Archive *.sources groups comp.sources,alt.sources x 5 @ # defaults for tech groups comp,sci x 7 - # enough for a long weekend misc,talk x 4 - # throw away junk quickly junk x 1 - # control messages are of scant interest, too control x 1 - # catch-all entry for the rest of it all x 2 - C News, . , newsreader active, . , C News . , , , updatemiin doexpire. 18.7 - 325 - , C News, . /usr/lib/news. . newsgroups - active, newsgroup, . , C News checknews (. 18.8). localgroups , , C News , checknews , , newsgroups. mailpaths . , email ( ). . . --- bang-path --- , , RFC 822 (user@host). , smail sendmail, RFC 822 - . , , . newsgroup -- alt.sewer, path!%s, C News path!alt-sewer, , . , , . uunet.uu.net!%s. distributions C News, newsreaders, nntpd. , , () . , : world everywhere in the world - 326 - local Only local to this site nl Netherlands only mugnet MUGNET only fr France only de Germany only brewery Virtual Brewery only log , C News. , newsdaily; log.o, log.oo, .. errlog - , C News. , .. newsmaster (usenet ) newsdaily, -. Errlog newsdaily. errlog.o . . batchlog sendbatches. . newsdaily. watchtime - , newswatch. 18.8 Usenet , . . Control , , . , , /usr/lib/news/ctl. C News, , newsmaster. , checkgroups newsmaster, , . 18.8.1 - , - 327 - , . spool, . , , , . , . ; - . 18.8.2 Newgroup rmgroup newsgroups - newgroup rmgroup. Newsgroups " " , Usenet . , alt - . . news.announce.newusers news.announce.newgroups. newgroup rmgroup , , . 18.8.3 Checkgroups Checkgroups , active Usenet. , Internet . "" checkgroups comp.announce.newgroups . , , , . checkgroups, , /tmp/check, , checkgroups , : # su news -c "/usr/lib/news/bin/ctl/checkgroups" < /tmp/check newsgroups , , localgroups. newsgroups newsgroups.bac. , - 328 - , inews . C News checkgroups active, , , . : From news Sun Jan 30 16:18:11 1994 Date: Sun, 30 Jan 94 16:18 MET From: news (News Subsystem) To: usenet Subject: Problems with your active file newsgroups . alt.ascii-art bionet.molbio.gene-org comp.windows.x.intrisics de.answers , : /usr/lib/news/bin/maint/delgroup alt.ascii-art /usr/lib/news/bin/maint/delgroup bionet.molbio.gene-org /usr/lib/news/bin/maint/delgroup comp.windows.x.intrisics /usr/lib/news/bin/maint/delgroup de.answers newsgroups . comp.binaries.cbm comp.databases.rdb comp.os.geos comp.os.qnx comp.unix.user-friendly misc.legal.moderated news.newsites soc.culture.scientists talk.politics.crypto talk.politics.tibet - 329 - , . , checkgroups , ; . , , , addgroup . : #!/bin/sh cd /usr/lib/news while read group; do if grep -si "^$group[[:space:]].*moderated" newsgroup; then mod=m else mod=y fi /usr/lib/news/bin/maint/addgroup $group $mod done 18.8.4 sendsys, version, senduuname , , , . - sendsys, version, senduu- . C News sys, , uuname (1), . C News - version; "C". , , , () . sendsys UUCP. 18.9 C News NFS , host, NFS, , newsreader - 330 - . NNTP - , , . NNTP, , , , . NFS, , host . , spool , , , . C News . , newsreader inews, . , , /usr/lib/news. hostname host, inews host rsh. inews C News, C News, , . rsh , , . , hostname, hostname (1) , C News . 18.10 C News, , C News . , cron, newsdaily. C News. , /usr/lib/news/bin/maint. , . - C News. - 331 - newsdaily : . - , , . , , , .. newsmaster. newswatch - , , , . , newsmaster. , , , . addgroup . addgroup groupname y|n|m|=realgroup active, (y), (n), (m), (=realgroup). addgroup, newgroup, , . delgroup n . delgroup groupname , spool. , (a.k.a. Expire) . addmissing . - 332 - , , , , . newsboot . , , , , NNTP , . newsrunning /usr/lib/news/bin/input, , , . /usr/lib/news/bin/input/newsrunning off , on off. 19. NNTP 19.1 - , NNTP () C News. NNTP " '', . , . - , . newsreaders. NNTP . NNTP , " pushing " " pulling ". (pushing) - C News ihave/sendme . " IHAVE ", , , , . , , . - , - 333 - . - (pulling) . , . NEWNEWS. , , , ARTICLE . , , . , , newsgroups . newsreaders, , . , host, , nntp- . - NFS, 18 .. NNTP , . faking. NNTP . NNTP . - NNTP daemon, . , Stan Barber Phil Lapsley, RFC 977. - nntpd-1.5.11, . . Nntpd , , inews . Bnews , , C news, . , NNTP newsreaders , . NNTP daemon nntpd , . - 334 - 19.2 NNTP NNTP nntpd, , . , - - , . definines common/conf.h. Nntpd , rc.inet2, daemon inetd. /etc/inetd.conf: nntp stream tcp nowait news /usr/etc/in.nntpd nntpd nntpd , , inetd.conf . , , /etc/services: nntp 119/tcp readnews untp # Network News Transfer Protocol , ., nntpd a .tmp spool . # mkdir /var/spool/news/.tmp # chown news.news /var/spool/news/.tmp 19.3 NNTP NNTP nntp access /usr/lib/news. , . : site read|xfer|both|no post|no [!exceptgroups] NNTP , nntpd, IP . - 335 - Hostname IP site , . . , ; , , . : hostname - host. hostname , , . IP address - IP . IP , , . domain name - , *.domain. hostname , . network name - /etc/networks. IP , , . default . . , . , , (read), , (xfer). , , . No, , . , , . nntp : # # by default, anyone may transfer news, but not read or post - 336 - default xfer no # # public.vbrew.com offers public access via modem, we allow # them to read and post to any but the local.* groups public.vbrew.com read post !local # # all other hosts at the brewery may read and post *.vbrew.com read post 19.4 NNTP () xfer read nntp access , nntpd . , Xfer XFER, nntpd , . NNTP, AUTHINFO. , NNTP . Nntpd , /etc/passwd, , nntp. NNTP , . - , ; . 19.5 Nntpd C News , nntpd . , IHAVE POST, rnews inews, . , rnews, rnews ( ) /var/spool/news/in.coming, relaynews, . ihave/sendme , nntpd . , , - 337 - . , C news nntpd . C news dbm -, ; , dbm . C news dbm , libc, nntpd , . nntpd C news - , nntpd , , NNTP. spool, telnet nntp , , nntpd . , ID- , nntpd . $ telnet localhost nntp Trying 127.0.0.1... Connected to loalhost Escape characters is '^]'. 201 vstout NNTP[auth] server version 1.5.11t (16 November 1991) ready at Sun Feb 6 16:02:32 1194 (no posting) IHAVE 435 Got it. QUIT nntpd; "Got it" , . "335 Ok" , , . Ctrl-D. , , ; nntpd syslog. dbm , dbminit . 20. Newsreader Newsreaders , , , , newsgroup . - 338 - . newsreaders, Linux. , tin, trn, nn. newsreaders $ find /var/spool/news -name '[0-9]*' -exec cat {} \; | more - , Unix . newsreaders, , . , , . . newsgroup, newsreaders , , . , , , . , " " Re: ''. , , . newsreaders, Linux , . , . . 20.1 tin newsreader - tin. Iain Lea - newsreader, . 486DX50, 30 , 1000 . NNTP , - 5 . , -u , tin - U . , tin .tin/index. , . , tin setuid , . tin - 339 - , /var/spool/news/.index. access Escape , , . tin, Linux NNTP. rtin -r , tin NNTP , /etc/nntpserver NNTPSERVER . Nntpserver . 20.2 Trn Trn - newsreader, rn ( ). " T " "". Wayne Davidson. tin, trn . , , mthreads, cron, . mthreads, , , , " Novell Linix!! " , , ( ). newsgroups, mthreads newsgroups . sys: mthreads comp,rec,!rec.games.go comp rec, rec.games.go (, , , ). , , . , active , mthreads . , mthreads , , . , , - 340 - mthreads daemon . , -d , , 10 , , , . mthreads daemon , rc.news : /usr/local/bin/rn/mthreads -deav -a mthread , ; -v mthreads, mt.log , trn. , , . , , , . , ( Expires) , mthreads -e , " " . mthreads daemon , -e , . 20.3 nn Nn Kim F. Storm, , newsreader , . " '', - " - . nn ." , nn , , , , , . , nnadmin, . Nn , nnmaster. daemon, rc.inet2 rc.news. /usr/local/lib/nn/nnmaster -l -r -C - 341 - newsgroups, active. , nnmaster cron, . sys, , . fake , "" , . # /usr/local/lib/nn/nnmaster !rec.games.go rec comp , : , , . , !rec.games.go rec, . Nn . , , , . - , nnmaster -E . , NNTP. 2 , mthreads, , , active. , -e . , . , -E3 nnmaster. , -F . , nnmaster, daemon, ( -k) , , . , expire , 1: # nnmaster -kF "" # nnmaster -lrC , , nn. , nnmaster . - 342 - Nnmaster , GROUPS, /usr/local/lib/nn. , . newsgroup, , , , . , , , . nnmaster , . APPENDIX A Null PLIP PLIP , 25 ( DB-25) 11 . 15 . , . , : +-------------------------------+ |D0 2 15 ERROR | |D1 3 13 SLCT | |D2 4 12 PAPOUT | |D3 5 10 ACK | |D4 6 11 BUSY | |GROUND 25 25 GROUND | |ERROR 15 2 D0 | |SLCT 13 3 D1 | |PAPOUT 12 4 D2 | |ACK 10 5 D3 | |BUSY 11 6 D4 | +-------------------------------+ . , DB-25 . - 343 - APPENDIX B smail UUCP . , smail-3.1.28. , . - , smail. smail , , . host , paths, /etc/hosts, . smail , , , . , . , , , . , , . smail, , pathalias . hostnames pathalias . : # # pathalias database for intra-domain routing domain paths: driver=pathalias, # look up host in a paths file transport=uux; # if matched, deliver over UUCP file=paths/domain, # file is /usr/lib/smail/paths/domain proto=lsearch, # file is unsorted (linear search) optional, # ignore if the file does not exist required=vbrew.com, # look up only *.vbrew.com hosts # - 344 - # pathalias database for routing to hosts outside our domain world paths: driver=pathalias, # look up host in a paths file transport=uux; # if matched, deliver over UUCP file=paths/world, # file is /usr/lib/smail/paths/world proto=bsearch, # file is sorted with sort(1) optional, # ignore if the file does not exist -required, # no required domains domain=uucp, # strip ending ".uucp" before searching , , , . , uux . transports, . , , mathod transports. hostnames transports. . , . host Internet, , , MX. inet , BIND smail. , UUCP TCP/IP, , /etc/hosts, SLIP PPP . , UUCP. inet , paths/force. - pathalias-, smail . # A sample /usr/lib/smail/routers file # # force - force UUCP delivery to certain hosts, even when # they are in our /etc/hosts - 345 - force: driver=pathalias, # look up host in a paths file transport=uux; # if matched, deliver over UUCP file=paths/force, # file is /usr/lib/smail/paths/force optional, # ignore if the file does not exist proto=lsearch, # file is unsorted (linear search) -required, # no required domains domain=uucp, # strip ending ".uucp" before searching # inet addrs - match domain literals containing literal # IP addresses, such as in janet@[191.72.2.1] inet addrs: driver=gethostbyaddr, # driver to match IP domain literals transport=smtp; # deliver using SMTP over TCP/IP fail if error, # fail if address is malformed check for local, # deliver directly if host is ourself # inet hosts - match hostnames with gethostbyname(3N) # Comment this out if you wish to use the BIND version instead. inet hosts: driver=gethostbyname, # match hosts with the library function transport=smtp; # use default SMTP -required, # no required domains -domain, # no defined domain suffixes -only local domain, # don't restrict to defined domains # inet hosts - alternate version using BIND to access the DNS #inet hosts: # driver=bind, # use built-in BIND driver # transport=smtp; # use TCP/IP SMTP for delivery # # defnames, # use standard domain searching # defer no connect, # try again if the nameserver is down # -local mx okay, # fail (don't pass through) an MX # # to the local host # # pathalias database for intra-domain routing domain paths: driver=pathalias, # look up host in a paths file transport=uux; # if matched, deliver over UUCP file=paths/domain, # file is /usr/lib/smail/paths/domain - 346 - proto=lsearch, # file is unsorted (linear search) optional, # ignore if the file does not exist required=vbrew.com, # look up only *.vbrew.com hosts # # pathalias database for routing to hosts outside our domain world paths: driver=pathalias, # look up host in a paths file transport=uux; # if matched, deliver over UUCP file=paths/world, # file is /usr/lib/smail/paths/world proto=bsearch, # file is sorted with sort(1) optional, # ignore if the file does not exist -required, # no required domains domain=uucp, # strip ending ".uucp" before searching # smart host - a partically specified smarthost director # If the smart path attribute is not defined in # /usr/lib/smail/config, this router is ignored. # The transport attribute is overridden by the global # smart transport variable smart host: driver=smarthost, # special-case driver transport=uux; # by default deliver over UUCP -path, # use smart path config file variable directors. , , . , , , aliases, , ... , janet, smail usr directors . director , , (, mailbox ), (, ). - , directors , . , ( world - aliases) . , - 347 - , . , smail . . , mailbox janet, janet. , aliases, , , , nobody. , smail manpage. # A sample /usr/lib/smail/directors file # aliasinclude - expand ":include:filename" addresses produced # by alias files aliasinclude: driver=aliasinclude, # use this special-case driver nobody; # access file as nobody user if unsecure copysecure, # get permissions from alias director copyowners, # get owners from alias director # forwardinclude - expand ":include:filename" addrs produced # by forward files forwardinclude: driver=forwardinclude, # use this special-case driver nobody; # access file as nobody user if unsecure checkpath, # check path accessibility copysecure, # get perms from forwarding director copyowners, # get owners from forwarding director # aliases - search for alias expansions stored in a database aliases: driver=aliasfile, # general-purpose aliasing director -nobody, # all addresses are associated # with nobody by default anyway sender okay, # don't remove sender from expansions owner=owner-$user; # problems go to an owner address file=/usr/lib/aliases, # default: sendmail compatible modemask=002, # should not be globally writable optional, # ignore if file does not exist proto=lsearch, # unsorted ASCII file # dotforward - expand .forward files in user home directories dotforward: - 348 - driver=forwardfile, # general-purpose forwarding director owner=real-$user, # problems go to the user's mailbox nobody, # use nobody user, if unsecure sender okay; # sender never removed from expansion file=~/.forward, # .forward file in home directories checkowner, # the user can own this file owners=root, # or root can own the file modemask=002, # it should not be globally writable caution=0-10:uucp:daemon, # don't run things as root or daemons # be extra careful of remotely accessible home directories unsecure="~ftp:~uucp:~nuucp:/tmp:/usr/tmp", # forwardto - expand a "Forward to " line at the top of # the user's mailbox file forwardto: driver=forwardfile, owner=Postmaster, # errors go to Postmaster nobody, # use nobody user, if unsecure sender okay; # don't remove sender from expansion file=/var/spool/mail/${lc:user}, # location of user's mailbox forwardto, # enable "Forward to " check checkowner, # the user can own this file owners=root, # or root can own the file modemask=0002, # under System V, group mail can write caution=0-10:uucp:daemon, # don't run things as root or daemons # user - match users on the # local host with delivery to their mailboxes user: driver=user; # driver to match usernames transport=local, # local transport goes to mailboxes # real user - match usernames when prefixed with the string "real-" real user: driver=user; # driver to match usernames transport=local, # local transport goes to mailboxes prefix="real-", # for example, match real-root # lists - expand mailing lists stored below /usr/lib/smail/lists lists: driver=forwardfile, caution, # flag all addresses with caution - 349 - nobody, # and then associate the nobody user sender okay, # do NOT remove the sender owner=owner-$user; # the list owner # map the name of the mailing list to lower case file=lists/${lc:user}, , smail , director, () . transports transports. , . , - , , , , cmd . , , , , . # A sample /usr/lib/smail/transports file # local - deliver mail to local users local: driver=appendfile, # append message to a file return path, # include a Return-Path: field from, # supply a From envelope line unix from hack, # insert > before From in body local; # use local forms for delivery file=/var/spool/mail/${lc:user}, # location of mailbox files group=mail, # group to own file for System V mode=0660, # group mail can access suffix="\n", # append an extra newline # pipe - deliver mail to shell commands pipe: driver=pipe, # pipe message to another program return path, # include a Return-Path: field from, # supply a From envelope line unix from hack, # insert > before From in body local; # use local forms for delivery cmd="/bin/sh -c $user", # send address to the Bourne Shell parent env, # environment info from parent addr pipe as user, # use user-id associated with address ignore status, # ignore a non-zero exit status - 350 - ignore write errors, # ignore write errors, i.e., broken pipe umask=0022, # umask for child process -log output, # do not log stdout/stderr # file - deliver mail to files file: driver=appendfile, return path, # include a Return-Path: field from, # supply a From envelope line unix from hack, # insert > before From in body local; # use local forms for delivery file=$user, # file is taken from address append as user, # use user-id associated with address expand user, # expand ~ and $ within address suffix="\n", # append an extra newline mode=0600, # set permissions to 600 # uux - deliver to the rmail program on a remote UUCP site uux: driver=pipe, uucp, # use UUCP-style addressing forms from, # supply a From envelope line max addrs=5, # at most 5 addresses per invocation max chars=200; # at most 200 chars of addresses cmd="/usr/bin/uux - -r -a$sender -g$grade $host!rmail $(($user)$)", pipe as sender, # have uucp logs contain caller log output, # save error output for bounce messages # defer child errors, # retry if uux returns an error # demand - deliver to a remote rmail program, # polling immediately demand: driver=pipe, uucp, # use UUCP-style addressing forms from, # supply a From envelope line max addrs=5, # at most 5 addresses per invocation max chars=200; # at most 200 chars of addresses cmd="/usr/bin/uux - -a$sender -g$grade $host!rmail $(($user)$)", pipe as sender, # have uucp logs contain caller log output, # save error output for bounce messages # defer child errors, # retry if uux returns an error # hbsmtp - half-baked BSMTP. The output files must - 351 - # be processed regularly and sent out via UUCP. hbsmtp: driver=appendfile, inet, # use RFC 822-addressing hbsmtp, # batched SMTP w/o HELO and QUIT -max addrs, -max chars; # no limit on number of addresses file="/var/spool/smail/hbsmtp/$host", user=root, # file is owned by root mode=0600, # only read-/writeable by root. # smtp - deliver using SMTP over TCP/IP smtp: driver=tcpsmtp, inet, -max addrs, -max chars; # no limit on number of addresses short timeout=5m, # timeout for short operations long timeout=2h, # timeout for longer SMTP operations service=smtp, # connect to this service port # For internet use: uncomment the below 4 lines # use bind, # resolve MX and multiple A records # defnames, # use standard domain searching # defer no connect, # try again if the nameserver is down # -local mx okay, # fail an MX to the local host APPENDIX C GNU GNU (GPL copy-left), Linux . . Linux - copyright (C) 1993 Linus Torvalds, . , Linux , , () GPL (GNU GENERAL PUBLIC LICENSE). - . , . - 352 - ACU . . ARP . IP CSMA-CD (Ethernet). ARPA , . Internet. ARPANET Internet; , ( ). BBS BBS. mailbox. BGP . . BIND Berkeley Internet Name Domain . DNS. BNU . - UUCP . HoneyDanBer UUCP. : P. Honeyman, D.A. Novitz, B.E. Redman. broadcast network , . BSD Berkeley . Unix. CCITT (. ) , .. CSLIP IP . IP , TCP/IP. DNS Domain name system. - , Internet host IP. EGP . - 353 - . Ethernet , Ethernet - , . Ethernet , , 10Mbps. Ethernet , . FQDN . Hostname , , . FTP . . FYI " ." Internet. GMU Groucho Marx University. , . GNU GNU Unix - - , Unix, . GNU , GNU (GPL), Copyleft. HoneyDanBer UUCP. . BNU. host , : -, . , x-, . ICMP Internet . , IP, host , .. IEEE Institute of Electrical and Eletronics Engineers. . UNIX, - 354 - - POSIX , UNIX, . IETF Internet . internet , . Internet "" internet. IP Internet Protocol. . ISO . ISDN . , . LAN . . MX . DNS, host gateway . NFS . . NIS . Rpc- , . . YP. NNTP . TCP . octet Internet, , . , Internet, , . OSI . ISO - 355 - . path UUCP . PLIP IP . IP . PPP ( ). PPP - , IP IPX . (), PPP ISDN. RARP . IP . RFC . , Internet. RIP . - , () . RPC . host. RR " ". RS-232 - . RTS/CTS , , ( ) RS-232. RTS (" ''), CTS (" , ''). RTM Internet Worm - , VMS BSD 4.3 Unix, Internet. "" , Internet. RTM - - 356 - (Robert T. Morris), . SLIP IP . - IP , . CSLIP. SMTP . TCP , UUCP (batched SMTP). SOA . DNS. System V Unix. TCP . . TCP/IP Internet . UDP . . UUCP Unix Unix. . virtual beer Linux'. , , Linux 0.98.X kernel, Linus "Oxford Beer Trolls" . YP . NIS, , - . , NIS yp. ?! 1. 2 1.1. Linux 3 1.2. 4 - 357 - 1.3. 5 1.4. 6 1.5. 7 1.6. 8 1.7. 9 1.8. linux 10 1.9. 11 2. . 12 2.1. . 12 2.2. UUCP . 13 2.2.1. UUCP 14 2.3. TCP/IP 16 2.3.1. TCP/IP-. 16 2.3.2. Ethernet 18 2.3.3. 20 2.3.4. Internet (IP) 21 2.3.5. IP 22 2.3.6. (TCP) 23 2.3.7. (UDP) 24 2.3.8. 24 2.3.9. (socket) 25 2.4. Linux 26 2.4.1. 27 2.4.2. 28 2.5. 28 2.5.1. 29 2.6. 31 3. TCP/IP 33 3.1. 33 3.2. IP 34 3.3. Address Resolution( ). 35 3.4. IP 37 3.4.1. IP 37 3.4.2. 37 3.4.3. Gateways 39 3.4.4. 40 - 358 - 3.4.5. 42 3.5. The Internet Control Message Protocol 42 3.6. (Domain Name System) 43 3.6.1 (Hostname Resolution) 43 3.6.2. DNS 45 3.6.3 DNS 47 3.6.4 (Domain Name Servers) 48 3.6.5 DNS 49 3.6.6. . 51 4. . 55 4.1. , , 55 4.2. 57 4.2.1. Linux 1.0 58 4.2.2. Linux 1.1.14 60 4.3. Linux 62 4.4. Ethernet 63 4.4.1. Ethernet . 64 4.4.2. 64 4.4.3. Ethernet 65 4.5. PLIP 68 4.6. SLIP PPP 69 5. 70 5.1. 70 5.2. 71 5.3. 72 5.4. . 74 6. TCP/IP 77 6.1. proc 77 6.2. 78 6.3. 79 6.4. 79 6.5. IP 80 6.6. hosts networks 82 6.7. IP 84 6.7.1. loopback 85 - 359 - 6.7.2. Ethernet 87 6.7.3. Gateway 90 6.7.4. Gateway 91 6.7.5. PLIP 92 6.7.6. SLIP PPP 93 6.7.7. Dummy() 94 6.8. ifconfig 94 6.9. netstat 98 6.9.1. 98 6.9.2. 99 6.9.3. 100 6.10. ARP 101 6.11. 103 7. . 105 7.1 . 105 7.1.1 . 106 7.1.2 . 107 7.1.3 --- resolv.conf 108 7.1.4 . 109 7.2 named. 110 7.2.1 named.boot. 111 7.2.2 DNS . 114 7.2.3 . 118 7.2.4 (Name Server Setup). 119 7.2.5 125 8. IP 126 8.1 . 126 8.2 SLIP . 127 8.3 dip 130 8.3.1 Script(). 130 8.3.2 Dip . 133 8.3.2.1 . 134 8.3.2.2 echo term. 135 8.3.2.3 Get . 135 8.3.2.4 Print 136 8.3.2.5 (Variable Names) 136 - 360 - 8.3.2.6 If Goto 137 8.3.2.7 send, wait sleep 137 8.3.2.8 mode default 138 8.4 server 138 9. (point-to-point protocol) 140 9.1 P's 140 9.2 PPP Linux 141 9.3 pppd 143 9.4 144 9.5 chat 146 9.6 PPP 149 9.7 IP 149 9.7.1 IP 150 9.7.2 PPP 151 9.8 153 9.9 155 9.10 PPP 156 9.11 PPP 161 10. 163 10.1 Inetd - 163 10.2 Tcpd  166 10.4 170 10.5 r 172 11. 175 11.1 NIS 177 11.2 NIS NIS + 181 11.3 NIS 182 11.4 NIS 182 11.5 NIS NYS 184 11.6 186 11.7 passwd Maps 188 11.8 NIS Shadow Support 191 11.9 NIS . 192 12. (NFS) 193 - 361 - 12.1 NFS 196 12.2 NFS 197 12.3 NFS daemon() 200 12.4 201 12.5 Linux Automounter 204 13. Taylor UUCP 205 13.1 205 13.1.1 UUCP 207 13.2 207 13.2.1 UUCP 207 13.2.2 uucico 208 13.2.3 uucico 210 13.3 UUCP 211 13.3.1 Taylor UUCP 211 13.3.2 UUCP 214 13.3.3 215 13.3.4 Taylor 216 13.3.5 - config 217 13.3.6 UUCP - sys 218 13.3.6.1 218 13.3.6.2 218 13.3.6.3 Port Speed 219 13.3.6.4 Login chat ( ) 220 13.3.6.5 222 13.3.6.6 223 13.3.7 (Devices) - port 224 13.3.8 - dial 226 13.3.9 UUCP TCP 228 13.3.10 229 13.4 UUCP, - 230 13.4.1 230 13.4.2 230 13.4.3 232 13.5 . 233 13.5.1 getty 233 13.5.2 UUCP (account) 233 13.5.3 235 - 362 - 13.5.4 - 236 13.5.5 UUCP 238 13.6 UUCP 239 13.6.1 239 13.6.2 241 14. 247 14.1 - ? 248 14.2 ? 251 14.3 Email 252 14.4 ? 253 14.4.1 Internet 253 14.4.2 UUCP 254 14.4.3 UUCP RFC 822 256 14.5 Pathalias 258 14.6 elm 261 14.6.1 elm 261 14.6.2 262 15. smail 263 15.1 UUCP 265 15.2 267 15.2.1 267 15.2.2 smail 269 15.3 ... 270 15.3.1 smail 272 15.4 272 15.5 273 15.6 274 15.7 274 15.7.1 277 15.8 277 15.8.1 278 15.8.2 279 15.8.3 279 15.8.4 280 15.9 UUCP- 281 15.10 SMTP- 282 - 363 - 15.11 Hostname 282 16. Sendmail + IDA 283 16.1 Sendmail + IDA 283 16.2 --- 284 16.3 Sendmail.cf 285 16.3.1 Sendmail.m4 286 16.3.2 sendmail.m4 286 16.3.2.1 , 287 16.3.2.2 Mailer' 288 16.3.2.3 Bounced- 289 16.3.2.4 289 16.3.2.5 289 16.3.2.6 Uucp- 290 16.3.2.7 Relay- Mailer' 290 16.3.2.8 291 16.3.2.9 Sendmail.mc 291 16.3.2.10 ? 291 16.4 Sendmail + IDA 292 16.4.1 Mailertable 292 16.4.2 Uucpxtable 294 16.4.3 pathtable 295 16.4.4 domaintable 296 16.4.5 aliases 296 16.4.6 298 16.5 sendmail 298 16.5.1 299 16.5.2 sendmail.cf 299 16.5.3 sendmail.cf 300 16.5.4 - 303 16.6 305 16.6.1 306 16.6.2 306 16.6.3 , UUCP 307 16.6.4 UUCP 307 16.6.5 Sendmail 308 16.6.6 308 16.7 309 - 364 - 16.8 309 17. Netnews 310 17.1 Usenet 310 17.2 Usenet, ? 310 17.3 Usenet ? 311 18. "C" 312 18.1 312 18.2 313 18.3 315 18.4 active 318 18.5 319 18.6 322 18.7 324 18.8 326 18.8.1 326 18.8.2 Newgroup rmgroup 327 18.8.3 Checkgroups 327 18.8.4 sendsys, version, senduuname 329 18.9 C News NFS 329 18.10 330 19. NNTP 332 19.1 332 19.2 NNTP 334 19.3 NNTP 334 19.4 NNTP 336 19.5 Nntpd C News 336 20. Newsreader 337 20.1 tin 338 20.2 Trn 339 20.3 nn 340 APPENDIX A 342 APPENDIX B 343 APPENDIX C 351

Last-modified: Sat, 18 May 2002 16:48:29 GMT
: