配置交换机
背景信息
本方案中的交换机主要有接入交换机、汇聚交换机和核心交换机,下连AP,上连AC,在本节中介绍如下配置内容:
- 在接入交换机上设置AP接入的端口和AP管理VLAN。
- 配置接入交换机、汇聚交换机、核心交换机之间的VLAN透传,使AP与AC之间、AP和物联网中间件平台之间网络可达。
前提条件
- 从可靠性考虑,汇聚交换机和核心交换机推荐部署双机。在部署本方案前,需要提前完成汇聚交换机和核心交换机的堆叠配置。交换机的堆叠具体配置,可参考文档S交换机堆叠最佳实践。
- 本方案中,物联网中间件平台一般位于数据中心,核心交换机到物联网中间件平台之间的网络,需要提前完成二层互通部署。
操作步骤
- 配置接入交换机ACC1连接AP的接口GE0/0/1的PVID为VLAN100(管理VLAN)并透传VLAN100和VLAN101(业务VLAN)。
# sysname ACC1 # vlan batch 100 101 //创建管理VLAN100,业务VLAN101 # interface GigabitEthernet0/0/1 port link-type trunk port trunk pvid vlan 100 //配置接口的PVID为VLAN100 undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 port-isolate enable group 1 //配置端口之间隔离 #
- 配置接入交换机ACC1连接汇聚交换机AGG1的接口GE0/0/2和接口GE0/0/3加入Eth-Trunk10,并透传VLAN100(管理VLAN)和VLAN101(业务VLAN)。
# interface Eth-Trunk10 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 # interface GigabitEthernet0/0/2 eth-trunk 10 //配置接口加入到eth-trunk # interface GigabitEthernet0/0/3 eth-trunk 10 //配置接口加入到eth-trunk #
- 配置汇聚交换机AGG1的下行接口GE1/1/0/2和GE2/1/0/2加入Eth-Trunk10,并透传VLAN100(管理VLAN)和VLAN101(业务VLAN)。
# sysname AGG1 # vlan batch 100 101 //创建管理VLAN100,业务VLAN101 # interface Eth-Trunk10 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 //透传VLAN100和VLAN101 # interface GigabitEthernet1/1/0/2 eth-trunk 10 //配置接口加入到eth-trunk # interface GigabitEthernet2/1/0/2 eth-trunk 10 //配置接口加入到eth-trunk #
- 配置汇聚交换机AGG1的上行接口GE1/1/0/3和GE2/1/0/3加入Eth-Trunk20,并透传VLAN100(管理VLAN)和VLAN101(业务VLAN)。
# interface Eth-Trunk20 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 //透传VLAN100和VLAN101 # interface GigabitEthernet1/1/0/3 eth-trunk 20 //配置接口加入到eth-trunk # interface GigabitEthernet2/1/0/3 eth-trunk 20 //配置接口加入到eth-trunk #
- 配置核心交换机CORE的下行接口GE1/1/0/4和GE2/1/0/4加入Eth-Trunk20,并透传VLAN100(管理VLAN)和VLAN101(业务VLAN)。
# sysname CORE # vlan batch 100 101 //创建管理VLAN100,业务VLAN101 # interface Eth-Trunk20 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 //透传VLAN100和VLAN101 # interface GigabitEthernet1/1/0/4 eth-trunk 20 //配置接口加入到eth-trunk # interface GigabitEthernet2/1/0/4 eth-trunk 20 //配置接口加入到eth-trunk #
- 配置核心交换机CORE的上行接口GE1/1/0/5和GE2/1/0/5加入Eth-Trunk30,并透传VLAN100(管理VLAN)和VLAN101(业务VLAN)。
# interface Eth-Trunk30 port link-type trunk undo port trunk allow-pass vlan 1 port trunk allow-pass vlan 100 101 //透传VLAN100和VLAN101 # interface GigabitEthernet1/1/0/5 eth-trunk 30 //配置接口加入到eth-trunk # interface GigabitEthernet2/1/0/5 eth-trunk 30 //配置接口加入到eth-trunk #