一. 实验拓扑图和实验要求(点击看大图):
 
RIP协议+PPP 封装(CHAP+PAP验证)实例_PAP
 
 
 
 
二. 部分配置:
1R1R2Chap
R1:
       R1(config) Hostname  R1
       R1(config) Username R2 password  121212   //R2被验证方主机名
       R1(config) Int S0/0
       R1(config-if)  Ip address 12.12.12.1  255.255.255.0  
       R1(config-if) encapsulation ppp
       R1(config-if) PPP  auther  chap
 
 R2:
        R2(config) Hostname  R2
        R2(config) Username R1  password  121212     //R1为主验证方主机
       R2(config) Int S0/0
       R2(config-if)  Ip address 12.12.12.2  255.255.255.0  
       R2(config-if) encapsulation  ppp
        R2(config-if) PPP  auther  chap
 
2R2R3PAP验证(采用单向认证,R2启动PAP):
R2:
       R2(config) Hostname R2
       R2(config) username cisco password 232323  //设置验证信息
       R2(config) int S0/1
       R2(config-if)  ip address 23.23.23.2  255.255.255.0
       R2(config-if) encapsulation PPP
       R2(config-if) PPP auther  PAP
R3:
       R3(config) Hostname R3
       R3(config) int S0/0
       R3(config-if)  ip address 23.23.23.3  255.255.255.0
       R3(config-if) encapsulation PPP
       R3(config-if) ppp pap sent-username cisco password 232323   //发送验证信息
 
(3) R1 R2 R3 配置RIP
R1:
       R1(config)# router rip
       R1(config-router)# network 10.1.1.0
       R1(config-router)# network 12.12.12.0
R2:
       R2(config)# router rip
       R2(config-router) # network 12.12.12.0
       R2(config-router)#  network 23.23.23.0
R3:
       R3(config)#  router rip
       R3(config-router)# network 23.23.23.0
       R3(confg-router)# network 192.168.1.0
 
 
 
三. 实验结果验证:
 
RIP协议+PPP 封装(CHAP+PAP验证)实例_CHAP_02
 
 
实验完成,实验中PAP验证采用的是单向验证,双向认证为(R1跟R2同时启动pap)
{
R2:
R2(config) username cisco password 232323 
R2(config-if) ppp pap sent-username cisco password 232323
 
 
R3:
R3(config) username cisco password 232323 
R3(config-if) ppp pap sent-username cisco password 232323
}
 
 
 
 
备注:
{
Rip 是基于特定的软硬件实现
协议包:
    Request:请求包,向邻居通告自己的身份,请求特定的路由信息
    Response:应答包,向邻居通告路由信息
封装:
    Rip 被UDP 封装,端口号520,目标IP:255.255.255.255,源IP:接口IP
工作流程:
    启动Rip 进程,从属于该进程的所有活动接口向外发送请求包
    每隔30S 定期向外发送应答包,通告路由信息(邻居维持机制,可靠性机制)
    收到应答包后,安装路由信息
    从应答包中获得目标网络,AD=120
    使用路由器个数作为Metric
    直连网络为0Hops,通告之前+1Hops,进来时不添加,使用源IP 作为下一跳
    安装路由信息成功后,启动失效计时器,默认60S
    在60S 内仍没有收到则清除
    为加快收敛使用触发更新
    为防止循环,使用水平分隔和无穷大计数
    水平分隔:从一个接口收到的路由不能再从这个接口通告出去
}