OSPF综合实验(第一部分)

news/2025/1/25 3:39:08/

目录

 要求

确定广播域的个数

分配网段

 配置路由器IP地址-优先公网配通

配置MGRE部分


拓扑结构:

 要求

1、R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间使用公有IP
2、R3~R5/6/7为MGRE环境,R3为中心站点
3、整个OSPF环境IP地址为172.6.0.0/16
4、所有设备均可访问R4的环回
5、减少LSA的更新量,加快收敛,保障更新安全
6、全网可达

 使用的设备:12台路由器、1台交换机

 解决网络拓扑:

1、确定广播域的个数

2、分配网段

3、配置IP地址 (优先配置路由器)

确定广播域的个数

根据拓扑结构图以及要求可知,本拓扑结构一共拥有24个网段,包括13个环回网段和11个接口网段。但是,本次实验采用新的思想划分网络,即每个区域划分一个子网,共6个区域,为6个大子网,剩下的在区域内基于区域内的实际情况进行划分。公网的地址自己给。

分配网段

所有网段基于172.168.1.0/16进行划分,要划分出6个子网借3位掩码作为网络位

area0:172.16.0.0/19

每一个环回可能模拟50个用户,所以我们划分为

172.16.0.0/25、172.16.0.128/25、172.16.1.0/25、172.16.1.128/25一直到172.16.31.128/25

然后接口网段P2P: 172.16.0.0/25 划分为172.16.0.0/30、172.16.0.4/30、172.16.0.8/30、172.16.0.12/30......

MA网段:172.16.0.128/29、172.16.0.136/29、172.16.0.144/29......

注:这是一种全新的地址划分思路,所以以下的地址都是按照area0的样例划分的

172.16.0.0/29

172.16.0.128/25

172.16.1.0/25

172.16.1.128/25

area1:172.16.32.0/19

172.16.32.0/29

172.16.32.128/25

172.16.33.0/25

172.16.33.128/25

area2:172.16.64.0/19

172.16.64.0/30

172.16.64.4/30

172.16.64.128/25

area3:172.16.96.0/19

172.16.96.0/30

172.16.96.4/30

172.16.96.128/25

area4:172.16.128.0/19

172.16.128.0/30

172.16.128.128/25

172.16.129.0/25

EIGRP(RIP):172.16.160.0/19

172.16.160.0/25

172.16.160.128/25

备用地址:

172.16.192.0/19

172.16.224.0/19

公网地址:
10.1.1.0/24

20.1.1.0/24

30.1.1.0/24

40.1.1.0/24

和AR4的环回3.3.3.0/24

 配置路由器IP地址-优先公网配通

以下的实际操作,先将R3、R4、R5、R6、R7公网配置,对他们优先进行IP地址的配置和MGRE配置并配置缺省路由,然后再配置其他的路由!!!

AR1:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 172.16.32.1 29
[r1-GigabitEthernet0/0/0]
May  8 2023 20:33:13-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]q
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 172.16.32.129 25
[r1-LoopBack0]q
[r1]

AR2:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 172.16.32.2 29
[r2-GigabitEthernet0/0/0]
May  8 2023 20:34:00-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]q
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 172.16.33.1 25
[r2-LoopBack0]q
[r2]

AR3:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 172.16.32.3 29
May 10 2023 19:25:02-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]q
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 10.1.1.1 24
May 10 2023 19:25:17-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]q
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 172.16.33.129 25
[r3-LoopBack0]q
[r3]

AR4:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname isp
[isp]interface GigabitEthernet 0/0/0
[isp-GigabitEthernet0/0/0]ip address 10.1.1.2 24
[isp-GigabitEthernet0/0/0]
May  8 2023 20:35:54-08:00 isp %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[isp-GigabitEthernet0/0/0]q
[isp]interface GigabitEthernet 0/0/1
[isp-GigabitEthernet0/0/1]ip address 20.1.1.2 24
[isp-GigabitEthernet0/0/1]
May  8 2023 20:36:11-08:00 isp %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[isp-GigabitEthernet0/0/1]q
[isp]interface GigabitEthernet 0/0/2
[isp-GigabitEthernet0/0/2]ip address 30.1.1.2 24
May  8 2023 20:36:28-08:00 isp %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[isp-GigabitEthernet0/0/2]q
[isp]interface GigabitEthernet 1/0/0
[isp-GigabitEthernet1/0/0]ip address 40.1.1.2 24
May  8 2023 20:36:42-08:00 isp %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP on the interface GigabitEthernet1/0/0 has entered the UP state. 
[isp-GigabitEthernet1/0/0]q
[isp]interface LoopBack 0
[isp-LoopBack0]ip address 3.3.3.3 24
[isp-LoopBack0]q
[isp]

AR5:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 20.1.1.1 24
May  8 2023 20:37:26-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]q
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 172.16.0.129 25
[r5-LoopBack0]q
[r5]

