一.   PPP协议为标准协议可认证方式有两种:
                 1. PAP(password authentication protocol ) 口令认证协议,安全程度较低,口令以明文传输,且只在初始链路建立时执行。对设备资源占用小。
                 2. CHAP(challenges authentication protocol)问答握手协议,进行周期性的检查,口令以MD5加密,对设备资源占用大。
             二.  配置如下:PPP协议的配置_网络
                 
                 Router1就是 R1           Router2就是  R2
一、单向验证:R1启动pap(R1为主验证方,R2为被验证方)

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    //
发送验证用户名及密码
 
 
 
二、双向验证:R1R2同时启动pap

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启动chap(R1为主验证方,R2为被验证方)

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,用户名可更改,但必须两边一致
 
 
二、双向认证:R1R2同时启动chap

R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
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启动pap,R2启动chap

R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
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
 
 
    呵呵 就这些了。o(∩_∩)o...