redistribution report initialized

This commit is contained in:
2025-10-09 16:58:28 +08:00
parent 5b9a0fe084
commit b485700f29
22 changed files with 365 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,153 @@
#let times = "Times LT Pro"
#let times = "Times New Roman"
#let song = (times, "Noto Serif CJK SC")
#let hei = (times, "Noto Sans CJK SC")
#let kai = (times, "Noto Serif CJK SC")
#let xbsong = (times, "Noto Serif CJK SC")
#let fsong = (times, "Noto Serif CJK SC")
#let code = (times, "JetBrains Mono")
#let nudtlabpaper(title: "",
author: "",
id: "",
training_type:"",
grade: "",
major: "",
department: "",
advisor: "",
jobtitle: "",
lab: "",
date: "",
header_str: "",
body) = {
// Set the document's basic properties.
set document(author: author, title: title)
set page(
margin: (left: 30mm, right: 30mm, top: 30mm, bottom: 30mm),
)
// Title row.
v(158pt)
align(center)[
#block(text(weight: 700, size: 30pt, font: hei, tracking: 15pt, "网络工程"))
]
align(center)[
#block(text(weight: 700, size: 30pt, font: song, tracking: 15pt, "本科实验报告"))
]
v(103pt)
pad(
left: 1em,
right: 1em,
grid(
columns: (80pt, 1fr),
rows: (17pt, auto),
text(weight: 700, size: 16pt, font: song, "实验名称:"),
align(center, text(weight: "regular", size: 16pt, font: song, title)),
text(""),
line(length: 100%)
)
// #block(text(weight: 700, 1.75em, title))
// underline(text(weight: 700, size: 16pt, font: song, title))
)
// Author information.
v(82.5pt)
grid(
columns: (0.25fr, 0.25fr, 0.25fr, 0.25fr),
rows: (15pt, 8pt, 15pt, 8pt, 15pt, 8pt, 15pt, 8pt, 15pt),
text(size: 14pt, font: song, tracking: 10pt, "学员姓名"),
align(center, text(size: 14pt, font: song, author)),
text(size: 14pt, font: song, tracking: 54pt, "学号"),
align(center, text(size: 14pt, font: times, id)),
text(""),
line(length: 100%),
text(""),
line(length: 100%),
text(size: 14pt, font: song, tracking: 9pt, "培养类型"),
align(center, text(size: 14pt, font: song, training_type)),
text(size: 14pt, font: song, tracking: 54pt, "年级"),
align(center, text(size: 14pt, font: times, grade)),
text(""),
line(length: 100%),
text(""),
line(length: 100%),
text(size: 14pt, font: song, tracking: 54pt, "专业"),
align(center, text(size: 14pt, font: song, major)),
text(size: 14pt, font: song, tracking: 9pt, "所属学院"),
align(center, text(size: 14pt, font: song, department)),
text(""),
line(length: 100%),
text(""),
line(length: 100%),
text(size: 14pt, font: song, tracking: 9pt, "指导教员"),
align(center, text(size: 14pt, font: song, advisor)),
text(size: 14pt, font: song, tracking: 54pt, "职称"),
align(center, text(size: 14pt, font: song, jobtitle)),
text(""),
line(length: 100%),
text(""),
line(length: 100%),
text(size: 14pt, font: song, tracking: 20pt, "实验室"),
align(center, text(size: 14pt, font: song, lab)),
text(size: 14pt, font: song, tracking: 9pt, "实验时间"),
align(center, text(size: 14pt, font: song, date)),
text(""),
line(length: 100%),
text(""),
line(length: 100%),
)
v(50.5pt)
align(center, text(font: hei, size: 15pt, "国防科技大学教育训练部制"))
pagebreak()
set page(
margin: (left: 30mm, right: 30mm, top: 30mm, bottom: 30mm),
numbering: "i",
number-align: center,
)
v(14pt)
align(center)[
#block(text(font: hei, size: 14pt, "《本科实验报告》填写说明"))
]
v(14pt)
text("")
par(first-line-indent: 2em, text(font: song, size: 12pt, "实验报告内容编排应符合以下要求:"))
par(first-line-indent: 2em, text(font: fsong, size: 12pt, "1采用A421cm×29.7cm白色复印纸单面黑字。上下左右各侧的页边距均为3cm缺省文档网格字号为小4号中文为宋体英文和阿拉伯数字为Times New Roman每页30行每行36字页脚距边界为2.5cm页码置于页脚、居中采用小5号阿拉伯数字从1开始连续编排封面不编页码。"))
par(first-line-indent: 2em, text(font: fsong, size: 12pt, "2报告正文最多可设四级标题字体均为黑体第一级标题字号为4号其余各级标题为小4号标题序号第一级用“一、”、“二、”……第二级用“”、“” ……第三级用“1.”、“2.” ……第四级用“1”、“2” ……,分别按序连续编排。"))
par(first-line-indent: 2em, text(font: fsong, size: 12pt, "3正文插图、表格中的文字字号均为5号。"))
pagebreak()
set page(
margin: (left: 30mm, right: 30mm, top: 30mm, bottom: 30mm),
numbering: "1",
number-align: center,
)
set heading(numbering: "1.1")
// set text(font: hei, lang: "zh")
show heading: it => box(width: 100%)[
#v(0.50em)
#set text(font: hei)
#counter(heading).display()
// #h(0.5em)
#it.body
]
// Main body.
set par(justify: true)
body
}
#let para(t) = par(first-line-indent: 2em, text(font: song, size: 10.5pt, t))

