一、首先为R5的四个端口配置IP地址
二、R1与R5之间使用ppp认证,R5为主认证方
[R5-aaa]local-user 1 password cipher 123456
[R5-aaa]local-user huawei service-type ppp
[R5]interface Serial 3/0/0
[R5-Serial3/0/0]link-protocol ppp
[R5-Serial3/0/0]ppp authentication-mode pap
[R1]interface Serial 4/0/0
[R1-Serial4/0/0]link-protocol ppp
[R1-Serial4/0/0]ppp pap local-user 1 password cipher 123456
三、R2与R5之间使用chap认证
主认证
[R5]aaa
[R5-aaa]local-user 2 password cipher 123456
[R5-aaa]local-user 2 service-type ppp
[R5-aaa]q
[R5]int s 3/0/1
[R5-Serial3/0/1]link-protocol ppp
[R5-Serial3/0/1]ppp authentication-mode chap
被认证
[R2]int s 4/0/0
[R2-Serial4/0/0]link-protocol ppp
[R2-Serial4/0/0]ppp chap user 2
[R2-Serial4/0/0]ppp chap password cipher 123456
四、R3与R5之间使用hdlc
[R3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[R5-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[R5-Serial4/0/0]
五、r1、r2、r3搭建MGRE
主站点
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.1.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
分站点:
[R2]interface Tunnel 0/0/1
[R2-Tunnel0/0/1]ip address 20.1.1.2 24
[R2-Tunnel0/0/1]tunnel-protocol gre p2
[R2-Tunnel0/0/1]tunnel-protocol gre p2mp
[R2-Tunnel0/0/1]source s 4/0/0
[R2-Tunnel0/0/1]nhrp network-id 100
[R2-Tunnel0/0/1]nhrp entry 10.1.1.1 15.1.1.1 register
六、利用动态路由,使全网可通