MGRE和OSPF实验
1.题目
1,R6为ISP只能配置IP地址,R1-R5的环回为私有网段
2,R1/4/5为全连的MGRE结构,R1/2/3为星型的拓扑结构,R1为中心站点私有网段使用OSPF完成。
3,所有私有网段可以互相通讯,私有网段使用OSPF完成
2.拓扑图
3.需求分析
1.配置IP 配置缺省路由
R1:
[Huawei]sy R1
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 16.0.0.1 24
[R1]int LoopBack 0
[R1-LoopBack0]ip address 192.168.1.1 24
[R1]ip route-static 0.0.0.0 0 16.0.0.3
[R1]ip route-static 0.0.0.0 0 116.0.0.3
R2:
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 26.0.0.1 24
[R2]int LoopBack 0
[R2-LoopBack0]ip address 192.168.2.1 24
[R2]ip route-static 0.0.0.0 0 26.0.0.3
R3:
[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip address 36.0.0.1 24
[R3]int LoopBack 0
[R3-LoopBack0]ip address 192.168.3.1 24
[R3]ip route-static 0.0.0.0 0 36.0.0.3
R4:
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 46.0.0.1 24
[R4]int LoopBack 0
[R4-LoopBack0]ip address 192.168.4.1 24
[R4]ip route-static 0.0.0.0 0 46.0.0.3
R5:
[Huawei]sysname R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip address 56.0.0.1 24
[R5]int l 0
[R5-LoopBack0]ip address 192.168.5.1 24
[R5]ip route-static 0.0.0.0 0 56.0.0.3
R6:
[Huawei]sy R6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip address 116.0.0.3 24
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip ad
[R6-GigabitEthernet0/0/1]ip address 16.0.0.3 24
[R6-GigabitEthernet0/0/1]int g0/0/2
[R6-GigabitEthernet0/0/2]ip ad
[R6-GigabitEthernet0/0/2]ip address 26.0.0.3 24
[R6-GigabitEthernet0/0/2]int g6/0/0
[R6-GigabitEthernet6/0/0]ip ad
[R6-GigabitEthernet6/0/0]ip address 36.0.0.3 24
[R6-GigabitEthernet6/0/0]int g6/0/1
[R6-GigabitEthernet6/0/1]ip ad
[R6-GigabitEthernet6/0/1]ip address 46.0.0.3 24
[R6-GigabitEthernet6/0/1]int g6/0/2
[R6-GigabitEthernet6/0/2]ip ad
[R6-GigabitEthernet6/0/2]ip address 56.0.0.3 24
结果:
2.配置MGRE结构
R1
[R1]int t 0/0/0
[R1-Tunnel0/0/0]ip address 192.168.5.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.0.0.1
[R1-Tunnel0/0/0]nhrp network-id 10
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
R2:
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source GigabitEthernet 0/0/1
[R2-Tunnel0/0/0]nhrp network-id 10
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
R3:
[R3-Tunnel0/0/0]ip address 192.168.5.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source GigabitEthernet 0/0/1
[R3-Tunnel0/0/0]nhrp network-id 10
[R3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
R4:
[R4-Tunnel0/0/0]ip address 192.168.5.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source GigabitEthernet 0/0/1
[R4-Tunnel0/0/0]nhrp network-id 10
[R4-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
R5:
[R5-Tunnel0/0/0]ip address 192.168.5.5 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source GigabitEthernet 0/0/1
[R5-Tunnel0/0/0]nhrp network-id 10
[R5-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
R6:
[R6-Tunnel0/0/0]ip address 192.168.5.6 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source GigabitEthernet 0/0/1
[R6-Tunnel0/0/0]nhrp network-id 10
[R6-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source GigabitEthernet 0/0/1
[R6-Tunnel0/0/0]nhrp network-id 10
[R6-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register