
                               PPP HOWTO 
                                       
: Robert Hart [1]hartr@interweft.com.au
: [2]Asd L. Chen & [3]C.W.Huang

   v3.0, 31 March 1997. : 25 August - 9 October 1997
     _________________________________________________________________
   
   ļչʾΰ Linux PC ӵһ̨ PPP ŷϣʹ PPP
   ·һṩһְ Linux 趨Ϊ PPP ŷķ
   ͬʱṩ޷ PPP ᣮ
     _________________________________________________________________
   
   Ȩ
   
   ļɢ GPL (GNU Public License)
   
   ɢ
   
   һļµİ汾ͻ comp.os.linux.answer Ⱥ Ҳ
   ڴȡ HTML ʽļ:
   
     * Linux Howto Index
     * PPP-HOWTO
       
   ʽ(SGML, ASCII, postscript, DVI)ļԴȡ: Howtos -
   other formats.
   
   Ϊ sunsite.unc.edu ĸطǳأʹʵӳ(mirror)
   㣮
   
   л
   
   ϵṩдļЭ رл Al Longyear  PPP 
   ָ(κδҵĶ) Greg Hankins(Linux
   HOWTOs ά)Լ Debi Tackett (MaximumAccess.com) ʽ
   ˳߼ȵý飮
   
   ᣬԵʼṩˣл  HOWTO 
   һõоյı꣬㹻 д
    HOWTO ļҳһСծңԼ Linux ʹ
   ߣ ǷΪ׫дάҵϵͳ˵ģ
   
1. 

     * 1.1 ͻԼŷ
     * 1.2 ͬ Linux ׼Ĳ
     * 1.3 ׼ص PPP ù
       
2. IP 

3. ļĿ

     * 3.1  PPP ͻ
     * 3.2 ʹ PPP ·һ··
     * 3.3  PPP ŷ
     * 3.4 ʹ PPP ֱ(direct null modem)
     * 3.5 ļĿǰδǵ...
       
4. ǵ汾

5. õģҪļ

     * 5.1 õ Linux ʵб
       
6.  PPP 趨Ϊͻ˵ĹҪ

     * 6.1 ȡ/װ
     * 6.2 ļ PPP ֧Ԯ
     * 6.3  ISP ȡѶ
     * 6.4 趨ݻв
     * 6.5 Ƶλַ(DNS)
     * 6.6 PPP  root Ȩ
     * 6.7  PPP ׼趨 PPP ѡ
     * 6.8  PPP ŷʹ PAP ֤(Password Authentication
       Protocol)
     * 6.9 ֶʽ PPP ŷ
     * 6.10 ʹ PPP Զ
     * 6.11 
     * 6.12 
     * 6.13 ֮
     * 6.14 ̬ IP ṩ׼ IP 
       
7.  Linux 

     * 7.1 װ Linux ԭʼʽ
     * 7.2 Ӳ
     * 7.3   Linux 1.2.13 
     * 7.4  - Linux 1.3.x  2.0.x 
     * 7.5 PPP-2.2  /proc/net/dev ע
     * 7.6 úĵһ㿼
       
8. ȡ PPP ŷѶ

9. 趨ݻв

     * 9.1 вٶԵע
     * 9.2 в
     * 9.3 ݻ
     * 9.4 ע
     * 9.5 ݻĲ
       
10. Ƶλַ(DNS)

     * 10.1 /etc/resolv.conf 
     * 10.2 /etc/host.conf 
       
11. ʹ PPP  root Ȩ

12. 趨 PPP ӵ

     * 12.1  options.tpl 
     * 12.2 Ӧʹʲѡ? ( PAP/CHAP)
       
13.  PPP ŷʹ PAP ֤(Password Authentication Protocol)

     * 13.1 ʹ MSCHAP
     * 13.2 PAP/CHAP 뵵
     * 13.3 PAP 뵵
     * 13.4 CHAP 뵵
     * 13.5  PAP ֤
       
14. ֶʽ PPP 

15. ʹԶ - ָ

     * 15.1 ʹƣָ֤
     * 15.2 ppp-on ָ
     * 15.3 ༭ṩʼָ
     * 15.4 һ chat ָеĺ...
     * 15.5 ʹ PAP/CHAP ߵ chat ָ
     * 15.6 pppd  debug  file option_file ѡ
       
16. ָ

17.  PPP 

18. 

     * 18.1 Ұ PPP ȥ Linux ˵û...
     * 18.2 ҵݻ˵ PPP δ
     * 18.3 ϵͳ¼˵ "serial line is not 8 bit clean..."
     * 18.4 Ԥ·
     * 18.5 
       
19. ȫ춽ʱȡð

20. ֮ձ

     * 20.1 ޷ߵ PPP ŷ
     * 20.2 ҿԼ͵ʼܽ
     * 20.3 ΪʲǲҵĻ finger, WWW, gopher, talk ȵ?
       
21. Զ̬ IP ṩ·

     * 21.1 趨ʼ
     * 21.2 趨صŷ
       
22. ʹ PPP ·

     * 22.1 趨 IP 
     * 22.2 趨·
     * 22.3 ·ȫ
       
23. ֮ - /etc/ppp/ip-up ָ

     * 23.1 ·
     * 23.2 ʼ
     * 23.3 һ /etc/ppp/ip-up ָ
     * 23.4 ʼ
       
24. ʹ /etc/ppp/ip-down

25. ·ϵĵ

     * 25.1 ȫϵע
       
26.  PPP ŷ

     * 26.1 
     * 26.2 ŷϵͳĸŹ
     * 26.3 ȫ
     * 26.4 趨׼Ĳ(shell access)
     * 26.5  PPP ѡ
     * 26.6 趨 pppd Աʹߣɹأִ
     * 26.7 Ϊ pppd 趨һȫı(alias)
       
27.  null modem (ֱ)ʹ PPP
     _________________________________________________________________
   
   Ȩ
   
   ļɢ GPL (GNU Public License)
   
   ɢ
   
   һļµİ汾ͻ comp.os.linux.answer Ⱥ Ҳ
   ڴȡ HTML ʽļ:
   
     * [4]Linux Howto Index
     * [5]PPP-HOWTO
       
   ʽ(SGML, ASCII, postscript, DVI)ļԴȡ: [6]Howtos
   - other formats.
   
   Ϊ sunsite.unc.edu ĸطǳأʹʵӳ(mirror)
   㣮
   
   л
   
   ϵṩдļЭ رл Al Longyear  PPP 
   ָ(κδҵĶ) Greg Hankins(Linux
   HOWTOs ά)Լ Debi Tackett (MaximumAccess.com) ʽ
   ˳߼ȵý飮
   
   ᣬԵʼṩˣл  HOWTO 
   һõоյı꣬㹻 д
    HOWTO ļҳһСծңԼ Linux ʹ
   ߣ ǷΪ׫дάҵϵͳ˵ģ
   
1. 

   PPP ԵЭڴ IP ·ЭԼ·Э
   һֻƣ ֱӵĴӣʹ null-modem ߣʹ
   ݻԼ绰· (ȻҲ ISDN λ·)
   
   ʹ PPP, ԰ Linux PC ӵһ̨ PPP ŷϲȡŷ
   ӵ·Դֱͬڸ·һ㣮
   
   Ҳ԰ Linux PC Ϊһ̨ PPP ŷһԾͿԲ
   ĵԲҴȡ·Դ
   
   Ϊ PPP һֵԵ (peer-to-peer) ϵͳҲʹ̨
   Linux PC ϵ PPP ·һ𣨻ǰ·ᵽ·ϣ
   
   ҪĲ쵱Ȼٶ  ׼̫· 10 MbpsÿλԪ
   ϵͨڶ ݻⷽ 56 kbpsÿ
   ǧλԪٶڶ
   
   ͬʱ PPP ߵ̬ĳЩӦԼʹϿܻЩƣ
   
1.1 ͻԼŷ

   PPP һȫȫǵԵЭӵĻԼܲӵĻ֮䣨
   ϣûв죮 ȻΪ׵Եʣŷͻ˵ķʽ
   ˼Ǻõģ
   
   㲦һڵҪ PPP ʱǿͻˣߵ̨ŷ
   ˣ
   
   趨һ̨ Linux ʹղ PPP ʱһ
   ̨ PPP ŷˣ
   
   κ Linux PC  PPP ŷԼͻ  һϵ
   вԼݻбҪĻͬʱֽɫ ͬǰ
   ˵ģ PPP ԣһ߽ͻŷ֮䲢ʲ
   죮
   
   Ϊ׵ĹϵļʼУ ""̨ͻ
    ѻӦ绰˶Բ֮ϣʹߴţԼܵ
   ƣ̨ŷˣ
   
   ʹ PPP Ϊͻ˰ĳطһ̨̨ᵽ·ϿǴ
   ˶Ȥһ - ǽǵ Linux Ϊһͻˣ
   
   ļĳ򽫻ܹԶ·ߣ
   
   ļҲڰ Linux PC Ϊ PPP ŷԼʹ PPP 
   ·ĵ趨Щָⳣ·
   ᣩ
   
1.2 ͬ Linux ׼Ĳ

   ಻ͬ Linux ׼ԼΪģʽ
   
   رأLinux (Լ Unix)ֲͬʼʽ趨ȵȣ
   
   ֱַ BSD system initialisation  System V system
   initialisation ĳЩ Unix Ⱥᷢ־˫֧
   ߵս Ȥͼ˷·Ƶ!
   
   ձʹõ׼
   
     * Slackware
       ʹ BSD ʽϵͳʼ
     * Red Hat (and its former associate Caldera)
       ʹ SysV ϵͳʼ(Щ޸)
     * Debian
       ʹ SysV ϵͳʼ
       
   BSD ʽϵͳʼͨ /etc/...Щ:
     _________________________________________________________________
   
        /etc/rc
        /etc/rc.local
        /etc/rc.serial
                (Ҳ)
     _________________________________________________________________
   
   һЩ BSD ϵͳʼģʽʹ /etc/rc.d... ΪĴĿ¼
   ǽеĶ /etc £
   
   System V ʼģʽ /etc/...  /etc/rc.d/... µһ
   Ŀ¼:
     _________________________________________________________________
   
drwxr-xr-x   2 root     root         1024 Jul  6 15:12 init.d
-rwxr-xr-x   1 root     root         1776 Feb  9 05:01 rc
-rwxr-xr-x   1 root     root          820 Jan  2  1996 rc.local
-rwxr-xr-x   1 root     root         2567 Jul  5 20:30 rc.sysinit
drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc0.d
drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc1.d
drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc2.d
drwxr-xr-x   2 root     root         1024 Jul 18 18:07 rc3.d
drwxr-xr-x   2 root     root         1024 May 27  1995 rc4.d
drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc5.d
drwxr-xr-x   2 root     root         1024 Jul  6 15:12 rc6.d
     _________________________________________________________________
   
   㳢Ѱ̫··趨õطҪ׷ٵ
   Щҳָڣ
   
1.3 ׼ص PPP ù

   ĳЩװ׼( Red Hat  Caldera)һ X window 趨 PPP 
   ϵͳ  HOWTO δصĹߣʹ
   ֱӺ׼ķѯʣ
   
    Red Hat 4.x ʹߣ Linux Դҵ [7]Red Hat
   PPP-TIP Ҳ֧Ԯҵ [8]Red Hat Software
   
2. IP 

   ÿһ·豸ӵԼģΨһ IP 룮Щ
   ÿҵйصλָģ
   
   Ҫ···ӵееԼ
   ʹôָ·Χ IP 룮 ʹһ
   ··֮⣩Ҳƾȡ IP 룮 '͵' IP 
   ʼѾʹ IP ĵԵĻʱᶯȫ
   ԵĴƻ
   
   עļʹõ IP 루һЩ⣩ǴӱûУ
   ··ʹõġδ·롯ϵģ
   
   һЩر··ʹõ IP 룮Щ IP :
   
     * 1  A-ȼ λַ
       10.0.0.0 (netmask 255.0.0.0)
     * 16  B-ȼ λַ
       172.16.0.0 - 172.31.0.0 (netmask 255.255.0.0)
     * 256  C-ȼ λַ
       192.168.0.0 - 192.168.255.0 (netmask 255.255.255.0)
       
   ·ûҵȨλ䵽 IP 룬ĻӦʹ
   ǰЩ·еһ
   
   ЩԶʹ·ϣ
   
   ȻԿʹһ·Ļϵڲ̫·ϣ Ϊ
   IP Ƿ·棬ǵԱģ Ȼ̫·ʹ
    10.0.0.1 () PPP ·ʱ PPP 潫ŷ
   һ(Ϸ) IP 룮  PC ·
   ·ڵĵûУ
   
   ʹ Linux Լ ipfwadm  IP αװ(Ҳ NAT - Network
   address Translation ·λת) Ϳ԰·ϲߺϷ
   IP Ļ·ṩķЩƣ
   
   õѶο [9]Linux IP Masquerade mini HOWTO
   
   춴󲿷ֵʹߣ PPP ӵһ·ṩ(Internet
   Service Providers: ISP) ȡһ IP 루ȷ˵һ·
   ûбҪģ
   
   ϣһС͵··ϣ·ṩ߿
   Դе IP λַռṩһ·ضһ IP 룩
   ߣʹ IP αװ
   
   춾 ISP ӵһ PC ·ϵʹߣ󲿷ֵṩʹö̬
   IP ָ ˵߳һУϵ PPP 񽫻Ļ
   ߵڼ PPP Ӧʹʲ IP 룮 ÿ ISP 
   ĺ벻һ
   
   ʹö̬ IP 룬ÿε߲ᶼȡͬ IP 룮 
   Linux ϵŷ̬Ӧóʽ sendmail, ftpd, httpd Լ
   Ի⣮ Щⲿṩĵͬ IP 
   ȡã
   
   춶̬ IP ָƵķԼķܵĻ
   ļۣ
   
3. ļĿ

3.1  PPP ͻ

   ļṩҪʹ Linux Լ PPP ӵĳһ̨ PPP ŷʹ
   PPP  IP ߵһЩָ ļм PPP ѾòҰװ
    Linux (̵غã±ĺԱ PPP ֧Ԯ
   Ĳ)
   
   Ȼ DIP SLIP ߵı׼ʽ PPP ߣ DIP ָ
   һ㶼൱ظӣ ΪԵʣļʹ DIP  PPP
   ߵĲݣ
   
   ȡ֮ǣļ׼ Linux PPP (chat/pppd)
   
3.2 ʹ PPP ·һ··

   ļṩ·һ··ϵģ
   Ѷ
   
3.3  PPP ŷ

   ļṩ Linux PC Ϊ PPP ŷָ˲
    Linux PC ҽ PPP ߣ
   
   Ӧע趨 Linux Ϊ PPP ŷķ֣ļĿǰ
   һַʽ  һ̨С PPP ŷ 16 ̨ݻ
   
   
   ʽ֪ãһõķʽ
   
3.4 ʹ PPP ֱ(direct null modem)

   ļṩʹ PPP  Linux PCs  null modem ߵļ
   Դ˷ҵϵͳ Linux Ҳǿܵģ Ҫο
   Ҫҵϵͳļ
   
3.5 ļĿǰδǵ...

     *  PPP 
       μ渽ʹõ pppd 汾ļ
     * Լݻ Linux (ϸ)
        Serial-HOWTOԼݻصʼ趨 [10]Modem
       Setup Information Ѷܶ趨ݻ
     * ʹ DIP  PPP 
       ʹ chat ȡ...
     * ʹ socks  IP Masquerade
       Ѿк׼ľļ
     * ʹ diald ԽԶ
        diald ļѶ
     * ʹ EQL ݻϳɵһ PPP ᣮ
     * ׼ص PPP ߷( Red Hat 4.x ·趨)
       ĸ׼еļ
     * ӵԶ PPP 
       ʵļ
       
