- R6为ISP只能配置Ip地址,R1-R5的环回为私有网段
- R1/4/5为全连的MGRE结构:R1/2/3为星型的拓扑结构,R1为中心站点
- 所有私有网段可以互相通讯,私有网段使用OSPF完成。
条件一 配置IP地址即可
地址配完后别忘记写指向ISP的缺省
条件二
R1
[Huawei-Tunnel0/0/0]ip address 192.168.6.1 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source 17.0.0.1
[Huawei-Tunnel0/0/0]nhrp network-id 100
[Huawei-Tunnel0/0/0]nhrp entry multicast dynamic
[Huawei-Tunnel0/0/0]nhrp entry 192.168.6.2 46.0.0.1 register
[Huawei-Tunnel0/0/0]nhrp entry 192.168.6.3 56.0.0.1 register
[Huawei-Tunnel0/0/0]display nhrp peer all --查看建立好的关系
R4
[Huawei-Tunnel0/0/0]ip address 192.168.6.2 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source 46.0.0.1
[Huawei-Tunnel0/0/0]nhrp entry multicast dynamic
[Huawei-Tunnel0/0/0]nhrp network-id 100
[Huawei-Tunnel0/0/0]nhrp entry 192.168.6.3 56.0.0.1 register
[Huawei-Tunnel0/0/0]nhrp entry 192.168.6.1 17.0.0.1 register
[Huawei-Tunnel0/0/0]display nhrp peer all --查看
R5
[Huawei-Tunnel0/0/0]ip address 192.168.6.3 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source 56.0.0.1
[Huawei-Tunnel0/0/0]nhrp network-id 100
[Huawei-Tunnel0/0/0]nhrp entry multicast dynamic
[Huawei-Tunnel0/0/0]nhrp entry 192.168.6.1 17.0.0.1 register
[Huawei-Tunnel0/0/0]nhrp entry 192.168.6.2 46.0.0.1 register
[Huawei-Tunnel0/0/0]display nhrp peer all --查看
R1
[Huawei-Tunnel0/0/1]ip address 192.168.7.1 24
[Huawei-Tunnel0/0/1]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/1]source 16.0.0.1
[Huawei-Tunnel0/0/1]nhrp network-id 110
[Huawei-Tunnel0/0/1]nhrp entry multicast dynamic
R2
[Huawei-Tunnel0/0/0]ip address 192.168.7.2 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source g0/0/0
[Huawei-Tunnel0/0/0]nhrp network-id 110
[Huawei-Tunnel0/0/0]nhrp entry 192.168.7.1 16.0.0.1 register
R3
[Huawei-Tunnel0/0/0]ip address 192.168.7.3 24
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source g0/0/0
[Huawei-Tunnel0/0/0]nhrp network-id 110
[Huawei-Tunnel0/0/0]nhrp entry 192.168.7.1 16.0.0.1 register
条件三 正常配置OSPF后
下面 OSPF网络类型在接口改为P2MP
[Huawei-Tunnel0/0/0]ospf network-type p2mp
上面OSPF网络类型在接口改为broadcast
[Huawei-Tunnel0/0/0]ospf network-type broadcast
P2MP网络在OSPF中会自动学习邻居接口的主机路由 192.168.7.2/192.168.7.3