CCIE R&S Configuration Part1 1.10 PPP

1.1.PPP

  • R3-R5間では、PPPカプセル化を行ってください。
  • R3-R5間でCHAP認証を行ってください。認証に利用するパスワードは「ci?co」で、ユーザIDは次の通りです。
    • R3:R3-CHAP
    • R5:R5-CHAP

【設定】

R3

---------------------------------------------------------------------------------
username R5-CHAP password 0 ci?co
!
interface Serial2/1
 encapsulation ppp
 ppp authentication chap
 ppp chap hostname R3-CHAP
---------------------------------------------------------------------------------

 

R5

---------------------------------------------------------------------------------
username R3-CHAP password 0 ci?co
!
interface Serial2/0
 encapsulation ppp
 ppp authentication chap
 ppp chap hostname R5-CHAP
---------------------------------------------------------------------------------

 

【確認のポイント】

  • show interface
    PPPのカプセル化になっていて、LCP、IPCPがOpenになっていることを確認します。

 

【解説】

CHAP認証を有効にするには、PPPのインタフェースで次のコマンドを利用します。

(config-if)#ppp authentication chap

CHAPでは、ユーザIDとしてデフォルトはルータのホスト名を利用します。ホスト名ではなくユーザIDを決めるためには、次の設定を行います。

(config-if)#ppp chap hostname <id>

認証をローカルユーザデータベースで行う場合は、対向のホスト名に対するパスワードの設定が必要です。

(config)#username <user> password <password>

  • パスワードの設定のときには、最後にスペースが入らないように注意してください。

PAP認証を行うには、PPPのインタフェースで次のコマンドを利用します。

(config-if)#ppp authentication pap

そして、PAP認証のユーザIDとパスワードを指定します。

(config-if)#ppp pap sent-username <user> password <password>

また、CHAP認証と同様に認証をローカルユーザデータベースで行う場合は、対向のホスト名に対するパスワードの設定が必要です。

(config)#username <user> password <password>

PPPのリンクが正常に確立できれば、show interfaceコマンドでLCPとNCPの状態がOpenとなります。R3でのshow interfaceコマンドは次のようになります。

R5

---------------------------------------------------------------------------------
R3#show interfaces serial 2/1
Serial2/1 is up, line protocol is up
Hardware is M4T
Interface is unnumbered. Using address of Loopback0 (192.168.3.3)
MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: IPCP, CDPCP, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:00, output 00:00:03, output hang never
Last clearing of "show interface" counters 06:23:37
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: Class-based queueing
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations  0/2/256 (active/max active/max total)
Reserved Conversations 1/1 (allocated/max allocated)
Available Bandwidth 1 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
8887 packets input, 493281 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
8668 packets output, 480264 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
1 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
---------------------------------------------------------------------------------