4. ǵ汾

   ʹ˵ʹ Linux 1.2.x  PPP 2.1.2  Linux
   1.3.X/2.0.x Լ PPP 2.2 森
   
   ڱļ׫д֮ʱLinux  PPP ʽ汾 ppp-2.2f µİ
   (ppp-2.3) beta ׶Σ
   
   ʹ PPP 2.2.0 Ϻ 1.2.13 пܵģȻҪҪ޲
    1.2.13 汾ʹ ppp-2.2 Ϊ
   ܼǿ
   
   УӦرעⲻܽ PPP 2.1.2  Linux  2.0.X ã
   
   עļʹ Linux  2.0.x Ŀģ⣮ 
    kerneld mini-HOWTO Լģģ 2.0.x ļ Linux 2.0.x 
   ԭʼʽĿ¼ /usr/src/linux/Documentation/... 
   
   ΪļЭֵģǿҽʹ֪ȶعͬ
   Linux 汾ʵ PPP 汾
   
5. õģҪļ

   ʹĶ:-
     * 渽 PPP ׼ļ;
     * pppd Լ chat ʹֲ;
       (ʹ man chat Լ man pppd Ķ)
     * Linux ·ָ (NAG);
        [11]The Network Administrators' Guide
     * Net-2/3 HOWTO;
        [12]Linux NET-2/3-HOWTO
     *  /usr/src/linux/Documentation  Linux ļ;
     * ݻ趨Ѷ -  [13]Modem Setup Information
     *  O'Reilly and Associates  Unix/Linux 鼮
       [14]O'Reilly and Associates On-Line Catalogue Ŀ¼ 
       Unix/Linux ֣ܣҪߵģĵȥͶʼ
       Щϣ
     *  Al Longyear ά PPP-FAQ [15]Linux PPP-FAQ ȡã
       ˴õѶʴʽ֣ͼҳΪ PPP (
       )ʱ൱ã
     * ɲͬ߳Ʒ鼮;
       ȥЩͨ鼮Linux ķչ׼ݽ൱٣
       ĸİٶ(һ˵)൱! һѾڵĺ()
       ʹʹ߸еʧ
       
   Linux ļ [16]The Linux Documentation Project Home
   Page. HOWTOs 춶ڵظ£
   
   ȻʹĶЩеκһҲʹļ PPP
   ᣬ ȥĶЩļľЩʲὫ
   ! 㽫ܹȷԼ( comp.os.linux... 
   Ⱥ Linux mailing lists ʳȵ)
   
   Щļļص RFCs ȣṩԼʹ
   ˵ܰĸϸڽͣ
   
   Ҫʹ PPP ··ϣ㽫֪һЩ
   TCP/IP ·֪ʶ һļǰᵽϣ㽫ᷢ
   O'Reilly  "TCP/IP Network Administration" Լ "Building
   Internet Firewalls" кô!
   
5.1 õ Linux ʵб

   ڲͬʹߵȼ֮ͨĵʵб(mailing lists) ѡ
   ȤԼרҵ֪ʶ۵бģ
   
   һЩҸ: ЩбǸЩ"רҼ"ʹ߻ģ Ȼû˻ᱧ
   Թ"Ǳ"(ĵ)棬 ڲʺϵб"
   "ܻյһЩŭ
   
   ⲢΪרҼʹ½ʹߣΪЩб
   һѶȵģ
   
   ЩԹĵбб森
   
   Linux ʵбһܺõ [17]Linux Mailing List Directory
   
6.  PPP 趨Ϊͻ˵ĹҪ

   ļѶ - ÿθİֲ!
   
   ˣڵĿṩһ̵ĸҪ˵Ҫ Linux ϵͳΪͻ
   ӵ PPP ŷĹ
   
6.1 ȡ/װ

    Linux ׼δ PPP 壬ɴӴȡ: [18]the Linux PPP
   daemon.
   
   Ǳļ׫дʱʽ汾ȻӸվȡµİ汾(ļ
   ׫дʱ ppp-2.3  beta ׶ζӦúܿᷢ)
   
    PPP ׼α뼰װָ˱Ĳ˲!
   
6.2 ļ PPP ֧Ԯ

   Linux  PPP 
     * ᵽ PPP daemon
     * PPP ĺ֧Ԯ
       
   ׼ƺԤİװṩ PPP ֧Ԯ
   
   ʱıѶϢ
     _________________________________________________________________
   
PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
PPP line discipline registered.
     _________________________________________________________________
   
   ĺѱ PPP ֧Ԯڣ
   
   Ǿ˵ʹʲ׼ϣбضӲ
   ֮µõЧϵͳԴã סĲܱû˾ú
   ıСڼ޵Ļ൱ã
   
   ļ [19] Linux  һṩ±ĵ˵
   
   ϸڲ [20]The Linux Kernel HOWTO
   
6.3  ISP ȡѶ

   趨 PPP ŷķ Ϊ ISP, ȡ PPP 
   Ѷ
   
   Ϊõ Linux, һЩ֪ MS Windows ͻ˵ ISP ѯſܻ
   ѣ
   
   Ȼ ISP ʹ Linux ṩ -  Linux Ҳ빫˾
   Ҳܻˣ
   
   [21]ȡ PPP ŷѶ һڸҪ֪ӵ PPP ŷ
   ʲѶ - ԼҳЩѶ
   
6.4 趨ݻв

   Ϊ PPP ŷȡѵϴʣݻ趨ȷ
   
   ͬأݻԵĴвҲȷ趨
   
   [22]趨ݻв һṩⷽѶ
   
6.5 Ƶλַ(DNS)

   ִ PPP Զǩ PPP ŷĵ֮⣬һЩõ
   趨 Աĵܽ www.interweft.com.au Ϊ IP λ
   ַԱ̨ߣ Щ:-
   
     * /etc/resolv.conf
     * /etc/host.conf
       
   [23]Ƶλַ һṩⷽ趨ϸڣ
   
   رأ㲢Ҫ Linux PC ִŷӵ·(
   Ȼ) ֻ֪һʹõŷ IP
   λַ( ISP ṩ)
   
6.6 PPP  root Ȩ

   Ϊ Linux һ PPP ŷҪ·(PPP 
   һ·)ĵ·ɱpppd Ҫʹ root Ȩޣ
   
   ϸڲݣ [24]ʹ PPP  root Ȩ һڣ
   
6.7  PPP ׼趨 PPP ѡ

   кüüŵҪԱ PPP  PPP ׼һЩ
   ڸӦеЩʲ:-
     _________________________________________________________________
   
/etc/ppp/options
/etc/ppp/scripts/ppp-on
/etc/ppp/scripts/ppp-on-dialer
/etc/ppp/options.tpl
     _________________________________________________________________
   
    PPP ﵽĿʲҪһЩĵ:-
     _________________________________________________________________
   
/etc/ppp/options.ttyXX
/etc/ppp/ip-up
/etc/ppp/pap-secrets
/etc/ppp/chap-secrets
     _________________________________________________________________
   
   ֮⣬PPP daemon дѡȷʹǺҪ; ˱ڴ
   㿴Щ׼ PPP ѡѡӦʹõѡ
   
   ϸڲݣ [25]趨 PPP ӵ һڣ
   
6.8  PPP ŷʹ PAP ֤(Password Authentication Protocol)

    ISP  PPP ŷʹ PAP ֤ŷʹ PAP (
   ֶǩ벢յ׼ʹ/ʾδʹ PAP)
   ˽ڣ
   
   ȡڽŷʱʾʹƼǣʹ PAP 
   PPP ŷҪģʽǩ뷽ʽ
   
   ʹ֤ӿЭ(link control protocol, LCP)һݣڽ
   PPP ֮ڽѶ
   
   [26] PPP ŷʹ PAP ֤(Password Authentication Protocol)
   һṩʹ PAP  PPP 赵Ѷ
   
6.9 ֶʽ PPP ŷ

   Ѿĵ֮ᣬ͸ֶ(ʹ minicom  seyon)ķʽӼ
    Linux PC  pppd Ǹ⣮
   
   μ [27]ֶʽ PPP  ˵趨ϸڲݣ
   
6.10 ʹ PPP Զ

   һɹֶʽǩ룬һָԶᣮ
   
   [28]ʹԶ - ָ һڰ˽ָ壬Լ
   ൱ע chat  PPP ŷḳ̌
   
   Ҳʹָ PAP/CHAP ֤ŷϣ
   
6.11 

   һܹܹᣮ
   
    [29] PPP  һ˵
   
6.12 

   ޷ PPP عPPP ŷԼǽߵķ
   ǳ֣ ƵأPPP ѡ - Щѡǲһõģ
   
   ǩ벢ʼ PPP ֮⣬ݻ绰·Ҳܻ⣮
   
   [30] һṩһĻѶԼη벢ķ
   
   ṩĲǻѶAl Longyear ά PPP-FAQ ˸һ
   Ѷ!
   
6.13 ֮

   һ PPP (رأһ IP )Linux  PPP 
   Զִ( root )һָκɵĹܣ
   
   [31]֮ һṩ /etc/ppp/ip-up ָѶ ν PPP
   ĲԼһЩ ISP ȡĵʼ ͳ
   дŵʼȵȹ
   
6.14 ̬ IP ṩ׼ IP 

   ڼһָģ̬ IP Ӱ Linux PC Ϊ·ŷ
   
   
   [32]̬ IP ṩ׼ IP  һṩ(Ҫ)ӰķԼ
   (еĻ)Ŀ˷취
   
7.  Linux 

   ΪҪܹʹ PPP Linux ı PPP ֧Ԯ 㻹û
    Linux ԭʼʽȡ   Linux ĵϵͳ׼Ƿ
   /usr/src/linux 森
   
   Ŀ¼ -  Linux ׼ڰװаװԭʼʽ(
   Ŀ¼)
   
   ʱ Linux ĻӡѶϢ֧Ԯ PPP Ļ
   һѶϢ ҪۿЩѶϢĻϵͳ¼ dmesg | less ָ
   ЩѶϢʾөĻϣ ֧Ԯ PPP Ļ㽫ῴļ
     _________________________________________________________________
   
PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
PPP line discipline registered.
     _________________________________________________________________
   
   ( Linux 2.0.x ϵкĵѶϢ)
   
   Linux ĵԭʼʽԴ sunsite.unc.edu ӳڵȡã
   
7.1 װ Linux ԭʼʽ

   Ǽ̵ȡüװ Linux ԭʼʽָʾϸѶ
   [33]The Linux Kernel HOWTO ҵ
   
   Ϊ˰װģ root ǩ룮
   
    1. л /usr/src Ŀ¼
       cd /usr/src
    2.  /usr/src/linux ǷѾװԭʼʽ룮
    3. ûеĻ [34]Linux kernel source directory ӳ
       ڵȡأ
       Ҹɰ汾ĺ( 1.2.X)ɵ [35]Old Linux kernel
       source directory ң
    4. ѡʵĺ - ͨİ汾ȡὫ 'tar' ѹ
       /usr/src
       ע: һ 'tar' һѹ - ѹ൵Ŀ¼ͷ
       ൱ DOS µ zip 
    5. ѾװԭʼʽҪ°ĺģƳɵ
       ʽ룮ָ
       rm -rf /usr/src/linux
    6. ָѹ
       tar xzf linux-2.0.XX.tar.gz
    7. Ȼᣬcd /usr/src/linux  README ͷĽ
       üºģ ϸĶ(ӡֱǸ⣬
       ֱ㹻֪)
       
7.2 Ӳ

   Ҫ±ĺ֪ PC Ľ濨豸!! ĳЩ
   豸ЧҲ֪趨ӲжϺ룬λַԼ
   Ѷ
   
7.3   Linux 1.2.13 

   Ҫʼóڽ˵˵ʵذװԭʼʽ룮Ȼ
   ָʼĵó
   
make config

   ΪҪܹʹ PPP úİ PPP ֧Ԯʹ PPP Ҫ pppd
   Լĵ PPP ֧Ԯߣ
     _________________________________________________________________
   
  PPP (point-to-point) support (CONFIG_PPP) [n] y
     _________________________________________________________________
   
    PC ӲԼҪ Linux ҵϵͳɫش
   Ȼոý˵벢װºģ
   
    1.2.13 ֻҪĸ PPP װã춶಺(multi-port serial cards)
   ˵޸ĺ PPP ԭʼʽԱõ಺֧Ԯ (μ渽
   PPP-2.1.2 ׼ README.linux ˵Ҫϸڲ)
   
   ע:  1.2.13 öԻͷ -  make config 
   д⣬ CTRL-C ¿ʼ
   
7.4  - Linux 1.3.x  2.0.x 

    Linux 2.0.x ĺģʹ Linux 1.2.13 ĳ һΣ
   ڽ˵˵ʵذװԭʼʽ룮Ȼָʼĵ
   ó
   
make config

   ȻҲѡ
   
make menuconfig

   ṩһѡΪϸϵͳó
   ֮
   
   Ҳһ X windows Ϊý
   
make xconfig

   ֱӱ PPP ֧Ԯȥɿģ飮
   
   ֻ Linux һʱʹ PPP ĻὨ
   PPP ֧ԮΪģ飮 ʹ 'kerneld'ĺĽ㿪ʼ
   PPP ʱԶṩ PPP ֧Ԯģ飮 ʡ˱ļ
   䣨ΪûκһݿԱû⣬ģδʹ
   ʱԶƳ
   
   ҪĻҪ򿪿ģ֧Ԯ:
     _________________________________________________________________
   
        Enable loadable module support (CONFIG_MODULES) [Y/n/?] y
     _________________________________________________________________
   
   Ҫ PPP ĺ֧Ԯش:-
     _________________________________________________________________
   
        PPP (point-to-point) support (CONFIG_PPP) [M/n/y/?]
     _________________________________________________________________
   
   ҪɿģĻش M ɣͱɺĵһݣش Y 
   ǣ
   
    1.2.13 ĺĲͬǣ2.0.x ĺҪԶ PPP 豸һ㶼
   Ҫȥоԭʼʽӿõ PPP 豸
   
7.5 PPP-2.2  /proc/net/dev ע

   ʹ PPP-2.2ֽᷢ PPP װõһþ۲
   /proc/net ϵͳ PPP װã ֱʼʹ pppd װòŻᱻ
   :-
     _________________________________________________________________
   
[hartr@archenland hartr]$ cat /proc/net/dev
Inter-|   Receive                  |  Transmit
 face |packets errs drop fifo frame|packets errs drop fifo colls carrier
    lo:  92792    0    0    0    0    92792    0    0    0     0    0
  eth0: 621737   13   13    0   23   501621    0    0    0  1309    0
     _________________________________________________________________
   
   һһ() PPP ᣬῴĿ(һ PPP 
   ȡ):-
     _________________________________________________________________
   
[root@kepler /root]# cat /proc/net/dev
Inter-|   Receive                  |  Transmit
 face |packets errs drop fifo frame|packets errs drop fifo colls carrier
    lo: 428021    0    0    0    0   428021    0    0    0     0    0
  eth0:4788257  648  648  319  650  1423836    0    0    0  4623    5
  ppp0:   2103    3    3    0    0     2017    0    0    0     0    0
  ppp1:  10008    0    0    0    0     8782    0    0    0     0    0
  ppp2:    305    0    0    0    0      297    0    0    0     0    0
  ppp3:   6720    7    7    0    0     7498    0    0    0     0    0
  ppp4: 118231  725  725    0    0   117791    0    0    0     0    0
  ppp5:  38915    5    5    0    0    28309    0    0    0     0    0
     _________________________________________________________________
   
