Contents
1.实战:配置PPP协议使用PAP验证
1.1.拓扑图


1.2.配置R1
<Huawei>sys
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.0.1 24
[R1-GigabitEthernet0/0/0]quit
[R1]interface Serial 2/0/0
[R1-Serial2/0/0]ip address 192.168.1.1 24
[R1-Serial2/0/0]quit
[R1]ip route-static 192.168.2.0 24 192.168.1.2
1.3.配置R2
<Huawei>sys
[Huawei]sysname R2
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]ip address 192.168.1.2 24
[R2-Serial2/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.2.1 24
[R2-GigabitEthernet0/0/1]quit
[R2]ip route-static 192.168.0.0 24 192.168.1.1
1.4.连通性测试

1.5.配置PAP验证
AR1
[R1]aaa
[R1-aaa]local-user han password cipher 91xueit.com
[R1-aaa]local-user han service-type ppp
[R1-Serial2/0/0]ppp authentication-mode pap

[R1]interface Serial 2/0/0
[R1-Serial2/0/0]shutdown
[R1-Serial2/0/0]undo shutdown
测试1


测试2
[R2-Serial2/0/0]ppp pap local-user han password cipher 91xueit.com



测试3

[R2]interface Serial 2/0/0
[R2-Serial2/0/0]shutdown
[R2-Serial2/0/0]undo shutdown



2.实战:配置PPP协议使用CHAP验证
2.1.配置R2
<R2>sys
[R2]aaa
[R2-aaa]local-user wong password cipher 51cto.com
[R2-aaa]local-user wong service-type ppp
[R2-aaa]quit
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]ppp authentication-mode chap
2.2.配置R1
<R1>sys
[R1]interface ser
[R1]interface Serial 2/0/0
[R1-Serial2/0/0]ppp chap user wong
[R1-Serial2/0/0]ppp chap password cipher 51cto.com
[R1-Serial2/0/0]shutdown
[R1-Serial2/0/0]undo shutdown
采用加密过得算法

2.3.测试


3.补充:配置PPP为另一端分配地址
3.1.配置R1:
<R1>sys
[R1]interface Serial 2/0/0
[R1-Serial2/0/0]undo ip address #删除地址
[R1-Serial2/0/0]ip address ppp-negotiate #采用协商地址
3.2.配置R2:
<R2>sys
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]remote address 192.168.1.1 #提供协商地址
3.3.抓包分析

提供协商地址

3.4.测试连通性