Binary file not shown.

View File

@ -0,0 +1,199 @@
#import "labtemplate.typ": *
#show: nudtlabpaper.with(title: "动态路由与路由重发布配置",
author: "程景愉",
id: "202302723005",
training_type: "无军籍",
grade: "2023",
major: "网络工程",
department: "计算机学院",
advisor: "张军",
jobtitle: "工程师",
lab: "306-707",
date: "2025.09.23",
header_str: "《网络工程》实验报告",
)
#set page(header: [
#set par(spacing: 6pt)
#align(center)[#text(size: 11pt)[《网络工程》实验报告]]
#v(-0.3em)
#line(length: 100%, stroke: (thickness: 1pt))
],)
#show heading: it => box(width: 100%)[
#v(0.50em)
#set text(font: hei)
#it.body
]
#outline(title: "目录",depth: 3, indent: 2em)
// #pagebreak()
#outline(
title: [图目录],
target: figure.where(kind: image),
)
#show heading: it => box(width: 100%)[
#v(0.50em)
#set text(font: hei)
#counter(heading).display()
// #h(0.5em)
#it.body
]
#set enum(indent: 0.5em,body-indent: 0.5em,)
#pagebreak()
= 实验目的
- 能正确配置动态路由
- 能根据需求设置路由重发布
= 实验原理
== 动态路由
动态路由是指路由器之间通过路由协议自动交换路由信息根据网络的拓扑结构和网络的状态动态调整路由表实现路由的自动学习和自动更新。通过动态路由协议路由器能够发现有哪些邻居路由器学习到网络中有哪些网段以及某个网段的所有路径从而选择最佳路径并维护和更新路由信息。同时动态路由协议还提供了防止路由环路的机制例如RIP的分割视域和触发更新功能。此外动态路由支持根据实际需要关闭自动汇总功能以传播精确的子网路由信息适应复杂的无类别路由CIDR环境。动态路由的优点是能够提高网络的可靠性和可扩展性常用的动态路由协议包括RIP、OSPF、EIGRP、BGP等。
=== RIP协议
RIPRouting Information Protocol是一种基于距离向量的动态路由协议采用跳数作为路由选择的度量标准认为到达目标网络经过的路由器最少的路径就是最佳路径并通过路由表中的cost值记录跳数。RIP协议的工作原理是每隔30秒向所有激活的接口发送完整的路由表根据接收到的路由更新信息动态更新路由表。然而RIP限制了最大跳数为15跳超过16跳的网络将被认为不可达这对自治系统AS的规模构成了限制。此外由于相邻路由器之间交换的是完整的路由表随着网络规模的扩大路由信息的传递开销也随之增加。
为防止路由环路RIP协议采用了水平分割默认开启、毒性反转等机制。同时可以通过关闭自动汇总功能支持更精确的子网路由传播。然而RIP在更新过程中的“坏消息传播得慢”特性会导致收敛时间过长进一步限制了其在大型网络中的应用。因此对于规模较大的自治系统AS建议使用更高效的动态路由协议如 OSPF。尽管如此RIP因其简单易用的特点仍适用于小型网络环境。
=== OSPF协议
#para[
OSPFOpen Shortest Path First是一种基于链路状态的动态路由协议采用链路状态和最短路径算法SPF作为路由选择的基础。OSPF通过交互问候Hello分组来建立和维护邻居关系相邻路由器每隔10秒发送一次Hello分组。如果在40秒内未收到邻居的Hello分组路由器将认为该邻居不可达并从邻居表中移除。每个路由器维护一张邻居表和链路状态数据库通过链路状态更新实现全网同步。
]
#para[
OSPF的优势在于其更新效率高、收敛速度快不受网络规模限制并从算法上保证不会产生路由环路。与RIP不同OSPF不会交换完整的路由表而是仅交换链路状态信息这显著降低了通信开销特别适合大型网络和自治系统AS。相比RIP在更新中的“坏消息传播得慢”和跳数限制OSPF更适合处理复杂的网络拓扑成为现代大型网络中最常用的动态路由协议之一。
]
=== EIGRP协议
#para[
EIGRPEnhanced Interior Gateway Routing Protocol是一种混合型的动态路由协议结合了距离向量和链路状态的优点。EIGRP协议的工作原理是每隔一段时间向相邻的路由器发送路由更新信息根据接收到的路由更新信息计算最短路径更新路由表。EIGRP协议的特点是收敛速度快适用于大型网络。
]
=== BGP协议
#para[
BGPBorder Gateway Protocol是一种路径矢量的动态路由协议采用路径作为路由选择的度量标准。BGP协议的工作原理是每隔一段时间向相邻的路由器发送路由更新信息根据接收到的路由更新信息计算最佳路径更新路由表。BGP协议的特点是灵活可靠适用于大型网络。
]
== 路由重发布
#para[
路由重发布Route Redistribution是指路由器将从一个动态路由协议学习到的路由信息重新发布到另一个动态路由协议中实现不同动态路由协议之间的路由信息交换。路由重发布可以实现不同动态路由协议之间的互联互通提高网络的可靠性和可扩展性。路由重发布的配置方法包括静态路由重发布和动态路由重发布。静态路由重发布是指手动配置路由器将从一个动态路由协议学习到的路由信息重新发布到另一个动态路由协议中动态路由重发布是指路由器根据配置的路由重发布策略自动将路由信息重新发布到另一个动态路由协议中。
]
= 实验环境
== 实验背景
#para[
网安系与网工系的寝室楼之间需要进行网络互联网安系的寝室楼使用RIP协议网工系的寝室楼使用OSPF协议。为了实现两个寝室楼之间的网络互联需要在两个寝室楼之间配置路由器实现RIP协议和OSPF协议之间的路由重发布。
]
== 实验设备
#align(center)[#table(
columns: (auto, auto,auto),
rows:(2em,2em,3em),
inset: 10pt,
align: horizon+center,
table.header(
[*设备名称*], [*设备型号*], [*设备数量*]
),
"路由器", "华为AR6120-S", "3",
"PC", "联想启天M410
Windows 10", "2",
)
]
#para[
另有网线若干控制线3条。
]
= 实验步骤及结果
== 实验拓扑
#para[
按实验背景,绘制拓扑图如下:
]
#figure(image("step0.jpg",format: "png",fit:"stretch",width: 100%),caption: "实验拓扑图")
== 按照拓扑图接线
#para[
按照拓扑图接线。
]
#figure(image("step1.jpg",format: "jpg",fit:"stretch",width: 55%),caption: "机柜正面接线图")
#figure(image("step2.jpg",format: "jpg",fit:"stretch",width: 90%),caption: "机柜背面接线图")
== 配置PC
#para[
设置网安系PC1的IP地址为`8.8.8.1`,网关为`8.8.8.8`网工系PC2的IP地址为`6.6.6.1`,网关为`6.6.6.6`
]
== 配置路由器
== 配置Router ID
#para[
配置网安系路由器AR2的Router ID为`1.1.1.1`
]
#figure(image("step3.0.jpg",format: "png",fit:"stretch",width: 60%),caption: "配置Router ID")
#para[
用同样的方式配置寝室楼间路由器AR1的Router ID为`2.2.2.2`网工系AR3的Router ID为`3.3.3.3`
]
=== 配置IP
#para[
按照拓扑图配置路由器各接口的IP地址。
配置路由器AR2两个接口的IP地址
]
#figure(image("step3.jpg",format: "png",fit:"stretch",width: 60%),caption: "配置IP(1)")
#para[
配置路由器AR3两个接口的IP地址
]
#figure(table(
columns: (auto),
rows:(auto,auto),
align: horizon+center,
stroke: 0pt,
table.header(
image("step4.jpg",format: "jpg",fit:"stretch",width: 79%),
),image("step4.1.jpg",format: "png",fit:"stretch",width: 67%)
),caption: "配置IP(2)",kind:image)
#para[
配置路由器AR1两个接口的IP地址
]
#figure(image("step5.jpg",format: "png",fit:"stretch",width: 67%),caption: "配置IP(3)")
=== 配置RIP与OSPF协议
#para[
在路由器AR2上配置RIP协议
]
#figure(image("step6.jpg",format: "png",fit:"stretch",width: 40%),caption: "配置动态路由(1)")
#para[
在路由器AR3上配置OSPF协议此处将与AR1相连的区域设为主干区域0
]
#figure(image("step7.jpg",format: "png",fit:"stretch",width: 65%),caption: "配置动态路由(2)")
#para[
在路由器AR1上配置两种协议
]
#figure(image("step8.jpg",format: "png",fit:"stretch",width: 82%),caption: "配置动态路由(3)")
=== 配置路由重发布
#para[
在路由器AR3上配置路由重发布策略将RIP协议学习到的路由信息重新发布到OSPF协议中并将OSPF协议学习到的路由信息重新发布到RIP协议中
]
#figure(image("step9.jpg",format: "png",fit:"stretch",width: 40%),caption: "配置路由重发布")
== 配置后检验
#para[
使用`display ip routing-table`命令查看AR1的路由表可以看到RIP协议学习到的路由信息已经重新发布到OSPF协议中OSPF协议学习到的路由信息也已经重新发布到RIP协议中
]
#figure(image("step10.jpg",format: "jpg",fit:"stretch",width: 85%),caption: "AR1的路由表")
#para[
查看AR2和AR3的路由表可以看到都有新学习到的路由信息
]
#figure(image("step11.jpg",format: "jpg",fit:"stretch",width: 85%),caption: "AR2的路由表")
#figure(image("step12.jpg",format: "jpg",fit:"stretch",width: 85%),caption: "AR3的路由表")
#para[
让PC1与PC2互相ping查看是否能够ping通。结果如下
]
#figure(image("step13.jpg",format: "jpg",fit:"stretch",width: 100%),caption: "PC1 ping PC2")
#figure(image("step14.jpg",format: "jpg",fit:"stretch",width: 100%),caption: "PC2 ping PC1")
#para[
说明PC1与PC2互相能够通信网络连接正常网安系与网工系寝室楼能够通信。实验完成。
]
= 实验总结
#para[
本次实验通过配置动态路由与路由重发布成功实现了网安系与网工系两栋寝室楼之间的网络互联验证了动态路由协议和路由重发布策略的正确性和实用性。实验中使用了两种动态路由协议RIP和OSPF。通过实验理解了这两种协议的适用场景及优缺点。路由重发布是连接不同路由协议的关键方法。通过配置AR3上的路由重发布策略将RIP和OSPF协议的路由信息互相传播实现了两种协议网络之间的互通。实验中分别验证了静态路由重发布和动态路由重发布的配置方法并通过观察路由表确认了路由信息的正确传播。
]
#para[
在实验过程中部分操作需要手动输入容易出现配置错误。若能借助脚本化管理工具进行批量配置将有效提高配置效率。此外可以进一步研究BGP等高级动态路由协议的配置与优化以适应更大规模网络的需求。
]
#show heading: it => box(width: 100%)[
#v(0.50em)
#set text(font: hei)
// #counter(heading).display()
// #h(0.5em)
#it.body
]
#pagebreak()
#bibliography("ref.yml",full: true,title: "参考文献",style:"gb-7714-2015-numeric")

13
3_redistribution/ref.yml Normal file
View File

@ -0,0 +1,13 @@
ripOspfRouteRedistribution:
type: Web
title: 华为ensp中rip和ospf路由重分发 原理及配置命令_ensp 在ospf中重发布-CSDN博客
author: 李正博
date: 2024-10-15
url:
value: https://blog.csdn.net/jxjdhdnd/article/details/138009187
abstract: 路由重分发Route Redistribution是指路由器将从一种路由协议学习到的路由信息通过另一种路由协议通告出去的功能。路由重分发的作用是将不同路由协议的路由信息进行互通创建冗余路由路径以及负载平衡流量。
genre: 技术博客
language: zh-Hans
archive: CSDN博客
archive-location: 中国
note: 遵循 CC 4.0 BY-SA 版权协议

BIN
3_redistribution/step0.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
3_redistribution/step1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
3_redistribution/step10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

BIN
3_redistribution/step11.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

BIN
3_redistribution/step12.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

BIN
3_redistribution/step13.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
3_redistribution/step14.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
3_redistribution/step2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
3_redistribution/step3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
3_redistribution/step4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
3_redistribution/step5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
3_redistribution/step6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
3_redistribution/step7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
3_redistribution/step8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
3_redistribution/step9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB