How to configure PPPoE with CHAP

Client:

interface Ethernet0/0
 no ip address
 ip virtual-reassembly in
 pppoe enable
 pppoe-client dial-pool-number 1
end

!
interface Dialer1
 ip address negotiated
 ip mtu 1492
 ip nat outside
 ip virtual-reassembly in
 encapsulation ppp
 dialer pool 1
 ppp chap hostname User1
 ppp chap password 0 Password1
 ppp ipcp route default     << To install default route
end


Server:

username User1 password 0 Password1
!
!
bba-group pppoe Group10
 virtual-template 10


interface Virtual-Template10
 ip unnumbered Loopback0
 ip mtu 1492
 peer default ip address pool Pool10
 ppp authentication chap

interface Ethernet0/2
 ip address 10.0.0.1 255.255.255.252
 pppoe enable group Group10


ip local pool Pool10 10.0.0.2


Verification:

client#sh ip int brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 unassigned YES manual up up
<..>
Ethernet1/3 unassigned YES TFTP administratively down down
Dialer1 10.0.0.2 YES IPCP up up
NVI0 unassigned NO unset up up
Virtual-Access1 unassigned YES unset up up
server# sh ppp all
Interface/ID OPEN+ Nego* Fail- Stage Peer Address Peer Name
------------ --------------------- -------- --------------- --------------------
Vi2.1 LCP+ CHAP+ IPCP+ LocalT 10.0.0.2 User1

server# sh subscriber session brief
Current Subscriber Information: Total sessions 1

Uniq ID Interface State Up-time Identifier
6 Vi2.1 authen 00:12:49 User1