• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

04-二层技术-以太网交换配置指导

目录

14-MVRP配置

本章节下载 14-MVRP配置  (301.38 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500/Configure/Operation_Manual/H3C_S12500_CG-R1828P04-6W182/04/201407/834575_30005_0.htm

14-MVRP配置


1 MVRP

1.1  MVRP简介

MRP(Multiple Register Protocol,多属性注册协议)作为一个属性注册协议的载体,可以用来传播属性消息。遵循MRP协议的应用实体称为MRP应用,MVRP(Multiple VLAN Register Protocol,多VLAN注册协议)就是MRP的应用之一。MRP和MVRP分别是GARP(Generic Attribute Registration Protocol,通用属性注册协议)及GVRP(GARP VLAN Registration Protocol,GARP VLAN注册协议)的升级版本,提高了属性声明效率,用于替代GARP和GVRP协议。MVRP用于在设备间发布并学习VLAN配置信息,使得设备能够自动同步VLAN配置,减少网管人员的配置工作。在网络拓扑变化后,MVRP根据新的拓扑重新发布及学习VLAN,做到实时与网络拓扑同步更新。有关GVRP的详细介绍,请参见“二层技术-以太网交换配置指导”中的“GVRP”。

1.1.1  MRP简介

与GARP提供的机制不同,MRP支持在基于MSTI(Multiple Spanning Tree Instance,多生成树实例)的基础上,用于协助同一局域网内各成员之间声明、传播和注册某种信息(如VLAN)。

1. MRP实现机制

设备上每一个参与协议的端口都可以视为一个应用实体,当MRP应用(如MVRP)在端口上启动之后,该端口就可视为一个MRP应用实体。

通过MRP机制,一个MRP应用实体上的配置信息会迅速传遍整个局域网。如图1-1所示,MRP应用实体通过发送两种协议报文:声明或回收声明,来通知其它MRP应用实体来注册或注销自己的属性信息,并根据其它MRP实体发来的声明或回收声明来注册或注销对方的属性信息。

图1-1 MRP实现机制示意图

 

2. MRP消息

MRP应用实体之间的信息交换借助于传递各种消息来完成,主要包括Join消息、New消息、Leave消息和LeaveAll消息,它们通过互相配合来确保信息的注册或注销。由于MVRP基于MRP实现,因此,MVRP也是通过MRP消息进行信息交互的。

(1)     Join消息

当一个MRP应用实体希望其它MRP实体注册自己的属性信息时,它会发送Join消息;当收到来自其它实体的Join消息或由于本实体静态配置了某些属性而需要其它实体进行注册时, 它也会发送Join消息。Join消息又分为JoinEmpty和JoinIn两种,二者的区别如下:

·     JoinEmpty:用于声明一个本身没有注册的属性。

·     JoinIn:用于声明一个本身已经注册的属性。

(2)     New消息

MSTP(Multiple Spanning Tree Protocol,多生成树协议)拓扑变化(这里指检测到MSTP的TcDetected事件)时,MRP应用实体需要向外发送New消息。当收到来自其它实体的New消息时,它也会发送New消息。New消息的作用和Join消息比较类似,都是为了实现属性的注册。

(3)     Leave消息

当一个MRP应用实体收到来自其它实体的Leave消息或由于本实体注销了某些属性而需要其它实体进行注销时,它也会发送Leave消息。

(4)     LeaveAll消息

每个MRP应用实体启动时都会启动各自的LeaveAll定时器,当该定时器超时后,该MRP实体就会对外发送LeaveAll消息。LeaveAll消息用来注销所有的属性,以使其它MRP实体重新注册本实体上所有的属性信息,从而周期性地清除网络中的垃圾属性;当收到来自其它实体的LeaveAll消息时,该MRP实体会根据其属性状态决定是否发送Join消息要求发送LeaveAll的实体重新注册。在发送LeaveAll消息同时MRP实体重新启动LeaveAll定时器,开始新的一轮循环。

3. MRP定时器

MRP定义了四种定时器,用于控制各种MRP消息的发送。

(1)     Periodic定时器

每个MRP应用实体启动时都会启动各自的Periodic定时器,来控制MRP消息的发送。该定时器超时前,MRP应用实体需要发送MRP消息时,不会立即将该消息发送出去,而是在该定时器超时后,将此时间间隔内待发送的所有MRP消息封装成尽可能少的报文发送出去,这样减少了报文发送数量,同时可以定期发送报文。随后再重新启动Periodic定时器,开始新一轮的循环。

说明

Periodic定时器允许用户通过命令行开启或关闭。如果关闭Periodic定时器,则不再周期发送MRP消息。

 

(2)     Join定时器

Join定时器用来控制消息的发送。为了保证消息能够可靠地传输到其它实体,MRP应用实体在发出Join消息后将等待一个Join定时器的时间间隔。如果在该定时器超时前收到了其它实体发来的JoinIn消息,便不再重发该Join消息。在该定时器超时后,如果此时Periodic定时器也超时,它将重发一次该Join消息;否则不发送该Join消息。

(3)     Leave定时器

Leave定时器用来控制属性的注销。当MRP应用实体希望其它实体注销自己的某属性信息时会发送Leave消息,收到该消息的实体将启动Leave定时器,只有在该定时器超时前没有收到该属性信息的Join消息,该属性信息才会被注销。

(4)     LeaveAll定时器

每个MRP应用实体启动时都会启动各自的LeaveAll定时器,当该定时器超时后,该MRP实体就会对外发送LeaveAll消息,以使其它实体重新注册本实体上所有的属性信息。随后再重新启动LeaveAll定时器,开始新一轮的循环。收到LeaveAll消息的实体将重新启动LeaveAll定时器。

说明

尽管全网各设备上LeaveAll定时器的值有可能不同,但这些设备都将以相邻端口的LeaveAll定时器的最小值为周期来发送LeaveAll消息,并且,下次重启后,各个端口的LeaveAll定时器的值都将在一定范围内随机变动。

 

4. MRP协议报文封装格式

图1-1 MRP协议报文封装格式

 

图1-1所示,MRP协议报文采用IEEE 802.3 Ethernet封装格式,其中主要字段的说明如表1-1所示。

表1-1 MRP协议报文主要字段说明

字段

说明

MRPDU

封装在MRP协议报文中的MRPDU(Protocol Data Unit,协议数据单元)

Protocol Version

协议版本号,目前为0

Message

属性消息,每个消息都由Attribute Type,Attribute Length和Attribute List三个字段构成

End Mark

属性及消息的结束标记,取值为0x00

Attribute Type

属性类型,目前使用的是VID Vector属性类型,取值为1

Attribute Length

FirstValue字段的长度取值,在MVRP中规定其取值为2

Attribute List

属性列表,由多个属性构成

Vector Attribute

属性,每个属性都由VectorHeader,FirstValue和Vector这三个字段构成

Vector Header

向量头域,每个向量头域由LeaveAllEvent和NumberOfValues这两个字段构成

First Value

起始属性值,长度为2字节

Vector

属性数据,每个字节代表3个属性的动作值,动作值分别定义为:

·     0x00: New operator

·     0x01: JoinIn operator

·     0x02: In operator

·     0x03: JoinMt operator

·     0x04: Mt operator

·     0x05: Lv operator

设共用同一个字节的3个属性的动作值分别为A1、 A2和A3,则A1A2A3对应的字节值应该为:((A1 * 6 + A2) * 6) + A3,取值范围在[0, 255]

LeaveAll Event

是否为LeaveAll操作:

·     0表示非LeaveAll操作

·     1表示LeaveAll操作

Number of Values

Vector字段中包含的属性值数量,长度为13bits

 

MRP协议报文以特定组播MAC地址为目的MAC,如MVRP的目的MAC地址为01-80-C2-00-00-21,Type为88F5。当设备在收到MRP应用实体的报文后,会根据其目的MAC地址分发给不同的MRP应用进行处理。

1.1.2  MVRP实现

1. MVRP概述

MVRP是MRP应用的一种,它基于MRP的工作机制来维护设备中的VLAN动态注册信息,并将该信息向其它设备传播:当设备启动了MVRP之后,就能够接收来自其它设备的VLAN注册信息,并动态更新本地的VLAN注册信息,包括当前的VLAN成员及这些VLAN成员可通过哪个端口到达等;此外,设备还能够将本地的VLAN注册信息向其它设备传播,从而使同一局域网内所有设备的VLAN信息都达成一致。

MVRP传播的VLAN注册信息既包括本地手工配置的静态注册信息,也包括来自其它设备的动态注册信息。

2. MVRP实现机制

MVRP协议实现VLAN属性注册和注销的方式如下:

l     当端口收到一个VLAN属性的声明时,该端口将注册该声明中所包含的VLAN属性(即,该端口加入到该VLAN中)。

l     当端口收到一个VLAN属性的回收声明时,该端口将注销该声明中所包含的VLAN属性 (即,该端口退出该VLAN)。

说明

图1-1可以看作是MVRP协议在某一个MSTI上的实现机制,属于比较简单的一种情况,在实际应用的复杂组网情况下,可能存在多个MSTI,而VLAN的注册和注销只会在各自的MSTI上进行。有关MSTI的详细介绍,请参见“二层技术-以太网交换配置指导”中的“生成树”。

 

3. MVRP的注册模式

我们将通过手工创建的VLAN称为静态VLAN,通过MVRP协议创建的VLAN称为动态VLAN。MVRP有三种注册模式,不同注册模式对静态VLAN和动态VLAN的处理方式也不同。

(1)     Normal模式

该模式下的接口允许进行动态VLAN的注册或注销,并允许发送动态和静态VLAN的声明。

(2)     Fixed模式

该模式下的接口禁止动态VLAN的注销,但允许发送动态和静态VLAN的声明,收到的MVRP报文会被忽略丢弃。也就是说,该模式下的Trunk接口,学习到的动态VLAN是不会被注销的,同时也不会学习到新的动态VLAN。

(3)     Forbidden模式

该模式下的接口禁止进行动态VLAN的注册,但允许发送动态和静态VLAN的声明,收到的MVRP报文会被忽略丢弃。也就是说,该模式下的Trunk接口,不允许进行动态VLAN的注册,一旦学习到的动态VLAN被注销后,不会重新进行学习。

1.1.3  协议规范

与MVRP相关的协议规范有:

·     IEEE 802.1ak:IEEE Standard for Local and Metropolitan Area Networks: Virtual Bridged Local Area Networks – Amendment 07:Multiple Registration Protocol

1.2  MVRP配置任务简介

表1-2 MVRP配置任务简介

配置任务

说明

详细配置

配置MVRP功能

必选

1.3 

配置MRP定时器

可选

1.4 

配置兼容GVRP功能

可选

1.5 

 

说明

对于MVRP的相关配置来说:

l     以太网接口视图下的配置或二层聚合接口视图下的配置只对当前接口有效;端口组视图下的配置对当前端口组中的所有端口有效。

l     聚合成员端口上的配置只有当该端口退出聚合组后才会生效。

 

1.3  配置MVRP功能

在使能端口的MVRP功能之前,必须先全局使能MVRP功能。此外,MVRP功能只能配置在Trunk端口上,并且需要通过配置来保证所有动态注册的VLAN都能够从该端口通过。

注意

l     MVRP功能与业务环回功能互斥,两者不可以同时应用。

l     MVRP功能只能与STP、RSTP或MSTP配合使用,而无法与其它二层网络拓扑协议(如PVST、RRPP和Smart Link)配合使用。MVRP报文的收发不受STP/RSTP/MSTP阻塞端口影响。有关STP、RSTP、MSTP和PVST的详细介绍,请参见“二层技术-以太网交换配置指导”中的“生成树”;有关RRPP和Smart Link的详细介绍,请参见“可靠性配置指导”中的“RRPP”和“Smart Link”。

l     建议不要同时启用远程端口镜像功能和MVRP功能,否则MVRP可能将远程镜像VLAN注册到不希望的端口上,导致镜像目的端口会收到很多不必要的报文。有关远程端口镜像的详细介绍,请参见“网络管理和监控配置指导”中的“镜像”。

l     在二层聚合接口上启用了MVRP功能后,会同时在二层聚合接口和对应的所有选中成员端口上进行动态VLAN的注册或注销。

l     由于MVRP需要基于MSTI运行,因此在配置MVRP时,需要保证当前网络内所有MSTI都生效,即网络中设备都需要至少存在一个MSTI对应的VLAN以保证MSTI能够生效。

 

表1-3 配置MVRP功能

操作

命令

说明

进入系统视图

system-view

-

全局使能MVRP功能

mvrp global enable

必选

缺省情况下,全局的MVRP功能处于关闭状态

进入相应视图

进入以太网接口或二层聚合接口视图

interface interface-type interface-number

二者必选其一

进入端口组视图

port-group manual port-group-name

配置端口的链路类型为Trunk类型

port link-type trunk

必选

缺省情况下,端口的链路类型为Access类型

允许所有VLAN都通过当前Trunk端口

port trunk permit vlan all

必选

缺省情况下,Trunk端口只允许VLAN 1通过

在端口上使能MVRP功能

mvrp enable

必选

缺省情况下,端口上的MVRP功能处于关闭状态

配置MVRP端口的注册模式

mvrp registration { fixed | forbidden | normal }

可选

缺省情况下,MVRP端口的注册模式为Normal模式

 

说明

有关port link-type trunkport trunk permit vlan all命令的详细介绍,请参见“二层技术-以太网交换命令参考”中的“VLAN”。

 

1.4  配置MRP定时器

说明

l     MRP定时器值的改变将应用于当前端口所有运行的MRP应用(如MVRP)上。MRP定时器的配置值建议全网配置一致,否则在配置不匹配的情况下会出现VLAN频繁注册/注销的情况。

l     设备的每个端口上都独立维护自己的Periodic定时器、Join定时器和LeaveAll定时器,而每个端口的每个属性上维护着一个Leave定时器。

 

表1-4 配置MRP定时器

操作

命令

说明

进入系统视图

system-view

-

进入相关视图

进入以太网接口或二层聚合接口视图

interface interface-type interface-number

二者必选其一

进入端口组视图

port-group manual port-group-name

配置LeaveAll定时器

mrp timer leaveall timer-value

可选

缺省情况下,LeaveAll定时器的值为1000厘秒

配置Join定时器

mrp timer join timer-value

可选

缺省情况下,Join定时器的值为20厘秒

配置Leave定时器

mrp timer leave timer-value

可选

缺省情况下,Leave定时器的值为60厘秒

配置Periodic定时器

mrp timer periodic timer-value

可选

缺省情况下,Periodic定时器的值为100厘秒

 

1-5所示,MRP定时器(Join定时器、Leave定时器、LeaveAll定时器)的取值范围之间存在着相互制约的关系:

·     当配置某定时器时,如果配置值超出了该定时器当前有效的取值范围,则该配置无效。用户可以通过改变相关定时器的值来重新进行配置。

·     当用户欲恢复各定时器的值为缺省值时,须按照Join定时器->Leave定时器->LeaveAll定时器的顺序依次恢复。Periodic定时器的值可以在任何时刻恢复为缺省值。

表1-5 各MRP定时器取值范围间的制约关系

定时器

取值下限

取值上限

Join定时器

20厘秒

小于Leave定时器值的一半

Leave定时器

大于Join定时器值的两倍

小于LeaveAll定时器的值

LeaveAll定时器

大于所有端口上Leave定时器的值

小于32765厘秒

 

1.5  配置兼容GVRP功能

注意

l     在配置兼容GVRP功能后,MVRP功能只能与STP或RSTP配合使用,而不能与MSTP配合使用,否则可能会造成网络工作的不正常。

l     在配置兼容GVRP功能后,建议关闭MVRP的Periodic定时器,否则在系统繁忙时,容易造成VLAN状态频繁改变。

 

MVRP允许兼容GVRP。当对端设备支持GVRP功能时,可以通过配置兼容GVRP功能,允许本端设备同时接收发送MVRP和GVRP报文。

表1-6 配置兼容GVRP功能

操作

命令

说明

进入系统视图

system-view

-

配置MVRP工作在兼容GVRP的模式

mvrp gvrp-compliance enable

必选

缺省情况下,MVRP不兼容GVRP模式

 

1.6  MVRP显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示配置后MRP或MVRP的运行情况,通过查看显示信息验证配置的效果。

在用户视图下执行reset命令可以清除MVRP的统计信息。

表1-7 MVRP显示和维护

操作

命令

显示指定端口及VLAN的各MVRP接口状态信息

display mvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include } regular-expression ]

