实验目的:
- R1和R2使用PPP链路直连,R2和R3把2条PPP链路捆绑为PPP MP直连
- 按照图式配置IP地址
- R2对R1的PPP进行单向chap验证
- R2对R3的PPP进行双向chap验证
实验拓扑图如下:
1. 按照图示配置IP
(1)R1和R2使用PPP链路直连
R1
[Huawei]sysname R1
[R1]int Serial 3/0/0
[R1-Serial3/0/0]ip address 192.168.1.1 24
R2
[Huawei]sysname R2
[R2]int Serial 3/0/0
[R2-Serial3/0/0]ip address 192.168.1.2 24
(2)R2和R3把2条PPP链路捆绑为PPP MP直连
R2:
[R2]int Mp-group 0/0/0
[R2-Mp-group0/0/0]quit[R2]int Serial 3/0/1
[R2-Serial3/0/1]pp mp mp
[R2-Serial3/0/1]pp mp Mp-group 0/0/0
Mar 27 2024 11:38:00-08:00 R2 %%01IFNET/4/LINK_STATE(l)[10]:The line protocol PP
P on the interface Serial3/0/1 has entered the DOWN state.[R2-Serial3/0/1]q
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp mp Mp-group 0/0/0
Mar 27 2024 11:38:42-08:00 R2 %%01IFNET/4/LINK_STATE(l)[12]:The line protocol PP
P on the interface Serial4/0/0 has entered the DOWN state.
查看一下IP配置是否成功
[R2-Serial4/0/0]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 5
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 5Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
Mp-group0/0/0 unassigned down down
NULL0 unassigned up up(s)
Serial3/0/0 192.168.1.2/24 up up
Serial4/0/1 unassigned down down
R3:
[Huawei]sysname R3
[R3]int Mp-group 0/0/0
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp mp Mp-group 0/0/0
[R3-Serial3/0/0]q
[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp mp Mp-group 0/0/0
[R3-Serial3/0/1]q
[R3]int Mp-group 0/0/0
[R3-Mp-group0/0/0]ip address 192.168.2.3 24
测试一下是否能ping通:
[R3]ping 192.168.2.2
PING 192.168.2.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.2: bytes=56 Sequence=1 ttl=255 time=130 ms
Reply from 192.168.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.2.2: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.2.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 192.168.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms
2.ppp协议的chap验证配置
(1)R2对R1的PPP进行单向chap验证
R2 对 R1 进行单向验证,R2 是主验证方,R1 是被验证方。
所以需要在 R2 上创建一个用户.
配置如下:
主验证方:
[R2]aaa
[R2-aaa]local-user yb password cipher 123456
Info: Add a new user.[R2-aaa]local-user zyp service-type ppp
[R2-aaa]q
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp authentication-mode chap
[R2-Serial3/0/1]q
被验证方:
[R1]int Serial 3/0/0
[R1-Serial3/0/0]ppp chap user yb
[R1-Serial3/0/0]ppp chap password cipher 123456
[R1-Serial3/0/0]q
测试一下:
[R1]ping 192.168.1.2
PING 192.168.1.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=110 ms
Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms
测试成功,实现R2对R1的ppp进行单向chap验证
(2)R2对R3的PPP进行双向chap验证
双向验证意味着 R2 和 R3 双方都需要创建用于验证的用户,
两种情况进行:
1.用户名和密码可以相同,
2.用户名和密码不同
如果两次情况的用户名与密码相同时,第二次配置时CHAP验证就不用给被验证方配置用户名和密码
(1)R2为主验证方,R3为被验证方
主验证方配置:
[R2]aaa
[R2-aaa]local-user zyp password cipher 123456
Info: Add a new user.[R2-aaa]local-user zyp service-type ppp
[R2-aaa]q
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp a
[R2-Serial3/0/1]ppp authentication-mode chap
[R2-Serial3/0/1]q[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp a
[R2-Serial4/0/0]ppp authentication-mode chap
[R2-Serial4/0/0]q
被验证方配置:
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp chap user zyp
[R3-Serial3/0/0]ppp chap password cipher 123456
[R3-Serial3/0/0]q[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp chap user zyp
[R3-Serial3/0/1]ppp chap password cipher 123456
[R3-Serial3/0/1]q
(2)R3为主验证方,R2为被验证方
主验证方配置:
[R3]aaa
[R3-aaa]local-user zyp password cipher 123456
Info: Add a new user.[R3-aaa]local-user zyp service-type ppp
[R3-aaa]q[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp a
[R3-Serial3/0/0]ppp authentication-mode chap
[R3-Serial3/0/0]q[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp a
[R3-Serial3/0/1]ppp authentication-mode chap
[R3-Serial3/0/1]q
被验证方配置:
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp chap user zyp
[R2-Serial3/0/1]ppp chap password cipher 123456
[R2-Serial3/0/1]q[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp chap password cipher 123456
[R2-Serial4/0/0]q
测试
[R2-Serial3/0/1]ping 192.168.2.3
PING 192.168.2.3: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.3: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.2.3: bytes=56 Sequence=2 ttl=255 time=40 ms
Reply from 192.168.2.3: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.2.3: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 192.168.2.3: bytes=56 Sequence=5 ttl=255 time=30 ms
测试通过,实现R2对R3的ppp进行双向chap验证!!