R1
配置r1
并且没做hdlc的情况下尝试ping通r2发现不可行
做hdlc
pingr2
做缺省
ip route-static 0.0.0.0 0 12.1.1.2
nhrp中心站点配置
rip
防止水平分割
R2
第一步先进行r2的配置
改s3/0/0为hdlc认证
r2]int s3/0/0
[r2-Serial3/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Jan 2 2023 20:32:34-08:00 r2 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed
the configuration that will change the encapsulation protocol of the link and th
en selected Y.
[r2-Serial3/0/1]ip address 23.1.1.2 24
做pap认证
[r2-Serial3/0/1]aaa
[r2-aaa]local-user zz privilege level 15 password cipher 123456
Info: Add a new user.
[r2-aaa]local-user zz service-type ppp
[r2-aaa]int s3/0/1
[r2-Serial3/0/1]ppp authentication-mode pap
[r2-Serial3/0/1]
Jan 2 2023 20:46:05-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial3/0/1 has entered the UP state.
重启s3/0/1接口
[r2-Serial3/0/1]shutdown
[r2-Serial3/0/1]undo shutdown
做chap认证
[r2-Serial3/0/1]int s4/0/0
[r2-Serial4/0/0]ip address 24.1.1.2 24
[r2-Serial4/0/0]ppp authentication-mode chap
[r2-Serial4/0/0]int s3/0/0
[r2-Serial3/0/0]ip address 12.1.1.2 24
R3
[r3-Serial4/0/0]ip address 23.1.1.1 24
[r3-GigabitEthernet0/0/0]ip ad 192.168.2.1 24
查看做完pap认证后接口状态
配置接口
[r3]int s4/0/0
[r3-Serial4/0/0]ppp pap local-user zz password cipher 123456
配置成功重新查看接口状态
pingR2
做缺省
ip route-static 0.0.0.0 0 23.1.1.2
分支站点配置
rip
R4
[Huawei-Serial4/0/0]ip address 24.1.1.1 24
[Huawei-GigabitEthernet0/0/0]ip address 192.168.3.1 24
重启r4接口
[Huawei-Serial4/0/0]shutdown
[Huawei-Serial4/0/0]undo shutdown
查看做完chap认证后接口状态
配置接口
[Huawei-Serial4/0/0]ppp chap user zz
[Huawei-Serial4/0/0]ppp chap password cipher 123456
配置完成后查看接口状态
ping r2路由器
做缺省 ip route-static 0.0.0.0 0 24.1.1.2
分支站点配置
rip
pc1.2.3的配置
pc3ping 192.168.1.2