显示MVRP的运行状态信息

display mvrp running-status [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

显示MVRP的统计信息

display mvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

显示端口上当前的动态VLAN操作信息

display mvrp vlan-operation interface interface-type interface-number  [ | { begin | exclude | include } regular-expression ]

清除端口上MRP的统计信息

reset mvrp statistics [ interface interface-list ]

 

1.7  MVRP典型配置举例

1.7.1  MVRP Normal注册模式配置举例

1. 组网需求

·     如图1-2所示,Device A、Device B、Device C和Device D分别相连。

·     通过配置MSTP,使不同VLAN的报文按照不同的MSTI转发:VLAN 10的报文沿MSTI 1转发,VLAN 20沿MSTI 2转发,其它VLAN沿MSTI 0转发。

·     通过启用MVRP功能,并配置MVRP的注册模式为Normal模式,来实现Device A、Device B、Device C和Device D之间的所有动态和静态VLAN的注册和注销。

2. 组网图

图1-2 MVRP Normal注册模式配置组网图

 

3. 配置步骤

(1)     配置Device A

# 进入MST域视图。

<DeviceA> system-view

[DeviceA] stp region-configuration

# 配置MST域的域名、VLAN映射关系和修订级别。

[DeviceA-mst-region] region-name example

[DeviceA-mst-region] instance 1 vlan 10

[DeviceA-mst-region] instance 2 vlan 20

[DeviceA-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceA-mst-region] active region-configuration

[DeviceA-mst-region] quit

# 定义Device A为MSTI 1的根桥。

[DeviceA] stp instance 1 root primary

# 全局使能生成树协议。

[DeviceA] stp enable

# 全局使能MVRP功能。

[DeviceA] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk口,并允许所有VLAN通过。

[DeviceA] interface GigabitEthernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] port link-type trunk

