一、实验拓扑图
PPP协议pap`chap配置_cisco
实验要求:(1)、各路由器之间使用PPP协议进行连接,PPP之间使用安全认证机制
                  R1R2之间进行PAP认证,R1R2R3之间进行CHAP认证
         2)、实现全网互通
二、配置清单
R1R1(config)#int s0/0
    R1(config-if)#encapsulation ppp
    R1(config-if)#ppp authentication pap
    R1(config)#username R2 password 0 123
    R1(config-if)#ip add 3.3.3.1 255.255.255.252
    R1(config-if)#no shutdown
    R1(config)#int f0/0
    R1(config-if)#ip add 172.16.1.1 255.255.255.0
    R1(config-if)#no shutdown
R2R2(config)#int s0/0
    R2(config-if)#encapsulation ppp
    R2(config)#ppp pap sent-username R2 password 0 123
    R2(config-if)#ip add 3.3.3.2 255.255.255.252
    R2(config-if)#no shutdown
    R2(config)#int f0/0
    R2(config-if)#ip add 192.168.1.1 255.255.255.0
    R2(config-if)#no shutdown
R1R1(config)#int s0/1
    R1(config-if)#encapsulation ppp
    R1(config-if)#ppp chap hostname 1B   #在设置CHAP认证时,用户名一定要设对端的
    R1(config)#username 3B password 0 456     用户名,密码与对端一致
    R1(config-if)#ppp authentication chap
    R1(config-if)#ip add 4.4.4.1 255.255.255.252
    R1(config-if)#no shutdown
R3R3(config)#int s0/0
    R3(config-if)#encapsulation ppp
    R3(config-if)#ppp chap hostname 3B
    R3(config)#username 1B password 0 456
    R3(config-if)#ip add 4.4.4.1 255.255.255.252
R3(config-if)#no shutdown
R1R1(config)#int s0/2
    R1(config-if)#encapsulation ppp
    R1(config-if)#ppp chap hostname 1C
    R1(config)#username 4C password 0 789
    R1(config-if)#ppp authentication chap
    R1(config-if)#ip add 5.5.5.1 255.255.255.252
R1(config-if)#no shutdown
R4R4(config)#int s0/0
    R4(config-if)#encapsulation ppp
    R4(config-if)#ppp chap hostname 4C
    R4(config)#username 1C password 0 789
    R4(config-if)#ip add 5.5.5.2 255.255.255.252
R4(config-if)#no shutdown
R4(config)#int f0/0
R4(config-if)#ip add 192.168.3.1 255.255.255.0
R4(config-if)#no shutdown
三、配置RIP协议实现全网互通
 R1R1(config)#router rip
     R1(config-router)#version 2
     R1(config-router)#no auto-summary
     R1(config-router)#network 3.3.3.0
     R1(config-router)#network 4.4.4.0
     R1(config-router)#network 5.5.5.0
R1(config-router)#network 172.16.1.0
R2 R2(config)#router rip
     R2(config-router)#version 2
     R2(config-router)#no auto-summary
     R2(config-router)#network 3.3.3.0
     R2(config-router)#network 192.168.1.0
R3 R3(config)#router rip
     R3(config-router)#version 2
     R3(config-router)#no auto-summary
     R3(config-router)#network 4.4.4.0
     R3(config-router)#network 192.168.2.0
R4 R4(config)#router rip
     R4(config-router)#version 2
     R4(config-router)#no auto-summary
     R4(config-router)#network 5.5.5.0
     R4(config-router)#network 192.168.3.0