MGRE实验报告二

实验要求:

实验预览图:

实验分析:

1、对R1-R5配置IP地址,同时R1-R5每个路由器各有一个环回

2.1、对R1、R3、R4路由器开启虚拟接口1,分别配置隧道IP、接口封装协议,接口类型、定义封装源、开启伪广播功能,之后对分别对隧道接口、环回进行宣告。

2.2、对R1、R5、R6路由器开启虚拟接口2,以R1为hub路由器,R5、R6为spoke路由器,接着对R1配置隧道IP、接口封装协议、封装源以及开启伪广播功能,对R5、R6配置隧道IP,接口封装协议、封装源、分支向节点注册,最后对隧道IP以及环回进行宣告。

实验过程:

配置IP:

R1:

r1\]interface GigabitEthernet 0/0/0 \[r1-GigabitEthernet0/0/0\]ip address 11.0.0.1 24 \[r1\]interface GigabitEthernet 0/0/1 \[r1-GigabitEthernet0/0/1\]ip address 10.0.0.1 24 \[r1\]interface LoopBack 0 \[r1-LoopBack0\]ip address 1.1.1.1 24 \[r1\]ip route-static 0.0.0.0 0 10.0.0.2 \[r1\]ip route-static 0.0.0.0 0 11.0.0.2

检查配置:

r1\]display ip interface brief Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 11.0.0.1/24 up up GigabitEthernet0/0/1 10.0.0.1/24 up up GigabitEthernet0/0/2 unassigned down down LoopBack0 1.1.1.1/24 up up(s) NULL0 unassigned up up(s)

R2:

r2\]interface GigabitEthernet 0/0/0 \[r2-GigabitEthernet0/0/0\]ip address 11.0.0.2 24 \[r2\]interface GigabitEthernet 0/0/1 \[r2-GigabitEthernet0/0/1\]ip address 10.0.0.2 24 \[r2\]interface GigabitEthernet 0/0/2 \[r2-GigabitEthernet0/0/2\]ip address 12.0.0.2 24 \[r2\]interface GigabitEthernet 2/0/0 \[r2-GigabitEthernet2/0/0\]ip address 13.0.0.2 24 \[r2\]interface GigabitEthernet 3/0/0 \[r2-GigabitEthernet3/0/0\]ip address 15.0.0.2 24 \[r2\]interface GigabitEthernet 4/0/0 \[r2-GigabitEthernet4/0/0\]ip address 14.0.0.2 24

检查配置:

r2\]display ip interface brief Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 11.0.0.2/24 up up GigabitEthernet0/0/1 10.0.0.2/24 up up GigabitEthernet0/0/2 12.0.0.2/24 up up GigabitEthernet2/0/0 13.0.0.2/24 up up GigabitEthernet3/0/0 15.0.0.2/24 up up GigabitEthernet4/0/0 14.0.0.2/24 up up NULL0 unassigned up up(s)

R3:

r3\]interface GigabitEthernet 0/0/0 \[r3-GigabitEthernet0/0/0\]ip address 15.0.0.1 24 \[r3\]interface LoopBack 0 \[r3-LoopBack0\]ip address 5.5.5.5 24 \[r3\]ip route-static 0.0.0.0 0 15.0.0.2

检查配置:

r3\]display ip interface brief Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 15.0.0.1/24 up up GigabitEthernet0/0/1 unassigned down down GigabitEthernet0/0/2 unassigned down down LoopBack0 5.5.5.5/24 up up(s) NULL0 unassigned up up(s)

R4:

r4\]interface GigabitEthernet 0/0/0 \[r4-GigabitEthernet0/0/0\]ip address 14.0.0.1 24 \[r4\]interface LoopBack 0 \[r4-LoopBack0\]ip address 4.4.4.4 24 \[r4\]ip route-static 0.0.0.0 0 14.0.0.2

检查配置:

r4\]display ip interface brief Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 14.0.0.1/24 up up GigabitEthernet0/0/1 unassigned down down GigabitEthernet0/0/2 unassigned down down LoopBack0 4.4.4.4/24 up up(s) NULL0 unassigned up up(s)

R5:

r5\]interface GigabitEthernet 0/0/0 \[r5-GigabitEthernet0/0/0\]ip address 13.0.0.1 24 \[r5\]interface LoopBack 0 \[r5-LoopBack0\]ip address 3.3.3.3 24 \[r5\]ip route-static 0.0.0.0 0 13.0.0.2

检查配置:

r5\]display ip interface brief Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 13.0.0.1/24 up up GigabitEthernet0/0/1 unassigned down down GigabitEthernet0/0/2 unassigned down down LoopBack0 3.3.3.3/24 up up(s) NULL0 unassigned up up(s)

R6:

r6\]interface GigabitEthernet 0/0/0 \[r6-GigabitEthernet0/0/0\]ip address 12.0.0.1 24 \[r6\]interface LoopBack 0 \[r6-LoopBack0\]ip address 2.2.2.2 24 \[r6\]ip route-static 0.0.0.0 0 12.0.0.2

检查配置:

r6\]display ip interface brief Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 12.0.0.1/24 up up GigabitEthernet0/0/1 unassigned down down GigabitEthernet0/0/2 unassigned down down LoopBack0 2.2.2.2/24 up up(s) NULL0 unassigned up up(s)

R1、R3、R4为全连的MGRE结构:

MGRE:

R1:

r1\]interface Tunnel 0/0/0 \[r1-Tunnel0/0/0\]ip address 192.168.1.1 24 \[r1-Tunnel0/0/0\]tunnel-protocol gre p2mp ---修改接口封装协议为多点GRE \[r1-Tunnel0/0/0\]source 10.0.0.1 ---定义封装源 \[r1-Tunnel0/0/0\]nhrp network-id 1 \[r1-Tunnel0/0/0\]nhrp entry multicast dynamic ------开启伪广播功能 \[r1-Tunnel0/0/0\]ospf network-type broadcast ------修改接口类型为broadcast \[r1-Tunnel0/0/0\]nhrp entry 192.168.1.2 14.0.0.1 register ------向节点注册 \[r1-Tunnel0/0/0\]nhrp entry 192.168.1.3 15.0.0.1 register------向节点注册

R3:

r3\]interface Tunnel 0/0/0 \[r3-Tunnel0/0/0\]ip address 192.168.1.3 24 \[r3-Tunnel0/0/0\]tunnel-protocol gre p2mp ---修改接口封装协议为多点GRE \[r3-Tunnel0/0/0\]source 15.0.0.1 ---定义封装源 \[r3-Tunnel0/0/0\]nhrp network-id 1 \[r3-Tunnel0/0/0\]nhrp entry multicast dynamic ------开启伪广播功能 \[r3-Tunnel0/0/0\]ospf network-type broadcast ------修改接口类型为broadcast

R4:

r4\]interface Tunnel 0/0/0 \[r4-Tunnel0/0/0\]ip address 192.168.1.2 24 \[r4-Tunnel0/0/0\]tunnel-protocol gre p2mp ---修改接口封装协议为多点GRE \[r4-Tunnel0/0/0\]source 14.0.0.1 ---定义封装源 \[r4-Tunnel0/0/0\]nhrp network-id 1 \[r4-Tunnel0/0/0\]nhrp entry multicast dynamic ------开启伪广播功能 \[r4-Tunnel0/0/0\]ospf network-type broadcast ------修改接口类型为broadcast \[r4-Tunnel0/0/0\]nhrp entry 192.168.1.3 15.0.0.1 register------向节点注册

OSPF:

R1:

r1\]ospf 1 router-id 1.1.1.1 \[r1-ospf-1\]area 0 \[r1-ospf-1-area-0.0.0.0\]network 192.168.1.1 0.0.0.0 \[r1-ospf-1-area-0.0.0.0\]network 1.1.1.1 0.0.0.0

R3:

r3\]ospf 1 router-id 5.5.5.5 \[r3-ospf-1\]area 0 \[r3-ospf-1-area-0.0.0.0\]network 192.168.1.3 0.0.0.0 \[r3-ospf-1-area-0.0.0.0\]network 5.5.5.5 0.0.0.0

R4:

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.1.2 0.0.0.0 \[r4-ospf-1-area-0.0.0.0\]network 4.4.4.4 0.0.0.0