[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceA-GigabitEthernet3/0/1] mvrp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 将端口GigabitEthernet3/0/2配置为Trunk口,并允许VLAN 40通过。

[DeviceA] interface GigabitEthernet 3/0/2

[DeviceA-GigabitEthernet3/0/2] port link-type trunk

[DeviceA-GigabitEthernet3/0/2] port trunk permit vlan 40

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceA-GigabitEthernet3/0/2] mvrp enable

[DeviceA-GigabitEthernet3/0/2] quit

# 将端口GigabitEthernet3/0/3配置为Trunk口,并允许所有VLAN通过。

[DeviceA] interface GigabitEthernet 3/0/3

[DeviceA-GigabitEthernet3/0/3] port link-type trunk

[DeviceA-GigabitEthernet3/0/3] port trunk permit vlan all

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceA-GigabitEthernet3/0/3] mvrp enable

[DeviceA-GigabitEthernet3/0/3] quit

# 配置静态VLAN 10。

[DeviceA] vlan 10

[DeviceA-vlan10] return

(2)     配置Device B

# 进入MST域视图。

<DeviceB> system-view

[DeviceB] stp region-configuration

# 配置MST域的域名、VLAN映射关系和修订级别。

[DeviceB-mst-region] region-name example

[DeviceB-mst-region] instance 1 vlan 10

