PPP協議pap/chap配置

一、實驗拓撲圖
實驗要求:(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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章