1.三个设备都创建vlan2 3
vlan batch 2 3
2.接入层1-9口vlan2 10-19口vlan3
lsw3 1-9口
port-group group-member g0/0/1 to g0/0/9
port link-type access
port default vlan 2
10-19口
port-group group-member g0/0/10 to g0/0/19
port link-type access
port default vlan 3
3.配置上行接口23 24
lsw3
interface GigabitEthernet0/0/23
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/24
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 3
对于未规划用途并且长期不使用的接口进行关闭处理
port-group group-member g0/0/20 to g0/0/22
shutdown
添加接口描述
> interface GigabitEthernet0/0/23
> description to_BG-AGG-Mster-S5728C_G0/0/23
设备命名
> [AGG-master]sysname BG-AGG-Mster-S5728C
4.下行接口 lsw1的23接口trunk,lsw2的24接口trunk
interface GigabitEthernet0/0/23
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 3
interface GigabitEthernet0/0/24
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 3
5.接口聚合
lsw1 lsw2
int eth-trunk 1
trunkport g0/0/1
trunkport g0/0/2
查看聚合接口
display eth-trunk
更改聚合接口链路属性
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 2 to 3
6.生成树配置–(负载)
lsw1
stp enable
stp mode mstp
stp region-configuration
region-name BG
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
stp instance 1 root primary
stp instance 2 root secondary
lsw2
stp enable
stp mode mstp
stp region-configuration
region-name BG
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
stp instance 1 root secondary
stp instance 2 root primary
lsw3
stp enable
stp mode mstp
stp region-configuration
region-name BG
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
7.检查配置
在非根(lsw3)上检查生成树是否按要求收敛
display stp instance 1 interface g0/0/23
display stp instance 1 interface g0/0/24
display stp instance 2 interface g0/0/23
display stp instance 2 interface g0/0/24
|