09-MVRP典型配置举例
本章节下载: 09-MVRP典型配置举例 (237.80 KB)
目 录
本文档介绍了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类型。
表1 适用产品及版本
产品 |
软件版本 |
S6550X-HI系列 |
Release 1213P01及以上版本 |
S6880系列 |
Release 1213P01及以上版本 |
S9820-8M |
Release 1213P01及以上版本 |
S5580X-HI系列 |
Release 1213P01及以上版本 |
S5580X-EI系列 |
Release 1213P01及以上版本 |
S5580S-EI系列 |
Release 1213P01及以上版本 |
· MVRP功能只能与STP、RSTP或MSTP配合使用,而无法与其他二层网络拓扑协议(如业务环回、PVST、RRPP和Smart Link)同时配置。MVRP报文的收发不受STP/RSTP/MSTP阻塞端口影响。有关业务环回的详细介绍,请参见“二层技术-以太网交换配置指导”中的“业务环回组”;有关STP、RSTP、MSTP和PVST的详细介绍,请参见“二层技术-以太网交换配置指导”中的“生成树”;有关RRPP的详细介绍,请参见“可靠性配置指导”中的“RRPP”;有关Smart Link的详细介绍,请参见“可靠性配置指导”中的“Smart Link”。
· 建议不要同时启用远程端口镜像功能和MVRP功能,否则MVRP可能将远程镜像VLAN注册到错误的端口上,导致镜像目的端口会收到很多不必要的报文。有关远程端口镜像的详细介绍,请参见“网络管理和监控配置指导”中的“镜像”。
· 在二层聚合接口上启用了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 twenty-fivegige 1/0/1 to twenty-fivegige 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 twenty-fivegige 1/0/1 to twenty-fivegige 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 twenty-fivegige 1/0/1 to twenty-fivegige 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 Twenty-FiveGigE1/0/1 DESI FORWARDING NONE
1 Twenty-FiveGigE1/0/2 DESI FORWARDING NONE
1 Twenty-FiveGigE1/0/3 DESI FORWARDING NONE
2 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
2 Twenty-FiveGigE1/0/2 DESI FORWARDING NONE
2 Twenty-FiveGigE1/0/3 DESI FORWARDING NONE
# 查看Device B上生成树的简要信息。
[DeviceB] display stp brief
MST ID Port Role STP State Protection
...
1 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
1 Twenty-FiveGigE1/0/2 DESI FORWARDING NONE
1 Twenty-FiveGigE1/0/3 DESI FORWARDING NONE
2 Twenty-FiveGigE1/0/1 DESI FORWARDING NONE
2 Twenty-FiveGigE1/0/2 DESI FORWARDING NONE
2 Twenty-FiveGigE1/0/3 DESI FORWARDING NONE
# 查看Device C上生成树的简要信息。
[DeviceC] display stp brief
MST ID Port Role STP State Protection
...
1 Twenty-FiveGigE1/0/1 ALTE DISCARDING NONE
1 Twenty-FiveGigE1/0/2 ROOT FORWARDING NONE
2 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
2 Twenty-FiveGigE1/0/2 ALTE DISCARDING NONE
# 查看Device D上生成树的简要信息。
[DeviceD] display stp brief
MST ID Port Role STP State Protection
...
1 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
1 Twenty-FiveGigE1/0/2 ALTE DISCARDING NONE
2 Twenty-FiveGigE1/0/1 ALTE DISCARDING NONE
2 Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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的Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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的Twenty-FiveGigE1/0/1(与Device B相连的端口)注册了VLAN 11~30;由于该端口在VLAN 11~20对应的MSTI 1中被阻塞,仅传播了VLAN 21~30。
· Device C的Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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
----[Twenty-FiveGigE1/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的Twenty-FiveGigE1/0/1(与Device A相连的端口)注册了VLAN 11~30;由于该端口在VLAN 21~30对应的MSTI 2中被阻塞,仅传播了VLAN 11~20。
· Device D的Twenty-FiveGigE1/0/2(与Device B相连的端口)注册了VLAN 11~30;由于该端口在VLAN 11~20对应的MSTI 1中被阻塞,仅传播了VLAN 21~30。
# 配置Device B上与Device A相连端口的MVRP注册模式为Fixed模式,使该端口注册的动态VLAN不被注销。
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] mvrp registration fixed
[DeviceB-Twenty-FiveGigE1/0/1] quit
# 在Device A上删除VLAN 30。
[DeviceA] undo vlan 30
# 查看Device B的端口Twenty-FiveGigE1/0/1上MVRP本地VLAN的信息,验证VLAN 30是否仍然在注册状态。
[DeviceB] display mvrp running-status interface twenty-fivegige 1/0/1
-------[MVRP Global Info] -------
Global Status : Enabled
Compliance-GVRP : False
----[Twenty-FiveGigE1/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的端口Twenty-FiveGigE1/0/1配置Fixed模式后,该端口注册的动态VLAN信息不会发生变化。验证完后,在Device A上恢复创建VLAN 30。
[DeviceA] vlan 30
通过关闭Device C的端口Twenty-FiveGigE1/0/2来引发网络拓扑变化,同时观察端口学习的动态VLAN信息是否同步更新。
(1) 关闭Device C的端口Twenty-FiveGigE1/0/2前,查看该端口实际通过的VLAN信息。
[DeviceC] display interface twenty-fivegige 1/0/2
Twenty-FiveGigE1/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的端口Twenty-FiveGigE1/0/2,查看网络拓扑变化。
[DeviceC] interface twenty-fivegige 1/0/2
[DeviceC-Twenty-FiveGigE1/0/2] shutdown
[DeviceC-Twenty-FiveGigE1/0/2] quit
# 通过使用display stp brief命令在各设备上查看生成树的简要信息。以Device C和Device D为例:
[DeviceC] display stp brief
MST ID Port Role STP State Protection
0 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
1 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
2 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
[DeviceD] display stp brief
MST ID Port Role STP State Protection
0 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
0 Twenty-FiveGigE1/0/2 ALTE DISCARDING NONE
1 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
1 Twenty-FiveGigE1/0/2 ALTE DISCARDING NONE
2 Twenty-FiveGigE1/0/1 ALTE DISCARDING NONE
2 Twenty-FiveGigE1/0/2 ROOT FORWARDING NONE
根据显示信息中MST ID为1的ALTE端口(阻塞端口),可以绘出MSTI 1的拓扑,如图3所示。
图3 Device C的WGE1/0/2断开后的拓扑
(3) 查看Device C的端口Twenty-FiveGigE1/0/2在关闭后实际通过的VLAN信息。
[DeviceC] display interface twenty-fivegige 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 Twenty-FiveGigE1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Twenty-FiveGigE1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Twenty-FiveGigE1/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 Twenty-FiveGigE1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Twenty-FiveGigE1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Twenty-FiveGigE1/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 Twenty-FiveGigE1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Twenty-FiveGigE1/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 Twenty-FiveGigE1/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
interface Twenty-FiveGigE1/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 30
mvrp enable
#
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!