同网段的VLAN隔离

一、环境准备

**(下载并安装好以下工具软件,注:以下版本的工具在win10-64位专业版下正常测试通过)
实验目的:某些小型工业环境中,同网段但是部门不同的PC之间不允许相互访问,可把接口划到不同的VLAN中,以实现局域网的隔离。

1、安装ENSP

(1)安装winpcap4.13
(2)安装wireshark_64位3.2.2
(3)安装virtualbox5.2.16
(4)安装ENSP1.3.100

2、打开ENSP,拖出拓扑图如下:

在这里插入图片描述

3、情境分析

(1)5台PC机,都是使用192.168.1.0/24的网段IP地址,分别属于IT部、人事部、市场部、研发部,仅client1与client2同属IT部,其余PC各自1个部门。
(2)跨交换机,所以交换机之间的端口作干道trunk处理,直连PC的端口使用access工作模式
(3)为方便管理,每个部门使用一个不同的VLAN ID

二、开始配置

1、依次双击client1、client2、client3、client4、client5配置好IP地址与子网掩码

在这里插入图片描述
client2、client3、client4、client5方法相同,不再赘述

2、配置SW1

(1)思路:与SW2相连的干道接口配置为trunk
(2)与PC相连的接口配置为access
(3)把各接口划分到对应的VLAN中
undo terminal monitor
system-view
vlan batch 10 20 30 40
interface Ethernet0/0/1
description to sw2
port link-type trunk
port trunk allow-pass vlan 10 20 30 40

interface Ethernet0/0/2
description it_pc1
port link-type access
port default vlan 10

interface Ethernet0/0/3
description it_pc2
port link-type access
port default vlan 10

interface Ethernet0/0/4
description renshi_pc
port link-type access
port default vlan 20

3、配置sw2

(1)思路:与SW2相连的干道接口配置为trunk
(2)与PC相连的接口配置为access
(3)把各接口划分到对应的VLAN中
undo terminal monitor
system-view
vlan batch 10 20 30 40
interface Ethernet0/0/1
description to sw1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40

interface Ethernet0/0/2
description shichang_pc
port link-type access
port default vlan 30

interface Ethernet0/0/3
description yanfa_pc
port link-type access
port default vlan 40

三、验证结果

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weixin_43075093

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值