[DeviceB-mst-region] instance 2 vlan 20

[DeviceB-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceB-mst-region] active region-configuration

[DeviceB-mst-region] quit

# 定义Device B为MSTI 2的根桥。

[DeviceB] stp instance 2 root primary

# 全局使能生成树协议。

[DeviceB] stp enable

# 开启全局MVRP功能。

[DeviceB] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk口,并允许VLAN 20、VLAN 40通过。

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] port link-type trunk

[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan 20 40

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceB-GigabitEthernet3/0/1] mvrp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 将端口GigabitEthernet3/0/2配置为Trunk口,并允许所有VLAN通过。

[DeviceB] interface GigabitEthernet 3/0/2

[DeviceB-GigabitEthernet3/0/2] port link-type trunk

[DeviceB-GigabitEthernet3/0/2] port trunk permit vlan all

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceB-GigabitEthernet3/0/2] mvrp enable

[DeviceB-GigabitEthernet3/0/2] quit

# 将端口GigabitEthernet3/0/3配置为Trunk口,并允许所有VLAN通过。

[DeviceB] interface GigabitEthernet 3/0/3

[DeviceB-GigabitEthernet3/0/3] port link-type trunk

[DeviceB-GigabitEthernet3/0/3] port trunk permit vlan all

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceB-GigabitEthernet3/0/3] mvrp enable

[DeviceB-GigabitEthernet3/0/3] quit

# 配置静态VLAN 20。

[DeviceB] vlan 20

[DeviceB-vlan20] return

(3)     配置Device C

# 进入MST域视图。

<DeviceC> system-view

[DeviceC] stp region-configuration

# 配置MST域的域名、VLAN映射关系和修订级别。

[DeviceC-mst-region] region-name example

[DeviceC-mst-region] instance 1 vlan 10

[DeviceC-mst-region] instance 2 vlan 20

[DeviceC-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceC-mst-region] active region-configuration

[DeviceC-mst-region] quit

# 全局使能生成树协议。

[DeviceC] stp enable

# 全局使能MVRP功能。

[DeviceC] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk口,并允许所有VLAN通过。

[DeviceC] interface GigabitEthernet 3/0/1

[DeviceC-GigabitEthernet3/0/1] port link-type trunk

[DeviceC-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceC-GigabitEthernet3/0/1] mvrp enable

[DeviceC-GigabitEthernet3/0/1] quit

# 将端口GigabitEthernet3/0/2配置为Trunk口,并允许所有VLAN通过。

[DeviceC] interface GigabitEthernet 3/0/2

[DeviceC-GigabitEthernet3/0/2] port link-type trunk

[DeviceC-GigabitEthernet3/0/2] port trunk permit vlan all

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceC-GigabitEthernet3/0/2] mvrp enable

