素材来源:华为数据中心交换机配置指南
一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!
附上汇总贴:玩转华为数据中心交换机系列 | 汇总_COCOgsta的博客-CSDN博客
配置思路采用如下思路配置MUX VLAN功能:
在Switch1~Switch3上均创建VLAN 2~VLAN 4,VLAN 2为主VLAN,VLAN 3为互通型从VLAN,VLAN 4为隔离型从VLAN。Gateway与Switch1通过接口10GE1/0/1对接,在Gateway上创建VLANIF 2,并配置IP地址为10.10.10.1/24,作为下挂Server的网关地址。配置接入层设备Switch2和Switch3的上行口10GE1/0/1允许VLAN 2~VLAN 4通过,下行口使能MUX VLAN功能,并加入与连接Server所属相同的VLAN。操作步骤配置MUX VLAN# 分别在Switch1、Switch2和Switch3上均创建VLAN 2~VLAN 4,配置VLAN 2为Principal VLAN,VLAN 3为Group VLAN,VLAN 4为Separate VLAN。以Switch1为例,Switch2和Switch3步骤类似,不再赘述。
<HUAWEI> system-view[~HUAWEI] sysname Switch1[*HUAWEI] commit[~Switch1] vlan batch 2 3 4[*Switch1] vlan 2[*Switch1-vlan2] mux-vlan[*Switch1-vlan2] subordinate group 3[*Switch1-vlan2] subordinate separate 4[*Switch1-vlan2] quit[*Switch1] commit# 配置Switch1的上行口10GE1/0/1加入VLAN 2,并使能MUX VLAN功能,配置下行口10GE1/0/2和10GE1/0/3允许VLAN 2~VLAN 4通过。
[~Switch1] interface 10ge 1/0/1[~Switch1-10GE1/0/1] port link-type trunk[*Switch1-10GE1/0/1] port trunk allow-pass vlan 2[*Switch1-10GE1/0/1] port mux-vlan enable vlan 2[*Switch1-10GE1/0/1] quit[*Switch1] interface 10ge 1/0/2[*Switch1-10GE1/0/2] port link-type trunk[*Switch1-10GE1/0/2] port trunk allow-pass vlan 2 to 4[*Switch1-10GE1/0/2] quit[*Switch1] interface 10ge 1/0/3[*Switch1-10GE1/0/3] port link-type trunk[*Switch1-10GE1/0/3] port trunk allow-pass vlan 2 to 4[*Switch1-10GE1/0/3] quit[*Switch1] commit在Gateway与Switch1对接的10GE1/0/1上创建VLANIF 2,并配置IP地址为10.10.10.1/24,作为下挂Server的网关地址。<HUAWEI> system-view[~HUAWEI] sysname Gateway[*HUAWEI] commit[~Gateway] vlan batch 2[*Gateway] interface 10ge 1/0/1[*Gateway-10GE1/0/1] port link-type trunk[*Gateway-10GE1/0/1] port trunk allow-pass vlan 2[*Gateway-10GE1/0/1] quit[*Gateway] interface vlanif 2[*Gateway-Vlanif2] ip address 10.10.10.1 24[*Gateway-Vlanif2] quit[*Gateway] commit配置接入层设备Switch2和Switch3的上行口10GE1/0/1允许VLAN 2~VLAN 4通过,下行口10GE1/0/2~10GE1/0/3使能MUX VLAN功能,并加入与连接Server所属相同的VLAN。以Switch2为例,Switch3和Switch2类似,不再赘述。# 配置上行口10GE1/0/1为trunk类型,允许VLAN 2~VLAN 4通过。
[~Switch2] interface 10ge 1/0/1[~Switch2-10GE1/0/1] port link-type trunk[*Switch2-10GE1/0/1] port trunk allow-pass vlan 2 to 4[*Switch2-10GE1/0/1] quit[*Switch2] commit# 使能下行口10GE1/0/2和10GE1/0/3的MUX VLAN功能,并加入与连接Server所属相同的VLAN。
[~Switch2] interface 10ge 1/0/2[~Switch2-10GE1/0/2] port default vlan 3[*Switch2-10GE1/0/2] port mux-vlan enable vlan 3[*Switch2-10GE1/0/2] quit[*Switch2] commit[~Switch2] interface 10ge 1/0/3[~Switch2-10GE1/0/3] port default vlan 3[*Switch2-10GE1/0/3] port mux-vlan enable vlan 3[*Switch2-10GE1/0/3] quit[*Switch2] commit配置Server的IP地址分别为各Server配置IP地址,并使它们和网关地址处于同一网段。
检查配置结果配置成功后,各Server用户可以访问Internet,ServerA和ServerB之间可以互相ping通,ServerC和ServerD之间不能互相ping通,ServerA和ServerB也不能和ServerC或ServerD之间互相ping通。
标签: 华为交换机配置