IP . " 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