一,实验配置
二,实验需求
1, R1 和 R2 使用 PPP 链路直连,R2和R3把2条PPP链路捆绑为PPP MP 直连
2,按照图示配置 IP 地址
3,R2 对 R1 的 PPP 进行单向 chap 验证
4,R2 和 R3 的 PPP 进行双向 chap 验证
三,实验步骤
1,配置IP:
R1:
[R1]int Serial 3/0/0
[R1-Serial3/0/0]ip add 192.168.1.1 24
[R1-Serial3/0/0]
Mar 27 2024 09:07:52-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial3/0/0 has entered the UP state.
[R1-Serial3/0/0]
R2:
[R2]int Serial 3/0/0
[R2-Serial3/0/0]ip add 192.168.1.2 24
[R2-Serial3/0/0]
Mar 27 2024 09:07:53-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial3/0/0 has entered the UP state.
由于R2和R3把2条PPP链路捆绑为PPP MP 直连,为了配地址,所以需要对R2和R3创建一个聚合接口(逻辑接口),并将两个物理接口接入创建的逻辑接口中:
R2:
[R2]int Mp-group 0/0/0
[R2-Mp-group0/0/0]q
[R2]
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp mp Mp-group 0/0/0
[R2-Serial3/0/1]q
[R2]
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp mp Mp-group 0/0/0
[R2-Serial4/0/0]q
[R2]
R3:
[R3]int Mp-group 0/0/0
[R3-Mp-group0/0/0]q
[R3]
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp mp Mp-group 0/0/0
[R3-Serial3/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]
此时由于还未配置R2和R3的IP,无法通信。
R2:
[R2]int Mp-group 0/0/0
[R2-Mp-group0/0/0]ip add 192.168.2.2 24
[R2-Mp-group0/0/0]
R3:
[R3]int Mp-group 0/0/0
[R3-Mp-group0/0/0]ip add 192.168.2.3 24
[R3-Mp-group0/0/0]
R3ping
R2:
[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=100 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=20 ms
Reply from 192.168.2.2: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 192.168.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/42/100 ms
[R3]
2,单向验证:
R2:
[R2-aaa]
[R2-aaa]local-user zahngyipei password c
[R2-aaa]local-user zahngyipei password cipher zhang123
Info: Add a new user.
[R2-aaa]
[R2-aaa]lo
[R2-aaa]local-user zhangyipei s
[R2-aaa]local-user zhangyipei service-type ppp
Info: Add a new user.
[R2-aaa]
[R2-aaa]q
[R2]int Serial 3/0/0
[R2-Serial3/0/0]ppp authentication-mode chap
[R2-Serial3/0/0]
R1:
[R1]int Serial 3/0/0
[R1-Serial3/0/0]ppp chap user zhangyipei
[R1-Serial3/0/0]ppp chap password cipher zhang123
[R1-Serial3/0/0]
[R1-Serial3/0/0]q
测试:
3,双向验证:
R2主R3被
R2:
[R2]aaa
[R2-aaa]local-user zhangerpei password cipher zhang456
[R2-aaa]local-user zhangerpei 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
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp authentication-mode chap
R3:
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp chap user zhangerpei
[R3-Serial3/0/0]ppp chap password cipher zhang456
[R3-Serial3/0/0]q
[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp chap user zhangerpei
[R3-Serial3/0/1]ppp chap password cipher zhang456
R3主R2被:
R3:
[R3]aaa
[R3-aaa]local-user zhangsanpei password cipher zhang789
Info: Add a new user.
[R3-aaa]local-user zhangsanpei service-type ppp
[R3-aaa]q
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp authentication-mode chap
[R3-Serial3/0/0]q
[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp authentication-mode chap
[R3-Serial3/0/1]q
[R3]
R2:
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp chap user zhangsanpei
[R2-Serial3/0/1]ppp chap password cipher zhang789
[R2-Serial3/0/1]q
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp chap user zhangsanpei
[R2-Serial4/0/0]ppp chap password cipher zhang789
[R2-Serial4/0/0]