第一步先将所有IP配置完成
第二步配置r1 r4 r5 的mgre架构
R1配置
ip address 192.168.7.1 24
tunnel-protocol gre p2mp
source 16.0.0.1
nhrp entry multicast dynamic
R4配置
ip address 192.168.1.4 24
tunnel-protocol gre p2mp
source 46.0.0.4
nhrp entry multicast dynamic
nhrp entry 192.168.7.1 16.0.0.1 register
nhrp entry 192.168.7.5 56.0.0.5 register
R5配置
ip address 192.168.1.5 24
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
nhrp entry multicast dynamic
nhrp entry 192.168.7.1 16.0.0.1 register
nhrp entry 192.168.7.4 46.0.0.4 register
第三步配置mger的ospf
R1
[1]ospf 1 router-id 1.1.1.1
[1-ospf-1]area 0
[1-ospf-1-area-0.0.0.0]network 16.0.0.1 0.0.0.0
[1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[1-ospf-1-area-0.0.0.0]network 192.168.7.1 0.0.0.0
[1-Tunnel0/0/0]ospf network-type broadcast
R4
[4]ospf 1 router-id 4.4.4.4
[4-ospf-1]area 0
[4-ospf-1-area-0.0.0.0]network 46.0.0.4 0.0.0.0
[4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[4-ospf-1-area-0.0.0.0]network 192.168.7.4 0.0.0.0
[4-Tunnel0/0/0]ospf network-type broadcast
[4-Tunnel0/0/0]ospf dr-priority 0
R5
[5]ospf 1 router-id 5.5.5.5
[5-ospf-1]area 0
[5-ospf-1-area-0.0.0.0]network 56.0.0.5 0.0.0.0
[5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[5-ospf-1-area-0.0.0.0]network 192.168.7.5 0.0.0.0
[5-Tunnel0/0/0]ospf network-type broadcast
第四步 配置r1 r2 r3的星型拓扑架构
R1
ip address 192.168.8.1 24
tunnel-protocol gre p2mp
source 61.0.0.1
nhrp entry multicast dynamic
R2
ip address 192.168.8.2 24
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
nhrp entry 192.168.8.1 61.0.0.1 register
R3
ip address 192.168.8.3 24
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
nhrp entry 192.168.8.1 61.0.0.1 register
第五步配置星型架构的ospf
R1
[1]ospf 1
[1-ospf-1]area 1
[1-ospf-1-area-0.0.0.1]network 61.0.0.1 0.0.0.0
[1-ospf-1-area-0.0.0.1]network 192.168.8.1 0.0.0.0
[1-Tunnel0/0/1]ospf network-type broadcast
R2
[2]ospf 1 router-id 2.2.2.2
[2-ospf-1]area 1
[2-ospf-1-area-0.0.0.1]network 26.0.0.2 0.0.0.0
[2-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[2-ospf-1-area-0.0.0.1]network 192.168.8.2 0.0.0.0
[2-Tunnel0/0/1]ospf network-type broadcast
R3
[3]ospf 1 router-id 3.3.3.3
[3-ospf-1]area 1
[3-ospf-1-area-0.0.0.1]network 36.0.0.3 0.0.0.0
[3-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[3-ospf-1-area-0.0.0.1]network 192.168.8.3 0.0.0.0
[3-Tunnel0/0/1]ospf network-type broadcast