[DeviceC-GigabitEthernet3/0/2] quit

# 将端口GigabitEthernet3/0/3配置为Trunk口,并允许VLAN30、VLAN 40通过。

[DeviceC] interface GigabitEthernet 3/0/3

[DeviceC-GigabitEthernet3/0/3] port link-type trunk

[DeviceC-GigabitEthernet3/0/3] port trunk permit vlan 30 40

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceC-GigabitEthernet3/0/3] mvrp enable

[DeviceC-GigabitEthernet3/0/3] return

(4)     配置Device D

# 进入MST域视图。

<DeviceD> system-view

[DeviceD] stp region-configuration

# 配置MST域的域名、VLAN映射关系和修订级别。

[DeviceD-mst-region] region-name example

[DeviceD-mst-region] instance 1 vlan 10

[DeviceD-mst-region] instance 2 vlan 20

[DeviceD-mst-region] revision-level 0

# 手工激活MST域的配置。

[DeviceD-mst-region] active region-configuration

[DeviceD-mst-region] quit

# 全局使能生成树协议。

[DeviceD] stp enable

# 全局使能MVRP功能。

[DeviceD] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk口,并允许VLAN 20,40通过。

[DeviceD] interface GigabitEthernet 3/0/1

[DeviceD-GigabitEthernet3/0/1] port link-type trunk