7.6 úĵһ㿼

   Ҫ Linux PC Ϊһ̨ PPP ŷĻ IP
   forwarding ֧Ԯȥ ʹ Linux ·
   ·ӵ·ϵĻѡҲҪģ
   
   Ҫһ··ϣֻ·
   ӦҪİȫϵ⣮ںм IP firewalls ֧ԮǱ
   !
   
   Ҫ IP αװʹǰκһδߡIP ··
   ҲҪã
   
   Ҫʹ IP αװ IP firewalling make config еĵһ
   ϻش yes:-
     _________________________________________________________________
   
Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)?
     _________________________________________________________________
   
   ȻʹЩѣʹ Linux 2.0.X ĵ
   IP αװ IP firewalling ܶû⣮
   
   һºĵİװԼ֮ᣬͿԿʼò PPP
   ᣮ
   
8. ȡ PPP ŷѶ

   Խĳ̨ŷ PPP ֮ǰҪȡеѶ PPP
   ŷϵͳʹ֧ԮԱȡã:-
     * ӷĵ绰
       ˽ý(PABX)ϵͳ£㻹Ҫźŵ˽ý
         ͨ 0  9
     * ŷʹö̬̬ IP ?
       ŷʹþ̬ IP 룬Ҫ֪ PPP Ҫʹ
       ĸ IP 룮  ISP ṩһϷ IP Ĵ·Ҫ
       ֪ʹõ IP 뼰·֣
       󲿷ֵ·ṩ߶ʹö̬ IP 룮ǰ
       ʹõķЩƣ
       Ȼʹʹþ̬ IP 룬󲿷ݵ PPP ŷҲ(Ϊ˰
       ȫ)ͻָ IP 룬Ϊаȫգ Ȼ֪
       ЩѶ
     * ISP ŷ IP ʲ?
       ȻֻҪһӦõҪ
       ܻһ⣮΢ Windows 95 PPP 趨 DNS ĵַ
       ߹дͻˣ  ISP (˾ѯ)ܻ㲻
       Ҫ֪ DNS ŷ IP λַ
        Linux ˵֪һ DNS λַ Ŀǰ Linux  PPP
       ʵв֮ʱָ̬ DNS  IP  - ܿܽҲ
       ᣮ
       ע: ȻLinux (Ϊ PPP Ŀͻ)ܴŷн DNS λַ
       ȻΪ PPP ŷʱ  pppd ѡ dns-addr Ϊͻ
       ָѶ
     * ŷǷҪʹ PAP/CHAP?
       Ҫ֪ "id" Լ "secret" Ż
        ISP ʹԼ룩
     * ŷԶ PPP һǩ֮Ҫκָŷ
       ˵ PPP?
       ĳָ PPP Ļʲ?
     * ŷ΢ Windows NT ϵͳǷʹ΢ PAP/CHAP ϵ
       ͳ?
       ๫˾·ƺʹ Windows NT ϵͳӰȫԣ
       
   ϸעЩѶ  Ҫʹ!
   
9. 趨ݻв

   Ӧȷݻ趨ȷ֪ӵĸв
   
   :-
     * DOS com1: = Linux /dev/cua0 (and /dev/ttyS0)
     * DOS com2: = Linux /dev/cua1 (and /dev/ttyS1)
       ȵ
       
   Ҫĸв׼ PC  com1  com3  IRQ4
    com2  com4  IRQ3
   
   װúʹвһ IRQ Ļܻ⣮ ȷ
   ݻвӵԼΨһһ IRQڵĴв(Ʒʽϼ
   ϵĴв)㽫вϵ IRQ ƿ
   
    Linux 2.0.X ģ cat /proc/interrupts ʹе
   IRQῴ
     _________________________________________________________________
   
 0:    6766283   timer
 1:      91545   keyboard
 2:          0   cascade
 4:     156944 + serial
 7:     101764   WD8013
10:     134365 + BusLogic BT-958
13:          1   math error
15:    3671702 + serial
     _________________________________________________________________
   
   ʾһв IRQ4 (һ)һв IRQ15 (Ҳһ
   в com2, IRQ3  com4  IRQ14δʹãûʾ)
   
   С - Ҫ IRQ ĻҪȷʵ֪Щʲ! 㲻ֻҪ
   ĵǣ濨² jumper㻹Ҫ֪Ǹռʲ
   IRQ ҵ˵ȫ SCSI Ϊ PCҽϵͨ
   ռ IRQ14  15  IDE ص
   
   㻹Ҫע PC ҵϵͳ IRQ λַʹǸ
   ҵϵͳ˻!
   
   ĽвƵ˷Ǳ׼ IRQҪ Linux ÿһõ
   IRQ λַ  setserial ָɣýŵ rc.local
   SysV ϵͳ rc.local е rc.serial Ϊ̵һݣ 
   еĻ˵ָ
     _________________________________________________________________
   
/bin/setserial -b /dev/ttyS2 IRQ 11
/bin/setserial -b /dev/ttyS3 IRQ 15
     _________________________________________________________________
   
   Ȼʹ kerneld гĶ̬봮ģ飬㲻ÿ
   οʱ趨һ IRQ Ͱˣ Ϊģ鱻ƳLinux
   ͻЩ趨
   
   ˣԶ̬ʽ봮ģ飬Ҫÿģʱ趨
   IRQ У
   
9.1 вٶԵע

   ʹø(ʽ)ݻ(14,400 baud )Ĵвٶȱ
   ݻǵݻѹʱ
   
   ĴвҪһ͵ UART (Universal Asynchronous Receiver
   Transmitter) 16550(A) ʹһɵĻ(ɵĴп)
   ܴܿвֻоɵ 8250 UARTʹøݻʱܻᷢ
   
   
   ʹָ
   
setserial -a /dev/ttySx

    Linux رʹõ UART ͣû 16550A ͵ UARTȥһ
   µĴп( $50) һ¿ʱȷܵ IRQ!
   
   ע: 汾 16550 UART Ƭ覴ãܿͱ˶Ҳ
   °ľƬ - 16550A UART ٲ覴õľƬ森Ȼ
   ̫ܸպþ򵽣㻹Ӧÿһ¾Ƭǲ 16550Aر
   һЩڵĴпϣ
   
9.2 в

   ǰLinux  cuaX ʾĴв ttySx ʾƣ
   
   Ժ 2.0.X ֮ҪѾıˣӦÿ ttySx ͬʱʾ
   뼰ƣ ˽ cuaX װδ汾ĺпܻȡ
   
   
9.3 ݻ

   Ϊʹ PPP 㽫ȷݻ  ҪĶݻ
   ʹֲ! 󲿷ֵݻ PPP ĵĳԤѡ 
   :-
     * Ӳ (RTS/CTS) (&K3  Hayes ָݻ)
       
   ӦҪо趨ʹñ׼ Hayes ָ:
     * E1 ָıػӦ (chat )
     * Q0 رִн (chat )
     * S0=0 رԶӦ (ݻ绰)
     * &C1 ֻ֮ز
     * &S0 Data Set Ready (DSR)ԶΪ
     * () Data Terminal Ready
       
   һվ̨ṩ㲻ӵݻʽ趨ܻ
   [36]Modem setup information
   
   ĵݻ֮ݻҲֵо˽⣮ 󲿷
   ִݻԹ̶ٶʹôн棬ʹ绰·л
   ߵٶԶݻܹ
   
   Ϊ split speed operationݻ֧Ԯܣݻ
   нٶȣͨ 115,200 baud  14,400 ݻ
   ˵ 38,400 baud
   
   ʹͨѶ壨 minicomҳݻѶΪ PPP
   趨 ݻ AT&V ָĻӦлرĿǰ趨״
   Ӧò鿴һݻʹֲᣮ
   
   趨ȫŪˣԽɷ AT&F ָصȶ״̬ͨ
   ԣ  ص趨 Ĵ󲿷ִݻУ趨
   ʹ PPP 趨  Ӧ飩
   
   һҳ˱Ҫ趨ִͰдȻ: Խ
   Щ趨ֵݻϵķǻӷԼʵ AT ָͿɽг
    һǽЩȷ趨 PPP ĲŹд룮
   
   ֻ Linux ʹݻӵ ISP ŷ򵥵ǽЩ
   趨ֵݻϵķǻӷԼ(non-volatile RAM)
   
   һ棬ҪӦóʽҵϵͳʹݻյ
   ÿβʱŽЩѶ룬 ˿ȷÿβʱݻ
   ȷ״̬(Щ趨ִиôݻʧ˼ʱ
   ȷʵܷ)
   
9.4 ע

   ڴͨѶ·ʱ򣬿ܻᷢϵıȵܴĻ
   ҪԿæ  ǵãLinux һʹߣ
   ҵϵͳ Ϊȷϲ©ʧڻеϲᳬض©
   ʧҪĳЩķ
   
   ַڴ·ϴĿ:-
     * ʹӲź(Clear To Send/Request to Send - CTS/RTS)
     * ʹź(control S and control Q, also known as XON/XOFF).
       
   Ȼն˻֣Ͽܺܺã PPP ϵʹ
   8 bits ռ  еĳط൱ܴڻᱻת control
   S Լ control Q λԪ飮 ԣݻʹƵĻ
   ᴫױ!
   
   ʹ PPP ĸᣨʹ 8 bits ϱ룩˵ӲǺҪ
   ģʹӲƣ
   
9.5 ݻĲ

   ˴вݻ趨֮ʱ ISP Ͽܷȷ
   趨Ƿ
   
   ʹն˻ͨѶ壨 minicomʹ PPP ߵ̨
   PPP ŷ
   
   ע: ׶ǲԽ PPP   ֻҪ֤ʵӵȷ
   绰ԼΪǩ벢 PPP ȷʵҳŷ͸ʲѶ
   Ϣ
   
   УԽȡ¼һǩĹ̻Сĵأ
   ǳСĵأȷʵдԶŷʾʹԼѶ
   ϢԼκν PPP Ҫ´ָ
   
   ŷʹ PAPܲῴǩʾţ(ֱʾ
   )ͨѶЭ()өĻϣ
   
   һЩ:-
   
     * ĳЩŷ൱: ģʽʹ/뷽ʽʹ
       PAP ǩ룮  ISP ˾վ̨ʹ PAP ûөĻ
       Ҳʾˣ
     * ĳЩվ̨ҪһЩʼȻ׼ PAP 
     * ĳЩ PPP ŷǱ - Ǿȴͳκϣֱ
       ͻ˲벢ͳϷЭ Ҫӵ PPP ŷǱ
       ģʽģ㽫ῴκ!
     * ĳЩŷ㰴 ENTER ǰ PPP - ȷǩ뵫δ
       Ļ!
       
   ֵò  ĳЩŷÿǩʱıʾʱ
   !  Linux ÿ㲦ʱҪܹϵҪʾ
   :-
     * ҪʹƵʾ;
     * Ҫʾ;
       
   뷢ĳָŷ˵ PPPҲҪҳһǩ֮
   ŷָ PPP ʾ
   
   ŷԶ PPP Ļһǩɣ㽫ʼөĻϳ
      PPP ŷ˴͸Ļ𶯲 PPP ߵѶ
   
   ⿴ӦûĶ:-
     _________________________________________________________________
   
~y}#.!}!}!} }8}!}$}%U}"}&} } } } }%}& ...}'}"}(}"} .~~y}
     _________________________________________________________________
   
   (һֱ! )
   
   ĳЩϵͳ PPP ŷȷؼ𶯣ͨΪŷ
   ʹͬʹƣ PPP ǩ뼰һʹý(shell)
   ǩ룮 һǩͷָһΣ㽫 PPP 
   ŷ𶯵Ѷ  ԹҶˣ
   
   ûʱөĻϿЩ(ҪĻǩ벢
   PPP ŷ)  Enter ܷ PPP ŷ...
   
   ʱͿԹҶݻͨǣٵؼ +++ һݻ
   Ӧ OK Ȼ ATHO ָ
   
   㲻ʹݻĻĶݻʹֲᣬͨѶ
   ʹֲԼ Serial HOWTO! һ⣬ǰ˵ģ
   
10. Ƶλַ(DNS)

   Ȼϲȡƣϲ֣  TCP/IP ·ϣҲ
   ·ǽضƺĳ̨ÿ̨һ
   ض森 ԣҵ Linux վΪ archenland 
    interweft.com.au  Ŀеλַ
   archenland.hedland.edu.au (Ϊ FQDN - fully qualified domain name
   )
   
   ȻΪʹ·ϵҵĵ̨ʵϵ·
   ͨʱǽ IP ֪ģ
   
   ѻԼ򣩵ת루Ϊ·ʵʹõ IP 
   ṩƷ֮Ĺ
   
   :-
     * ĻҪ֪ĳضԵ IP λַҪѶӦóʽ
        Linux PC ϵ'ƽ'ѯʴѶ;
     * ƽѯڲƵ( /etc/hosts Լ/֪
       ѶŷƽʵʵΪ
       /etc/host.conf );
     * ƵУԴ˴𰸻ش;
     * ָŷУ PC ûѯ;
     * ⲿŷѾ֪ѯƵ IP 룬Դ˻ش𣮷
       ͸·ŷѰѶ ⲿŷ
       ὫѶظԭѯʵƽȻᴫҪѶӦóʽ
       
   㴴 PPP ʱҪ Linux ҵ
   ƶյ IP 루λַѶͿʹûƶĵ
   Կ԰Щת IP 룮
   
   һ /etc/hosts 
   ·Ļȫܵ£ һʹ춻Ƶ IP
   루Ҫǵȫ IP λַǲܵĳС·ϣ
   
   õķ趨 Linux ʹ֪õȡƵѶ  
   أ ŷϵͳṩҪȫǰ IP 
   뵽 /etc/resov.conf 
   
10.1 /etc/resolv.conf 

    PPP ŷϵͳʹ֧ԮԱӦҪṩ DNS  IP 
   루ֻҪһ  ڳʱԶЩ
   
   ǰLinux  MS Windows 95 һķʽ趨ŷ
   IP 룮 (ò) ISP ṩѶ!
   
    /etc/resolv.conf Ӧû:
     _________________________________________________________________
   
domain your.isp.domain.name
nameserver 10.25.0.1
nameserver 10.25.1.2
     _________________________________________________________________
   
   ༭ûеĻͽһµģԳ ISP ṩѶ
   ӵԼȨӦ:-
   
-rw-r--r--   1 root     root           73 Feb 19 01:46 /etc/resolv.conf

   Ϊ·Ѿ /etc/resolv.conf Ļֻ
   Ҫ򵥵İ PPP ߵ DNS ŷ IP ӵеĵＴɣ
   
10.2 /etc/host.conf 

   ҲӦü /etc/host.conf Ƿ趨ȷӦ
     _________________________________________________________________
   
order hosts,bind
multi on
     _________________________________________________________________
   
   ƽŷѯ֮ǰʹƵеѶ
   
11. ʹ PPP  root Ȩ

   Ϊ PPP Ҫ趨·豸ĵͱԼĶ
   Ҫ root ȨЩ£
   
    root ʹҪܽ PPP ߣ pppd ʽӦΪ root
   ִ(setuid):-
   
-rwsr-xr-x   1 root     root        95225 Jul 11 00:27 /usr/sbin/pppd

    /usr/sbin/ppd 趨Ϊ root ָ:
   
