快捷搜索:  汽车  科技

华为交换机路由策略配置案例(华为交换机MSTP协议实例配置)

华为交换机路由策略配置案例(华为交换机MSTP协议实例配置)vlan batch 10 20 30 40Stp mod mstp (华为交换机默认STP模式为MSTP)SW2为实例2的主根桥,实例1的次根桥SW1配置命令:Stp enable (开启STP)

实例:在三台交换机上启用MSTP(多实例生成树协议)

组网图:

华为交换机路由策略配置案例(华为交换机MSTP协议实例配置)(1)

组网图及配置需求

SW1为实例1的主根桥,实例2的次根桥

SW2为实例2的主根桥,实例1的次根桥

SW1配置命令:

Stp enable (开启STP)

Stp mod mstp (华为交换机默认STP模式为MSTP)

vlan batch 10 20 30 40

stp region-configuration

region-name huawei (定义域名为:huawei)

revision-level 1

instance 1 VLAN 10 20 (定义实例1中映射的VLAN 10和20)

instance 2 vlan 30 40 (定义实例2中映射的VLAN 30和40)

active region-configuration

quit

stp instance 1 root primary (配置实例1为主根(primary))

stp instance 2 root secondary (配置实例2为次根(secondary))

interface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 10 20 30 40

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 10 20 30 40

SW2配置文件:

#

sysname SW2

#

vlan batch 10 20 30 40

#

stp instance 1 root secondary

stp instance 2 root primary

#

stp region-configuration

region-name huawei

revision-level 1

instance 1 vlan 10 20

instance 2 vlan 30 40

active region-configuration

#

interface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 10 20 30 40

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 10 20 30 40

SW3配置文件:

#

sysname SW3

#

vlan batch 10 20 30 40

#

stp region-configuration

region-name huawei

revision-level 1

instance 1 vlan 10 20

instance 2 vlan 30 40

active region-configuration

#

interface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 10 20 30 40

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 10 20 30 40

SW1查看验证配置结果:

<SW1>dis stp brief

MSTID Port Role STP State Protection

0 GigabitEthernet0/0/1 ALTE DISCARDING NONE

0 GigabitEthernet0/0/2 ROOT FORWARDING NONE

1 GigabitEthernet0/0/1 DESI FORWARDING NONE

1 GigabitEthernet0/0/2 DESI FORWARDING NONE

2 GigabitEthernet0/0/1 ROOT FORWARDING NONE

2 GigabitEthernet0/0/2 DESI FORWARDING NONE

SW2查看验证配置结果:

<SW2> dis stp br

MSTID Port Role STP State Protection

0 GigabitEthernet0/0/1 ROOT FORWARDING NONE

0 GigabitEthernet0/0/2 DESI FORWARDING NONE

1 GigabitEthernet0/0/1 DESI FORWARDING NONE

1 GigabitEthernet0/0/2 ROOT FORWARDING NONE

2 GigabitEthernet0/0/1 DESI FORWARDING NONE

2 GigabitEthernet0/0/2 DESI FORWARDING NONE

SW3查看验证配置结果:

<SW3>dis stp brief

MSTID Port Role STP State Protection

0 GigabitEthernet0/0/1 DESI FORWARDING NONE

0 GigabitEthernet0/0/2 DESI FORWARDING NONE

1 GigabitEthernet0/0/1 ROOT FORWARDING NONE

1 GigabitEthernet0/0/2 ALTE DISCARDING NONE 实例1中的非根端口阻塞

2 GigabitEthernet0/0/1 ALTE DISCARDING NONE 实例2中的非根端口阻塞

2 GigabitEthernet0/0/2 ROOT FORWARDING NONE

猜您喜欢: