カテゴリ:

今回はPPPの認証をRADIUSサーバを使う例を紹介します。

R2はR1(12.12.12.1)とR3(23.23.23.3)に接続されています。R3をPPPクライアント、R1をRADIUSサーバとして利用します。

R2(config)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            12.12.12.2      YES manual up                    up
Serial1/2                  23.23.23.2      YES manual up                    up
Loopback0                  17.17.2.2       YES NVRAM  up                    up

まずR1にRADIUSサーバの設定を行います。

R1(config)#aaa new-model
R1(config)#radius-server local
R1(config-radsrv)#nas 17.17.2.2 key CISCO
R1(config-radsrv)#user cisco password cisco
R1#debug radius local-server packets

次にR2でPPPの認証を設定します。

R2(config)#aaa new-model
R2(config)#aaa authentication ppp MYPPP group radius

R2(config)#int s1/2
R2(config-if)#en ppp
R2(config-if)#ppp authentication pap MYPPP

R2でRADIUSサーバ(R1)を指定します。

R2(config)#radius-server host 17.17.1.1 auth-port 1812 acct-port 1813 key CISCO
R2(config)#ip radius source-interface loopback 0
R2#debug radius authentication
R2#debug ppp authentication

R3にPAPの設定を行います。設定前はインターフェースがdownしていますが、設定後にインターフェースを有効にすると認証が成功しupとなります。

R3(config)#int s1/3
R3(config-if)#do sh ip int b | i Serial1/3
Serial1/3                  23.23.23.3      YES manual up                    down
R3(config-if)#sh
R3(config-if)#ppp pap sent-username cisco password cisco
R3(config-if)#do deb ppp authen
R3(config-if)#no sh

Jun 29 06:31:04.711: Se1/3 PAP: Using hostname from interface PAP
Jun 29 06:31:04.711: Se1/3 PAP: Using password from interface PAP
Jun 29 06:31:04.715: Se1/3 PAP: O AUTH-REQ id 10 len 16 from "cisco"
Jun 29 06:31:04.871: Se1/3 PAP: I AUTH-ACK id 10 len 5
Jun 29 06:31:05.875: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/3, changed state to up
Jun 29 06:31:05.891: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.23.23.2 (Serial1/3) is up: new adjacency

R2ではこのような表示されます。

Jun 29 06:31:01.799: RADIUS:  Framed-Protocol     [7]   6   PPP                       [1]
Jun 29 06:31:01.799: RADIUS:  User-Name           [1]   7   "cisco"
Jun 29 06:31:01.799: RADIUS:  User-Password       [2]   18  *
Jun 29 06:31:01.799: RADIUS:  NAS-Port            [5]   6   10002
Jun 29 06:31:01.803: RADIUS:  NAS-Port-Id         [87]  11  "Serial1/2"
Jun 29 06:31:01.803: RADIUS:  NAS-Port-Type       [61]  6   Sync                      [1]
Jun 29 06:31:01.803: RADIUS:  Service-Type        [6]   6   Framed                    [2]
Jun 29 06:31:01.803: RADIUS:  NAS-IP-Address      [4]   6   17.17.2.2
Jun 29 06:31:01.923: RADIUS: Received from id 1645/1 17.17.1.1:1812, Access-Accept, len 88
〜略〜
Jun 29 06:31:01.927: Se1/2 PPP: Received LOGIN Response PASS
Jun 29 06:31:01.931: Se1/2 PAP: O AUTH-ACK id 10 len 5
Jun 29 06:31:02.919: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.23.23.3 (Serial1/2) is up: new adjacency
Jun 29 06:31:02.939: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed state to up

R1でRADIUSの認証結果を表示しています。

R1#show radius local-server statistics | b Username
Username                  Successes  Failures  Blocks
cisco                             1         0       0

このようにRADIUSを使うことで、PPPの認証を一元化することが出来ます。