background image
576 Chapter 8: WAN Protocols and Design
CHAP authentication is passed. Figure 8-26 illustrates the message flow in PAP and CHAP
environments. Example 8-25 shows the CHAP configuration for Figure 8-26.
Figure 8-26
PAP and CHAP Messages
Notice that each router refers to the other router's host name; each router uses its own host name
in CHAP flows, unless overridden by configuration. Each codes the same password. When
Router Barney receives a challenge from Router Fred, Router Barney sends an encrypted value,
which is the value Fred should compute given the name Barney, the password Bedrock, and the
original random number. CHAP authentication is completed if the two values match.
Example 8-25
CHAP Configuration Sample
Router Fred Router Barney

username Barney password Bedrock username Fred password Bedrock
! !
Interface serial 0 Interface serial 0
encapsulation ppp encapsulation ppp
ppp authentication chap ppp authentication chap
. .
Waiting
for Dial
Fred
Dialing
Router
Barney
CHAP
Challenge!
I am #$%#$@
Waiting
for Dial
Fred
Dialing
Router
Barney
PAP
I am Barney
Password = Betty
Ack.
ch08.fm Page 576 Monday, March 20, 2000 5:17 PM