[DeviceD-GigabitEthernet3/0/1] port trunk permit vlan 20 40

# 在端口GigabitEthernet3/0/1上使能MVRP。

[DeviceD-GigabitEthernet3/0/1] mvrp enable

[DeviceD-GigabitEthernet3/0/1] quit

# 将端口GigabitEthernet3/0/2配置为Trunk口,并允许VLAN 40通过。

[DeviceD] interface GigabitEthernet 3/0/2

[DeviceD-GigabitEthernet3/0/2] port link-type trunk

[DeviceD-GigabitEthernet3/0/2] port trunk permit vlan 40

# 在端口GigabitEthernet3/0/2上使能MVRP。

[DeviceD-GigabitEthernet3/0/2] mvrp enable

[DeviceD-GigabitEthernet3/0/2] quit

# 将端口GigabitEthernet3/0/3配置为Trunk口,并允许所有30,40通过。

[DeviceD] interface GigabitEthernet 3/0/3

[DeviceD-GigabitEthernet3/0/3] port link-type trunk

[DeviceD-GigabitEthernet3/0/3] port trunk permit vlan 30 40

# 在端口GigabitEthernet3/0/3上使能MVRP。

[DeviceD-GigabitEthernet3/0/3] mvrp enable

[DeviceD-GigabitEthernet3/0/3] return

(5)      检验配置效果

通过使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,验证配置是否生效。

# 查看Device A上的本地VLAN信息。

<DeviceA> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 20,

由此可见,在端口GigabitEthernet3/0/1和端口GigabitEthernet3/0/2上通过MVRP学习到的VLAN信息只有VLAN 1。在端口GigabitEthernet3/0/3上通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device B上创建VLAN 20的动态VLAN信息。

# 查看Device B上的本地VLAN信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 10,

由此可见,在端口GigabitEthernet3/0/1和端口GigabitEthernet3/0/2上通过MVRP学习到的VLAN信息只有VLAN 1。在端口GigabitEthernet3/0/3上通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device A上创建VLAN 10的动态VLAN信息。

# 查看Device C上的本地VLAN信息。

<DeviceC> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 10,

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 20,

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

由此可见,在端口GigabitEthernet3/0/1上通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device A上创建VLAN 10的动态VLAN信息。在端口GigabitEthernet3/0/2上通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device B上创建VLAN 20的动态VLAN信息。在端口GigabitEthernet3/0/3上通过MVRP学习到的VLAN信息只有VLAN 1。

# 查看Device D上的本地VLAN信息。

<DeviceD> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 20,

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

由此可见,在端口GigabitEthernet3/0/1上通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device B上创建VLAN 20的动态VLAN信息。在端口GigabitEthernet3/0/2和端口GigabitEthernet3/0/3上通过MVRP学习到的VLAN信息只有VLAN 1。

1.7.2  MVRP Fixed注册模式配置举例

1. 组网需求

·     Device A和Device B分别通过各自的端口GigabitEthernet3/0/1相连。

·     通过启用MVRP功能,并配置MVRP的注册模式为Fixed模式,来实现Device A和Device B之间动态VLAN的禁止注销功能。

2. 组网图

图1-3 MVRP Fixed注册模式配置组网图

 

3. 配置步骤

(1)     配置Device A

# 全局使能MVRP功能。

<DeviceA> system-view

[DeviceA] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk端口,并允许所有VLAN通过。

[DeviceA] interface GigabitEthernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] port link-type trunk

[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceA-GigabitEthernet3/0/1] mvrp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 配置静态VLAN 2。

[DeviceA] vlan 2

[DeviceA-vlan2] return

(2)     配置Device B

# 全局使能MVRP功能。

<DeviceB> system-view

[DeviceB] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk端口,并允许所有VLAN通过。

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] port link-type trunk

[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceB-GigabitEthernet3/0/1] mvrp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 配置静态VLAN 3。

[DeviceB] vlan 3

[DeviceB-vlan3] return

(3)     检验配置效果

通过使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,验证配置是否生效。

# 查看Device A的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceA> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 3,

由此可见,通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device B上创建VLAN 3的动态VLAN信息。

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 2,

由此可见,通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device A上创建VLAN 2的动态VLAN信息。

(4)     Device B上配置端口Fixed模式

# 在端口GigabitEthernet3/0/1上配置Fixed模式。

<DeviceB> system-view

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] mvrp registration fixed

[DeviceB-GigabitEthernet3/0/1] return

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 2,

由此可见,此时端口GigabitEthernet3/0/1上的VLAN信息与没有配置Fixed模式时的VLAN信息相同。

(5)     Device A上删除静态VLAN 2

<DeviceA> system-view

[DeviceA] undo vlan 2

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 2,

由此可见, GigabitEthernet3/0/1端口配置Fixed模式后,端口学习的VLAN不会发生变化。

1.7.3  MVRP Forbidden注册模式配置举例

1. 组网需求

·     Device A和Device B分别通过各自的端口GigabitEthernet3/0/1相连。

·     通过启用MVRP功能,并配置MVRP的注册模式为Forbidden模式,来实现Device A和Device B之间动态VLAN的禁止注册功能。

2. 组网图

图1-4 MVRP Forbidden注册模式配置组网图

 

 

3. 配置步骤

(1)     配置Device A

# 全局使能MVRP功能。

<DeviceA> system-view

[DeviceA] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk端口,并允许所有VLAN通过。

[DeviceA] interface GigabitEthernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] port link-type trunk

[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceA-GigabitEthernet3/0/1] mvrp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 配置静态VLAN 2。

[DeviceA] vlan 2

[DeviceA-vlan2] return

(2)     配置Device B

# 全局使能MVRP功能。

<DeviceB> system-view

[DeviceB] mvrp global enable

# 将端口GigabitEthernet3/0/1配置为Trunk端口,并允许所有VLAN通过。

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] port link-type trunk

[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all

# 在端口GigabitEthernet3/0/1上使能MVRP功能。

[DeviceB-GigabitEthernet3/0/1] mvrp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 配置静态VLAN 3。

[DeviceB] vlan 3

[DeviceB-vlan3] return

(3)     检验配置效果

通过使用display mvrp running-status命令可以查看MVRP本地VLAN的信息,验证配置是否生效。

# 查看Device A的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceA> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 3,

由此可见,通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device B上创建VLAN 3的动态VLAN信息。

# 查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default), 2,

由此可见,通过MVRP学习到的VLAN信息包括VLAN 1,以及在Device A上创建VLAN 2的动态VLAN信息。

(4)     Device B上配置端口Forbidden模式

# 在端口GigabitEthernet3/0/1上配置Forbidden模式。

<DeviceB> system-view

[DeviceB] interface GigabitEthernet 3/0/1

[DeviceB-GigabitEthernet3/0/1] mvrp registration forbidden

[DeviceB-GigabitEthernet3/0/1] return

# 10秒后,查看Device B的端口GigabitEthernet3/0/1上MVRP本地VLAN的信息。

<DeviceB> display mvrp running-status

-------[MVRP Global Info]-------

Global Status     : Enabled

Compliance-GVRP   : False

 

----[GigabitEthernet3/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

Local VLANs :

  1(default),

由此可见,端口GigabitEthernet3/0/1通过MVRP学习到的VLAN信息不再包括在Device A上创建VLAN 2的动态VLAN信息,配置了Forbidden的端口保持了动态VLAN的注销状态。

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们