实验拓扑及要求如下:
要求1:
首先进行基础的IP配置
以R1为例
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 61.0.0.2 24
Apr 5 2024 18:19:06-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interfaceGigabitEthernet0/0/0 has entered the UP state.
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 16.0.0.2 24
Apr 5 2024 18:19:18-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interfaceGigabitEthernet0/0/1 has entered the UP state.
[r1]interface l0
[r1-LoopBack0]ip address 1.1.1.1 24
查看每个路由器的路由表以保证IP配置无误
每个路由器写一条指向ISP的缺省路由,保证公网能通
以R1为例
[r1]ip route-static 0.0.0.0 0 16.0.0.1
[r1]ip route-static 0.0.0.0 0 61.0.0.1
测试公网保证能正常通讯
要求2:
R1/R4/R5为MGRE环境
R1为中心站点
R4,R5上分别做如下配置
[r4]interface t0/0/0
[r4-Tunnel0/0/0]ip address 192.168.1.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source g0/0/0
Apr 10 2024 11:20:06-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]nhrp entry 192.168.1.1 16.0.0.2 register
[r5]interface t0/0/0
[r5-Tunnel0/0/0]ip address 192.168.1.3 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source g0/0/0
Apr 10 2024 11:21:00-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]nhrp entry 192.168.1.1 16.0.0.2 register
在R1上查看NHRP表象
同时在三台路由器上修改接口网络类型为broadcast,即可实现全连
R1,R2,R3为星型拓扑,创建新的隧道并做如下配置
在R1上
在R2,R3上做如下配置
[r2]interface t0/0/1
[r2-Tunnel0/0/1]ip address 192.168.2.2 24
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp
[r2-Tunnel0/0/1]source g0/0/0
Apr 10 2024 11:39:56-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r2-Tunnel0/0/1]nh entry 192.168.2.1 61.0.0.2 register
查看R1上的NHRP表象
得到4个表象
要求3:
将R1-R5划分到一个OSPF区域,并宣告私网网段
以R1为例
测试,得到结果,全网可达
实验结束