AR6:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]interface GigabitEthernet 0/0/0
[r6-GigabitEthernet0/0/0]ip address 30.1.1.1 24
[r6-GigabitEthernet0/0/0]
May  8 2023 20:38:27-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r6-GigabitEthernet0/0/0]q
[r6]interface GigabitEthernet 0/0/1
[r6-GigabitEthernet0/0/1]ip address 172.16.64.1 30
[r6-GigabitEthernet0/0/1]
May  8 2023 20:38:52-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r6-GigabitEthernet0/0/1]q
[r6]interface LoopBack 0
[r6-LoopBack0]ip address 172.16.1.1 25
[r6-LoopBack0]q
[r6]

AR7:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r7
[r7]interface GigabitEthernet 0/0/0
[r7-GigabitEthernet0/0/0]ip address 40.1.1.1 24
[r7-GigabitEthernet0/0/0]
May  8 2023 20:39:42-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r7-GigabitEthernet0/0/0]q
[r7]interface GigabitEthernet 0/0/1
[r7-GigabitEthernet0/0/1]ip address 172.16.96.1 30
May  8 2023 20:40:06-08:00 r7 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r7-GigabitEthernet0/0/1]q
[r7]interface LoopBack 0
[r7-LoopBack0]ip address 172.16.1.129 25
[r7-LoopBack0]q
[r7]

AR8:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r8
[r8]interface GigabitEthernet 0/0/0
[r8-GigabitEthernet0/0/0]ip address 172.16.96.2 30
[r8-GigabitEthernet0/0/0]
May  8 2023 20:41:20-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r8-GigabitEthernet0/0/0]q
[r8]interface GigabitEthernet 0/0/1
[r8-GigabitEthernet0/0/1]ip address 172.16.96.5 30
May  8 2023 20:41:46-08:00 r8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r8-GigabitEthernet0/0/1]q
[r8]interface LoopBack 0
[r8-LoopBack0]ip address 172.16.96.129 25
[r8-LoopBack0]q
[r8]

AR9:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r9
[r9]interface GigabitEthernet 0/0/0
[r9-GigabitEthernet0/0/0]ip address 172.16.96.6 30
[r9-GigabitEthernet0/0/0]
May  8 2023 20:42:50-08:00 r9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r9-GigabitEthernet0/0/0]q
[r9]interface GigabitEthernet 0/0/1
[r9-GigabitEthernet0/0/1]ip address 172.16.128.1 30
May  8 2023 20:43:20-08:00 r9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r9-GigabitEthernet0/0/1]q
[r9]interface LoopBack 0
[r9-LoopBack0]ip address 172.16.128.129 25
[r9-LoopBack0]q
[r9]

AR10:

<Huawei>system 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r10
[r10]interface GigabitEthernet 0/0/0
[r10-GigabitEthernet0/0/0]ip address 172.16.128.2 30
[r10-GigabitEthernet0/0/0]
May  8 2023 20:44:04-08:00 r10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r10-GigabitEthernet0/0/0]q
[r10]interface LoopBack 0
[r10-LoopBack0]ip address 172.16.129.1 25
[r10-LoopBack0]q
[r10]

AR11:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r11
[r11]interface GigabitEthernet 0/0/0
[r11-GigabitEthernet0/0/0]ip address 172.16.64.2 30
[r11-GigabitEthernet0/0/0]
May  8 2023 20:44:49-08:00 r11 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r11-GigabitEthernet0/0/0]q
[r11]interface GigabitEthernet 0/0/1
[r11-GigabitEthernet0/0/1]ip address 172.16.64.5 30
May  8 2023 20:45:07-08:00 r11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r11-GigabitEthernet0/0/1]q
[r11]interface LoopBack 0
[r11-LoopBack0]ip address 172.16.64.129 25
[r11-LoopBack0]q
[r11]

AR12:

<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r12
[r12]interface GigabitEthernet 0/0/0
[r12-GigabitEthernet0/0/0]ip address 172.16.64.6 30
[r12-GigabitEthernet0/0/0]
May  8 2023 20:46:08-08:00 r12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r12-GigabitEthernet0/0/0]q
[r12]interface LoopBack 0
[r12-LoopBack0]ip address 172.16.160.1 25
[r12-LoopBack0]q
[r12]interface LoopBack 1
[r12-LoopBack1]ip address 172.16.160.129 25
[r12-LoopBack1]q
[r12]

在R3、R5、R6、R7上配置指向R4的静态缺省路由:

[r3]ip route-static 0.0.0.0 0 10.1.1.2[r5]ip route-static 0.0.0.0 0 20.1.1.2[r6]ip route-static 0.0.0.0 0 30.1.1.2[r7]ip route-static 0.0.0.0 0 40.1.1.2

配置MGRE部分

AR3:中心站点

