交换实验

要求:
1.四台交换机使用MSTP配置,域名为huawei,配置修订号为1,配置两个实例

SW1:为例

stp region-configuration
  region-name huawei
  revision-level 1
  instance 1 vlan 10 20
  instance 2 vlan 30 40
 active region-configuration


2.在SW3/SW4手工创建四个VLAN,分别为VLAN 10 20 30 40,SW1与SW2通过GVRP来动态注册VLAN

SW3/AW4

以SW3为例:

vlan batch 10 to 40

SW1与SW2通过GVRP来动态注册VLAN

以SW1为例:(先将接口变成trunk口)SW2同SW1一样

(gvrp 

int g0/0/1

gvrp)

结果如下:

interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
stp root-protection
gvrp
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp

SW3/SW4:是g0/0/1 g0/0/4需要做gvrp

3.将VLAN 10 20 映射到实例1当中,将VLAN 30 40映射到实例2当中(四台交换机都需要做)

以LSW1为例:

stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration

4.将SW1作为实例1的主根桥、作为实例2的备份根桥,SW2作为实例2的主根桥、作为实例1的
备份根桥

以LSW1为例:

stp instance 1 root primary
stp instance 2 root secondary

LSW2:

stp instance 1 root secondary
stp instance 2 root primary


5.PC1与PC2属于VLAN 10,PC3与PC4属于VLAN 20

以LSW3(LSW4)为例:

interface GigabitEthernet0/0/5
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/6
port link-type access
port default vlan 20


6.SW3与SW4之间配置eth-trunk链路聚合,采用LACP静态方式

以LSW3(LSW4)为例:

interface Eth-Trunk0
   mode lacp-static
   trunkport g 0/0/3 0/0/4


7.要求PC1与PC2配置为10.1.1.0/24网段,并且能够互相通信


8.要求PC3与PC4配置为20.1.1.0/24网段,并且能够互相通信

SW3 SW4 都做;
interface Eth-Trunk0
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094


9.要求保护交换的接口防止从PC端收到不必要的BPDU

SW3 SW4 接pc的所有端口: 

以SW3 为例:

interface Ethernet0/0/5
 port link-type access
 port default vlan 10
 stp bpdu-filter enable
 stp edged-port enable


10.要求确保SW1的根桥位置,防止其它交换机抢占根桥,在最合适的地方部署

在SW1的3个端口都做

#进口

#stp root-protection

原文地址:https://www.cnblogs.com/TiAmoLJ/p/11391451.html