配置CHAP單向認(rèn)證示例(本地認(rèn)證方式)
組網(wǎng)需求
如圖1所示,RouterA的Serial1/0/0和RouterB的Serial1/0/0相連。
用戶希望RouterA對(duì)RouterB進(jìn)行可靠的認(rèn)證,而RouterB不需要對(duì)RouterA進(jìn)行認(rèn)證。
圖1?CHAP認(rèn)證組網(wǎng)圖
?
配置思路
配置思路如下:
- 用戶希望進(jìn)行可靠的認(rèn)證,對(duì)安全的要求較高,所以需要配置CHAP認(rèn)證且認(rèn)證方需要配置用戶名。
- 用戶希望進(jìn)行單向認(rèn)證,所以僅需要配置RouterA作為CHAP認(rèn)證的認(rèn)證方,RouterB作為CHAP認(rèn)證的被認(rèn)證方。
操作步驟
-
配置RouterA
# 配置接口Serial1/0/0的IP地址及封裝的鏈路層協(xié)議為PPP。
<Huawei> system-view [Huawei] sysname RouterA [RouterA] interface serial 1/0/0 [RouterA-Serial1/0/0] link-protocol ppp [RouterA-Serial1/0/0] ip address 10.10.10.9 30 [RouterA-Serial1/0/0] quit
# 配置本地用戶及域。
[RouterA] aaa [RouterA-aaa] authentication-scheme system_a [RouterA-aaa-authen-system_a] authentication-mode local [RouterA-aaa-authen-system_a] quit [RouterA-aaa] domain system [RouterA-aaa-domain-system] authentication-scheme system_a [RouterA-aaa-domain-system] quit [RouterA-aaa] local-user user2@system password Please configure the login password (8-128) It is recommended that the password consist of at least 2 types of characters, i ncluding lowercase letters, uppercase letters, numerals and special characters. Please enter password: Please confirm password: Info: Add a new user. Warning: The new user supports all access modes. The management user access mode s such as Telnet, SSH, FTP, HTTP, and Terminal have security risks. You are advi sed to configure the required access modes only. [RouterA-aaa] local-user user2@system service-type ppp [RouterA-aaa] quit
# 配置PPP認(rèn)證方式為CHAP、認(rèn)證域?yàn)閟ystem。
[RouterA] interface serial 1/0/0 [RouterA-Serial1/0/0] ppp authentication-mode chap domain system
# 重啟接口,保證配置生效。
[RouterA-Serial1/0/0] shutdown [RouterA-Serial1/0/0] undo shutdown
-
配置RouterB
# 配置接口Serial1/0/0的IP地址及封裝的鏈路層協(xié)議為PPP。
<Huawei> system-view [Huawei] sysname RouterB [RouterB] interface serial 1/0/0 [RouterB-Serial1/0/0] link-protocol ppp [RouterB-Serial1/0/0] ip address 10.10.10.10 30
# 配置本地被RouterA以CHAP方式認(rèn)證時(shí)RouterB發(fā)送的CHAP用戶名和密碼。
[RouterB-Serial1/0/0] ppp chap user user2@system [RouterB-Serial1/0/0] ppp chap password cipher huawei123
# 重啟接口,保證配置生效。文章來源:http://www.zghlxwxcb.cn/news/detail-465926.html
[RouterB-Serial1/0/0] shutdown [RouterB-Serial1/0/0] undo shutdown
-
驗(yàn)證配置結(jié)果
# 通過命令display interface serial 1/0/0查看接口的配置信息,接口的物理層和鏈路層的狀態(tài)都是Up狀態(tài),并且PPP的LCP和IPCP都是opened狀態(tài),說明鏈路的PPP協(xié)商已經(jīng)成功,并且RouterA和RouterB可以互相Ping通對(duì)方。文章來源地址http://www.zghlxwxcb.cn/news/detail-465926.html
[RouterB] display interface serial 1/0/0 Serial1/0/0 current state : UP Line protocol current state : UP Last line protocol up time : 2012-04-10 09:26:32 Description:HUAWEI, AR Series, Serial3/0/0 Interface Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec) Internet Address is 10.10.10.9/30 Link layer protocol is PPP LCP opened, IPCP opened Last physical up time : 2012-04-10 09:26:29 Last physical down time : 2012-04-10 09:26:27 Current system time: 2012-04-10 09:29:56 Physical layer is synchronous, Virtualbaudrate is 64000 bps Interface is DTE, Cable type is V35, Clock mode is TC Last 300 seconds input rate 8 bytes/sec 64 bits/sec 0 packets/sec Last 300 seconds output rate 7 bytes/sec 56 bits/sec 0 packets/sec Input: 20239 packets, 465621 bytes Broadcast: 0, Multicast: 0 Errors: 0, Runts: 0 Giants: 0, CRC: 0 Alignments: 0, Overruns: 0 Dribbles: 0, Aborts: 0 No Buffers: 0, Frame Error: 0 Output: 15591 packets, 327478 bytes Total Error: 0, Overruns: 0 Collisions: 0, Deferred: 0 DCD=UP DTR=UP DSR=UP RTS=UP CTS=UP Input bandwidth utilization : 0.06% Output bandwidth utilization : 0.05%
到了這里,關(guān)于PPP 認(rèn)證 配置CHAP單向認(rèn)證示例(本地認(rèn)證方式)實(shí)驗(yàn)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!