实验拓扑
实验要求
1.R2为ISP,其上只能配置IP地址
2.R1-R2之间为HDLC封装
3.R2-R3之间为ppp封装,pap认证,R2为主认证方
4.R2-R4之间为PPP封装,chap认证,R2为主认证方
5.R1、R2、R3构建MGRE环境,仅R1P地址固定
6.内网使用RTP获取路中,所有pc可以五相访问,并日可访问B2的环回。
实验步骤
1、IP地址配置,不做过多阐述
2、路由配置:R1,R3,R4各有一条缺省指向R2
3、R1-R2之间为HDLC封装
R1
[Huawei]int s4/0/0
[Huawei-Serial4/0/0]link-protocol hdlc
R2
[Huawei]int s4/0/0
[Huawei-Serial4/0/0]link-protocol hdlc
4、R2-R3之间为ppp封装,pap认证,R2为主认证方
R2:
[Huawei-aaa]local-user qq privilege level 15 password cipher 123456
[Huawei-aaa]local-user qq service-type ppp
[Huawei]int s4/0/1
[Huawei-Serial4/0/1]ppp authentication-mode pap
R3:
[Huawei]int s4/0/0
[Huawei-Serial4/0/0]ppp pap local-user qq password cipher 123456
5、R2-R4之间为PPP封装,chap认证,R2为主认证方
R2
[Huawei-aaa]local-user qq1 privilege level 15 password cipher 123456
[Huawei-aaa]local-user qq1 service-type ppp
[Huawei]int s3/0/0
[Huawei-Serial3/0/0]ppp authentication-mode chap
R4
[Huawei]interface Serial 4/0/0
[Huawei-Serial4/0/0]ppp chap user qq1
[Huawei-Serial4/0/0]ppp chap password cipher 123456
6、R1、R2、R3构建MGRE环境,仅R1 iP地址固定
R1
[Huawei]interface Tunnel 0/0/0 创建隧道接口
[Huawei-Tunnel0/0/0]ip address 192.168.4.1 24 隧道接口ip地址
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp 定义该隧道为多点gre隧道
[Huawei-Tunnel0/0/0]source 14.1.1.1 该隧道加封装的报头源ip地址
通过NHRP协议来获取加封装的目标ip地址
[Huawei-Tunnel0/0/0]nhrp entry multicast dynamic 本地成为NHRP服务端
[Huawei-Tunnel0/0/0]nhrp network-id 100 NHRP的工作编号,该网段所有设备必须在同一id
R3
[Huawei]interface Tunnel 0/0/0
[Huawei-Tunnel0/0/0]ip address 192.168.4.2 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
加封装的源ip地址,为本地的隧道实际通过接口的ip地址,填写接口编号,而不是接口ip,原因在于该接口ip地址可变
[Huawei-Tunnel0/0/0]source s0/0/0
加封装的目标ip地址,需要到NHRP中心站点获取
[Huawei-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[Huawei-Tunnel0/0/0]nhrp network-id 100
R4
[Huawei]interface Tunnel 0/0/0
[Huawei-Tunnel0/0/0]ip address 192.168.4.3 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source s0/0/0
[Huawei-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
[Huawei-Tunnel0/0/0]nhrp network-id 100