60-MVRP典型配置举例
本章节下载: 60-MVRP典型配置举例 (233.48 KB)
H3C S6860产品MVRP典型配置举例
Copyright © 2018 新华三技术有限公司 版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。
本文档中的信息可能变动,恕不另行通知。
目 录
本文档介绍了MVRP(Multiple VLAN Registration Protocol,多VLAN注册协议)的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解MVRP特性。
如图1所示:
· Device A和Device B为核心层设备,Device C和Device D为汇聚层设备;所有设备的端口均允许VLAN 11~30通过。
· 通过MSTP功能,Device C和Device D的VLAN 11~20报文、VLAN 21~30报文沿不同链路分别上行到Device A和Device B,达到流量负载分担和链路备份的目的。
现要求通过配置MVRP功能简化VLAN配置工作,实现:
· 在Device A上创建VLAN 11~30后,VLAN配置信息可同步到其他设备,并与网络拓扑同步更新。
· 在网络稳定后,配置Device B上与Device A相连端口的MVRP注册模式为Fixed模式,使该端口注册的动态VLAN不被注销。
图1 MVRP组网图
· 配置MSTP功能时,为了使所有设备属于同一MST域,在所有设备上配置相同的如下参数:
¡ 生成树的工作模式(使用缺省的MSTP模式,无需配置)
¡ 域名(本例配置为test)
¡ 修订级别(缺省为0,无需配置)
¡ VLAN映射表(本例将VLAN 11~20映射到MSTI 1,VLAN 21~30映射到MSTI 2)
· 为了使MSTI 1和MSTI 2拓扑中的上行链路不同并互相作为冗余备份,配置Device A为MSTI 1的根桥,Device B为MSTI 2的根桥。
· 由于MVRP需要基于MSTI运行,网络中的设备都需要至少存在一个MSTI对应的VLAN以保证MSTI能够生效。本例中,每台设备都创建MSTI 1对应的VLAN 11,以及MSTI 2对应的VLAN 21。
· 由于MVRP功能只能在Trunk端口上生效,配置MVRP实体的端口链路类型为Trunk类型。
本举例是在S6860-CMW710-R2612版本上进行配置和验证的。
· MVRP功能只能与STP、RSTP或MSTP配合使用,而无法与其他二层网络拓扑协议(如业务环回、PVST、RRPP和Smart Link)配合使用。MVRP报文的收发不受STP/RSTP/MSTP阻塞端口影响。
· 在二层聚合接口上启用了MVRP功能后,会同时在二层聚合接口和对应的所有选中成员端口上进行动态VLAN的注册或注销。
· 如果二层以太网接口加入了聚合组,则加入聚合组之前和加入聚合组之后在该接口上进行的MVRP相关配置不会生效,该接口退出聚合组后,MVRP的配置才会生效。
# 创建VLAN 11~30。
<DeviceA> system-view
[DeviceA] vlan 11 to 30
# 配置MST域的域名为test,将VLAN 11~20映射到MSTI 1,VLAN 21~30映射到MSTI 2,并激活MST域的配置。
[DeviceA] stp region-configuration
[DeviceA-mst-region] region-name test
[DeviceA-mst-region] instance 1 vlan 11 to 20
[DeviceA-mst-region] instance 2 vlan 21 to 30
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit
# 配置本设备为MSTI 1的根桥。
[DeviceA] stp instance 1 root primary
# 全局使能生成树协议。
[DeviceA] stp global enable
# 全局使能MVRP功能。
# 将设备的各端口配置为Trunk端口,允许VLAN 11~30通过,并使能MVRP。
[DeviceA] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/3
[DeviceA-if-range] port link-type trunk
[DeviceA-if-range] port trunk permit vlan 11 to 30
[DeviceA-if-range] mvrp enable
[DeviceA-if-range] quit
# 创建VLAN 11和VLAN 21。
<DeviceB> system-view
[DeviceB] vlan 11
[DeviceB-vlan11] quit
[DeviceB] vlan 21
[DeviceB-vlan21] quit
# 配置MST域的域名为test,将VLAN 11~20映射到MSTI 1,VLAN 21~30映射到MSTI 2,并激活MST域的配置。
[DeviceB] stp region-configuration
[DeviceB-mst-region] region-name test
[DeviceB-mst-region] instance 1 vlan 11 to 20
[DeviceB-mst-region] instance 2 vlan 21 to 30
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit
# 配置本设备为MSTI 2的根桥。
[DeviceB] stp instance 2 root primary
# 全局使能生成树协议。
[DeviceB] stp global enable
# 全局使能MVRP功能。
[DeviceB] mvrp global enable
# 将设备的各端口配置为Trunk端口,允许VLAN 11~30通过,并使能MVRP。
[DeviceB] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/3
[DeviceB-if-range] port link-type trunk
[DeviceB-if-range] port trunk permit vlan 11 to 30
[DeviceB-if-range] mvrp enable
[DeviceB-if-range] quit
Device D的配置与Device C相同,这里以Device C为例。
# 创建VLAN 11和VLAN 21。
<DeviceC> system-view
[DeviceC] vlan 11
[DeviceC-vlan11] quit
[DeviceC] vlan 21
[DeviceC-vlan21] quit
# 配置MST域的域名为test,将VLAN 11~20映射到MSTI 1,VLAN 21~30映射到MSTI 2,并激活MST域的配置。
[DeviceC] stp region-configuration
[DeviceC-mst-region] region-name test
[DeviceC-mst-region] instance 1 vlan 11 to 20
[DeviceC-mst-region] instance 2 vlan 21 to 30
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# 全局使能生成树协议。
[DeviceC] stp global enable
# 全局使能MVRP功能。
[DeviceC] mvrp global enable
# 将设备的各端口配置为Trunk端口,允许VLAN 11~30通过,并使能MVRP。
[DeviceC] interface range ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/2
[DeviceC-if-range] port link-type trunk
[DeviceC-if-range] port trunk permit vlan 11 to 30
[DeviceC-if-range] mvrp enable
[DeviceC-if-range] quit
通过使用display stp brief命令可以查看生成树的简要信息,验证各VLAN对应的网络拓扑是否正确形成。
# 查看Device A上生成树的简要信息。
[DeviceA] display stp brief
MST ID Port Role STP State Protection
...
1 Ten-GigabitEthernet1/0/1 DESI FORWARDING NONE
1 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE
1 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE
2 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
2 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE
2 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE
# 查看Device B上生成树的简要信息。
[DeviceB] display stp brief
MST ID Port Role STP State Protection
...
1 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
1 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE
1 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE
2 Ten-GigabitEthernet1/0/1 DESI FORWARDING NONE
2 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE
2 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE
# 查看Device C上生成树的简要信息。
[DeviceC] display stp brief
MST ID Port Role STP State Protection
...
1 Ten-GigabitEthernet1/0/1 ALTE DISCARDING NONE
1 Ten-GigabitEthernet1/0/2 ROOT FORWARDING NONE
2 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
2 Ten-GigabitEthernet1/0/2 ALTE DISCARDING NONE
# 查看Device D上生成树的简要信息。
[DeviceD] display stp brief
MST ID Port Role STP State Protection
...
1 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
1 Ten-GigabitEthernet1/0/2 ALTE DISCARDING NONE
2 Ten-GigabitEthernet1/0/1 ALTE DISCARDING NONE
2 Ten-GigabitEthernet1/0/2 ROOT FORWARDING NONE
根据上述显示信息中MST ID为1和2的ALTE端口(阻塞端口),可以绘出MSTI 1和MSTI 2的拓扑,如图2所示。
图2 MSTI 1和MSTI 2的拓扑
通过使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,验证Device A上配置的VLAN 11~30是否同步到了其他设备。
(1) 查看Device A上的本地VLAN信息。
[DeviceA] display mvrp running-status
-------[MVRP Global Info] -------
Global Status : Enabled
Compliance-GVRP : False
----[Ten-GigabitEthernet1/0/1] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11, 21
Declared VLANs :
1(default), 11-30
Propagated VLANs :
1(default), 11, 21
----[Ten-GigabitEthernet1/0/2] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11
Declared VLANs :
1(default), 11-30
Propagated VLANs :
1(default), 11
----[Ten-GigabitEthernet1/0/3] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11
Declared VLANs :
1(default), 11-30
Propagated VLANs :
1(default), 11
由此可见,Device A的所有端口均向外声明了VLAN 11~30。
(2) 查看Device B上的本地VLAN信息。
[DeviceB] display mvrp running-status
-------[MVRP Global Info] -------
Global Status : Enabled
Compliance-GVRP : False
----[Ten-GigabitEthernet1/0/1] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11-30
Declared VLANs :
1(default), 11, 21
Propagated VLANs :
1(default), 11-30
----[Ten-GigabitEthernet1/0/2] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
21
Declared VLANs :
1(default), 11-30
Propagated VLANs :
21
----[Ten-GigabitEthernet1/0/3] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
21
Declared VLANs :
1(default), 11-30
Propagated VLANs :
21
由此可见:
· Device B的Ten-GigabitEthernet1/0/1(与Device A相连的端口)注册了VLAN 11~30,并在本设备传播了VLAN 11~30。
· 其他两个端口向外声明了VLAN 11~30。
(3) 查看Device C上的本地VLAN信息。
[DeviceC] display mvrp running-status
-------[MVRP Global Info] -------
Global Status : Enabled
Compliance-GVRP : False
----[Ten-GigabitEthernet1/0/1] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11-30
Declared VLANs :
21
Propagated VLANs :
21-30
----[Ten-GigabitEthernet1/0/2] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11-30
Declared VLANs :
1(default), 11
Propagated VLANs :
1(default), 11-20
· Device C的Ten-GigabitEthernet1/0/1(与Device B相连的端口)注册了VLAN 11~30;由于该端口在VLAN 11~20对应的MSTI 1中被阻塞,仅传播了VLAN 21~30。
· Device C的Ten-GigabitEthernet1/0/2(与Device A相连的端口)注册了VLAN 11~30;由于该端口在VLAN 21~30对应的MSTI 2中被阻塞,仅传播了VLAN 11~20。
(4) 查看Device D上的本地VLAN信息。
[DeviceD] display mvrp running-status
-------[MVRP Global Info] -------
Global Status : Enabled
Compliance-GVRP : False
----[Ten-GigabitEthernet1/0/1] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11-30
Declared VLANs :
1(default), 11
Propagated VLANs :
1(default), 11-20
----[Ten-GigabitEthernet1/0/2] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 11-30
Declared VLANs :
21
Propagated VLANs :
21-30
· Device D的Ten-GigabitEthernet1/0/1(与Device A相连的端口)注册了VLAN 11~30;由于该端口在VLAN 21~30对应的MSTI 2中被阻塞,仅传播了VLAN 11~20。
· Device D的Ten-GigabitEthernet1/0/2(与Device B相连的端口)注册了VLAN 11~30;由于该端口在VLAN 11~20对应的MSTI 1中被阻塞,仅传播了VLAN 21~30。
# 配置Device B上与Device A相连端口的MVRP注册模式为Fixed模式,使该端口注册的动态VLAN不被注销。
[DeviceB] interface ten-gigabitethernet 1/0/1
[DeviceB-Ten-GigabitEthernet1/0/1] mvrp registration fixed
[DeviceB-Ten-GigabitEthernet1/0/1] quit
# 在Device A上删除VLAN 30。
[DeviceA] undo vlan 30
# 查看Device B的端口Ten-GigabitEthernet1/0/1上MVRP本地VLAN的信息,验证VLAN 30是否仍然在注册状态。
[DeviceB] display mvrp running-status interface ten-gigabitethernet 1/0/1
-------[MVRP Global Info] -------
Global Status : Enabled
Compliance-GVRP : False
----[Ten-GigabitEthernet1/0/1] ----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Fixed
Registered VLANs :
1(default), 21-30
Declared VLANs :
1(default), 21
Propagated VLANs :
1(default), 21-30
由此可见,Device B的端口Ten-GigabitEthernet1/0/1配置Fixed模式后,该端口注册的动态VLAN信息不会发生变化。验证完后,在Device A上恢复创建VLAN 30。
[DeviceA] vlan 30
通过关闭Device C的端口Ten-GigabitEthernet1/0/2来引发网络拓扑变化,同时观察端口学习的动态VLAN信息是否同步更新。
(1) 关闭Device C的端口Ten-GigabitEthernet1/0/2前,查看该端口实际通过的VLAN信息。
[DeviceC] display interface ten-gigabitethernet 1/0/2
Ten-GigabitEthernet1/0/2
Current state: UP
Line protocol state: UP
...
Port link-type: Trunk
VLAN Passing: 1(default vlan), 11-30
VLAN permitted: 1(default vlan), 11-30
Trunk port encapsulation: IEEE 802.1q
...
由此可见,该端口实际通过的VLAN为缺省VLAN 1和VLAN 11~30。
(2) 关闭Device C的端口Ten-GigabitEthernet1/0/2,查看网络拓扑变化。
[DeviceC] interface ten-gigabitethernet 1/0/2
[DeviceC-Ten-GigabitEthernet1/0/2] shutdown
[DeviceC-Ten-GigabitEthernet1/0/2] quit
# 通过使用display stp brief命令在各设备上查看生成树的简要信息。以Device C和Device D为例:
[DeviceC] display stp brief
MST ID Port Role STP State Protection
0 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
1 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
2 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
[DeviceD] display stp brief
MST ID Port Role STP State Protection
0 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
0 Ten-GigabitEthernet1/0/2 ALTE DISCARDING NONE
1 Ten-GigabitEthernet1/0/1 ROOT FORWARDING NONE
1 Ten-GigabitEthernet1/0/2 ALTE DISCARDING NONE
2 Ten-GigabitEthernet1/0/1 ALTE DISCARDING NONE
2 Ten-GigabitEthernet1/0/2 ROOT FORWARDING NONE
根据显示信息中MST ID为1的ALTE端口(阻塞端口),可以绘出MSTI 1的拓扑,如图3所示。
图3 Device C的XGE1/0/2断开后的拓扑
(3) 查看Device C的端口Ten-GigabitEthernet1/0/2在关闭后实际通过的VLAN信息。
[DeviceC] display interface ten-gigabitethernet 1/0/2
...
Port link-type: Trunk
VLAN Passing: 1(default vlan), 11, 21
VLAN permitted: 1(default vlan), 11-30
Trunk port encapsulation: IEEE 802.1q
...
由此可见,该端口实际通过的VLAN为缺省VLAN 1以及本地创建的VLAN 11和VLAN 21,该端口没有学习到动态VLAN。关于设备上的动态VLAN,可用display vlan dynamic命令查看:
[DeviceC] display vlan dynamic
Dynamic VLANs: 18
The dynamic VLANs include:
12-20, 22-30
#
sysname DeviceA
#
mvrp global enable
#
vlan 1
#
vlan 11 to 30
#
stp region-configuration
region-name test
instance 1 vlan 11 to 20
instance 2 vlan 21 to 30
active region-configuration
#
stp instance 0 to 1 root primary
stp global enable
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
#
sysname DeviceB
#
mvrp global enable
#
vlan 1
#
vlan 11
#
vlan 21
#
stp region-configuration
region-name test
instance 1 vlan 11 to 20
instance 2 vlan 21 to 30
active region-configuration
#
stp instance 2 root primary
stp global enable
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Ten-GigabitEthernet1/0/3
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
#
sysname DeviceC
#
mvrp global enable
#
vlan 1
#
vlan 11
#
vlan 21
#
stp region-configuration
region-name test
instance 1 vlan 11 to 20
instance 2 vlan 21 to 30
active region-configuration
#
stp global enable
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
#
sysname DeviceD
#
mvrp global enable
#
vlan 1
#
vlan 11
#
vlan 21
#
stp region-configuration
region-name test
instance 1 vlan 11 to 20
instance 2 vlan 21 to 30
active region-configuration
#
stp global enable
#
interface Ten-GigabitEthernet1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Ten-GigabitEthernet1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
· H3C S6860系列以太网交换机 二层技术-以太网交换配置指导-Release 26xx系列
· H3C S6860系列以太网交换机 二层技术-以太网交换命令参考-Release 26xx系列
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!