[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 172.16.0.1 29
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source 10.1.1.1
May  8 2023 20:50:55-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 entry multicast dynamic 
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]q
[r3]

AR5:

[r5]interface Tunnel 0/0/0
[r5-Tunnel0/0/0]ip address 172.16.0.2 29
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r5-Tunnel0/0/0]source GigabitEthernet 0/0/0
May  8 2023 20:53:21-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 network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.0.1 10.1.1.1 register 
[r5-Tunnel0/0/0]q
[r5]

AR6:

[r6]interface Tunnel 0/0/0
[r6-Tunnel0/0/0]ip address 172.16.0.3 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r6-Tunnel0/0/0]source GigabitEthernet 0/0/0
May  8 2023 20:54:43-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state. 
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.16.0.1 10.1.1.1 register 
[r6-Tunnel0/0/0]q
[r6]

AR7:

[r7]interface Tunnel 0/0/0
[r7-Tunnel0/0/0]ip address 172.16.0.4 29
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r7-Tunnel0/0/0]source GigabitEthernet 0/0/0
May  8 2023 20:57:03-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state. 
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.16.0.1 10.1.1.1 register 
[r7-Tunnel0/0/0]q
[r7]ip ro
配置了MGRE之后,真实的拓扑结构:

 此时配置了MGRE的设备之间可以相互通信,但是除了MGRE之外都不能通信,还得运行OSPF协议

因为篇幅太长就放在第二部分里了:OSPF综合实验(第二部分)


http://www.ppmy.cn/news/67137.html

相关文章

【Linux】指令(下)

⭐博客主页&#xff1a;️CS semi主页 ⭐欢迎关注&#xff1a;点赞收藏留言 ⭐系列专栏&#xff1a;Linux ⭐代码仓库&#xff1a;Linux 家人们更新不易&#xff0c;你们的点赞和关注对我而言十分重要&#xff0c;友友们麻烦多多点赞&#xff0b;关注&#xff0c;你们的支持是我…

linux 安装jdk、tomcat

文章目录 前言一、Linux上安装jdk1、jdk安装与配置过程2、linux查看jdk安装路径 二、Linux上安装tomcat1、tomcat安装与配置过程2、对外开放访问的端口、重启防火墙、查看日志3、修改tomcat的默认端口 三、在window系统中通过浏览器访问 前言 先检察是否安装jdk java -jar ##…

IDEA编译JDK1.8源码及运行测试

———————————————— 版权声明&#xff1a;本文为CSDN博主「神韵499」的原创文章&#xff0c;遵循CC 4.0 BY-SA版权协议&#xff0c;转载请附上原文出处链接及本声明。 原文链接&#xff1a;https://blog.csdn.net/qq_41055045/article/details/112002440 ————…

Redis进阶(集群,雪崩,击穿,穿透.......)

Redis进阶 Redis事务_事务的概念与ACID特性 Redis的事物不保证原子性 数据库层面事务 在数据库层面&#xff0c;事务是指一组操作&#xff0c;这些操作要么全都被成功执行&#xff0c;要么全都不执行。 数据库事务的四大特性 A&#xff1a;Atomic&#xff0c;原子性&#xf…

使用Chatglm-6b微调催收问答对的尝试

1.工作目录&#xff0c;如&#xff1a;mnt/d/work&#xff0c;下载源代码&#xff0c;并安装依赖 git clone https://github.com/THUDM/ChatGLM-6B cd ChatGLM-6B pip install -r requirement.txt 2. 从拥抱脸下载chatglm-6b-int4-qe到本地&#xff08;GPU环境搭建参考浪潮服…

9.设计模式之适配器模式

前言 适配器模式是我们在很多框架中会见到的设计模式。它主要解决的是两种接口不兼容而不能一起使用的问题。通过适配器&#xff0c;将原来的接口适配成目标接口&#xff0c;在不改动老代码的同时&#xff0c;实现两者同时使用。生活中常见的例子比如手机电源充电适配器。 本…

单片机GD32F303RCT6 (Macos环境)开发 (十七)—— i2c1从机中断接收发送数据

i2c1从机中断接收发送数据 1、将i2c1设置为从机模式&#xff0c;与树莓派连接。树莓派发送或者读取数据&#xff0c;gd32中断触发&#xff0c;从而接收数据或者向主机发送数据。 2、关于代码的宏定义配置 Application目录的Makefile中 ENABLE_I2C_TEST yes才会编译I2C1的相关…

Springboot +Flowable,设置流程变量的方式(二)

一.简介 为什么需要流程变量。 举个例子&#xff0c;假设有如下一个流程&#xff0c;截图如下&#xff1a; 这是一个请假流程&#xff0c;那么谁请假、请几天、起始时间、请假理由等等&#xff0c;这些都需要说明&#xff0c;不然领导审批的依据是啥&#xff1f;那么如何传递…