链路聚合,MSTP,VLAN综合配置

Posted 锅锅——Kk

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了链路聚合,MSTP,VLAN综合配置相关的知识,希望对你有一定的参考价值。

1.拓扑图
在这里插入图片描述pc5——pc12
192.168.1.10——192.168.1.80
pc5 pc9 vlan 10
pc6 pc10 vlan 20
pc7 pc11 vlan 30
pc8 pc12 vlan 40
2.要求 pc5 ping通 pc9, 交换机使用链路集合 ,使用生成树协议MSTP
配置如下:
[L1]配置
dis cu

version 7.1.075, Alpha 7571
sysname L1
#vlan配置
vlan 1

vlan 10

vlan 20

vlan 30

vlan 40
#MSTP配置
stp region-configuration
region-name kk1
instance 1 vlan 10
instance 2 vlan 20
instance 3 vlan 30
instance 4 vlan 40
active region-configuration

stp instance 1 root primary
stp global enable
#链路聚合组配置
interface Bridge-Aggregation1
port link-type trunk
port trunk permit vlan 1 10 20 30 40

interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 10
combo enable fiber

interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 20
combo enable fiber

interface GigabitEthernet1/0/3
port link-mode bridge
port access vlan 30
combo enable fiber

interface GigabitEthernet1/0/4
port link-mode bridge
port access vlan 40
combo enable fiber
#trunk配置
interface GigabitEthernet1/0/5
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 1

interface GigabitEthernet1/0/6
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber

interface GigabitEthernet1/0/7
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 1
[L2]配置
dis cu

version 7.1.075, Alpha 7571

sysname L2

vlan 1

vlan 10

vlan 20

vlan 30

vlan 40

stp region-configuration
region-name kk1
instance 1 vlan 10
instance 2 vlan 20
instance 3 vlan 30
instance 4 vlan 40
active region-configuration

stp instance 2 root primary
stp global enable
#两个链路聚合组
interface Bridge-Aggregation1
port link-type trunk
port trunk permit vlan 1 10 20 30 40

interface Bridge-Aggregation2
port link-type trunk
port trunk permit vlan 1 10 20 30 40

interface GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 2

interface GigabitEthernet1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 2

interface GigabitEthernet1/0/3
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 2

interface GigabitEthernet1/0/4
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 1

interface GigabitEthernet1/0/5
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber

interface GigabitEthernet1/0/6
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 1
[L3]配置
dis cu

version 7.1.075, Alpha 7571

sysname L3
vlan 1

vlan 10

vlan 20

vlan 30

vlan 40

stp region-configuration
region-name kk1
instance 1 vlan 10
instance 2 vlan 20
instance 3 vlan 30
instance 4 vlan 40
active region-configuration

stp instance 3 root primary
stp global enable

interface Bridge-Aggregation2
port link-type trunk
port trunk permit vlan 1 10 20 30 40

interface Bridge-Aggregation3
port link-type trunk
port trunk permit vlan 1 10 20 30 40

interface GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 2

interface GigabitEthernet1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40 100
combo enable fiber
port link-aggregation group 2

interface GigabitEthernet1/0/3
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 2

interface GigabitEthernet1/0/4
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 3

interface GigabitEthernet1/0/5
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber

interface GigabitEthernet1/0/6
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 3
[L4] 配置
dis cu

version 7.1.075, Alpha 7571

sysname L4

vlan 1

vlan 10

vlan 20

vlan 30

vlan 40

stp region-configuration
region-name kk1
instance 1 vlan 10
instance 2 vlan 20
instance 3 vlan 30
instance 4 vlan 40
active region-configuration

stp instance 4 root primary
stp global enable

interface Bridge-Aggregation3
port link-type trunk
port trunk permit vlan 1 10 20 30 40

interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 10
combo enable fiber

interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 20
combo enable fiber

interface GigabitEthernet1/0/3
port link-mode bridge
port access vlan 30
combo enable fiber

interface GigabitEthernet1/0/4
port link-mode bridge
port access vlan 40
combo enable fiber

interface GigabitEthernet1/0/5
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 3

interface GigabitEthernet1/0/6
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber

interface GigabitEthernet1/0/7
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 10 20 30 40
combo enable fiber
port link-aggregation group 3

return

3.经过如上配置,pc5可以和pc9 ping通了
如下:
在这里插入图片描述在这里插入图片描述

以上是关于链路聚合,MSTP,VLAN综合配置的主要内容,如果未能解决你的问题,请参考以下文章

链路聚合综合实验

中小企业综合布网实践配置

ENSP网络综合实验

Cisco交换机VLAN与TRUNK链路配置命令

MSTP+VRRP

MSTP+VRRP