chmod u+s /usr/sbin/pppd

    pppd  root ȨִУʹһʹִеģ һ
   ʹִе pppd бҪȨ޽·漰ĵͱ
   
    root ִеĳʽڰȫǱڵ©趨Ϊ
   'setuid' ĳʽǳСģ سʽ( pppd)ѾСĵ׫д
    root ִеΣսͣӦǰȫ(֤)
   
   
   ϣϵͳرϣϵͳκʹ߶
   ʼ PPP ᣬӦð ppp-on/off ָ趨Ϊȫ˶Զȡ
   ִУ PC ֻʹŲ
   
   Ȼ㲻ϣκ˶ʼ PPP ߣ磬ĺ Linux
   PC ʺŶ㲻ϣûļල·㽫ýһ
   PPP Ⱥ飨༭ /etc/group :
     *  pppd 趨Ϊ root ȨִУӵ root Ⱥ PPP
       Ȩ޶رգӦ
       
-rwsr-x---   1 root     PPP        95225 Jul 11 00:27 /usr/sbin/pppd

     * ʹ ppp-on/off ָʹ root ԼȺ PPP ӵ
     * ʹ ppp-of/off ָȺ PPP ȡִ
       
  -rwxr-x---   1 root     PPP           587 Mar 14  1995 /usr/sbin/ppp-on
  -rwxr-x---   1 root     PPP           631 Mar 14  1995 /usr/sbin/ppp-off

     * رĴȡȨ
     * ܹ PPP ʹ߼ /etc/group  PPP Ⱥ
       
   ʹˣһʹȻ޷ķʽֹᣮ ִ ppp-off ָ
   Ҫ root ȨޣȻΣκʹ߶Թصݻ(򽫵绰ڽʽ
   ݻ)
   
   һ(õ)취ʹʹ sudo  ppp ᣮ 
   ѵİȫԲҿ趨κ(ε)ʹʹָ/
   ᣮ ʹ sudo һλεʹǬȫ/ PPP 
   ᣮ
   
12. 趨 PPP ӵ

    root ǩЩĿ¼ұ༭Щ PPP ĵ
   ʹеʹ߶ʹ PPP
   
   PPP ʹü趨 PPP ᣮЩ PPP 2.1.2  2.2 е
   λöͬ
   
    PPP 2.1.2 Щ:-
     _________________________________________________________________
   
/usr/sbin/pppd               # PPP ִе
/usr/sbin/ppp-on             # /ָ
/usr/sbin/ppp-off            # ָ
/etc/ppp/options             # ʹõѡ
/etc/ppp/options.ttyXX   # ĳһضͨѶʹõѡ
     _________________________________________________________________
   
    PPP 2.2 Щ:-
     _________________________________________________________________
   
/usr/sbin/pppd                  # PPP ִе
/etc/ppp/scripts/ppp-on         # /ָ
/etc/ppp/scripts/ppp-on-dialer  # ŵ chat ָ岿
/etc/ppp/scripts/ppp-off        # ָ
/etc/ppp/options                # ʹõѡ
/etc/ppp/options.ttyXX          # ĳһضͨѶʹõѡ
     _________________________________________________________________
   
   Red Hat Linux ʹӦע׼ Red Hat 4.X װЩָ
   /usr/doc/ppp-2.2.0f-2/scripts
   
    /etc Ŀ¼ӦҪиĿ¼:
   
drwxrwxr-x   2 root     root         1024 Oct  9 11:01 ppp

   ڵĻ  Ȩ޽
   
   Ŀ¼ѾڣӦûһΪ options.tpl ѡ壮
   森
   
   Ϊ PPP ѡĽӡ pppd ʹ
   ĶǺõģ ȻʹΪ /etc/ppp/options
   ĻǽԼģûаָѡ
   ܻ  ̵öұȽĶά
   
   ж·ݻ͵ PPP ŷὨһһ
   㻯 /etc/ppp/options аÿṩ֧ԮĴвʹ
   ĹͬѡΪÿһҪ趨Խ PPP ߵĴ·ѡ
   
   
   ЩΪ options.ttyx1, options.ttyx2 ƣ x 㴮в
   ʵ룩
   
   Ȼ춵һ PPP ߣֱʹ /etc/ppp/options 
   һְ취԰еѡŽ pppd ָΪ
   
   ʹ /etc/ppp/options.ttySx 趨ʽȽ׼ά ʹ
    PPP ߵüͬĽڵȥĻͿ
   /etc/ppp/options.site Ϊÿڵ㽨ѡȻʱָѡ
   Ϊ PPP ָĲ (ʹ file option-file  pppd ָ)
   
   
12.1  options.tpl 

   ĳЩ PPP ķ׼ƺ©ʧ options.tpl и
   ĵ ҽ㲻Ҫֱӱ༭Լ /etc/ppp/options
    һµĵȻ༭õȽϺãŪ༭ĵ
   Իͷԭʼٶȿʼ
     _________________________________________________________________
   
# /etc/ppp/options -*- sh -*- general options for pppd
# created 13-Jul-1995 jmk
# autodate: 01-Aug-1995
# autotime: 19:45

# Use the executable or shell command specified to set up the serial
# line.  This script would typically use the "chat" program to dial the
# modem and start the remote ppp session.
#connect "echo You need to install a connect command."

# Run the executable or shell command specified after pppd has
# terminated the link.  This script could, for example, issue commands
# to the modem to cause it to hang up if hardware modem control signals
# were not available.
#disconnect "chat -- \d+++\d\c OK ath0 OK"

# async character map -- 32-bit hex; each bit is a character
# that needs to be escaped for pppd to receive it.  0x00000001
# represents '\x01', and 0x80000000 represents '\x1f'.
#asyncmap 0

# Require the peer to authenticate itself before allowing network
# packets to be sent or received.
#auth

# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
# on the serial port.
#crtscts

# Use software flow control (i.e. XON/XOFF) to control the flow of data
# on the serial port.
#xonxoff

# Add a default route to the system routing tables, using the peer as
# the gateway, when IPCP negotiation is successfully completed.  This
# entry is removed when the PPP connection is broken.
#defaultroute

# Specifies that certain characters should be escaped on transmission
# (regardless of whether the peer requests them to be escaped with its
# async control character map).  The characters to be escaped are
# specified as a list of hex numbers separated by commas.  Note that
# almost any character can be specified for the escape option, unlike
# the asyncmap option which only allows control characters to be
# specified.  The characters which may not be escaped are those with hex
# values 0x20 - 0x3f or 0x5e.
#escape 11,13,ff

# Don't use the modem control lines.
#local

# Specifies that pppd should use a UUCP-style lock on the serial device
# to ensure exclusive access to the device.
#lock

# Use the modem control lines.  On Ultrix, this option implies hardware
# flow control, as for the crtscts option.  (This option is not fully
# implemented.)
#modem

# Set the MRU [Maximum Receive Unit] value to <n> for negotiation.  pppd
# will ask the peer to send packets of no more than <n> bytes. The
# minimum MRU value is 128.  The default MRU value is 1500.  A value of
# 296 is recommended for slow links (40 bytes for TCP/IP header + 256
# bytes of data).
#mru 542

# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
# notation (e.g. 255.255.255.0).
#netmask 255.255.255.0

# Disables the default behaviour when no local IP address is specified,
# which is to determine (if possible) the local IP address from the
# hostname. With this option, the peer will have to supply the local IP
# address during IPCP negotiation (unless it specified explicitly on the
# command line or in an options file).
#noipdefault

# Enables the "passive" option in the LCP.  With this option, pppd will
# attempt to initiate a connection; if no reply is received from the
# peer, pppd will then just wait passively for a valid LCP packet from
# the peer (instead of exiting, as it does without this option).
#passive

# With this option, pppd will not transmit LCP packets to initiate a
# connection until a valid LCP packet is received from the peer (as for
# the "passive" option with old versions of pppd).
#silent

# Don't request or allow negotiation of any options for LCP and IPCP
# (use default values).
#-all

# Disable Address/Control compression negotiation (use default, i.e.
# address/control field disabled).
#-ac

# Disable asyncmap negotiation (use the default asyncmap, i.e. escape
# all control characters).
#-am

# Don't fork to become a background process (otherwise pppd will do so
# if a serial device is specified).
#-detach

# Disable IP address negotiation (with this option, the remote IP
# address must be specified with an option on the command line or in an
# options file).
#-ip

# Disable magic number negotiation.  With this option, pppd cannot
# detect a looped-back line.
#-mn

# Disable MRU [Maximum Receive Unit] negotiation (use default, i.e.
# 1500).
#-mru

# Disable protocol field compression negotiation (use default, i.e.
# protocol field compression disabled).
#-pc

# Require the peer to authenticate itself using PAP.
# This requires TWO WAY authentication - do NOT use this for a standard
# PAP authenticated link to an ISP as this will require the ISP machine
# to authenticate itself to your machine (and it will not be able to).
#+pap

# Don't agree to authenticate using PAP.
#-pap

# Require the peer to authenticate itself using CHAP [Cryptographic
# Handshake Authentication Protocol] authentication.
# This requires TWO WAY authentication - do NOT use this for a standard
# CHAP authenticated link to an ISP as this will require the ISP machine
# to authenticate itself to your machine (and it will not be able to).
#+chap

# Don't agree to authenticate using CHAP.
#-chap

# Disable negotiation of Van Jacobson style IP header compression (use
# default, i.e. no compression).
#-vj

# Increase debugging level (same as -d).  If this option is given, pppd
# will log the contents of all control packets sent or received in a
# readable form.  The packets are logged through syslog with facility
# daemon and level debug. This information can be directed to a file by
# setting up /etc/syslog.conf appropriately (see syslog.conf(5)).  (If
# pppd is compiled with extra debugging enabled, it will log messages
# using facility local2 instead of daemon).
#debug

# Append the domain name <d> to the local host name for authentication
# purposes.  For example, if gethostname() returns the name porsche,
# but the fully qualified domain name is porsche.Quotron.COM, you would
# use the domain option to set the domain name to Quotron.COM.
#domain <d>

# Enable debugging code in the kernel-level PPP driver.  The argument n
# is a number which is the sum of the following values: 1 to enable
# general debug messages, 2 to request that the contents of received
# packets be printed, and 4 to request that the contents of transmitted
# packets be printed.
#kdebug n

# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
# requests a smaller value via MRU negotiation, pppd will request that
# the kernel networking code send data packets of no more than n bytes
# through the PPP network interface.
#mtu <n>

# Set the name of the local system for authentication purposes to <n>.
# This will probably have to be set to your ISP user name if you are
# using PAP/CHAP.
#name <n>

# Set the user name to use for authenticating this machine with the peer
# using PAP to <u>.
# Do NOT use this if you are using 'name' above!
#user <u>

# Enforce the use of the host name as the name of the local system for
# authentication purposes (overrides the name option).
#usehostname

# Set the assumed name of the remote system for authentication purposes
# to <n>.
#remotename <n>

# Add an entry to this system's ARP [Address Resolution Protocol]
# table with the IP address of the peer and the Ethernet address of this
# system.
#proxyarp

# Use the system password database for authenticating the peer using
# PAP.
#login

# If this option is given, pppd will send an LCP echo-request frame to
# the peer every n seconds. Under Linux, the echo-request is sent when
# no packets have been received from the peer for n seconds. Normally
# the peer should respond to the echo-request by sending an echo-reply.
# This option can be used with the lcp-echo-failure option to detect
# that the peer is no longer connected.
#lcp-echo-interval <n>

# If this option is given, pppd will presume the peer to be dead if n
# LCP echo-requests are sent without receiving a valid LCP echo-reply.
# If this happens, pppd will terminate the connection.  Use of this
# option requires a non-zero value for the lcp-echo-interval parameter.
# This option can be used to enable pppd to terminate after the physical
# connection has been broken (e.g., the modem has hung up) in
# situations where no hardware modem control lines are available.
#lcp-echo-failure <n>

# Set the LCP restart interval (retransmission timeout) to <n> seconds
# (default 3).
#lcp-restart <n>

# Set the maximum number of LCP terminate-request transmissions to <n>
# (default 3).
#lcp-max-terminate <n>

# Set the maximum number of LCP configure-request transmissions to <n>
# (default 10).
# Some PPP servers are slow to start up. You may need to increase this
# if you keep getting 'serial line looped back' errors and your are SURE
# that you have logged in correctly and PPP should be starting on the server.
#lcp-max-configure <n>

# Set the maximum number of LCP configure-NAKs returned before starting
# to send configure-Rejects instead to <n> (default 10).
#lcp-max-failure <n>

# Set the IPCP restart interval (retransmission timeout) to <n>
# seconds (default 3).
#ipcp-restart <n>

# Set the maximum number of IPCP terminate-request transmissions to <n>
# (default 3).
#ipcp-max-terminate <n>

# Set the maximum number of IPCP configure-request transmissions to <n>
# (default 10).
#ipcp-max-configure <n>

# Set the maximum number of IPCP configure-NAKs returned before starting
# to send configure-Rejects instead to <n> (default 10).
#ipcp-max-failure <n>

# Set the PAP restart interval (retransmission timeout) to <n> seconds
# (default 3).
#pap-restart <n>

# Set the maximum number of PAP authenticate-request transmissions to
# <n> (default 10).
#pap-max-authreq <n>

# Set the CHAP restart interval (retransmission timeout for
# challenges) to <n> seconds (default 3).
#chap-restart <n>

# Set the maximum number of CHAP challenge transmissions to <n>
# (default 10).
#chap-max-challenge

# If this option is given, pppd will re-challenge the peer every <n>
# seconds.
#chap-interval <n>

# With this option, pppd will accept the peer's idea of our local IP
# address, even if the local IP address was specified in an option.
#ipcp-accept-local

# With this option, pppd will accept the peer's idea of its (remote) IP
# address, even if the remote IP address was specified in an option.
#ipcp-accept-remote
     _________________________________________________________________
   
12.2 Ӧʹʲѡ? ( PAP/CHAP)

   ţȫṩӦ춴󲿷ݵŷ
   
   Ȼ޷ĻĶ嵵(/etc/ppp/options.tpl) Լ pppd 
   ʹֲᲢҸ֮ŷϵͳʹ֧ԮԱ
   
   㻹ӦעչʾָҲʹһЩ pppd ѡԱ
   ׵Щ
     _________________________________________________________________
   
# /etc/ppp/options (NO PAP/CHAP)
#
#  pppd 뱳ִ
-detach
#
# ʹݻ
modem
# ʹ uucp ̬Աȡôװ
lock
# ʹӲ
crtscts
# ڵͱнὨΪԤװ
defaultroute
# ʹκ"ݳ"
asyncmap 0
# ͷСΪ 552 bytes
mtu 552
# շСΪ 552 bytes
mru 552
#
#-------END OF SAMPLE /etc/ppp/options (no PAP/CHAP)
     _________________________________________________________________
   
13.  PPP ŷʹ PAP ֤(Password Authentication Protocol)

   ӵŷҪ PAP  CHAP ֤ҪһĹ
   
   ѡУ漸
     _________________________________________________________________
   
#
#  pppd ʹ ISP Ϊ֤е""
name <your ISP user name>    # Ҫıһ
#
# ִ PPP *ŷ* Ҫʹ PAP  CHAP ֤ʵȥ
# ע⣮ҪΪͻŷʱʹôѡ(ʹʹ PAP  CHAP)
# ΪǸŷΪԼĻṩ֤(⼸ǲܵģ
# ʧ)
#+chap
#+pap
#
# ʹ /etc/ppp/pap-secrets о룬ȥһеע⣮
# ע:  Windows NT ϵԶ˴ȡ΢ǲͬģ
#+papcrypt
     _________________________________________________________________
   
13.1 ʹ MSCHAP

   ΢ Windows NT Զ˴ȡ(RAS)Ա趨Ϊʹһ
   CHAP(Challenge/Handshake Authentication Protocol) ı֣  PPP
   ԭʼʽУҵһ README.MSCHAP80 ĵ£
   
   Կ pppd жŷǷҪʹô֤Э ŷ
   ʹ MS CHAP ֤ῴһ
     _________________________________________________________________
   
rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap 80> <magic 0x46a3>]
     _________________________________________________________________
   
   ؼѶϢ auth chap 80
   
   Ϊʹ MS CHAP± pppd ֧ԮЭ μ PPP ԭʼ
   ʽе README.MSCHAP80 ˵αʹô˱Э
   
   㻹Ҫעĳʽֻ Linux PPP Ϊͻ MS Windows NT
   ŷõģ ֧Ԯ Linux Ϊÿͻʹ MSCHAP80 ֤ PPP 
   
   
13.2 PAP/CHAP 뵵

   ʹ PAP  CHAP ֤뽨Щ뵵:
     _________________________________________________________________
   
/etc/ppp/pap-secrets
/etc/ppp/chap-secrets
     _________________________________________________________________
   
   Щӵ߱Ϊ rootȺΪ rootͬʱΪ˰ȫȨӦΪ 740
   
    PAP  CHAP һҪָ֤ϵͳʹ
   ģ
   
   "? ʲ᲻ͬ?" ʣ
   
   ŶһĵԽŷ PPP ߣϵͳϵκʹ߶ʹ
   ô - ֻѣ ҲΪʹ PPP ·(LAN)
   һ·(WAN)ԭ
   
   PAP ( CHAP Ҳ)Ҫ˫֤ - ҲÿһҪһϷ
   һϣ ȻⲢǴ󲿷ṩʽ PAP ֤ӵ PPP ŷ
   ķʽ
   
   Ҳ˵ ISP ܻһʹӵǵϵ
   ͳӵ·ϣ  ISP ԵһҲȤ
   ܱʹ ISP ϵʹΪԵƣ
   
   Ҫʹ pppd ѡ name user name ɣ ˣʹ ISP
   ʹƣһ
     _________________________________________________________________
   
name your_user name_at_your_ISP
     _________________________________________________________________
   
    /etc/ppp/options У
   
   Ӽ˵PAP ʵӦҪʹ user our_user name_at_your_ISP ѡ
   ʹõ PAP Ļ pppd ԰ name Ϊ user ʹ
    name ѡĺô CHAP ҲЧģ
   
   Ϊ PAP/CHAP ϵԵģڼҲҪָԶ˵Եƣ Ȼ
   󲿷ֵֻһ ISP 뵵Զʹͨ
   Ԫ(*) 
   
    ISP жݻӵͬն˻ŷ  ÿն˻ŷ
   вͬƣӵһģԶתߣ벦ӣ ĳЩ¿
   ˶ܲԤ֪Զ˵Ե!
   
13.3 PAP 뵵

   /etc/ppp/pap-secrets 
     _________________________________________________________________
   
# Secrets for authentication using PAP
# client        server       secret     acceptable_local_IP_addresses
     _________________________________________________________________
   
   ĸλԿհ׷ֽһǿհ(ʹö̬ IP 
   ISP ṩľ̬ IP)
   
   ٶ ISP ʹ fred  flintstone ĻӦ
    /etc/ppp/options[.ttySx] 趨 name fred ѡҰ
   /etc/ppp/pap-secrets 
     _________________________________________________________________
   
# Secrets for authentication using PAP
# client        server  secret          acceptable local IP addresses
fred            *       flintstone
     _________________________________________________________________
   
   ˵ fred ػƣѾ߹ pppd ʹƣ
   ʹⲻǱػҲһԼκεŷʹ flintstone
   루룩
   
   ע⵽ǲҪָص IP λַҪҪʹһضģ
   ̶ IP λַ ʹһ̶ IPҲеͨΪ춴
   ݵ PPP ŷ(Ϊ˰ȫ)Զϵͳָ IP 룮
   
13.4 CHAP 뵵

   Ŀǰ pppd 汾ҪҪлϵķ  ˵ܹôĻ
   ԶŷԼԶŷĻ϶ܽУ
   
   ԣĻ fred Զ barney ĻǸ
   /etc/ppp/options.ttySx Ϊ name fred remotename barney Զ˻
   ӦΪ name barney remotename fred
   
   fred ̨ /etc/ppp/chap-secrets 
     _________________________________________________________________
   
# Secrets for authentication using CHAP
# client        server  secret            acceptable local IP addresses
fred            barney  flintstone
barney          fred    wilma
     _________________________________________________________________
   
    barney 
     _________________________________________________________________
   
# Secrets for authentication using CHAP
# client        server  secret            acceptable local IP addresses
barney          fred    flintstone
fred            barney  wilma
     _________________________________________________________________
   
   رҪע˫˫֤ĿصĻԶ
   ֤ԼԶػ򱾵ػ֤Լ
   
13.5  PAP ֤

   һЩʹӵжһʹ PAP ŷߣ ʹÿ
   ӵĻ϶ͬⲢ⣮
   
   Ȼʹϵͳ(ȫ)Ͼͬʹƣ 
    /etc/ppp/pap-secrets ȷѡʵһʱ⣮
   
   ϵأPPP ṩһֻԿ˷ѣ PPP ʹ remotename ѡ
   ΪԶŷ趨һ""
   
   ӵ PPP ŷʹ fredԴ˷ʽ
   /etc/ppp/pap-secrets 
     _________________________________________________________________
   
fred    pppserver1      barney
fred    pppserver2      wilma
     _________________________________________________________________
   
   ˣ pppserver1 ʱ pppd ѡʹ name fred remotename
   pppserver1  pppserver2 ʱʹ name fred remotename pppserver2
   
   Ϊʹ pppd ʹ file filename ָ ppp ѡԽһ
   ָӵÿ PPP ŷȷȡѡѡȷ
   remotename ѡ
   
14. ֶʽ PPP 

   Ѿ /etc/ppp/options Լ /etc/resolv.conf Լ
   Ҫ /etc/ppp/pap|chap-secrets Խֶ
   PPP Щ趨һʹֶǽԶù
   
   
   Ҫ£ͨѶڲݻ½ Minicom
     ALT Q ڱȽϾɵ minicom 汾ʹ CTRL A Q
   
   ȷ root ǩ룮
   
   ͨѶ壨 minicomӵ PPP ŷƽһǩ
    Ҫĳָŷϵ PPPɣ㽫ῴ
   ǰ
   
   ʹ PAP  CHAP ĻֻߵԶϵͳӦþͻԶ
    PPP 㽫ûǩ¾ͼЩȻĳЩŷϲ
   ᷢ -  Enter ܷ񿴵Щ
   
   ڣڲҪݻ½ͨѶ( minicom ʹ ALT Q 
   CTL A Q) Linux ʾ£ root ֣
     _________________________________________________________________
   
pppd -d -detach /dev/ttySx 38400 &
     _________________________________________________________________
   
   -d ѡ  ppp ʱġ̸¼ϵͳ
   ¼ȥ  鷳õģ
   
   ݻĵӦҪ˸ΪҪ PPP ߣPPP ߵĽỨ
   ʱ䣮
   
   ʱԹ۲ PPP 棬ɷָ
     _________________________________________________________________
   
ifconfig
     _________________________________________________________________
   
   ӵеκ̫·Լ豸֮⣬ӦûῴѶ:
     _________________________________________________________________
   
ppp0     Link encap:Point-Point Protocol
         inet addr:10.144.153.104  P-t-P:10.144.153.51 Mask:255.255.255.0
         UP POINTOPOINT RUNNING  MTU:552  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0
         TX packets:0 errors:0 dropped:0 overruns:0
     _________________________________________________________________
   
   
     * inet addr:10.144.153.10 Ǹ˵ IP 룮
     * P-t-P:10.144.153.5 ŷ˵ IP 룮
       
   (Ȼ ifconfig ᱨЩ IP 룬 PPP ŷʹõģ)
   
   ע: ifconfig ҲѾ𶯲ִ!
   
   û ppp װгõѶ:
     _________________________________________________________________
   
ppp0     Link encap:Point-Point Protocol
         inet addr:0.0.0.0  P-t-P:0.0.0.0  Mask:0.0.0.0
         POINTOPOINT  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0
         TX packets:0 errors:0 dropped:0 overruns:0
     _________________________________________________________________
   
    PPP ߲ûн... йشų½!
   
   㻹ԿⲿԶ˻()ĵ·Ҫ㣬ָ
     _________________________________________________________________
   
route -n
     _________________________________________________________________
   
   Ӧÿ:-
     _________________________________________________________________
   
Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
10.144.153.3    *               255.255.255.255 UH    1500   0        1 ppp0
127.0.0.0       *               255.0.0.0       U     3584   0       11 lo
10.0.0.0        *               255.0.0.0       U     1500   0       35 eth0
default         10.144.153.3    *               UG    1500   0        5 ppp0
     _________________________________________________________________
   
   رעĿָǵ ppp װã
   
   һ( H űʾ)ǿⲿӵ
   - ûˣ
   
   ڶԤ·( pppd  defaultroute ѡ) ݵ·
   ǵ Linux PC κβڲ̫·ķ͵ - ָ
   · - Ҳǵ PPP ŷ  PPP ŷΪǽ
   ·Ӧķͻظǣ
   
   ڵͱûĿЩ²Ծ رϵͳ
   ¼(syslog)ʾһѶϢ pppd ޷ȡѴڵԤ·
   һԤ·ָ̫· - ָ·ȡ:
   ֻһԤ·!!!
   
   һϵͳʼҳԤｨ(
   route add default... ָָ) ĳ route add net...
   
   ڽ ifconfig ֮ر IP  'ping' һ¸ŷԲ
   ᣬ
     _________________________________________________________________
   
ping 10.144.153.51
     _________________________________________________________________
   
   Ӧûյ
     _________________________________________________________________
   
PING 10.144.153.51 (10.144.153.51): 56 data bytes
64 bytes from 10.144.153.51: icmp_seq=0 ttl=255 time=328.3 ms
64 bytes from 10.144.153.51: icmp_seq=1 ttl=255 time=190.5 ms
64 bytes from 10.144.153.51: icmp_seq=2 ttl=255 time=187.5 ms
64 bytes from 10.144.153.51: icmp_seq=3 ttl=255 time=170.7 ms
     _________________________________________________________________
   
   ⽫һֱӡȥ   CTRL C ֹʱ㽫յѶϢ:
     _________________________________________________________________
   
--- 10.144.153.51 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 170.7/219.2/328.3 ms
     _________________________________________________________________
   
   Ŀǰܺã
   
    ping ĳ̨ PPP ŷԼƣһ
   طһ̨֪Ѿ𶯶
     _________________________________________________________________
   
ping sunsite.unc.edu
     _________________________________________________________________
   
   ʱһͣ٣Ϊ Linux  /etc/resolv.conf ָ DNS ȡ
   Ҫ 'ping' Ӧ IP λַ  ԲҪģ㽫
   ݻƺ˸ ڶݵʱ㽫յ
     _________________________________________________________________
   
 PING sunsite.unc.edu (152.2.254.81): 56 data bytes
64 bytes from 152.2.254.81: icmp_seq=0 ttl=254 time=190.1 ms
64 bytes from 152.2.254.81: icmp_seq=1 ttl=254 time=180.6 ms
64 bytes from 152.2.254.81: icmp_seq=2 ttl=254 time=169.8 ms
64 bytes from 152.2.254.81: icmp_seq=3 ttl=254 time=170.6 ms
64 bytes from 152.2.254.81: icmp_seq=4 ttl=254 time=170.6 ms
     _________________________________________________________________
   
   һΣɰ CTRL C ֹȡͳ...
     _________________________________________________________________
   
--- sunsite.unc.edu ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 169.8/176.3/190.1 ms
     _________________________________________________________________
   
   ûյκλӦ ping һ ISP ṩ DNS  IP λַ
   õ϶Ľῴ /etc/resolv.conf 
   
   
   ûн·ϣ ISP ڽͻظ
   ʱ⣮ ĵͱû⣬ ISP 磮һ
    ISP ĺ÷һҵϵͳӣ ͿԶ
   ߣ
   
   һɼָֹ
     _________________________________________________________________
   
ppp-off
     _________________________________________________________________
   
   һζݵ֮ͣᣬݻӦûԼҶϵ绰
   
   ָ޷Ļ᲻ǹصݻͨѶ岢
    +++ жݻȻᵱյݻ OK ʾʱ ATH0 Ҷϵ绰
   
   Ҳ pppd 
     _________________________________________________________________
   
rm -f /var/lock/LCK..ttySx
     _________________________________________________________________
   
15. ʹԶ - ָ

   һķֶʽǩ룬õǽһЩָԶ
   ΪЩ
   
   һ chat ָԶǩԼ PPP ĳģ
   root  ppp ȺԱֻ֣Ƿһָߣ
   
15.1 ʹƣָ֤

    ISP Ҫʹ PAP/CHAP ĻЩΪ׼!
   
    ppp ׼װȷӦû  PPP 2.1.2 
   /usr/sbin  PPP 2.2  /etc/ppp/scriptsЩ
   
    PPP-2.1.2
   
ppp-on
ppp-off

    PPP-2.2
   
ppp-off
ppp-on
ppp-on-dialer

   ڣʹ PPP 2.1.2ǿҽɾЩ Ǳ
   ڵ - Ҫǹúܺ - Ҳ˺ܳһʱ(һ
   HOWTO ĵһƼ)!
   
   Ϊ ppp 2.1.2 ʹߵȨ棬бȽϺõ嵵ЩǴ ppp 2.2
   ׼ģ ҽ㿽ʹЩָҪþɵ
   PPP-2.1.2 ָ壮
   
15.2 ppp-on ָ

   ʵߵһָеĵһ
     _________________________________________________________________
   
#!/bin/sh
#
# Script to initiate a PPP connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command.  However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=555-1212      # The telephone number for the connection
ACCOUNT=george          # The account name for logon (as in 'George Burns')
PASSWORD=gracie         # The password for this account (and 'Gracie Allen')
LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0       # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0   # The proper netmask if needed
#
# Export them so that they will be available to 'ppp-on-dialer'
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in.  Please use the absolute file name as the $PATH variable is not
# used on the connect option.  (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
#
#
exec /usr/sbin/pppd debug /dev/ttySx 38400 \
        $LOCAL_IP:$REMOTE_IP \
        connect $DIALER_SCRIPT
     _________________________________________________________________
   
    ppp-on-dialer ָ:-
     _________________________________________________________________
   
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
/usr/sbin/chat -v                                       \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-+++\c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDT$TELEPHONE                  \
        CONNECT         ''                              \
        ogin:--ogin:    $ACCOUNT                        \
        assword:        $PASSWORD
     _________________________________________________________________
   
    PPP-2.2 Уppp-off ָ忴:-
     _________________________________________________________________
   
#!/bin/sh
######################################################################
#
# Determine the device to be terminated.
#
if [ "$1" = "" ]; then
        DEVICE=ppp0
else
        DEVICE=$1
fi

######################################################################
#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
        kill -INT `cat /var/run/$DEVICE.pid`
