vlan report finished

This commit is contained in:
2025-09-30 15:54:45 +08:00
parent c0efdf69ea
commit 88e141aecb
50 changed files with 48 additions and 77 deletions

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
1_vlan/PC3IP.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
1_vlan/macprint.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 KiB

View File

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

View File

@ -46,8 +46,7 @@
= 实验目的
#para[
能根据需求划分和配置VLAN实现VLAN的基本功能。
了解端口安全的作用,掌握端口安全的配置方法。
要求学员能根据需求划分和配置VLAN实现VLAN的基本功能。了解端口安全的作用,掌握端口安全的配置方法。
]
= 实验原理
@ -106,135 +105,111 @@
== 按照拓扑图接线
#para[
按照拓扑图接线将PC1、PC2、PC3、PC4分别连接到LSW1、LSW2上。图中手握的三根线是用于链路聚合的网线。
按照拓扑图接线将PC1、PC2、PC3、PC4分别连接到LSW1、LSW2上。
]
#figure(image("接线图.jpg",format: "jpg",fit:"stretch",width: 90%),caption: "接线图")
== 配置前检验
#para[
设置PC1、2、3、4的IP地址分别为`192.168.10.{1, 2, 3, 4}`。设置PC1、2的网关为`192.168.10.5`设置PC3、4的网关为`192.168.10.6`。使用`ipconfig`命令查看PC的IP地址和网关地址以PC1为例查看结果如下:
设置PC1、2、3、4的IP地址分别为`10.130.81.{210, 211, 212, 213}`。设置PC的网关`10.130.81.1`以PC1为例配置如下:
]
#figure(image("step0.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "配置前检验")
#figure(image("PC1IP.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "配置前检验")
#para[
说明PC1的IP地址、网关地址已经设置成功。
然后在PC1上ping PC2、PC3、PC4查看是否能够ping通。结果如下:
]
#figure(image("step1.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "配置前检验结果")
#para[
说明PC1能够ping通PC2、PC3、PC4网络连接正常。下面开始进行VLAN配置。
说明PC1的IP地址、网关地址已经设置成功。
然后在PC1上ping PC2、PC3、PC4查看是否能够ping通。结果显然是PC1能够ping通PC2、PC3、PC4网络连接正常。下面开始进行VLAN配置。
]
== 配置VLAN
#para[
下列许多步骤在LSW1和LSW2上都有相同的操作这里只列出LSW1上的操作步骤。
]
// === 配置LACP模式的链路聚合
// #para[
// 在LSW1上创建Eth-Trunk1并配置为LACP模式。
// #figure(image("../labtemplate.typ",format: "jpg",fit:"stretch",width: 40%),caption: "配置LACP模式的链路聚合(1)")
// 配置LSW1上的成员接口加入Eth-Trunk1。
// #figure(image("../labtemplate.typ", format: "jpg", fit: "stretch", width: 70%),caption: "配置LACP模式的链路聚合(2)")
// #figure(image("../labtemplate.typ", format: "jpg", fit: "stretch", width: 70%),caption: "配置LACP模式的链路聚合(2)")
// 在LSW1上配置系统优先级为100使其成为LACP主动端LSW2上不需要配置其缺省优先级为32768比LSW1低已经满足要求。配置活动接口上限阈值为2。
// #figure(image("../labtemplate.typ",format: "jpg",fit:"stretch",width: 60%),caption: "配置LACP模式的链路聚合(2)")
// 在LSW1上配置接口优先级确定活动链路。
// #figure(image("../labtemplate.typ",format: "jpg",fit:"stretch",width: 60%),caption: "配置LACP模式的链路聚合(3)")
// ]
=== 配置各个接口的VLAN属性
#para[
创建VLAN并将接口加入VLAN。将与PC1、PC2相连接口的接口类型设置为access。将PC1划分到VLAN 10将PC2划分到VLAN 20。
]
#figure(image("step2.1.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置VLAN属性(1)")
#figure(image("vlanbatch.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "VLAN进行划分")
#para[
配置Eth-Trunk1接口允许VLAN10和VLAN20通过
配置VLAN10和VLAN20接口属性为access
]
#figure(image("step3.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置VLAN属性(2)")
#figure(image("vlanset.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置VLAN属性(1)")
#para[
验证配置结果查看各交换机的Eth-Trunk信息查看链路是否协商成功
配置trunk接口允许VLAN10和VLAN20通过
]
#figure(image("step4.jpg",format: "jpg",fit:"stretch",width: 90%),caption: "LSW1的Eth-Trunk信息")
#figure(image("step5.jpg",format: "jpg",fit:"stretch",width: 90%),caption: "LSW2的Eth-Trunk信息")
#figure(image("vlantrunk.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置VLAN属性(2)")
#para[
通过以上显示信息可以看到LSW1的系统优先级为100高于LSW2的系统优先级。Eth-Trunk的成员接口中GigabitEthernet0/0/3、GigabitEthernet0/0/4成为活动接口处于“Selected”状态接口GigabitEthernet0/0/5处于“Unselect”状态同时实现2条链路的负载分担和1条链路的冗余备份功能
接下来需要验证配置结果,查看链路是否协商成功
]
=== 阶段性检验
#para[
在PC1上ping PC2、PC3、PC4查看是否能够ping通。预期结果为PC1可以ping通PC3无法ping通PC2、4。结果如下
]
#figure(image("step6.jpg",format: "jpg",fit:"stretch",width: 50%),caption: "阶段性检验(1)")
#figure(image("pingcheck1.jpg",format: "jpg",fit:"stretch",width: 50%),caption: "阶段性检验(1)")
#para[
上述结果说明PC1可以ping通PC3无法ping通PC2、4VLAN配置成功。网工系的学生与网安系的学生电脑之间无法通信,满足了苞米要求。
上述结果说明PC2可以ping通PC4无法ping通PC1、2VLAN配置成功。
]
== 添加网关
== 配置VLANIF接口实现三层路由通信
#para[
网工系的学生做了一个网工实验他们PC的IP地址发生了变化`192.168.10.x/24`变为了`192.168.20.x/24`,如下图所示:
]
#figure(image("step7.1.jpg",format: "jpg",fit:"stretch",width: 100%),caption: "新的拓扑图")
#para[
现在网工系与网安系之间展开交流要求网安系的PC1、PC3能够访问网工系的PC2、PC4。为此需要在交换机上配置网关。本实验选择在LSW1上配置网关。
现在两部门之间展开交流要求PC1234能够互相访问。为此需要在交换机上配置VLANIF接口以及网关地址。
]
=== 配置PC默认网关
#para[
在PC2、PC4上配置默认网关为`192.168.20.6`以PC2为例
]
#figure(image("step8.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "配置PC默认网关(1)")
#para[
使用`ipconfig`命令查看PC的网关地址以PC2为例查看结果如下
]
#figure(image("step9.jpg",format: "jpg",fit:"stretch",width: 70%),caption: "配置PC默认网关(2)")
#para[
说明PC2的IP网关地址已经设置成功。PC4同理。
进行该实验时先调整PC3,4的IP地址`10.130.81.x/24`变为了`10.130.91.x/24`
并在PC3、PC4上调整网关为`10.130.91.1`。以PC3为例配置如下
]
#figure(image("PC3IP.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "PC3进行IP地址调整")
=== 配置VLAN网关
#para[
配置VLANIF接口作为学生PC的网关。在LSW1上配置VLANIF10接口的IP地址为`192.168.10.5/24`配置VLANIF20接口的IP地址为`192.168.20.6/24`
配置VLANIF接口作为学生PC的网关。在LSW1上配置VLANIF10接口的IP地址为`10.130.81.1/24`配置VLANIF20接口的IP地址为`10.130.91.1/24`
具体命令如下:
]
#figure(image("step10.jpg",format: "png",fit:"stretch",width: 60%),caption: "配置VLAN网关(1)")
#align(center)[`[LSW1] int vlanif 10`]
#align(center)[`[LSW1-Vlanif10] ip addr 10.130.81.1`]
#align(center)[`[LSW1-Vlanif10] int vlanif 20`]
#align(center)[`[LSW1-Vlanif20] ip addr 10.130.91.1`]
#para[
配置好之后使用`display interface Vlanif <index>`命令查看VLANIF接口的状态查看结果如下
配置好之后使用`display interface Vlanif <index>`命令查看VLANIF接口的状态查看结果显示
]
#figure(image("step11.jpg",format: "jpg",fit:"stretch",width: 90%),caption: "配置VLAN网关(2)")
#figure(image("vlanif10.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "vlanif10接口状态")
#figure(image("vlanif20.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "vlanif20接口状态")
#para[
可以看到IP已经正确配置且状态为UP。
说明IP已经正确配置且状态为UP。
]
=== 阶段性检验
#para[
在PC1上ping PC2、PC3、PC4查看是否能够ping通。预期结果为全通。结果如下
在PC1上ping PC1、PC2、PC3、PC4查看是否能够ping通。预期结果为全通。结果如下
]
#figure(image("step12.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "阶段性检验(2)")
#figure(image("pingcheck2.jpg",format: "jpg",fit:"stretch",width: 60%),caption: "阶段性检验(2)")
#para[
上述结果说明PC1可以ping通PC2、PC3、PC4VLAN配置成功。网工系的学生与网安系的学生电脑之间可以通信。
上述结果说明PC1可以ping通PC2、PC3、PC4VLANIF配置成功。两个部门的电脑之间可以通信。
]
== 引入接口安全
#para[
网工系与网安系的交流活动中,有外部人员参与。为了保证网络安全,需要对接口进行安全配置,防止外部人员使用外部设备接入网络。
两个部门的交流活动中,有外部人员参与。为了保证网络安全,需要对接口进行安全配置,防止外部人员使用外部设备接入网络。
]
=== 配置接口安全
#para[
将接口GigabitEthernet0/0/1、GigabitEthernet0/0/2的最大MAC地址数设置为1。以LSW1的GigabitEthernet0/0/1为例配置如下
]
#figure(image("step13.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置接口安全(1)")
#figure(image("macset.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置接口安全")
配置好之后让PC1与PC2、PC3、PC4进行一次ping通信让交换机学习每个PC的MAC地址。用`ipconfig /all`命令查看PC的MAC地址以PC1为例查看结果如下
#figure(image("step14.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置接口安全(2)")
可以看到PC1的MAC地址为`1C-69-7A-2F-8E-43`
#figure(image("macprint.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "查看PC1的MAC地址")
可以看到PC1的MAC地址为`1C-69-7A-2F-93-70`
在LSW1上运行`display mac-address`命令查看交换机学习到的MAC地址查看结果如下
#figure(image("step15.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "配置接口安全(3)")
#figure(image("maccheck.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "验证交换机学习到的MAC地址")
#para[
可以看到交换机学习到了PC1的MAC地址。
]
=== 检验接口安全配置
#para[
模拟外部人员进入网安系将PC1用于接入交换机LSW1的网线取下改用个人笔记本电脑接入LSW1
模拟外部人员进入将PC1用于接入交换机LSW1的网线取下改用个人笔记本电脑接入LSW1并将IP地址与默认网关设置为与PC1相同。
]
#figure(image("step16.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "检验接口安全配置(1)")
#para[
将IP地址与默认网关设置为与PC1相同
]
#figure(image("step17.jpg",format: "jpg",fit:"stretch",width: 80%),caption: "检验接口安全配置(2)")
#para[
然后分别ping PC2、PC3、PC4看是否能够正常通信。预期结果为无法通信。结果如下
]
#figure(image("step18.jpg",format: "png",fit:"stretch",width: 80%),caption: "检验接口安全配置(3)")
#para[
个人笔记本电脑无法与任何PC通信交换机出色地完成了苞米任务。
然后分别ping PC2、PC3、PC4结果均无法正常ping通查看交换机的MAC地址表发现并没有学习到个人笔记本电脑的MAC地址说明接口安全配置成功。
]
= 实验总结
@ -247,17 +222,13 @@
- 学习了 VLAN 的基本概念和作用,掌握了如何根据需求划分和配置 VLAN。
- 通过实际操作,将一个物理局域网划分为多个逻辑局域网,实现了不同 VLAN 之间的隔离,提高了网络的安全性和管理性。
2. 链路聚合
- 了解了链路聚合技术的基本原理,掌握了如何将多个物理链路聚合成一个逻辑链路。
- 通过实际操作,实现了链路聚合,增加了带宽,提高了网络的性能和可靠性。
3. 端口安全配置:
2. 端口安全配置
- 学习了端口安全的作用和配置方法,掌握了如何通过端口安全配置来防止未经授权的设备接入网络。
- 通过实际操作,模拟了外部人员尝试接入网络的场景,验证了端口安全配置的有效性。
== 心得感悟
#para[
本次实验,我选择了MobaXterm作为Serial会话的发起终端而非Hypertrm。虽然两者没有本质区别但后者具有更加现代化的界面方便查看输入、输出。其次在完成基础的VLAN配置后我尝试学习课上讲到的其他技术,并在实验中成功利用。较为遗憾的是由于没有技术搭建较好的测试与应用环境没有尝试使用Hybrid类型接口配置基于MAC的VLAN。在实验中,我遇到了许多问题,但通过查阅资料、请教老师和同学,最终解决了问题。通过本次实验,我不仅学会了网络配置的方法,还提高了解决问题的能力。
本次实验我在完成基础的VLAN配置后我尝试学习课上讲到的安全技术,并在实验中成功利用。在实验中,我遇到了许多问题,但通过查阅资料、请教老师和同学,最终解决了问题。通过本次实验,我不仅学会了网络配置的方法,还提高了解决问题的能力。
]
#show heading: it => box(width: 100%)[

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
1_vlan/vlanif10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
1_vlan/vlanif20.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 424 KiB

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.