R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 202.106.46.1 255.255.255.0
R1(config-if)#encapsulation ppp //修改封装协议为PPP
R1(config-if)#ppp authentication pap // 认证协议为pap
R1(config-if)#exi
R1(config)#username R2 password test //设置验证用户名及密码
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 202.106.46.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp pap sent-username R2 password test //发送验证用户名及密码
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 202.106.46.1 255.255.255.0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R1(config-if)#ppp pap sent-username R1 password test
R1(config-if)#exi
R1(config)#username R2 password test
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 202.106.46.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
R2(config-if)#ppp pap sent-username R2 password test
R2(config-if)#exi
R2(config)#username R1 password test
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 202.106.46.1 255.255.255.0
R1(config-if)#encapsulation ppp //修改封装协议为PPP
R1(config-if)#ppp authentication chap //认证协议为pap
R1(config-if)#exi
R1(config)#username R2 password test //发送被验证方用户名及密码,R2为被验证方hostname
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 202.106.46.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp chap password test //设置用户名及密码,用户名默认为hostname,用户名可更改,但必须两边一致
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#exi
R1(config)#username R2 password test //R2为对方hostname
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#exi
R2(config)#username R1 password test //R1为对方hostname
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R1(config-if)#ppp chap password test
R1(config-if)#exi
R1(config)#username R2 password test
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#ppp pap sent-username R2 password test
R2(config-if)#exi
R2(config)#username R1 password test //R1为对方hostname