- 实验要求:
- 不同交换机之间的access链路,相同VLAN通讯
- 理解access链路特点
- 实验拓扑图:
-
- 实验设备
- 4台PC 2台S3700交换机
- 实验配置
- 先在4台PC上配置IP地址与子网掩码
- 在交换机1中配置:
- <Huawei>system-view 在用户视图下键入system-view 系统视图
- [Huawei]sysname SW-1 更改设备名
- [SW-1]un in en 取消弹窗
- [SW-1]vlan 10 创建VLAN 10
- [SW-1-vlan10]vlan 20 创建VLAN20
- [SW-1-vlan20]quit 退出
- [SW-1]interface e0/0/1 进入 e0/0/1接口模式
- [SW-1-Ethernet0/0/1]port link-type access 把e0/0/1接口设为access链路
- [SW-1-Ethernet0/0/1]port default vlan 20 把e0/0/1加入到VLAN20 中
- [SW-1-Ethernet0/0/1]interface e0/0/20 进入e0/0/20接口
- [SW-1-Ethernet0/0/20]port link-type access 把e0/0/20接口设为access链路
- [SW-1-Ethernet0/0/20]port default vlan 20
- 把e0/0/20加入到VLAN20 中
- [SW-1-Ethernet0/0/20]int e0/0/10 进入e0/0/10接口
- [SW-1-Ethernet0/0/10]port link-type access 把e0/0/10接口设为access链路
- [SW-1-Ethernet0/0/10]port default vlan 10
- 把e0/0/10加入到VLAN10 中
- [SW-1-Ethernet0/0/1]int e0/0/3 进入e0/0/3接口
- [SW-1-Ethernet0/0/3]port link-type access 把e0/0/3接口设为access链路
- [SW-1-Ethernet0/0/3]port default vlan 10 把e0/0/3加入到VLAN10 中
- 交换机2也是同样的配置
- 创建VLAN10 、VLAN20 进入接口e0/0/2和e0/0/20 设为access链路 并加入VLAN 20
- 进入接口e0/0/4 和e0/0/10设为access链路 并加入VLAN10中
- 验证
- 在PC3 上可以ping通PC4 无法ping通PC2
-
- PC1不可以ping通PC2 无法ping通PC4 (未设置生成树协议 无法ping通)
-
基于端口VLAN配置access接入链路
最新推荐文章于 2024-04-17 21:40:57 发布