0
点赞
收藏
分享

微信扫一扫

从零开始学习生成树实验:一步一步走向精通

老榆 2024-05-07 阅读 6

以下是初级课程-华为生成树实验配置


01、实验拓扑


从零开始学习生成树实验:一步一步走向精通_生成树

02、实验需求


1.按图完成L2的链路捆绑

2.运行MSTP完成核心之间的负载分担

3.按图完成L3的链路捆绑


03、实验步骤


A . L2的Etherchannel

SW1:

[SW1]vlan batch 10 20 30 40 (sw1上创建4个vlan)

[SW1]int Eth-Trunk 1 (创建链路聚合逻辑口)

[SW1-Eth-Trunk1]trunkport g0/0/1 (将物理接口加入逻辑接口)

[SW1-Eth-Trunk1]trunkport g0/0/2 (将物理接口加入逻辑接口)

[SW1-Eth-Trunk1]port link-type trunk (配置为trunk接口)

[SW1-Eth-Trunk1]port trunk allow-pass vlan all (透传vlan)

[SW1]int Eth-Trunk 2 (创建链路聚合逻辑口)

[SW1-Eth-Trunk2]trunkport g0/0/3 (将物理接口加入逻辑接口)

[SW1-Eth-Trunk2]trunkport g0/0/4 (将物理接口加入逻辑接口)

[SW1-Eth-Trunk2]port link-type trunk (配置为trunk接口)

[SW1-Eth-Trunk2]port trunk allow-pass vlan all (透传vlan)


SW2:

[SW2]vlan batch 10 20 30 40 (sw2上创建4个vlan)

[SW2]int Eth-Trunk 1 (创建链路聚合逻辑口)

[SW2-Eth-Trunk1]trunkport g0/0/1 (将物理接口加入逻辑接口)

[SW2-Eth-Trunk1]trunkport g0/0/2 (将物理接口加入逻辑接口)

[SW2-Eth-Trunk1]port link-type trunk (配置为trunk接口)

[SW2-Eth-Trunk1]port trunk allow-pass vlan all (透传vlan)

[SW2]int Eth-Trunk 3 (创建链路聚合逻辑口)

[SW2-Eth-Trunk3]mode lacp-static (指定动态LACP模式)

[SW2-Eth-Trunk3]trunkport g0/0/3 (将物理接口加入逻辑接口)

[SW2-Eth-Trunk3]trunkport g0/0/4 (将物理接口加入逻辑接口)

[SW2-Eth-Trunk3]port link-type trunk (配置为trunk接口)

[SW2-Eth-Trunk3]port trunk allow-pass vlan all (透传vlan)


SW3:

[SW3]vlan batch 10 20 30 40 (sw3上创建4个vlan)

[SW3]int Eth-Trunk 2 (创建链路聚合逻辑口)

[SW3-Eth-Trunk2]trunkport g0/0/1 (将物理接口加入逻辑接口)

[SW3-Eth-Trunk2]trunkport g0/0/2 (将物理接口加入逻辑接口)

[SW3-Eth-Trunk2]port link-type trunk (配置为trunk接口)

[SW3-Eth-Trunk2]port trunk allow-pass vlan all (透传vlan)

[SW1]int Eth-Trunk 3 (创建链路聚合逻辑口)

[SW3-Eth-Trunk3]mode lacp-static (指定动态LACP模式)

[SW3-Eth-Trunk3]trunkport g0/0/3 (将物理接口加入逻辑接口)

[SW3-Eth-Trunk3]trunkport g0/0/4 (将物理接口加入逻辑接口)

[SW3-Eth-Trunk3]port link-type trunk (配置为trunk接口)

[SW3-Eth-Trunk3]port trunk allow-pass vlan all (透传vlan)

从零开始学习生成树实验:一步一步走向精通_链路_02

从零开始学习生成树实验:一步一步走向精通_生成树_03

从零开始学习生成树实验:一步一步走向精通_链路_04

三台交换机链路捆绑状态均为up。

要注意的是两条链路要能捆绑成功,必须满足链路带宽一致,接口配置一致。


B . MSTP

华为生成树模式有三种:STP(工业标准);RSTP(工业标准);MST(工业标准)。默认模式是MST。其中STP和RSTP的特点是所有vlan一颗树,所以无法实现负载分担。

从零开始学习生成树实验:一步一步走向精通_生成树_05

从零开始学习生成树实验:一步一步走向精通_生成树_06

此时SW1上有ALTE口,证明SW1绝对不是根桥。


SW1:

[SW1]stp mode mstp (默认模式)

[SW1]stp region-configuration (进入mst配置模式)

[SW1-mst-region]region-name huawei(配置域名,必配且相同)

[SW1-mst-region]instance 1 vlan 10 30 (将vlan10,30关联实例1)

[SW1-mst-region]instance 2 vlan 20 40 (将vlan20,40关联实例2)

[SW1-mst-region]active region-configuration (激活配置)

[SW1]stp instance 1 root primary (设置SW1为实例1的主根桥)

[SW1]stp instance 2 root secondary

(设置SW1为实例2的备份根桥)


SW2:

[SW2]stp mode mstp (默认模式)

[SW2]stp region-configuration (进入mst配置模式)

[SW2-mst-region]region-name huawei(配置域名,必配且相同)

[SW2-mst-region]instance 1 vlan 10 30 (将vlan10,30关联实例1)

[SW2-mst-region]instance 2 vlan 20 40 (将vlan20,40关联实例2)

[SW2-mst-region]active region-configuration (激活配置)

[SW2]stp instance 1 root secondary

(设置SW1为实例1的备份根桥)

[SW2]stp instance 2 root primary(设置SW1为实例2的主根桥)


SW3:

[SW3]stp mode mstp (默认模式)

[SW3]stp region-configuration (进入mst配置模式)

[SW3-mst-region]region-name huawei(配置域名,必配且相同)

[SW3-mst-region]instance 1 vlan 10 30 (将vlan10,30关联实例1)

[SW3-mst-region]instance 2 vlan 20 40 (将vlan20,40关联实例2)

[SW3-mst-region]active region-configuration (激活配置)

从零开始学习生成树实验:一步一步走向精通_链路_07

从零开始学习生成树实验:一步一步走向精通_生成树_08

此时SW1为实例1的主根桥,SW2为实例2的主根桥,从而实现了vlan间的负载


C . L3的链路捆绑

二层的链路捆绑主要是为了防环和增加带宽,而三层的链路捆绑则是为了增加带宽

华为的S5700交换机不支持将二层口修改为三层口。所以L2的链路捆绑和L3的链路捆绑基本是一样的。


从零开始学习生成树实验:一步一步走向精通_链路_09

举报

相关推荐

0 条评论