VLAN划分实验(eNSP)
拓扑图:
![](https://img-blog.csdnimg.cn/img_convert/a9a72ccfb08347a2af4a3f07f687c4d0.png)
一、实验要求
将pc1和pc3划分到vlan10下
将pc2和pc4划分到vlan20下
相同VLAN能通信
不同VLAN无法通信
二、配置
配置PC机的IP和掩码
![](https://img-blog.csdnimg.cn/img_convert/5cd8747ece0049d1b333da44ba8aec49.png)
![](https://img-blog.csdnimg.cn/img_convert/5383880e706843fea445526bb3eb93b5.png)
![](https://img-blog.csdnimg.cn/img_convert/269b689f812c48e48f5c6d7135f4676d.png)
![](https://img-blog.csdnimg.cn/img_convert/332ea98c6352481fbb611947ef26508e.png)
2.配置交换机
SW1:
①access配置
![](https://img-blog.csdnimg.cn/img_convert/a3b8e92bc6dd452eae05b9065e953535.png)
![](https://img-blog.csdnimg.cn/img_convert/dc222c93d0ca4abcb1ee2e54ca70413d.png)
②trunk配置
![](https://img-blog.csdnimg.cn/img_convert/872d84760f5040d59ba60ca9340b4424.png)
SW2:
①access配置
![](https://img-blog.csdnimg.cn/img_convert/bb84822423e24ac8ab5fd27d53d695be.png)
②trunk配置
![](https://img-blog.csdnimg.cn/img_convert/c8db1f153b844a6db45e011b012e8afb.png)
三、测试结果
①PC1:
![](https://img-blog.csdnimg.cn/img_convert/079b3ed4a2164f95ad1bbb167a8a492b.png)
②PC2:
![](https://img-blog.csdnimg.cn/img_convert/e17b59effc624abd84b88add0fccceb5.png)
③PC3:
![](https://img-blog.csdnimg.cn/img_convert/58cc3b3ebeeb4a878442ff4261c6dd87.png)
测试成功
将pc1和pc3划分到vlan10下
将pc2和pc4划分到vlan20下
相同VLAN能通信
不同VLAN无法通信
测试成功