实验思路
配置所有接口IP,再在边界路由器上配置缺省路由指向ISP,搭建MGRE环境,R1/2/3为中心到站点结构,R1为中心;R1/4/5为全连结构,即每个站点都是中心,需要互相注册,运行ospf宣告私网路由,修改R1/4/5的全连tunnel口ospf网路类型broadcast;修改R1/2/3的星型tunnel口的ospf网路类型为broadcast。
第一步配置
所有路由器配置指向ISP的缺省路由
启动ospf,宣告私网路由
根据题意配置R1为中心站点
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.1.6 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 16.0.0.1
Apr 7 2023 21:31:20-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]nhrp network-id 100
配置分站点R4,R5
[r4-Tunnel0/0/0]ip add 192.168.4.6 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source g0/0/0
Apr 7 2023 21:35:12-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r4-Tunnel0/0/0]
[r4-Tunnel0/0/0]nhrp network-id 100
[r4-Tunnel0/0/0]nhrp entry 192.168.1.6 16.0.0.1 register
R5同上
上面写错了,配置成R1,R4,R5的拓补结构,R1为中心站点
下面将R1,R2,R3 配置为全连的MGRE结构
由于MGRE的全连网状和星系结构不能在一根链路上使用所以使用R1的G0/0/0接口作为全连MGRE结构
创建Tunne0/0/1 搭建MGRE全连网状结构
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]sou
[r1-Tunnel0/0/1]source 61.0.0.1
Apr 7 2023 22:11:52-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r1-Tunnel0/0/1]
[r1-Tunnel0/0/1]ospf network-type broadcast
[r1-Tunnel0/0/1]nhrp entry multicast dynamic
[r1-Tunnel0/0/1]nhrp entry 192.168.2.6 26.0.0.1 register
[r1-Tunnel0/0/1]nhrp entry 192.168.3.6 36.0.0.1 register
[r1-Tunnel0/0/1]
R2
[r2]int t0/0/1
[r2-Tunnel0/0/1]ip add 192.168.2.6 24
[r2-Tunnel0/0/1]tunnel-protocol gre p
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp
[r2-Tunnel0/0/1]sou
[r2-Tunnel0/0/1]source 26.0.0.1
Apr 7 2023 22:37:26-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r2-Tunnel0/0/1]
[r2-Tunnel0/0/1]ospf network-type broadcast
[r2-Tunnel0/0/1]nhrp entry multicast dynamic
[r2-Tunnel0/0/1]nhrp entry 192.168.6.1 61.0.0.1 register
[r2-Tunnel0/0/1]nhrp entry 192.168.3.6 36.0.0.1 register
[r2-Tunnel0/0/1]
R3同上