当前位置:网站首页>【HCIP】两个MGRE网络通过OSPF实现互联(eNSP)
【HCIP】两个MGRE网络通过OSPF实现互联(eNSP)
2022-07-29 00:33:00 【1ta-chi】
实验要求及拓扑
- R4为ISP,所连接的所有物理接口为共有网段
- R1-2-3 构建一个星型结构MGRE,其中R1为中心站点
- R1-5-6 构建一个全连网状MGRE,其中R1/5均为中心站点
- 使用OSPF实现整个私有网络的互通,同时所有PC可以正常访问R4的环回
实验过程
IP配置
以R4(ISP)为例
[ISP]interface LoopBack 0
[ISP-LoopBack0]ip address 4.4.4.4 24 //公网IP
[ISP-LoopBack0]quit
[ISP]interface g0/0/0
[ISP-GigabitEthernet0/0/0]ip address 21.1.1.4 24
[ISP-GigabitEthernet0/0/0]quit
[ISP]interface g0/0/1
[ISP-GigabitEthernet0/0/1]ip address 12.1.1.4 24
[ISP-GigabitEthernet0/0/1]quit
[ISP]interface g0/0/2
[ISP-GigabitEthernet0/0/2]ip address 23.1.1.4 24
[ISP-GigabitEthernet0/0/2]quit
[ISP]interface g4/0/0
[ISP-GigabitEthernet4/0/0]ip address 34.1.1.4 24
[ISP-GigabitEthernet4/0/0]quit
[ISP]interface g4/0/1
[ISP-GigabitEthernet4/0/1]ip address 45.1.1.4 24
[ISP-GigabitEthernet4/0/1]quit
[ISP]interface g4/0/2
[ISP-GigabitEthernet4/0/2]ip address 56.1.1.4 24
星型MGRE
先配置R1-6指向ISP的缺省(不做展示)
//R1(中心站点)
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 12.1.1.1
Jul 22 2022 18:55:09-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
//R2
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source g0/0/0
Jul 22 2022 18:57:24-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register
//R3
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source g0/0/0
Jul 22 2022 18:58:59-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register
全连网状MGRE
//R1(中心站点)
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 20.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]source 21.1.1.1
Jul 22 2022 19:06:32-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]nhrp entry multicast dynamic
[R1-Tunnel0/0/1]nhrp network-id 200
//R5(中心站点)
[R5]interface Tunnel 0/0/1
[R5-Tunnel0/0/1]ip address 20.1.1.5 24
[R5-Tunnel0/0/1]tunnel-protocol gre p2mp
[R5-Tunnel0/0/1]source 45.1.1.5
Jul 22 2022 19:08:26-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.
[R5-Tunnel0/0/1]nhrp entry multicast dynamic
[R5-Tunnel0/0/1]nhrp network-id 200
[R5-Tunnel0/0/1]nhrp entry 20.1.1.1 21.1.1.1 register
//R6
[R6]interface Tunnel 0/0/1
[R6-Tunnel0/0/1]ip address 20.1.1.6 24
[R6-Tunnel0/0/1]tunnel-protocol gre p2mp
[R6-Tunnel0/0/1]source 56.1.1.6
Jul 22 2022 19:10:02-08:00 R6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.
[R6-Tunnel0/0/1]nhrp network-id 200
[R6-Tunnel0/0/1]nhrp entry 20.1.1.1 21.1.1.1 register
[R6-Tunnel0/0/1]nhrp entry 20.1.1.5 45.1.1.5 register
OSPF
//R1(area 0 + area 1)
[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 10.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]quit
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]network 20.1.1.1 0.0.0.0
//R2(area 0)
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.2.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0
//R3(area 0)
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 192.168.3.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0
//R5(area 1)
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 1
[R5-ospf-1-area-0.0.0.1]network 192.168.4.1 0.0.0.0
[R5-ospf-1-area-0.0.0.1]network 20.1.1.5 0.0.0.0
//R6(area 1)
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 1
[R6-ospf-1-area-0.0.0.1]ne
[R6-ospf-1-area-0.0.0.1]network 192.168.5.1 0.0.0.0
[R6-ospf-1-area-0.0.0.1]ne
[R6-ospf-1-area-0.0.0.1]network 20.1.1.6 0.0.0.0
在NBMA网络中,接口类型为p2p,故OSPF协议不能正常建立邻居关系,此时要将其所有接口均修改为Broadcast;
R2和R3在星型MGRE网络中,还要使其放弃DR选举,否则area 0选路将不一致
//R1
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf network-type broadcast
[R1-Tunnel0/0/0]quit
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ospf network-type broadcast
//R2
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ospf network-type broadcast
[R2-Tunnel0/0/0]ospf dr-priority 0
//R3
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf network-type broadcast
[R3-Tunnel0/0/0]ospf dr-priority 0
//R5
[R5]interface Tunnel 0/0/1
[R5-Tunnel0/0/1]ospf network-type broadcast
//R6
[R6]interface Tunnel 0/0/1
[R6-Tunnel0/0/1]ospf network-type broadcast
NAT地址转换,以R1为例
[R1]acl 2000
[R1-acl-basic-2000]rule 1 permit source any
[R1-acl-basic-2000]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 2000
路由表展示及连通性测试
边栏推荐
- Flask reports an error: pymysq1.err OperationalError:(1054, “Unknown column ‘None‘ in ‘field list‘“)
- Linux Redis 源码安装
- Openpyxl merge cells
- Letax record \documentclass{}, authoryear attribute is used
- Seven SQL performance optimizations that spark 3.0 must know
- Naver 三方登录
- Oozie工作调度
- SQL question brushing: find the last of all employees who have been assigned departments_ Name and first_ Name and Dept_ no
- Oozie job scheduling
- [ManageEngine] help Harbin Engineering University realize integrated monitoring and management of network traffic
猜你喜欢
Recommended Spanish translation of Beijing passport
瑞吉外卖项目实战Day01
2022年最火的十大测试工具,你掌握了几个
Flask project architecture (First Edition
Third party login process of flask Weibo
Openpyxl merge cells
Oozie工作调度
Use of resttemplate and Eureka
18 diagrams, intuitive understanding of neural networks, manifolds and topologies
Intel introduces you to visual recognition -- openvino
随机推荐
MySQL time is formatted by hour_ MySQL time format, MySQL statement queried by time period [easy to understand]
CSDN modify column name
Flink SQL Hudi 实战
Nacos installation guide on win system
File “manage.py“, line 14 ) from exc
【SQL之降龙十八掌】01——亢龙有悔:入门10题
Date conversion EEE MMM DD hh:mm:ss zzz YYYY
全面升级,你能想象的都在这————京东API接口
Flink Postgres CDC
vm options、program arguments、environment property
一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
北京护照西班牙语翻译推荐
Use of resttemplate and Eureka
18 diagrams, intuitive understanding of neural networks, manifolds and topologies
RHCE command practice (II)
(perfect solution) why is the effect of using train mode on the train/val/test dataset good, but it is all very poor in Eval mode
RHCE command practice (I)
【idea】查询字段使用位置
2022年最火的十大测试工具,你掌握了几个
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益