1.1实验介绍
1.1.1关于本实验
以太网是当今现有局域网LAN (Local Area Network)采用的最通用的通信协议标准,以太
网作为一种原理简单、便于实现同时又价格低廉的局域网技术已经成为业界的主流。
本实验主要介绍了LAN网络中的Eth-Trunk技术和MSTP技术。
1.1.2实验目的
掌握手工模式及静态LACP模式下,Eth-Trunk的创建和维护。
掌握MSTP中包括MST域、MSTI、 VLAN映射等配置和维护。
步骤1配置Sw1、 Sw2、 Sw3 和Sw4域名为 HUIAWEI 的域,创建实例MSTI1和实例MSTI2
#配置Sw1的MST域。
< Huawei> system-view
[Huawei]sysname Sw1
[Sw1]vlan bach 2 to 20 //创建VLAN2到vlan20
[Sw1]stp region-configuration //进入MST域视图
[Sw1-mst- region]region-name HUIAWEI //域名为 HUIAWEI 的域
[Sw1-mst- region]revision-level 1 //修改级别为1
[Sw1-mst- region]instance 10 vlan2 to 10 //创建实例instance 10匹配VLAN2到VLAN10
[Sw1-mst- region]instance20 vlan 11 to 20 //创建实例instance 20匹配VLA11到VLAN20
[Sw1-mst-region]active region-configuration //手动激活
[Sw1-mst- region]quit
#配置Sw2的MST域。
< Huawei> system-view
[Huawei]sysname Sw2
[Sw2]stp region-configuration
[Sw2-mst- region]region-name HUIAWEI
[Sw2-mst- region]revision-level 1
[Sw2-mst- region]instance 1 vlan2 to 10
[Sw2-mst- region]instance2 vlan 11 to 20
[Sw2-mst-region]active region-configuration
[Sw2-mst- region]quit
#配置Sw3的MST域。
< Huawei> system-view
[Huawei]sysname Sw3
[Sw3]stp region-configuration
[Sw3-mst- region]region-name HUIAWEI
[Sw3-mst- region]revision-level 1
[Sw3-mst- region]instance 1 vlan2 to 10
[Sw3-mst- region]instance2 vlan 11 to 20
[Sw3-mst-region]active region-configuration
[Sw3-mst- region]quit
#配置Sw4的MST域。
< Huawei> system-view
[Huawei]sysname Sw2
[Sw4]stp region-configuration
[Sw4-mst- region]region-name HUIAWEI
[Sw4-mst- region]revision-level 1
[Sw4-mst- region]instance 1 vlan2 to 10
[Sw4-mst- region]instance2 vlan 11 to 20
[Sw4-mst-region]active region-configuration
[Sw4-mst- region]quit
步骤2配置 实例1和实例2的根桥与备份根桥
[Sw1]stp instance 1 root primary //配置Sw1为实例1的根桥。
[Sw1]stp instance 2 root secondary //配置Sw1为实例1的备份根桥。
#
[Sw2]stp instance 1 root secondary //配置Sw2为实例1的备份根桥。
[Sw2]stp instance 2 root primary //配置Sw1为实例1的根桥
步骤3配置实例 MSTI1和MSTI2中将要被阻塞端口的路径开销值大于缺省值
[Sw1]stp pathcost standard legacy //配置Sw1的端路径开销计算方法为华为计算方法
[Sw2]stp pathcost-standard legacy //#配置Sw2的端口路径开销计算方法为华为计算方法
#
配置Sw3的端口路径开销计算方法为华为计算方法,将端口GE1/0/2在实例MSTI2中
的路径开销值配置为20000.
[Sw3]stp pathcost- standard legacy
[Sw3]interface gigabitethernet 0/0/2
[Sw3-GigabitEthernet0/0/2]stp instance 2 cost 20000
Sw3- GigabitEthernet0/0/2]quit
#
配置Sw4的端口路径开销计算方法为华为计算方法,将端口GE1/0/2在实例MSTI1中
的路径开销值配置为20000。
[Sw4]stp pathcost- standard legacy
[Sw4]interface gigabitethernet 0/0/2
[Sw4-GigabitEthernet0/0/2]stp instance 2 cost 20000
[Sw4- GigabitEthernet0/0/2]quit
步骤3使能MSTP, 并将与终端相连的端口设置为边缘端口
#在Sw1 .上启动MSTP。
[sw1]stp enable //在Sw1上启动MSTP。
[sw2]stp enable
[sw3]stp enable
[sw4]stp enable
#
配置Sw3端口GE0/0/1为边缘端口。
[Sw3]interface gigabitethernet 0/0/1
[Sw3C-GigabitEthernet0/0/1]stp edged- port enable
[Sw3-GigabitEthermet0/0/1]quit
[Sw3]stp bpdu-protection //Sw3的BPDU保护功能。
#
配置Sw4端口GE0/0/1为边缘端口。
[Sw4]interface gigabitethernet 0/0/1
[Sw4-GigabitEthernet0/0/1]stp edged-port enable
[Sw4-GigabitEthernet0/0/1]quit
[Sw4]stp bpdu-protection
步骤4“配置保护功能,如在各实例的根桥设备的指定端口配置根保护功能
#
在Sw1端口GE0/0/1上启动根保护。
[Sw1]interface gigabitethernet 0/0/1
[Sw1-GigabitEthernet0/0/1]stp root protection
[Sw1-GigabitEthernet0/0/1]quit
#在Sw2端口GE0/0/1上启动根保护。
[Sw2]interface gigabitethernet 0/0/1
[Sw2- GigabitEthernet0/0/1]stp root protection
[Sw2-GigabitEthernet0/0/1]quit
# Sw1创建VLAN,并将相应接口加入VLAN。
[Sw1]vlan batch 2 to 20
[Sw1]interface gigabitethernet 0/0/1
[Sw1-GigabitEthernet0/0/1 ]port link-type trunk
[Sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 20
[Sw1]quit
|链路聚合:
[Sw1interface Eth-Trunk12 //创建et-trunk12
[sw1-Eth-Trunk12]trunkport GigabitEthernet 0/0/22
[sw1-Eth-Trunk12]trunkport GigabitEthernet 0/0/23
[sw1-Eth-Trunk12]trunkport GigabitEthernet 0/0/24 //接口放入et-trunk12中
[sw1-Eth-Trunk12]mode lacp-static //设置LACP为静态模式
[sw1-Eth-Trunk12] max active-linknumber 2 //最大通行链路为2条
[sw1-Eth-Trunk12]lacp preempt delay 20 //开启抢占延时为20 s
[sw1-Eth-Trunk12] port link-type trunk //打上trunk
[sw1-Eth-Trunk12] port trunk allow-pass vlan 2 to 20 //放行VLAN2到VLAN20通过
Sw2:
[Sw2]interface gigabitethernet 0/0/1
[Sw2-GigabitEthernet0/0/1 ]port link-type trunk
[Sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 20
[Sw2interface Eth-Trunk12 //创建et-trunk12
[sw2-Eth-Trunk12]trunkport GigabitEthernet 0/0/22
[sw2-Eth-Trunk12]trunkport GigabitEthernet 0/0/23
[sw2-Eth-Trunk12]trunkport GigabitEthernet 0/0/24 //接口放入et-trunk12中
[sw2-Eth-Trunk12]mode lacp-static //设置LACP为静态模式
[sw2-Eth-Trunk12] max active-linknumber 2 //最大通行链路为2条
[sw2-Eth-Trunk12]lacp preempt delay 20 //开启抢占延时为20 s
[sw2-Eth-Trunk12] port link-type trunk //打上trunk
[sw2-Eth-Trunk12] port trunk allow-pass vlan 2 to 20 //放行VLAN2到VLAN20通过
Sw3:
[Sw3]interface gigabitethernet 0/0/3
[Sw3-GigabitEthernet0/0/3 ]port link-type trunk
[Sw3-GigabitEthernet1/0/3]port trunk allow-pass vlan 2 to 20
[Sw3]interface gigabitethernet 1/0/2
[Sw3-GigabitEthernet1/0/2 ]port link-type trunk
[Sw3-GigabitEthernet1/0/2]port trunk allow-pass vlan 2 to 20
[Sw3]interface gigabitethernet 0/0/1
[Sw3-GigabitEthernet0/0/1 ]port link-type access
[Sw3-GigabitEthernet0/0/1]port default vlan 2
Sw4:
[Sw4]interface gigabitethernet 0/0/3
[Sw4-GigabitEthernet0/0/3 ]port link-type trunk
[Sw4-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 20
[Sw4]interface gigabitethernet 0/0/2
[Sw4-GigabitEthernet1/0/2 ]port link-type trunk
[Sw4-GigabitEthernet1/0/2]port trunk allow-pass vlan 2 to 20
[Sw4]interface gigabitethernet 1/0/1
[Sw4-GigabitEthernet0/0/1 ]port link-type access
[Sw4-GigabitEthernet0/0/1]port default vlan 11
结果验证:
[Sw1]display stp brief
[Sw2]display stp brief
[Sw3]display stp brief
[Sw4]display stp brief
留言与评论(共有 0 条评论) “” |