实验拓扑结构1 开启DHCP,使每个PC获取IP
2、R1/4/5为全连的MGRE结构
R1
[r1]interface Tunnel0/0/0
[r1]ip address 10.1.1.1 255.255.255.0
[r1]tunnel-protocol gre p2mp
[r1]source 16.1.1.1
[r1]ospf network-type broadcast
[r1]ospf dr-priority 255
[r1]nhrp entry multicast dynamic
[r1] nhrp network-id 100
[r1]nhrp entry 10.1.1.2 46.1.1.1 register
R4
[r4]interface Tunnel0/0/0
[r4]ip address 10.1.1.2 255.255.255.0
[r4]tunnel-protocol gre p2mp
[r4]source 46.1.1.1
[r4]nhrp entry multicast dynamic
[r4]nhrp network-id 100
R5
[r5]interface Tunnel0/0/0
[r5]ip address 10.1.1.3 255.255.255.0
[r5]tunnel-protocol gre p2mp
[r5]source 56.1.1.1
[r5]nhrp network-id 100
[r5]nhrp entry 10.1.1.1 16.1.1.1 register
[r5]nhrp entry 10.1.1.2 46.1.1.1 register
R1/2/3为星型的拓扑结构,R1为中心站点
R1
[r1]interface Tunnel0/0/1
[r1]ip address 20.1.1.1 255.255.255.0
[r1]tunnel-protocol gre p2mp
[r1]source 61.1.1.1
[r1]ospf network-type broadcast
[r1]nhrp entry multicast dynamic
[r1]nhrp network-id 100
R2
[r2]interface Tunnel0/0/1
[r2]ip address 20.1.1.2 255.255.255.0
[r2]tunnel-protocol gre p2mp
[r2]source 26.1.1.1
[r2]ospf network-type broadcast
[r2]ospf dr-priority 0
[r2]nhrp network-id 100
[r2]nhrp entry 20.1.1.1 61.1.1.1 register
R3
[r3]interface Tunnel0/0/1
[r3]ip address 20.1.1.3 255.255.255.0
[r3]tunnel-protocol gre p2mp
[r3]source 36.1.1.1
[r3]ospf network-type broadcast
[r3]ospf dr-priority 0
[r3]nhrp network-id 100
[r3]nhrp entry 20.1.1.1 61.1.1.1 register
3、使用OSPF协议使全网可达
结果