配置DCE时钟:( O3 u; T; Z0 `2 v
8 h- p1 p0 Z* N+ I: g
router# show controllers Type Port router(confin-if)# clock rate 64000 router(config-if)# ^z 配置PPP协议:
- B( g& m E- S$ t8 M5 H# a
% Q1 T" P" z% C& [router(config)# username Name password Set-Password-Here router(config)# interface Type Port router(config-if)# encapsulation ppp router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] router(config-if)# ppp pap sent-username Name password Password router(config-if)# ^z PAP单向认证配置实例:
+ A. J$ `1 G' g# b! L* y/ Q' ?验证方:
# D, p! V" {* I6 M; }# A( y7 z" i- u" [& u# E! H: {. P, d3 ]7 `& t0 P
router-server(config)# username Client password 12345 router-server(config)# interface serial 0 router-server(config-if)# encapsulation ppp router-server(config-if)# ppp authentication pap router-server(config-if)# ^z 被验证方:
2 {9 V$ U' \0 z5 h$ K
, F( j8 j! s- P h' ]. F5 Vrouter-client(config-if)# encapsulation ppp router-client(config-if)# ppp pap sent-username Client password 12345 router-client(config-if)# ^z PAP双向认证配置实例:
# d S' p! Z, H0 J( \ V3 r$ M路由器 A:
/ X2 `4 o% o8 V4 f+ N
( K# `8 B2 O$ H$ erouterA(config)# username B password 12345 routerA(config)# interface serial 0 routerA(config-if)# encapsulation ppp routerA(config-if)# ppp authentication pap routerA(config-if)# ppp pap sent-username A password 54321 routerA(config-if)# ^z 路由器 B:
+ T, Z# K$ B4 Z( a9 z' l4 z' y9 ^9 Y @; Q
routerB(config)# username A password 54321 routerB(config)# interface serial 1 routerB(config-if)# encapsulation ppp routerB(config-if)# ppp authentication pap routerB(config-if)# ppp pap sent-username B password 12345 routerB(config-if)# ^z CHAP单向认证配置实例:8 b0 K; I) p" o! u
验证方:' O* M9 P% z9 L* _$ a7 i) I/ t1 I
5 `) P: }7 K, s& Y6 ?
router-server(config)# username router-client password 12345 router-server(config)# interface serial 0 router-server(config-if)# encapsulation ppp router-server(config-if)# ppp authentication chap router-server(config-if)# ^z 被验证方:) Z! h8 X8 L2 \ Z/ q( S
5 m# D4 N8 ^$ ` c; k
router-client(config-if)# encapsulation ppp router-client(config-if)# ppp authentication chap router-client(config-if)# ppp chap hostname router-client router-client(config-if)# ppp chap password 12345 router-client(config-if)# ^z CHAP双向认证配置实例:
& H3 }. {7 x j3 y2 `2 `路由器 A:
0 D" _6 s4 N/ D/ B; x# o' ^ V; M- H& T$ X. A6 @& Y/ k5 |6 t1 ^
routerA(config)# username routerB password 12345 routerA(config)# interface serial 0 routerA(config-if)# encapsulation ppp routerA(config-if)# ppp authentication chap routerA(config-if)# ppp chap hostname routerA routerA(config-if)# ppp chap password 54321 routerA(config-if)# ^z 转自:考试网 - [Examw.Com]路由器 B:- S' f1 j" Y& I M: V+ g5 `
% }0 `) p6 ]/ {routerB(config)# username routerA password 54321 routerB(config)# interface serial 1 routerB(config-if)# encapsulation ppp routerB(config-if)# ppp authentication chap routerB(config-if)# ppp chap hostname routerB routerB(config-if)# ppp chap password 12345 routerB(config-if)# ^z |