实验要求及拓扑图:
1.地址配置
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[R1]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1]ip address 14.1.1.1 24
[R1]interface GigabitEthernet0/0/2
[R1-GigabitEthernet0/0/2]ip address 41.1.1.1 24
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.2.1 24
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]ip address 24.1.1.1 24
[R3]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.3.1 24
[R3]interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0]ip address 34.1.1.1 24
[R4]interface GigabitEthernet0/0/1
[R4-GigabitEthernet0/0/1]ip address 24.1.1.4 24
[R4]interface GigabitEthernet0/0/0
[R4-GigabitEthernet0/0/0]ip address 14.1.1.4 24
[R4]interface GigabitEthernet0/0/2
[R4-GigabitEthernet0/0/2]ip address 34.1.1.4 24
[R4]interface GigabitEthernet2/0/0
[R4-GigabitEthernet2/0/0]ip address 41.1.1.4 24
[R4]interface GigabitEthernet3/0/0
[R4-GigabitEthernet3/0/0]ip address 54.1.1.4 24
[R4]interface GigabitEthernet4/0/0
[R4-GigabitEthernet4/0/0]ip address 64.1.1.4 24
[R5]interface GigabitEthernet0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.5.1 24
[R5]interface GigabitEthernet0/0/0
[R5-GigabitEthernet0/0/0]ip address 54.1.1.1 24
[R6]interface GigabitEthernet0/0/1
[R6-GigabitEthernet0/0/1]ip address 192.168.6.1 24
[R6]interface GigabitEthernet0/0/0
[R6-GigabitEthernet0/0/0]ip address 64.1.1.1 24
2.配置R1为中心的MGRE网络
[R1]ip route-static 0.0.0.0 0 14.1.1.4
[R1]interface Tunnel0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 255.255.255.0
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 10.1.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
[R2]ip route-static 0.0.0.0 0 24.1.1.4
[R2]interface Tunnel0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 255.255.255.0
[R2-Tunnel0/0/0] tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source GigabitEthernet0/0/0
[R2-Tunnel0/0/0] nhrp network-id 100
[R2-Tunnel0/0/0] nhrp entry 10.1.1.1 14.1.1.1 register
[R3]ip route-static 0.0.0.0 0 34.1.1.4
[R3]interface Tunnel0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.3 255.255.255.0
[R3-Tunnel0/0/0] tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source GigabitEthernet0/0/0
[R3-Tunnel0/0/0] nhrp network-id 100
[R3-Tunnel0/0/0] nhrp entry 10.1.1.1 14.1.1.1 register
3.配置R1/R5为中心的MGRE网络 这我以R5为中心
[R5]ip route-static 0.0.0.0 0 54.1.1.4
[R5]interface Tunnel0/0/1
[R5-Tunnel0/0/1] ip address 20.1.1.1 255.255.255.0
[R5-Tunnel0/0/1]tunnel-protocol gre p2mp
[R5-Tunnel0/0/1]source 54.1.1.1
[R5-Tunnel0/0/1]nhrp entry multicast dynamic
[R5-Tunnel0/0/1]nhrp network-id 200
[R1]interface Tunnel0/0/1
[R1-Tunnel0/0/1]ip address 20.1.1.3 255.255.255.0
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]source GigabitEthernet0/0/2
[R1-Tunnel0/0/1]nhrp network-id 200
[R1-Tunnel0/0/1]nhrp entry 20.1.1.1 54.1.1.1 register
[R6]ip route-static 0.0.0.0 0 64.1.1.4
[R6]interface Tunnel0/0/1
[R6-Tunnel0/0/1]ip address 20.1.1.2 255.255.255.0
[R6-Tunnel0/0/1]tunnel-protocol gre p2mp
[R6-Tunnel0/0/1]source GigabitEthernet0/0/0
[R6-Tunnel0/0/1]nhrp network-id 200
[R6-Tunnel0/0/1]nhrp entry 20.1.1.1 54.1.1.1 register
每台路由配置rip协议
测试结果:
完成!