vpn report initialized

This commit is contained in:
2025-10-22 01:38:01 +08:00
parent a4e0bfc0f0
commit 4dee61182e
46 changed files with 358 additions and 0 deletions

BIN
6_vpn/ar1ip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
6_vpn/ar1rip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
6_vpn/ar2ip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

BIN
6_vpn/ar2rip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
6_vpn/ar3binding.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
6_vpn/ar3ip.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
6_vpn/ar3ip_2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
6_vpn/ar3rip.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
6_vpn/ar3vpn.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
6_vpn/ar3vpnrip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

153
6_vpn/labtemplate.typ Normal file
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))

23
6_vpn/ref.yml Normal file
View File

@ -0,0 +1,23 @@
haweiS600ESeriesSwitchesCase1:
type: Web
title: S600-E系列交换机 典型配置案例 - 华为
author: 华为
url:
value: https://support.huawei.com/enterprise/zh/doc/EDOC1000141427/f36b09a2
date: 2024-11-07
haweiS600ESeriesSwitchesCase2:
type: Web
title: S600-E系列交换机 典型配置案例 - 华为
author: 华为
url:
value: https://support.huawei.com/enterprise/zh/doc/EDOC1000141427/82710693
date: 2024-11-07
haweiS600ESeriesSwitchesCase3:
type: Web
title: 配置端口安全示例 - S600-E系列交换机 典型配置案例 - 华为
author: 华为
url:
value: https://support.huawei.com/enterprise/zh/doc/EDOC1000141427/6b53bfef
date: 2024-11-07

BIN
6_vpn/tag.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
6_vpn/vpn.pdf Normal file

Binary file not shown.

182
6_vpn/vpn.typ Normal file
View File

