实战:配置PPP协议使用PAP,CHAP,协商IP验证

1.实战:配置PPP协议使用PAP验证

1.1.拓扑图

image-20250701150319270

image-20250701150303264

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.连通性测试

image-20250701145633081

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
image-20250701151257576

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

测试1

image-20250701151647179

image-20250701151951519

测试2

[R2-Serial2/0/0]ppp pap local-user han password cipher 91xueit.com
image-20250701152339816

image-20250701152437997

image-20250701152720047

测试3

image-20250701152950833

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

image-20250701153423441

image-20250701153521841

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

采用加密过得算法

image-20250701163507469

2.3.测试

image-20250701163651194

image-20250701163706517

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.抓包分析

image-20250701165100107

提供协商地址

image-20250701165042315

3.4.测试连通性

image-20250701165128598

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注