R1、R5、R6建立hub-spoke的MGRE环境:

MGRE:

R1:

r1\]interface Tunnel 0/0/1 \[r1-Tunnel0/0/1\]ip address 192.168.2.1 24 \[r1-Tunnel0/0/1\]tunnel-protocol gre p2mp ---修改接口封装协议为多点GRE \[r1-Tunnel0/0/1\]source 11.0.0.1 ---定义封装源 \[r1-Tunnel0/0/1\]nhrp network-id 2 \[r1-Tunnel0/0/1\]nhrp entry multicast dynamic ------开启伪广播功能 \[r1-Tunnel0/0/1\]ospf network-type p2mp------修改接口类型为p2mp

R5:

r5\]interface Tunnel 0/0/1 \[r5-Tunnel0/0/1\]ip address 192.168.2.3 24 \[r5-Tunnel0/0/1\]tunnel-protocol gre p2mp ---修改接口封装协议为多点GRE \[r5-Tunnel0/0/1\]source GigabitEthernet 0/0/0 ---定义封装源 \[r5-Tunnel0/0/1\]nhrp network-id 2 \[r5-Tunnel0/0/1\]nhrp entry 192.168.2.1 11.0.0.1 register ---分支向中心节点注册 \[r5-Tunnel0/0/1\]ospf network-type p2mp------修改接口类型为p2mp

R6:

r6\]interface Tunnel 0/0/1 \[r6-Tunnel0/0/1\]ip address 192.168.2.2 24 \[r6-Tunnel0/0/1\]tunnel-protocol gre p2mp ---修改接口封装协议为多点GRE \[r6-Tunnel0/0/1\]source GigabitEthernet 0/0/0 ---定义封装源 \[r6-Tunnel0/0/1\]nhrp network-id 2 \[r6-Tunnel0/0/1\]nhrp entry 192.168.2.1 11.0.0.1 register ---分支向中心节点注册 \[r6-Tunnel0/0/1\]ospf network-type p2mp------修改接口类型为p2mp

OSPF:

R1:

r1\]ospf 1 router-id 1.1.1.1 \[r1-ospf-1\]area 0 \[r1-ospf-1-area-0.0.0.0\]network 192.168.2.1 0.0.0.0

R5:

r5\]ospf 1 router-id 3.3.3.3 \[r5-ospf-1\]area 0 \[r5-ospf-1-area-0.0.0.0\]network 192.168.2.3 0.0.0.0 \[r5-ospf-1-area-0.0.0.0\]network 3.3.3.3 0.0.0.0

R6:

r6\]ospf 1 router-id 2.2.2.2 \[r6-ospf-1\]area 0 \[r6-ospf-1-area-0.0.0.0\]network 192.168.2.2 0.0.0.0 \[r6-ospf-1-area-0.0.0.0\]network 2.2.2.2 0.0.0.0

实验结果:

全网可达:

R1:
R3:
R4:
R5:
R6:
相关推荐
世界尽头与你37 分钟前
SSL 签名相关漏洞
网络·安全·ssl
g***B7381 小时前
Rust在网络中的Tokio
开发语言·网络·rust
xu_yule2 小时前
网络和Linux网络-5(应用层)HTTP协议(方法+报头+状态码)
linux·网络·网络协议·http
报错小能手2 小时前
TCP/UDP面经整理
网络·tcp/ip·udp
xxp43212 小时前
Qt 网络编程 网络下载
网络·qt·php
xuchaoxin13753 小时前
cdn节点代理的副作用@fail2ban对接cdn封锁恶意请求ip@fail2ban封锁ip有效性问题
运维·网络·cdn·cloudflare
西幻凌云3 小时前
了解计算机网络的“物理根基”——物理层与数据链路层
网络·网络协议·计算机网络·数据链路层·物理层
白狐_7986 小时前
网络基础核心问题深度解析:从IP/MAC到IPv6与路由配置
网络·tcp/ip·macos
板鸭〈小号〉6 小时前
应用层协议 HTTP
网络·网络协议·http
拾忆,想起6 小时前
Dubbo服务超时与重试策略配置指南:构建 resilient 微服务架构
服务器·网络·微服务·云原生·架构·dubbo