#
# If the kill did not work then there is no process running for this
# pid. It may also mean that the lock file will be left. You may wish
# to delete the lock file at the same time.
        if [ ! "$?" = "0" ]; then
                rm -f /var/run/$DEVICE.pid
                echo "ERROR: Removed stale pid file"
                exit 1
        fi
#
# Success. Let pppd clean up its own junk.
        echo "PPP link to $DEVICE terminated."
        exit 0
fi
#
# The ppp process is not running for ppp0
echo "ERROR: PPP link is not active on $DEVICE"
exit 1
     _________________________________________________________________
   
15.3 ༭ṩʼָ

   ΪµֳָݣǷֱ༭ǣ
   
  ppp-on ָ
  
   㽫ñ༭ָԷӳ ISP ʹƣ ISP 룬
   ISP ĵ绰룮
   
   ÿһ TELEPHONE= ʵ趨ڵȺұߵѶ (Ȼ
   עⲿ) ˱༭ÿһʹ ISP ȷģ
   
   ң(Ҫ) /etc/ppp/options 趨 IP 룬ɾ
     _________________________________________________________________
   
$LOCAL_IP:$REMOTE_IP \
     _________________________________________________________________
   
   Уȷ DIALER_SCRIPT ָ㽫ҪʹõĲָȫ·ƣ
   ˣƶıָƣȷȷظı ppp-on ָ
   һУ
   
  ppp-on-dialer ָ
  
   ǵڶָʵʽǵ PPP ᣮ
   
   ע: һ chat ָһȫͬһбһпԿ
   еʵУĶָ屾ɵһݣ
   
   ȻϸؿϸڲԱ˽ʵ()ҪʲǷǳ
   õ!
   
15.4 һ chat ָеĺ...

   һ chat ָһϵ"ڴִ" "ͳִ"ԣ رǣע⵽
   ͳĳЩѶϢ֮ǰڴĳЩѶϢ֣
   
   ûȽյκѶϢҪͳĳЩѶϢĻǱʹ
   յڴִ "" ָûͳκѶϢҪڴĳЩѶϢ
   Ҳ! ңִü֣ NO CARRIERִ
   ס chat ִǵһĿ
   
    chat ָ:
     _________________________________________________________________
   
exec /usr/sbin/chat -v
     _________________________________________________________________
   
    chat -v  chat е뿽ϵͳ¼ͨ
   /var/log/messages һ chat ָȶɿ༭һ
   а -v ƳԱϵͳ¼Ļӣ
     _________________________________________________________________
   
TIMEOUT         3
     _________________________________________________________________
   
   趨ڴʱʱΪ룮ʹǺݻ
   ܵҪ趨ʮ!
     _________________________________________________________________
   
ABORT           '\nBUSY\r'
     _________________________________________________________________
   
   յ BUSY ִִֹУ
     _________________________________________________________________
   
ABORT           '\nNO ANSWER\r'
     _________________________________________________________________
   
   յ NO ANSWER ִִֹУ
     _________________________________________________________________
   
ABORT           '\nRINGING\r\n\r\nRINGING\r'
     _________________________________________________________________
   
   յظģRINGRING ִִֹУΪĳ绰!
     _________________________________________________________________
   
"              \rAT
     _________________________________________________________________
   
   ڴݻκѶϢͳ AT ִ
     _________________________________________________________________
   
OK-+++\c-OK   ATH0
     _________________________________________________________________
   
   һȽϸһ㣬ΪʹĳЩ chat Ĵظܣ
   
   ...ڴ OK ûյΪݻָģʽ£
   ͳ +++ ʹݻָģʽı׼ Hayes ݻִڴ
   OKͳ ATH0 ݻҶִ ָӦݻ
   ޷ߵ
     _________________________________________________________________
   
TIMEOUT         30
     _________________________________________________________________
   
   趨ָŲִеʱʱΪ 30 룮Ϊʱ
   chat ָ屻ֹ⣬Ϊ 45 ã
     _________________________________________________________________
   
OK              ATDT$TELEPHONE
     _________________________________________________________________
   
   ڴ OK ݻ ATH0 ָĻӦҲӵҪеĺ룮
     _________________________________________________________________
   
CONNECT         "
     _________________________________________________________________
   
   ڴ CONNECT ִԶݻлӦʱǵݻͳģҲͳ
   ظѶϢ
     _________________________________________________________________
   
ogin:--ogin:    $ACCOUNT
     _________________________________________________________________
   
   һΣһЩظ趨ڴǩʾ(...ogin:)
   ʱǰûнյͳһԪ(return)ȻٴѰǩʾ
   յʾʱͳʹƣʹ߽ $ACCOUNT 
   
     _________________________________________________________________
   
assword:        $PASSWORD
     _________________________________________________________________
   
   ڴʾͳ루һΣʹ߽һ
   
    chat ָкĴظܣ Chat Ҫɫ
   չʾҪ࣮ ϸѶ chat ʹֲ(man 8 chat)
   
  ŷ PPP
  
   Ȼ ppp-on-dialer ָǩԶ pppd ŷ˵
   ǳĺãȻĳЩŷҪ׵ŷ PPP
   
   Ҫŷָ PPPҪ༭ ppp-on-dialer ָ
   
   
   ָβ( password ) ڴ ͳ ִ - Ѱ
    shell ʾ (رСĶ Bourne shell Ԫ -  $
    [  ] ҷŵ)
   
   һ chat ҵ shell ʾţchat ָ ISP  PPP 
   
   
   ҵӶԣҵ PPP ŷʹñ׼ Linux Bash ʾ
     _________________________________________________________________
   
[hartr@kepler hartr]$
     _________________________________________________________________
   
   ҪҴ
     _________________________________________________________________
   
ppp
     _________________________________________________________________
   
   ŷϵ PPP
   
   ڴһظǸ⣬ҵ
     _________________________________________________________________
   
        hartr--hartr    ppp
     _________________________________________________________________
   
   ˵ʱǰûյʾţͳ return ٴεȴʾ
   ţ
   
   һյʾţͳ ppp ִ
   
   ע: ǰһнǰ \ Ա chat Ϊָһ
   !
   
   ҵǣĳЩŷǳʾ! ܱʹ minicom 
   ǩ뼸Ա˽ʲΪȷ"ڴ"ִ
   
15.5 ʹ PAP/CHAP ߵ chat ָ

    ISP ʹ PAP/CHAP ϣ chat ָ򵥵ö࣮ 
   chat ָҪȫֻǲӵ绰ȴߣȻ pppd ȥǩ
   !
     _________________________________________________________________
   
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec /usr/sbin/chat -v                                  \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-+++\c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDT$TELEPHONE                  \
        CONNECT         ''                              \
     _________________________________________________________________
   
15.6 pppd  debug  file option_file ѡ

   ѾģԶ pppd ʹ -d ѡѶϢ¼
   'debug' ѡһģ
   
   Ϊʹµָ彨µߣȷѡܣ (: 
   Ĵŵռ䲻󹻣¼ pppd ѶϢܻϵͳ¼С
   ʹ鷳 - ڴضʧܲ)
   
   һ˵ΪһйԳȥѡ
   
   㲻Ǵ /etc/ppp/options  /etc/ppp/options.ttySx нг ppp
   ѡ  pppd  file ѡָ - 
     _________________________________________________________________
   
exec /usr/sbin/pppd debug file options.myserver /dev/ttyS0 38400 \
     _________________________________________________________________
   
16. ָ

   һµ Xterm X £һµ̨
   root ǩ룮
   
   µĽ׶ҵУָ
   
tail -f /var/log/messages

   ϵͳ¼κƣ
   
   ڵһӴ̨У
   
ppp-on &

   κ༭ /usr/sbin/ppp-on 汾֮ƣ ûн
   ָβָ & ʹָ뱳ִеĻ ppp 
   ʱ֮ǰ㶼ܻصն˻ʾ
   
   л׷ϵͳ¼Ӵ
   
   㽫ĳЩеĶٶ chat ָ -v Ҷ pppd ָ -d
   ѡ.... ǽ pppd Ѷ֮¼ϵͳ¼ chat ָ
   弰Ӧ:
     _________________________________________________________________
   