@ -0,0 +1,182 @@
#import "labtemplate.typ": *
#show: nudtlabpaper.with(title: "VPN实例配置",
author: "程景愉",
id: "202302723005",
training_type: "无军籍",
grade: "2023",
major: "网络工程",
department: "计算机学院",
advisor: "张军",
jobtitle: "工程师",
lab: "306-707",
date: "2025.09.28",
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: 1em)
#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()
= 实验目的
#para[
1. 了解VPN的基本概念及应用场景
2. 掌握VPN在隔离数据流、构建虚拟网络中的关键作用
3. 熟悉VPN的配置方法与工作机制。
通过本实验我将学习VPN的基本原理及其在实现多租户隔离、提升网络灵活性方面的重要应用。同时通过实践掌握VPN实例的创建、接口绑定及路由表配置等操作深入理解VPN实例在数据转发和隔离中的实现机制并了解其与根实例的区别及优点。实验将进一步验证VPN实例在多接口场景下的流量隔离效果帮助我建立对虚拟网络技术的系统性认识为日后设计复杂网络拓扑和实现网络隔离奠定基础。
]
= 实验原理
== VPN
#para[
虚拟专用网络VPNVirtual Private Network是一种通过公共网络如Internet建立安全连接的技术用于实现远程用户接入、分支机构互联、数据加密传输等应用场景。VPN技术通过加密隧道、身份认证、数据加密等手段保障数据传输的安全性和隐私性提高网络通信的可靠性和保密性。常见的VPN类型包括IPSec VPN、SSL VPN、PPTP VPN等广泛应用于企业网络、远程办公、移动通信等领域。
]
== VRF
=== 概述
#para[
虚拟路由转发VRFVirtual Routing and Forwarding技术通过在同一台三层设备上创建多张独立的路由表实现数据流的隔离和独立转发。VRF广泛应用于MPLS VPN、防火墙等需要隔离的场景。在VRF环境中每个实例拥有独立的接口、路由表和路由协议进程等使流量彻底隔离。没有VPN实例时设备的所有接口都属于同一个根实例而创建VPN实例后可以将特定接口绑定到该实例使其服务于特定业务从而实现多租户数据的独立管理。
在华为设备上VRF又称为VPN实例。
]
=== 工作原理
#para[
1. 创建实例在物理设备中创建VPN实例用于定义独立的转发域
2. 接口绑定将三层接口如物理接口、子接口或VLANIF接口分配给实例使其成为实例的一部分
3. 路由表建立:基于实例绑定的接口和配置的路由协议建立独立的路由表,并按照这些路由表转发数据,从而实现实例间的数据隔离。
]
#pagebreak()
= 实验环境
== 实验背景
#para[
网工系的学生正在学习VPN技术需要通过实验验证VPN实例在网络隔离中的应用。为此需要搭建一个简单的网络拓扑包括三台路由器和四台PC通过配置VPN实例实现不同网络之间的数据隔离。
]
== 实验设备
#para[
#align(center)[#table(
columns: (auto, auto,auto),
rows:(auto, auto,auto),
inset: 10pt,
align: horizon+center,
table.header(
[*设备名称*], [*设备型号*], [*设备数量*]
),
"路由器", "华为AR6120-S", "3",
"PC", "联想启天M410\nWindows 10", "4",
)]
另有网线若干控制线3条。
]
= 实验步骤及结果
== 实验拓扑
#para[
按实验背景,绘制拓扑图如下:
#figure(image("实验拓扑.png",format: "png",fit:"stretch",width: 100%),caption: "实验拓扑图")
要求将红框内的PC1、PC3划分到一个VPN实例中。
]
#pagebreak()
== 按照拓扑图接线
#para[
按照拓扑图接线。
#figure(image("机柜正面连线.jpg",format: "jpg",fit:"stretch",width: 50%),caption: "机柜正面接线图")
#figure(image("机柜背面连线.jpg",format: "jpg",fit:"stretch",width: 50%),caption: "机柜背面接线图")
]
#pagebreak()
== 配置基本网络
=== 配置PC
#para[
- 配置PC1的IP地址为`192.168.10.1/24`,网关为`192.168.10.2`
- 配置PC2的IP地址为`192.168.20.1/24`,网关为`192.168.20.2`
- 配置PC3的IP地址为`192.168.30.1/24`,网关为`192.168.30.2`
- 配置PC4的IP地址为`192.168.40.1/24`,网关为`192.168.40.2`
步骤简单,展示图略。
]
=== 配置路由器IP地址
#para[
按照拓扑图配置路由器的IP地址。配置AR1的G0/0/0口IP地址为
1. 配置AR1路由器
- 接口 `GE 0/0/0` 连接到 `AR3`IP地址为 `192.168.60.2`
- 接口 `GE 0/0/1` 连接到 `PC3`IP地址为 `192.168.30.2`
#figure(image("ar1ip.png",format: "png",fit:"stretch",width: 60%),caption: "配置AR1的IP地址")
2. 配置AR2路由器
- 接口 `GE 0/0/0` 连接到 `AR3`IP地址为 `192.168.80.2`
- 接口 `GE 0/0/1` 连接到 `PC4`IP地址为 `192.168.40.2`
#figure(image("ar2ip.png",format: "png",fit:"stretch",width: 60%),caption: "配置AR2的IP地址")
3. 配置AR3路由器
- 接口 `GE 0/0/0` 连接到 `PC1`IP地址为 `192.168.10.2`
- 接口 `GE 0/0/1` 连接到 `PC2`IP地址为 `192.168.20.2`
注意拓扑图中的`Ethernet0/0/0``Ethernet0/0/1`分别对应`GE 0/0/3``GE 0/0/2`
- 接口 `GE 0/0/2` 连接到 `AR2`IP地址为 `192.168.80.1`
- 接口 `GE 0/0/3` 连接到 `AR1`IP地址为 `192.168.60.1`
#figure(image("ar3ip.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "配置AR3的IP地址")
]
=== 配置RIP协议使互通
#para[
本次实验使用RIP协议配置路由器使得各个网络互通
#figure(image("ar1rip.png",format: "png",fit:"stretch",width: 60%),caption: "在AR1上配置RIP协议")
#figure(image("ar2rip.png",format: "png",fit:"stretch",width: 60%),caption: "在AR2上配置RIP协议")
#figure(image("ar3rip.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "在AR3上配置RIP协议")
此时在PC4(`192.168.40.1/24`)上ping其他三台主机发现可以互通
#figure(image("配置vpn前_2.jpg",format: "jpg",fit:"stretch",width: 90%),caption: "PC2 ping其他主机")
]
== 配置VPN实例
=== 创建VPN实例
#para[
在AR1上创建VPN实例`wlxvpn`并为该实例设置RD值为`100:1`
#figure(image("ar3vpn.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "创建VPN实例并设置RD值")
并配置接口`GE 0/0/0``GE 0/0/2`绑定到该实例:
#figure(image("ar3binding.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "绑定接口")
如下图@qingkong绑定之后接口的配置会被清空需要重新设置接口的IP地址
#figure(image("ar3ip_2.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "重新设置接口IP地址")<qingkong>
]
=== 配置VPN实例的路由
#para[
`wlxvpn`的路由表中创建RIP进程进程号为100并且该进程与VPN实例`wlxvpn`进行绑定。设备在该RIP进程中所学习到的路由会加载到`wlxvpn`的路由表中。
#figure(image("ar3vpnrip.png",format: "png",fit:"stretch",width: 50%),caption: "配置RIP进程")
此时可以测试一下VPN的连通性
#figure(image("vpnpingPC1.png",format: "png",fit:"stretch",width: 80%),caption: "AR3 ping PC1")
]
== 结果检验
#para[
在PC1上分别ping PC2与PC3发现PC1与PC2无法通信PC1与PC3可以通信
#figure(image("配置vpn后.jpg",format: "jpg",fit:"stretch",width: 100%),caption: "PC1分别ping VPN内外的主机")
说明VPN实例`wlxvpn`的配置成功实现了PC1与PC2等的数据隔离。
]
= 实验总结
#para[
本次实验通过配置VPN实例实现了不同网络之间的数据隔禆验证了VPN实例在网络隔离中的重要作用。通过实验我掌握了VPN实例的创建、接口绑定、路由配置等操作方法深入理解了VPN实例在数据转发和隔离中的实现机制。同时通过实验验证了VPN实例在多接口场景下的流量隔离效果为我今后设计复杂网络拓扑和实现网络隔离提供了重要参考。
]
#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")

BIN
6_vpn/vpnpingPC1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
6_vpn/实验拓扑.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

BIN
6_vpn/配置vpn前_1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
6_vpn/配置vpn前_2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
6_vpn/配置vpn后.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB