题目分析:
1、R4为ISP,所连接的所有物理接口为共有网段,任意指定ip即可
2、R1-2-3 构建一个星型结构的MGRE结构,其中R1为中心点,假设R1为中心点,假设R1的共有ip为固定地址
3、R1-5-6构建另一个全连网状的MGRE网络,其中R1/5均为中心区域;
4、使用OSPF实现整个私有网络的互通,同时所有PC可以正常访问R4的环回
路由 R1: 配置ip、环回、路由缺省
[r1]int LoopBack 0
[r1-LoopBack0]ip add 192.168.1.1 24
[r1-LoopBack0]q
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 16.1.1.1 24
[r1-GigabitEthernet0/0/1]int g0/0/2
[r1-GigabitEthernet0/0/2]ip add 16.1.2.1 24
[r1]ip route-static 0.0.0.0 0 16.1.1.2
[r1]ip route-static 0.0.0.0 0 16.1.2.2
Tunnel网段1配置:MGRE结构
设置中心站点
[r1]int Tunnel0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 16.1.1.1
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp network-id 100
手工注册
[r1-Tunnel0/0/0]nhrp entry 10.1.1.2 46.1.1.1 register
[r1-Tunnel0/0/0]nhrp entry 10.1.1.3 56.1.1.1 register
Tunnel网段2配置:
[r1]int t0/0/1
[r1-Tunnel0/0/1]ip add 10.1.2.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 16.1.2.1
[r1-Tunnel0/0/1]nhrp entry multicast dynamic
[r1-Tunnel0/0/1]nhrp network-id 200
启OSPF服务:宣告
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]q
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 10.1.2.0 0.0.0.255
修改接口工作方式为广播
[r1-Tunnel0/0/0]ospf network-type broadcast
路由R2:
[r2]int LoopBack 0
[r2-LoopBack0]ip add 192.168.2.1 24
[r2-LoopBack0]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 26.1.1.1 24
[r2]ip route-static 0.0.0.0 0 26.1.1.2
分支站点配置
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip add 10.1.2.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]sou
[r2-Tunnel0/0/0]source g0/0/0
[r2-Tunnel0/0/0]nhrp network-id 200
[r2-Tunnel0/0/0]nhrp entry 10.1.2.1 16.1.2.1 register
启ospf服务:
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]network 10.1.2.0 0.0.0.255
[r2-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
修改接口工作方式为广播
[r2-Tunnel0/0/0]ospf network-type broadcast
路由R3:
[r3]int l0
[r3-LoopBack0]ip add 192.168.3.1 24
[r3-LoopBack0]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 36.1.1.1 24
[r3]ip route-static 0.0.0.0 0 36.1.1.2
分支站点配置
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 10.1.2.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source g0/0/0
[r3-Tunnel0/0/0]nhrp network-id 200
[r3-Tunnel0/0/0]nhrp entry 10.1.2.1 16.1.2.1 register
启ospf服务:
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 10.1.2.0 0.0.0.255
[r3-ospf-1-area-0.0.0.1]network 192.168.3.0 0.0.0.255
修改接口工作方式为广播
[r3-Tunnel0/0/0]ospf network-type broadcast
R1-2-3 构建一个星型结构的MGRE结构,其中R1为中心点,假设R1为中心点,假设R1的共有ip为固定地址
路由R4: 配置ip、环回
[r4]int l0
[r4-LoopBack0]ip add 192.168.4.1 24
[r4-LoopBack0]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 46.1.1.1 24
[r4]ip route-static 0.0.0.0 0 46.1.1.2
设置中心站点
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add 10.1.1.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source 46.1.1.1
[r4-Tunnel0/0/0]nhrp entry multicast dynamic
[r4-Tunnel0/0/0]nhrp network-id 100
手工注册
[r4-Tunnel0/0/0]nhrp entry 10.1.1.1 16.1.1.1
[r4-Tunnel0/0/0]nhrp entry 10.1.1.3 56.1.1.1
启ospf服务
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
修改接口工作方式为广播
[r4-Tunnel0/0/0]ospf network-type broadcast
R1-5-6构建另一个全连网状的MGRE网络,其中R1/5均为中心区域
路由R5:
[r5]int l0
[r5-LoopBack0]ip add 192.168.5.1 24
[r5-LoopBack0]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 56.1.1.1 24
[r5]ip route-static 0.0.0.0 0 56.1.1.2
设置中心站点
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ip add 10.1.1.3 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 56.1.1.1
[r5-Tunnel0/0/0]nhrp entry multicast dynamic
[r5-Tunnel0/0/0]nhrp network-id 100
手工注册
[r5-Tunnel0/0/0]nhrp entry 10.1.1.1 16.1.1.1 register
[r5-Tunnel0/0/0]nhrp entry 10.1.1.2 46.1.1.1 register
启ospf服务:
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255
修改接口工作方式为广播
[r2-Tunnel0/0/0]ospf network-type broadcast
路由R6:
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 16.1.1.2 24
[ISP-GigabitEthernet0/0/0]int g0/0/1
[ISP-GigabitEthernet0/0/1]ip add 16.1.2.2 24
[ISP-GigabitEthernet0/0/1]int g0/0/2
[ISP-GigabitEthernet0/0/2]ip add 56.1.1.2 24
[ISP-GigabitEthernet0/0/2]int g2/0/0
[ISP-GigabitEthernet2/0/0] ip add 26.1.1.2 24
[ISP-GigabitEthernet2/0/0]
[ISP-GigabitEthernet2/0/0]int g3/0/0
[ISP-GigabitEthernet3/0/0]ip add 36.1.1.2 24
[ISP-GigabitEthernet3/0/0]int g4/0/0
[ISP-GigabitEthernet4/0/0]ip add 46.1.1.2 24
[ISP]int LoopBack 0
[ISP-LoopBack0]ip add 6.6.6.6 24