Oct 21 16:09:58 hwin chat[19868]: abort on (NO CARRIER)
Oct 21 16:09:59 hwin chat[19868]: abort on (BUSY)
Oct 21 16:09:59 hwin chat[19868]: send (ATZ^M)
Oct 21 16:09:59 hwin chat[19868]: expect (OK)
Oct 21 16:10:00 hwin chat[19868]: ATZ^M^M
Oct 21 16:10:00 hwin chat[19868]: OK -- got it
Oct 21 16:10:00 hwin chat[19868]: send (ATDT722298^M)
Oct 21 16:10:00 hwin chat[19868]: expect (CONNECT)
Oct 21 16:10:00 hwin chat[19868]: ^M
Oct 21 16:10:22 hwin chat[19868]: ATDT722298^M^M
Oct 21 16:10:22 hwin chat[19868]: CONNECT -- got it
Oct 21 16:10:22 hwin chat[19868]: send (^M)
Oct 21 16:10:22 hwin chat[19868]: expect (ogin:)
Oct 21 16:10:23 hwin chat[19868]: kepler login: -- got it
Oct 21 16:10:23 hwin chat[19868]: send (hartr^M)
Oct 21 16:10:23 hwin chat[19868]: expect (ssword:)
Oct 21 16:10:23 hwin chat[19868]:  hartr^M
Oct 21 16:10:23 hwin chat[19868]: Password: -- got it
Oct 21 16:10:23 hwin chat[19868]: send (??????^M)
Oct 21 16:10:23 hwin chat[19868]: expect (hartr)
Oct 21 16:10:24 hwin chat[19868]: [hartr -- got it
Oct 21 16:10:24 hwin chat[19868]: send (ppp^M)
Oct 21 16:10:27 hwin pppd[19872]: pppd 2.1.2 started by root, uid 0
Oct 21 16:10:27 hwin pppd[19873]: Using interface ppp0
Oct 21 16:10:27 hwin pppd[19873]: Connect: ppp0 <--> /dev/cua1
Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 1, id 1.
Oct 21 16:10:27 hwin pppd[19873]: LCP: sending Configure-Request, id 1
Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(LCP): Rcvd id 1.
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MRU
Oct 21 16:10:27 hwin pppd[19873]: (1500)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ASYNCMAP
Oct 21 16:10:27 hwin pppd[19873]: (0)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd MAGICNUMBER
Oct 21 16:10:27 hwin pppd[19873]: (a098b898)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd PCOMPRESSION
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: rcvd ACCOMPRESSION
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: lcp_reqci: returning CONFACK.
Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(LCP): Sent code 2, id 1.
Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfack(LCP): Rcvd id 1.
Oct 21 16:10:27 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
Oct 21 16:10:27 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
Oct 21 16:10:27 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 1.
Oct 21 16:10:27 hwin pppd[19873]: ipcp: received ADDR
Oct 21 16:10:27 hwin pppd[19873]: (10.144.153.51)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: ipcp: received COMPRESSTYPE
Oct 21 16:10:27 hwin pppd[19873]: (45)
Oct 21 16:10:27 hwin pppd[19873]:  (ACK)
Oct 21 16:10:27 hwin pppd[19873]: ipcp: returning Configure-ACK
Oct 21 16:10:28 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 1.
Oct 21 16:10:30 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 1, id 1.
Oct 21 16:10:30 hwin pppd[19873]: IPCP: sending Configure-Request, id 1
Oct 21 16:10:30 hwin pppd[19873]: fsm_rconfreq(IPCP): Rcvd id 255.
Oct 21 16:10:31 hwin pppd[19873]: ipcp: received ADDR
Oct 21 16:10:31 hwin pppd[19873]: (10.144.153.51)
Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
Oct 21 16:10:31 hwin pppd[19873]: ipcp: received COMPRESSTYPE
Oct 21 16:10:31 hwin pppd[19873]: (45)
Oct 21 16:10:31 hwin pppd[19873]:  (ACK)
Oct 21 16:10:31 hwin pppd[19873]: ipcp: returning Configure-ACK
Oct 21 16:10:31 hwin pppd[19873]: fsm_sdata(IPCP): Sent code 2, id 255.
Oct 21 16:10:31 hwin pppd[19873]: fsm_rconfack(IPCP): Rcvd id 1.
Oct 21 16:10:31 hwin pppd[19873]: ipcp: up
Oct 21 16:10:31 hwin pppd[19873]: local  IP address 10.144.153.104
Oct 21 16:10:31 hwin pppd[19873]: remote IP address 10.144.153.51
     _________________________________________________________________
   
   ע  ʹþ̬ IP   ҵĻЩ PPP ŷȥ
    ʹö̬ IP 㽫ῴЩ Уŷ
   Ҫָ PPP
   
   ⿴ûʲ  ͬǰĲ԰㣬 ping һЩ IP Լ
   ƣ
   
   ȫѶκҿʼ  !
   
17.  PPP 

    PPP ֮ᣬʹñ׼ ppp-off ָֹҪǵ  
    root  PPP ȺԱ! 
   
   㽫ϵͳ¼￴һЩĵĶ:
     _________________________________________________________________
   
Oct 21 16:10:45 hwin pppd[19873]: Interrupt received: terminating link
Oct 21 16:10:45 hwin pppd[19873]: ipcp: down
Oct 21 16:10:45 hwin pppd[19873]: default route ioctl(SIOCDELRT): Bad address
Oct 21 16:10:45 hwin pppd[19873]: fsm_sdata(LCP): Sent code 5, id 2.
Oct 21 16:10:46 hwin pppd[19873]: fsm_rtermack(LCP).
Oct 21 16:10:46 hwin pppd[19873]: Connection terminated.
Oct 21 16:10:46 hwin pppd[19873]: Exit.
     _________________________________________________________________
   
   Ǹ SIOCDELRT - ⲻ pppd ʾҪ˶ûʲõĵģ
   
18. 

   иֿܵԭ޷  chat ޷ȷɣ·Ѷ
   ȵȣ ԣϵͳ¼Ѱ
   
18.1 Ұ PPP ȥ Linux ˵û...

   һǳѾ PPP 뵽֮вҳִ pppd
   ȻԹ˵֧Ԯ PPP! ԭܵ´·
   
  ȷĺ?
  
   ȻѾ±֧Ԯ PPPȴûµĺģ Ϊ
   ûи /etc/lilo.conf  lilo
   
   ķָ uname -aĽ
     _________________________________________________________________
   
Linux archenland 2.0.28 #2 Thu Feb 13 12:31:37 EST 1997 i586
     _________________________________________________________________
   
   ˺ĵİ汾ı - ֪׷ʲ£
   
  㽫 PPP ֧ԮΪģ?
  
   㽫 PPP ֧ԮΪģ飬ȴûб뼰װģ飬ͻõ
    һ [37]Kernel-HOWTO Լ /usr/src/linux µ README !
   
   һģĿҪģԶر룬ȴûִ
   kerneld (Զ벢ƳģĹ) һ [38]kerneld mini-HOWTO 
   Ѷ˵趨 kerneld
   
  Ƿȷ PPP 汾ĺ?
  
   ʹ ppp-2.2 Ϻ 2.0.X ں 1.2.X ʹ ppp-2.2
   (޲)ʹ ppp-2.1.2
   
  Ƿ root ִ pppd?
  
   㲻 root ִ pppd ( pppd δ趨Ϊ root ִ)
   ͻյѶϢ
   
18.2 ҵݻ˵ PPP δ

   ͬҲԭ(οһ comp.os.linux...)
   
   һĴָٴĳЩ Ψһ㽫
   Linux PC ŷĶԻǵϵͳ¼(/var/log/messages)Ȼһһ
   еؿϸ ܻҪٴֶŷһ飮
   
   ҪͷβСĵؼ  ҪǵĶ
   ΪǼ  !
   
18.3 ϵͳ¼˵ "serial line is not 8 bit clean..."

   Ҳ -  serial line looped back ȵȣµԭ
   еһ(һϵ)
   
   Ҫ֪׷ʲᣬ pppd Щʲе˽⣮
   
    pppd ᣬͳЭ(link control protocol)Զ˻
    յϷĻӦŻߵһ׶(ʹ IPCP - IP Ʒ)
   ֻЭ֮ʵʵ IP ŻὨʹ PPP ᣮ
   
    PC ͳЭ̷ʱԶû PPP ŷЩԶ
   ǩн ΪЩʹ 8 bitsʱὫڰ˸λ
   Ԫص(ΣASCII λԪ) PPP ˶ԹѶϢ
   
   ԭЭ̷أ
   
  ûȷǩŷ
  
    chat ָᣬ PC  pppdȻ㲢δ
   ǩ(ͳκαҪŷ PPP ָ)PPP ͲῪ
   ʼ
   
   ЭҲյ
   
   Сĵؼ鲢(ҪĻ) chat ָ(μ˵)
   
  㲢δŷϵ PPP
  
   ĳЩ PPP ŷǩҪָ RETURN ŻԶ
    PPP
   
    chat ָ(μ˵)
   
   ֶʽǩʱͳ RETURN ŻԶ PPP򵥵
    chat ָβ˼Ͽհ׵ڴ/ͳִ(յͳִʵϻ
    RETURN)
   
  Զ˵ PPP 
  
   е!
   
   Ԥ Linux pppd ͳʮ߿Ҫ 
   ŷеʮ߷Զ PPP ׼ýǰȫͳˣ
   
   Ļϣpppd ʮ(ڰλԪȥ)
   
   Խ:-
   
    PPP ѡм lcp-max-configure 30  pppd ڷǰͳ
   ߷Ŀһĺŷ˵ܻҪ࣮
   
   ߣԻعһЩɣע⵽ֶǩ PPP ŷ
    PPP ʱյĵһ tilde(~) Ԫ
   
   ô˵ǿ chat ָβ˼µڴ/ͳִԣڴ tilde
   Ԫͳκζ ⿴:-
     _________________________________________________________________
   
\~      ''
     _________________________________________________________________
   
   ע: Ϊ tilde Ԫ shell ˵壬ݳ(ǰ
   б)
   
18.4 Ԥ·

    pppd ܾԤ·Ϊ(Ӧû)ܾƳȡ
   Ԥ·
   
   ͨԭΪĳЩ׼̫·ΪԤ·Ϊָ
   ·ͣ
   
   μ Linux NAG  Net2/3 HOWTOs Ѷȷ趨̫·
   صĵͣ
   
   һԭ·ʹբ·ĵͱ趨
   ΪԤ·ָ
   
   ҪҪ·֪ʶѾ˷ HOWTO ġΧˣ 
   ȡһЩרҵ(ȺΧʵ)
   
18.5 

   ԭ PPP ޷ӻ޷ȷ
   
   ϸ PPP FAQ һϵеش𣩣һݷǳʵ
   ļҴ𰸾! Լãľ飬𰸲
   Ͳ PPP Ĵ! Ϊʹ ELF Ķûʵ
   ģ飮֮ǰҽ˷˴죨ԼһϵĴ󲿷ʱ
   ȥǸʵѷǳõ PPP ŷ
   
19. ȫ춽ʱȡð

   㲻ʹ PPP ͷĶļÿһ  ͬ
   ʱ "chat -v..." Լ "pppd -d" ϵͳ¼ｨΪο
   
   ҲҪο PPP ļԼ FAQ ڴἰļ!
   
   Ȼ춽״̬ĻЩܹ PPP ⷽ˻ġ
   йɵɨ comp.os.linux.misc  comp.os.linux.networking Ⱥ
   Լ comp.protocols.ppp
   
   ԳԼĸ˵ĵʼңԼĹҲ
   ֤ܿػظʹȫΪĿǰĹԼ˽
   ˵״̬!
   
   ر  ҪĴȺҲҪɵʼ
   ĸ  ǰ˷Ѵ·Ƶ߽ת /dev/null (رҪ
   ĸ!)
   
20. ֮ձ

   һ㽫ᷢṩֻ֧ԮǸʺŵװ壮 
   ͣǸ΢Ӵ :-(  ṩߵ֧Ԯһ㶼
   ˽ Unix (or Linux) Ҫ׼ǵò̫Э!
   
   㵱Ȼ԰һæҽǹ Linux ֪ʶκ ISP Э
   Ա·жӦ "֪" ζڼӦҪ̨ Linux
     Ȼ!
   
20.1 ޷ߵ PPP ŷ

   õ   PPP ѽִжԽɸ PPP ŷ IP 
   루 ifconfig ppp0 ָʾĵڶ "Զ"  IP 룩 ping 
   ŷ㲻ܴκεط
   
   ȣ ping  /etc/resolv.conf ָΪŷ̨
   IP 룮 ԵĻͿԼ PPP ŷ֮Ķ
    IP ߵ "Զ" IP ͬ  ping 
   ṩߵ·  
   
ping my.provider.net.au

   ޷ɹиƽϵ⣮Ϊ
   /etc/resolv.conf дִ 绰ķṩ߶õ
   ѶСĵؼȫû⣬ٴ绰ṩȷ
   дȷ IP 롵
   
   Ȼ޷ķṩȷŷп
   ִУĵط  ҽСĵشͷβ㰲
   װ Linuxرע⵵Ȩޣ
   
   Ȼܽ IP  ping ṩߵŷ᲻
   ص绰ȷһ£иⷢķṩ
   Ǳߣ һΣ绰ǲʿ
   
   и "Զ" һ̨ Linux PPP ŷûָ IP
   forwarding ѡ!
   
   һõĲԷʹôṩһף Microsoft Windows 峢
   Խķṩߣ ȫͬʺһҵϵͳһ
    Linux ϵͳ϶ķṩǱߣ
   
20.2 ҿԼ͵ʼܽ

   ʹö̬ IP 룬Ǻģ " [39]" һ
   
   
20.3 ΪʲǲҵĻ finger, WWW, gopher, talk ȵ?

   ͬأʹö̬ IP 룬Ƿǳģ  " [40]
   "ýڣ
   
21. Զ̬ IP ṩ·

   ʹö̬ IP 루ṩҲֻṩ̬ IP Ϊ
   ߸ۣʶƣ
   
   ȣͷ󽫲⣮˵ʹ sendmail ͳʼ
   Զ˽ڵ㴫(ftp) (finger)ϵʹߣȫ
   Ѷȵȣ
   
   رǣȻ㲻ϵԻظϵĵʼʼ
   ʵֱ㲦 ISP ͳ
   
   ȻĻһ 24 Сʱ·ϣÿҲӵ
   ͬ IP 룮 㲻ܽӵõֱӼĵĵʼҺ
   һ̨ȫѶŷ򵵰ŷ! Ϊ·Ļһ
   ΨһģÿϵĹϵΪĻûΨһ IP (ס - 
   ĻҲʹЩ IP 룬ǲʱ)
   
   һ̨ WWWκŷ·ϵκ˶ȫ
   ֪֪ĻԼȷʵĿǰ IP 룮 
   ܵԵõѶ绰ǣķʼ
   ṩߵʺʹ ".plan" ṩ
   shell  finger ȡ
   
   ڣԴ󲿷ֵʹ߶ԣⲻǸ  󲿷Ҫȫֻ
   ǼյʼʹṩϵʺţԼߵȫѶ
   䵵Լ·ϵķ ӵڵ߷
   Ӧȡþ̬ IP 룮һַоǰʾķ...
   
21.1 趨ʼ

   ʹǶ̬ IP 룬ȷϵ sendmail ͳڱ
   дõκεʼ й sendmail ÿܻǺܺҺѵ
    ļͼ ȻӦ
   sendmail Ա·ṩΪ "smart relay" 
   sendmail.cf  DS ѡΪϸѶ sendmail ļ 
   渽 sendmail  m4 þ޼ȷһһܷ
   Ҫ
   
   Ҳһǳõڽ Sendmail(O'Reilly and Associates Ϊ 'ʥ')
   Դ󲿷ݵʹ˵ʵ̫!
   
   һú sendmail ᣬ PPP ߸һ𶯵ʱҪ
   sendmail ϿͳκδʼѶϢ ҪĻָ
   
sendmail -q &

    /etc/ppp/ip-up ָ(μ˵)
   
   ڵĵʼԶ̬ IP Ǹ⣮ķ:
     * ʹʵݳʽͳȥʼ "reply to" ͷи
       ·ṩϵĵʵλַ
       ԵĻҲӦý FROM ַΪ ISP ṩĵʵλַ
       
     * ʹ popclient ʽķṩǱߢȡĵʼߣ
        ISP ʹ IMAPʹ֧Ԯ IMAP ʹʵݳʽ( pine)
       
   Խ /etc/ppp/ip-up ָзҪָԱڲʱ
   Զ(μ˵)
   
21.2 趨صŷ

   Ȼʹ ISP ŷҲһ̨صݴ
   רãҪŷ ip-up ָ ܱأݴרã
   ŷĺôڼ䳣ϵͬĽڵԽʡʱ
   䣨ԼƵ
   
   ݴרŷ named.boot ʹһ 'forwarders' ָ
   ISPs  DNSŷñȽϼ򵥣 O'Reilly book (DNS and Bind) 
   Ҫ֪Ķ
   
   Ҳһ [41]DNS-HOWTO ȡã
   
   һС· Linux PC ȡ·(ʹ IP αװ)
    ڱضִŷ(ʹ forwarders )Ǹ⣬Ϊή
   ƽռõ·Ƶӳʱ䣮
   
   ·ҵһҪ: Ҫ ISP ￪ʼһ̨Ҫģݴר
   ŷ֮ǰѯ ISP صȨޣ ȷ DNS һ㶼
    ISP ţЩʲᣬܻ鷳...
   
22. ʹ PPP ·

   ᵥһ̨ Linux PC  PPP ŷԼʹ PPP ·û
   ʲ𣮼ǵãPPP һֵԵЭ
   
   Ȼȷ˽춵·ν⣮Ķ NET-2 howto Լ
   Linux Network Administrator Guide (NAG) ҲⱾ "TCP/IP
   Network Administration" (by O'Reilly and Assoc - ISBN 0-937175-82-X)
   мѵİ
   
   ĳһʹһ·Ĵ·ָᷢ Linux
   (draft) sub networking mini-howto õģ  [42]Linux Sub
   networking mini-HOWTO ҵ
   
   Ϊ·ʹõıǲͬ IP ·(ͬ·
   Ĵ·)㽫ʹþ̬ IP   ʹ IP αװ Ҫʹ
    IP αװĻ IP masquerade mini-howto й趨ܣ
   
22.1 趨 IP 

   ··Э˵ PPP ʹõ IP 룮 ʹ
   þ̬ IP 룬ҲҪ㲦ضĵ绰룮
   
   ڱ༭ʵ /etc/ppp/options[.ttyXX]   춴һʹ
   ضݻвǸ⣮ ҲҪȥ
   /etc/ppp/options   ҲҪΪκ߽ʵ
   options.ttyXX !
   
   ʵѡָ PPP ˵ IP 룬ǰչʾʹþ
   ̬ IP 벦ӵķʽȫͬ
   
22.2 趨·

   밲·ϵķ PPP ĽͳȥǸ
   ׶εḶ́
   
   ȣ뽨ִ PPP ĻԶ·ȥĵ· 
   ͨ·Խ pppd ѡ 'defaultroute' 
   Ԥ·㲻κ£
   
   Ȼֻ·һָ··
     /etc/ppp/ip-up ָʹ 'route' ִָеģ
   ֮... ýйִеĽܣ
   
   ĵڶǸ·ϵ̨ Linux ʵǸ
   ppp ͨԶ·'բ'
   
   ȻЩһ˵·Ҳȫ! ȻΪ/뽫
   ͵·һָ··ǱҪģԤ·
   (Զ˵·ȥȡ·)
   
22.3 ·ȫ

   ʹ PPP ··ȥ  ֻǵһ"
   "·ȥ㶼뿼ǰȫԵ⣮ ǿҹ㿼һ̨
   ǽ!
   
   㻹ӦԴ˷ʽ··֮ǰȸ·
   ߣ ûĻʹص鷳!
   
23. ֮ - /etc/ppp/ip-up ָ

   һ PPP Ὠᣬ pppd Ѱ /etc/ppp/ip-up ָ壮 ָ
   ڲҿִеĻ PPP ŷʽͻִָ壮 
   ԶִκοбҪ·ָκÿ PPP ʱ
   ִеĶ
   
   ⲻһͨ shell ָ壬κָ(Ҳǣ
   )
   
   磬Ҫ sendmail Ͽ촦ʼеȴ͵ѶϢ
   
   Ƶأ ip-up һЩָȡãʹ POP ISP Ǳߵ
   κεʼ
   
    /etc/ppp/ip-up ҲЩ:-
   
     * Ծ޵ĻӰȫԣҲ˵ִеȫ·
       Ƶȣ
     * ˵/etc/ppp/ip-up һʽָ壮 ˵Աֱ
       ִ - Ҳڵһпʼб׼ file magic
       (#!/bin/bash) ܱ root ȡִУ
       
23.1 ·

   ·㽫һ '' ·ָ
   · Ժ׵ʹ /etc/ppp/ip-up ָɣΨһѷ
   Ļж PPP ʱ
   
   Ϊ /etc/ppp/ip-up ָÿһ𶯵 ppp ִеģ
   ҪСĵΪÿһ𶯵ִȷĵָ!
   
23.2 ʼ

   ·Ὠ֮ᣬҪȷеĵʼ
   - ͵Ŀĵأ ʵĺ sendmail ɣ
   
    pppd ݸָضʹ bash  `case' 
    磬ǵĹ·ἰͨҼ̫·ģҲ
   ͬ PPP ŷ/etc/ppp/ip-up ָ壮
   
23.3 һ /etc/ppp/ip-up ָ

   ṩͬʹá
     _________________________________________________________________
   
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
#       $1      the interface name used by pppd (e.g. ppp3)
#       $2      the tty device name
#       $3      the tty device speed
#       $4      the local IP address for the interface
#       $5      the remote IP address
#       $6      the parameter specified by the 'ipparam' option to pppd
#
case "$5" in
# Handle the routing to the Newman Campus server
        202.12.126.1)
                /sbin/route add -net 202.12.126.0 gw 202.12.126.1
# and flush the mail queue to get their email there asap!
                /usr/sbin/sendmail -q &
                ;;
        139.130.177.2)
# Our Internet link
# When the link comes up, start the time server and synchronise to the world
# provided it is not already running
                if [ ! -f /var/lock/subsys/xntpd ]; then
                        /etc/rc.d/init.d/xntpd.init start &
                fi
# Start the news server (if not already running)
                if [ ! -f /var/lock/subsys/news ]; then
                        /etc/rc.d/init.d/news start &
                fi
                ;;
        203.18.8.104)
# Get the email down to my home machine as soon as the link comes up
# No routing is required as my home Ethernet is handled by IP
# masquerade and proxyarp routing.
                /usr/sbin/sendmail -q &
                ;;
        *)
esac
exit 0
     _________________________________________________________________
   
   ͨ Newman У԰ ppp ԼָĽõ
   ͱ¼̨Ҳͨõ PPP ŷҴǵ
   ·ᣩ ѾһЩעԽÿĿʲ:
     _________________________________________________________________
   
[root@kepler /root]# route -n
Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
# the HOST route to our remote internet gateway
139.130.177.2   *               255.255.255.255 UH    1500   0      134 ppp4
# the HOST route to our Newman campus server
202.12.126.1    *               255.255.255.255 UH    1500   0       82 ppp5
# the HOST route to my home ethernet
203.18.8.104    *               255.255.255.255 UH    1500   0       74 ppp3
# two of our general dial up PPP lines
203.18.8.64     *               255.255.255.255 UH    552    0        0 ppp2
203.18.8.62     *               255.255.255.255 UH    552    0        1 ppp1
# the specific network route to the Newman campus LAN
202.12.126.0    202.12.126.1    255.255.255.0   UG    1500   0        0 ppp5
# the route to our local Ethernet (super-netting two adjacent C classes)
203.18.8.0      *               255.255.254.0   U     1500   0     1683 eth0
# the route to the loop back device
127.0.0.0       *               255.0.0.0       U     3584   0      483 lo
# the default route to the Internet
default         139.130.177.2   *               UG    1500   0     3633 ppp4
     _________________________________________________________________
   
23.4 ʼ

   һἰδ͵ʼ  һ߽֮򵥵ؽʼ
   ɣ
   
   ִ·ᣬԸԶ··Э
   ִȫͬĶ 磬ǵĹ· Newman У԰һ˵
   /etc/ppp/ip-up ָ忴:
     _________________________________________________________________
   
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Hedland requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
#       $1      the interface name used by pppd (e.g. ppp3)
#       $2      the tty device name
#       $3      the tty device speed
#       $4      the local IP address for the interface
#       $5      the remote IP address
#       $6      the parameter specified by the 'ipparam' option to pppd
#
case "$5" in
        203.18.8.4)
                /usr/sbin/sendmail -q
                ;;
        *)
esac
exit 0
     _________________________________________________________________
   
   Ȼֻʹö̬ IP 뷽ʽ PPP  ISPô
   ISP ϵʺȡĵʼ ͨʹ POP(Post Office
   Protocol)Эɵģʹ `popclient' ʽ  
   ip-up ָҲΪԶ
   
   򵥵ؽһ /etc/ppp/ip-up ָ壬а popclient ʽ
   ָ ִ Red Hat Linux ϥ͵ϣκʱҶ
   
     _________________________________________________________________
   
popclient -3 -c -u hartr -p <password> kepler.hedland.edu.au |formail -s procma
il
     _________________________________________________________________
   
   ʹ slurp ͬķʽȡ·ţԼķ
    ǵãip-up ָֻǸ׼ bash ָ˿Զÿ
   ʵ PPP ὨʱҪɵκιܣ
   
24. ʹ /etc/ppp/ip-down

   Խһָһִ֮У /etc/ppp/ip-down 
    ԭκζӦ /etc/ppp/ip-up ָ⶯
   
25. ·ϵĵ

   Ѿĳ·ϵȻҪʹ˵ Linux ϵ
   pppd ĻҪӦĳЩͷ⣬Ļ·
   ̫·棩ԼԶ˵ PPP ŷ͸磮
   
   һڲԽйط͵Ļ  ֻһ򵥵ģضĵ
   ̬ģ!
   
   㲻ϤͻƵĻǿҵعĶ Linux Network
   Administrator Guide (NAG) ͬʱ O'Reilly  "TCP/IP Network
   Administration" ҲԷǳ˽ķʽ⣮
   
   ̬·ĻԤ·Ӧָ·λַһ
    ·ڵͱָ·
   
   Ψһܵ Linux һû·
   ·  ҪȻ·²ӵ·ϹԼʹ
   ã
   
   ȣȷ̫··ܹͨ·ָ·λַ
    Ԥ·!
   
   ɷ route ָ֮ӦûῴµѶϢ:
   
[root@hwin /root]# route -n
Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
loopback        *               255.255.255.0   U     1936   0       50 lo
10.0.0.0        *               255.255.255.0   U     1436   0      565 eth0

   ̫· (eth0) ָԤ· eth0 еĵһ
   ʾ "default" Ҫ̫·ʼָʹָض
   ·Ԥ· Net2 HOWTO Լ NAG
   
   ⽫ pppd Ԥ·ʾ:
   
[root@hwin /root]# route -n
Kernel routing table

Destination     Gateway         Genmask         Flags MSS    Window Use Iface
10.144.153.51   *               255.255.255.255 UH    488    0        0 ppp0
127.0.0.0       *               255.255.255.0   U     1936   0       50 lo
10.1.0.0        *               255.255.255.0   U     1436   0      569 eth0
default         10.144.153.51   *               UG    488    0        3 ppp0

   ͬģӵо ppp0  PPP ŷ(10.144.153.51)
   趨Ҳӵʹ PPP ŷΪբԤ·趨
   
   趨Ҫȴ˸  ĶѾйص͵ļ
   ר!
   
   ·Ѿ·Ѿͨ·
   բ ӦԤ·ָ PPP   ʹĵ·
   ָ··
   
25.1 ȫϵע

   е·趨һ̨ Linux ᵽ·ϣڲ֪
   Ѿ·  Լĺ  · 
   ֮ǰǿҵع·߲οôİȫԣ 
    PPP ߱ɹվ̨ĻҲͬⷵʹ
   ߣ·ϵͳĹǿҵķŭ ҲܻᷢԼ춷ǳص
   鷳!
   
   ··ȥ֮ǰǶ̬㶼ӦҪǰȫ
     ο O'Reilly  "Building Internet Firewalls"!
   
26.  PPP ŷ

   ͬǰģ෽ԿԴɣ ܵ
   ķʹ Cyclades ಺пԼһԶתӵĵ绰·
   
   㲻ϲܵķɵʹԼķ Һ
   ʹ˵δİ汾аķʽԣ۸
   !
   
   ע⣬һֻ趨 Linux Ϊ PPP ŷйأҲ루
   й趨ն˻ŷһѶ
   
   ңδʵ shadow ʹãӦûĿǰܵ
   Ѷκ shadow Ҫ趨
   
26.1 

   춱Լ pppd 汾˵ãڼ
   ļǰ½!
   
    PPP ŷĺа IP forwarding Ĺܣ Ҳ
   ϣĹܣ IP firewalls, accounting ȵȣ
   
   ʹö಺пҲȷĺаҪ
   ʽ!
   
26.2 ŷϵͳĸŹ

   ʹͬʹƣṩ PPP (and SLIP) ʺԼ
   shell ʺţ ĺôǶԣʹֻҪһʺžͿʹ
   ߣ
   
   Ϊǽ֯ǲְԱԼѧʹշѣԲصļ
   շѵ⣮
   
   ǵĽڵ·֮һ̨ǽĳЩʹߵ
   ȡΪ·ǵģ·ǽڣɺԣ
   ·ǽϸҲڴ˳ֶκ¶ûйϵ
   
   ʹ߽ǽڵ֮ PPP ĳ򣨵ȻӵЧʺᣩ
   :
     * ǵԶתӲһݻĵһ绰  һ
       ̨աݻĵ绰
     * ʹһЧʹԼǩ룮
     *  shell ʾ£ ppp ָŷϵ PPP 
     * ǻϵ PPPִ Windows, DOS, Linux, MAC OS κ
       ҵϵͳĻ  ǵ⣩
       
   ̨ŷΪÿĲʹø /etc/ppp/options.ttyXX Ϊ
   ̬ IP 趨Զ˵ IP 룮 ŷΪԶصĿͻʹôλַ
   Э(proxyarp)ͷʵ pppd ѡ趨 ʹ
   routed  gated 
   
   ʹߴǶ˹Ҷʱpppd ݻҪҶϣͬʱͣ
   PPP ᣮ
   
26.3 ȫ

   㽫Ҫе:-
     * Linuxʵر԰Ҫѡ
     * ʺĵ pppd 汾
     * һܹشݻͨѶ 'getty' ʽ
       ʹõ getty_ps2.0.7h  mgetty ˽
       mgetty ʹ pap/chap ĺУ pap  Windows 95 ʹõı
       ׼Զ pppdδо
     * Ĳʹܹȡһ̨ŷ (DNS)
       пܵĻӦִԼŷ...
       
26.4 趨׼Ĳ(shell access)

    PPP ŷ֮ǰ Linux ܹ׼Ĳ
   ȡ
   
   ʹ˵趨ѡ֮ getty ļԼ
   [43]Serial HOWTO й趨Ѷ
   
26.5  PPP ѡ

   㽫ΪвӲһȫ /etc/ppp/options ͨõѡ
    ʹõѡ:
     _________________________________________________________________
   
asyncmap 0
netmask 255.255.254.0
proxyarp
lock
crtscts
modem
     _________________________________________________________________
   
   ע - ûʹκ(Ե)趨 - رû defaultroute
   ѡ Ϊ(Ϊ PPP ŷ)Ҫľǽ PPP ͻ
   ˵͵··ҽ·͵Ŀͻ
   
   
   ȫֻǵͻͣʹ pppd  'proxyarp' ѡ
   
   
    'proxyarp' ѡһλַЭĿ PPP ŷλַ
   Э(ARP)УǻϾ˵ 'Ҫ PPP ͻ˵ķ͸'
   ǽһ PPP ͻ˵ĵ·򵥵һʽ - 㲻ַʽ
   ·֮ͷ - ʵ·Ͷʹôλַ
   Э
   
   㼸һϣṩ̬ IP ĲʹߣԽɷ
   IP ÿӲĿģ ڣΪÿӲһ
   /etc/ppp/options.ttyXX 
   
   棬ֻҪ򵥵ط뱾أŷ IP 뼰òҪʹõ IP 
   룮
     _________________________________________________________________
   
kepler:slip01
     _________________________________________________________________
   
   رע⣬ʹúϷƣҷֻǵ·
   Ҫ豸 IP   ƻŶԣ!
   
26.6 趨 pppd Աʹߣɹأִ

   Ϊ ppp ú豸·棩ٿغĵͱĶ
   ҪرȨ  ʵҪ root Ȩޣ
   
   ˵ǣ pppd ѾƳɿ԰ȫ趨Ϊ root ִУ
   
     _________________________________________________________________
   
chmod u+s /usr/sbin/pppd
     _________________________________________________________________
   
   гʱӦûͬ
     _________________________________________________________________
   
-rwsr-xr-x   1 root     root        74224 Apr 28 07:17 /usr/sbin/pppd
     _________________________________________________________________
   
   ûʹ߽ǵ PPP ᣮ
   
26.7 Ϊ pppd 趨һȫı(alias)

   Ϊ˼ǲ PPP ʹߵ߳ǽһȫı(
   /etc/bashrc)һǩֻ֮Ҫһ򵥵ָŷ˵ ppp
   
   
   ⿴
     _________________________________________________________________
   
alias ppp="exec /usr/sbin/pppd -detach"
     _________________________________________________________________
   
   
     * exec : ִָָеĳʽ滻ִеĳʽ
       shell
     * pppd -detach :  pppd ҲҪѲĳ뱳ִУȷ
       pppd ʱκγ
       
   һʹǩʱ 'w' п
     _________________________________________________________________
   
  6:24pm  up 3 days,  7:00,  4 users,  load average: 0.05, 0.03, 0.00
User     tty       login@  idle   JCPU   PCPU  what
hartr    ttyC0     3:05am  9:14                -
     _________________________________________________________________
   
   ... Ҹ߹һܼ򵥵ģ PPP ŷϵͳ!
   
27.  null modem (ֱ)ʹ PPP

   ǳؼ - Ϊûݻøף
   
   ȣѡһΪ'ŷ'ڴв getty Ա
   'ͻ'ʹ minicom ȥȡô˴вԲԣ
   
   һɹˣԳȥ gettyʹ/ȷ
    Ϊ'ʵȨ'Ҽ㲢
   
   ڣŷ˳ȥ getty ȷȷʹ
   'setserial' 趨в
   
   Ҫľϵͳ pppd Ҽ̨϶ʹ
   /dev/ttyS3 ߣ ˣִָ:-
     _________________________________________________________________
   
pppd -detach crtscts lock <local IP>:<remote IP> /dev/ttyS3 38400 &
     _________________________________________________________________
   
   ⽫Ὠ - ĿǰΪֹ㻹δָ· ÿ
   ping ָᣮԵĻֹһ pppd Խ
   
   
   Ҫĵ·ʵϿ㾿ʲ һ˵һ
   ̫·(估·)ĵȫ PPP ŷͻһ
   
   ھ̫·Ļϣpppd ָӦ
     _________________________________________________________________
   
pppd -detach crtscts lock proxyarp <local IP>:<remote IP> /dev/ttyS3 38400 &
     _________________________________________________________________
   
   һ
     _________________________________________________________________
   
pppd -detach crtscts lock defaultroute <local IP>:<remote IP> /dev/ttyS3 38400
&
     _________________________________________________________________
   
   ·(ʹô!)иӵĵȫ
   ļǰķʹ /etc/ppp/ip-up
   
   Robert Hart
   Port Hedland, Western Australia
   Melbourne, Victoria, Australia August/October 1996 January/March 1997

References

   1. mailto:hartr@interweft.com.au
   2. http://ultima.ncnu.edu.tw/~asdchen/
   3. http://www.phys.ntu.edu.tw/~cwhuang/pub/
   4. http://sunsite.unc.edu/LDP/HOWTO/
   5. http://www.interweft.com.au/other/ppp-howto/ppp-howto.html
   6. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats
   7. http://www.interweft.com.au/
   8. http://www.RedHat.com/
   9. http://sunsite.unc.edu/mdw/HOWTO/mini/IP-Masquerade
  10. http://www.in.net/info/modems/index.html
  11. http://sunsite.unc.edu/mdw/LDP-books/nag-1.0/nag.html
  12. http://sunsite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html
  13. http://www.in.net/info/modems/index.html
  14. http://www.ora.com/
  15. ftp://sunsite.unc.edu/pub/Linux/docs/faqs
  16. http://sunsite.unc.edu/mdw/
  17. http://summer.snu.ac.kr/~djshin/linux/mail-list/index.shtml
  18. ftp://sunsite.unc.edu/pub/Linux/system/network/serial/ppp/ppp-2.2.0g.tar.gz
  19. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#Kernel configuration
  20. file://localhost/tmp/zh-sgmltools.9250/Kernel-HOWTO.html
  21. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#Server info
  22. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#Modem
  23. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#DNS
  24. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#root
  25. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#options
  26. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#pap
  27. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#manual
  28. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#automate
  29. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#off
  30. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#problems
  31. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#ip-up
  32. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#dynamic-server
  33. file://localhost/tmp/zh-sgmltools.9250/Kernel-HOWTO.html
  34. ftp://sunsite.unc.edu/pub/Linux/kernel/v2.0
  35. ftp://sunsite.unc.edu/pub/Linux/kernel/old
  36. http://www.in.net/info/modems/index.html
  37. file://localhost/tmp/zh-sgmltools.9250/Kernel-HOWTO.html
  38. file://localhost/tmp/zh-sgmltools.9250/mini/Kerneld.html
  39. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#dynamic-server
  40. file://localhost/tmp/zh-sgmltools.9250/PPP-HOWTO.txt.html#dynamic-server
  41. file://localhost/tmp/zh-sgmltools.9250/DNS-HOWTO.html
  42. http://www.interweft.com.au/other/
  43. file://localhost/tmp/zh-sgmltools.9250/Serial-HOWTO.html
