redistribution report initialized
BIN
1_vlan/main.pdf
153
3_redistribution/labtemplate.typ
Normal 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)采用A4(21cm×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))
|
||||
BIN
3_redistribution/redistribution.pdf
Normal file
199
3_redistribution/redistribution.typ
Normal 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协议
|
||||
RIP(Routing Information Protocol)是一种基于距离向量的动态路由协议,采用跳数作为路由选择的度量标准,认为到达目标网络经过的路由器最少的路径就是最佳路径,并通过路由表中的cost值记录跳数。RIP协议的工作原理是每隔30秒向所有激活的接口发送完整的路由表,根据接收到的路由更新信息动态更新路由表。然而,RIP限制了最大跳数为15跳,超过16跳的网络将被认为不可达,这对自治系统(AS)的规模构成了限制。此外,由于相邻路由器之间交换的是完整的路由表,随着网络规模的扩大,路由信息的传递开销也随之增加。
|
||||
|
||||
为防止路由环路,RIP协议采用了水平分割(默认开启)、毒性反转等机制。同时,可以通过关闭自动汇总功能支持更精确的子网路由传播。然而,RIP在更新过程中的“坏消息传播得慢”特性会导致收敛时间过长,进一步限制了其在大型网络中的应用。因此,对于规模较大的自治系统(AS),建议使用更高效的动态路由协议如 OSPF。尽管如此,RIP因其简单易用的特点,仍适用于小型网络环境。
|
||||
=== OSPF协议
|
||||
#para[
|
||||
OSPF(Open Shortest Path First)是一种基于链路状态的动态路由协议,采用链路状态和最短路径算法(SPF)作为路由选择的基础。OSPF通过交互问候(Hello)分组来建立和维护邻居关系,相邻路由器每隔10秒发送一次Hello分组。如果在40秒内未收到邻居的Hello分组,路由器将认为该邻居不可达,并从邻居表中移除。每个路由器维护一张邻居表和链路状态数据库,通过链路状态更新实现全网同步。
|
||||
]
|
||||
#para[
|
||||
OSPF的优势在于其更新效率高、收敛速度快,不受网络规模限制,并从算法上保证不会产生路由环路。与RIP不同,OSPF不会交换完整的路由表,而是仅交换链路状态信息,这显著降低了通信开销,特别适合大型网络和自治系统(AS)。相比RIP在更新中的“坏消息传播得慢”和跳数限制,OSPF更适合处理复杂的网络拓扑,成为现代大型网络中最常用的动态路由协议之一。
|
||||
]
|
||||
|
||||
=== EIGRP协议
|
||||
#para[
|
||||
EIGRP(Enhanced Interior Gateway Routing Protocol)是一种混合型的动态路由协议,结合了距离向量和链路状态的优点。EIGRP协议的工作原理是每隔一段时间向相邻的路由器发送路由更新信息,根据接收到的路由更新信息计算最短路径,更新路由表。EIGRP协议的特点是收敛速度快,适用于大型网络。
|
||||
]
|
||||
=== BGP协议
|
||||
#para[
|
||||
BGP(Border 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
@ -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
|
After Width: | Height: | Size: 53 KiB |
BIN
3_redistribution/step1.jpg
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
3_redistribution/step10.jpg
Normal file
|
After Width: | Height: | Size: 189 KiB |
BIN
3_redistribution/step11.jpg
Normal file
|
After Width: | Height: | Size: 150 KiB |
BIN
3_redistribution/step12.jpg
Normal file
|
After Width: | Height: | Size: 202 KiB |
BIN
3_redistribution/step13.jpg
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
3_redistribution/step14.jpg
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
3_redistribution/step2.jpg
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
BIN
3_redistribution/step3.0.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
3_redistribution/step3.jpg
Normal file
|
After Width: | Height: | Size: 248 KiB |
BIN
3_redistribution/step4.1.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
3_redistribution/step4.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
3_redistribution/step5.jpg
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
3_redistribution/step6.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
3_redistribution/step7.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
3_redistribution/step8.jpg
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
3_redistribution/step9.jpg
Normal file
|
After Width: | Height: | Size: 27 KiB |