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

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

目录

15-MVRP配置

本章节下载 15-MVRP配置  (296.31 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/CE3000/CE3000-EI/Configure/Operation_Manual/H3C_CE3000-32F-EI_CG-Release_18xx-6W100/03/201403/822354_30005_0.htm

15-MVRP配置


1 MVRP

1.1  MVRP简介

MRP(Multiple Registration Protocol,多属性注册协议)作为一个属性注册协议的载体,可以用来传播属性消息。MVRP(Multiple VLAN Registration Protocol,多VLAN注册协议)是MRP的一种应用,用于在设备间发布并学习VLAN配置信息。当设备启动了MVRP之后,设备将本地的VLAN配置信息向其它设备传播,同时还能够接收来自其它设备的VLAN配置信息,并动态更新本地的VLAN配置信息(包括当前的VLAN成员及这些VLAN成员可通过哪个端口到达等),从而使所有设备的VLAN信息都达成一致,极大减轻了网络管理员的VLAN配置工作。在网络拓扑发生变化后,MVRP还能根据新的拓扑重新发布及学习VLAN,做到VLAN配置信息实时与网络拓扑同步更新。

MRP和MVRP分别是GARP(Generic Attribute Registration Protocol,通用属性注册协议)及GVRP(GARP VLAN Registration Protocol,GARP VLAN注册协议)的升级版本,用于替代GARP和GVRP协议。相比GVRP,MVRP有如下优点:

l     GVRP不支持MSTI(Multiple Spanning Tree Instance,多生成树实例),而MVRP支持在MSTI的基础上运行,从而为不同VLAN的冗余链路计算及负载分担实现提供了便利。

l     MVRP可以有效减少在传递同样多VLAN信息量时的报文数量,从而提高了属性声明效率。

有关GVRP的详细介绍,请参见“二层技术-以太网交换配置指导”中的“GVRP”。有关MSTI的详细介绍,请参见“二层技术-以太网交换配置指导”中的“生成树”。

1.1.1  MRP简介

MRP支持在基于MSTI的基础上,协助同一局域网内各成员之间声明、传播和注册某种信息(如VLAN)。

1. MRP实现机制

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

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

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

 

对于MVRP,实现VLAN属性注册和注销的方式如下:

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

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

说明

图1-1可以看作是MVRP协议在某个MSTI上的实现机制,属于比较简单的一种情况,在实际应用的复杂组网情况下,可能存在多个MSTI,而VLAN的注册和注销只会在各自的MSTI上进行。

 

2. MRP消息

MRP实体之间通过传递各种MRP消息来完成信息交换。MRP消息主要包括Join消息、New消息、Leave消息和LeaveAll消息,它们通过互相配合来确保信息的注册或注销。其中,Join消息和New消息属于声明协议报文,Leave消息和LeaveAll消息属于回收声明协议报文。

(1)     Join消息

l     当一个MRP实体配置了某些属性,需要其它MRP实体来注册自己的属性信息时,它会对外发送Join消息。

l     当一个MRP实体收到来自其它实体的Join消息时,它会向除发送该Join消息的实体外的其它实体发送Join消息。

Join消息又分为JoinEmpty和JoinIn两种,二者的区别如下:

l     JoinEmpty:用于声明一个本身没有注册的属性。比如设备上存在某静态VLAN,即使之后又通过MRP消息学习到该VLAN,也不会改变该VLAN在本设备上的属性,所以该VLAN不能算作注册属性,这时对应的Join消息就为JoinEmpty消息。

l     JoinIn:用于声明一个本身已经注册的属性。比如设备通过MRP消息学习到某VLAN,并在本设备上动态创建该VLAN,这时对应的Join消息就为JoinIn消息。

(2)     New消息

New消息的作用和Join消息比较类似,都是为了实现属性的注册。

l     当MSTP(Multiple Spanning Tree Protocol,多生成树协议)拓扑变化时,MRP实体需要对外发送New消息声明拓扑变化。

l     当一个MRP实体收到来自其它实体的New消息时,它会向除发送该New消息的实体外的其它实体发送New消息。

(3)     Leave消息

l     当一个MRP实体注销了某些属性,需要其它实体进行同步注销时,它会对外发送Leave消息。

l     当一个MRP实体收到来自其它实体的Leave消息时,它会向除发送该Leave消息的实体外的其它实体发送Leave消息。

(4)     LeaveAll消息

l     每个MRP实体启动时都会启动各自的LeaveAll定时器,当该定时器超时后,MRP实体就会向对端实体发送LeaveAll消息,使本实体和对端实体分别注销并重新注册所有的属性信息,从而周期性地清除网络中的垃圾属性。

l     当一个MRP实体收到来自对端实体的LeaveAll消息时,它会根据自身属性状态决定是否发送Join消息要求对端实体重新注册某属性信息。

3. MRP定时器

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

(1)     Periodic定时器

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

说明

Periodic定时器允许用户通过命令行开启或关闭。如果关闭Periodic定时器,则不再周期发送MRP消息,仅在LeaveAll定时器超时或者收到对端的LeaveAll消息的情况下会发送MRP消息。

 

(2)     Join定时器

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

(3)     Leave定时器

Leave定时器用来控制属性的注销。当MRP实体需要其它实体注销自己的某属性信息时会发送Leave消息,收到该消息的实体将启动Leave定时器。如果启动Leave定时器的实体直到该定时器超时还未收到该属性信息的Join消息,该属性信息才会被注销。当实体发送和收到LeaveAll消息时,也会启动Leave定时器,在Leave定时器超时后,如果未收到某些原有属性信息的Join消息,这些属性信息会被注销。

(4)     LeaveAll定时器

每个MRP实体启动时都会启动各自的LeaveAll定时器,当该定时器超时后,该MRP实体就会向对端实体发送LeaveAll消息,随后再重新启动LeaveAll定时器,开始新一轮的循环,对端实体在收到LeaveAll消息后也重新启动LeaveAll定时器。

说明

LeaveAll定时器具有抑制机制,即当某个MRP实体的LeaveAll定时器超时后,会向对端实体发送LeaveAll消息,对端实体在收到LeaveAll消息时,重启本实体的LeaveAll定时器,不再发送LeaveAll消息,从而有效抑制网络中的LeaveAll消息数。为了防止每次都是同一实体的LeaveAll定时器先超时,每次LeaveAll定时器重启时,LeaveAll定时器的值都将在一定范围内随机变动。

 

1.1.2  MVRP注册模式

MVRP传播的VLAN配置信息既包括本地手工配置的静态信息,也包括来自其它设备的动态信息。我们将本地手工创建的VLAN称为静态VLAN,通过MVRP协议学习到的VLAN称为动态VLAN。MVRP有三种注册模式,不同注册模式对静态VLAN和动态VLAN的处理方式也不同。

(1)     Normal模式

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

(2)     Fixed模式

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

(3)     Forbidden模式

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

1.1.3  协议规范

与MVRP相关的协议规范有:

l     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-1 MVRP配置任务简介

配置任务

说明

详细配置

使能MVRP功能

必选

1.3.2 

配置MVRP注册模式

可选

1.3.3 

配置MRP定时器

可选

1.3.4 

配置兼容GVRP功能

可选

1.3.5 

 

说明

如果二层以太网接口加入了聚合组,则加入聚合组之前和加入聚合组之后在该接口上进行的MVRP相关配置不会生效;该接口退出聚合组后,MVRP的配置才会生效。

 

1.3  配置MVRP功能

1.3.1  配置准备

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

l     MVRP功能只能在Trunk端口上配置,因此需要配置要运行MVRP功能的端口链路类型为Trunk类型。

1.3.2  使能MVRP功能

注意

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

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

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

 

表1-2 使能MVRP功能

操作

命令

说明

进入系统视图

system-view

-

全局使能MVRP功能

mvrp global enable

必选

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

要在端口上使能MVRP功能,必须先全局使能MVRP功能

进入相应视图

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

interface interface-type interface-number

二者必选其一

进入端口组视图

port-group manual port-group-name

配置允许指定的VLAN通过当前Trunk端口

port trunk permit vlan { vlan-list | all }

必选

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

需要保证所有注册的VLAN都能够从该端口通过

在端口上使能MVRP功能

mvrp enable

必选

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

 

说明

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

 

1.3.3  配置MVRP注册模式

表1-3 配置MVRP注册模式

操作

命令

说明

进入系统视图

system-view

-

进入相应视图

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

interface interface-type interface-number

二者必选其一

进入端口组视图

port-group manual port-group-name

配置当前端口的MVRP注册模式

mvrp registration { fixed | forbidden | normal }

可选

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

 

1.3.4  配置MRP定时器

注意

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

 

说明

设备的每个端口上都独立维护自己的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所示,Join定时器、Leave定时器和LeaveAll定时器的取值范围之间存在着相互制约的关系:

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

l     当用户欲恢复各定时器的值为缺省值时,须按照Join定时器->Leave定时器->LeaveAll定时器的顺序依次恢复。

表1-5 Join定时器、Leave定时器和LeaveAll定时器取值范围间的制约关系

定时器

取值下限

取值上限

Join定时器

20厘秒

小于Leave定时器值的一半

Leave定时器

大于Join定时器值的两倍

小于LeaveAll定时器的值

LeaveAll定时器

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

32760厘秒

 

说明

Periodic定时器的值可以在任何时刻恢复为缺省值。

 

1.3.5  配置兼容GVRP功能

注意

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

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

 

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

表1-6 配置兼容GVRP功能

操作

命令

说明

进入系统视图

system-view

-

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

mvrp gvrp-compliance enable

必选

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

 

1.4  MVRP显示和维护

在完成上述配置后,在任意视图下执行display命令可以显示配置后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 ]

清除端口的MVRP统计信息

reset mvrp statistics [ interface interface-list ]

 

1.5  MVRP典型配置举例

1. 组网需求

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

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

l     通过启用MVRP功能,并配置MVRP的注册模式为Normal模式,来实现Device A、Device B、Device C和Device D之间的所有动态和静态VLAN的注册和注销,从而保持各MSTI中VLAN配置的一致。

l     在网络稳定后,配置Device B上与Device A相连端口的MVRP注册模式为Fixed模式,使Device B学习到的的动态VLAN不被注销。

2. 组网图

图1-2 MVRP配置组网图

 

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

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

[DeviceA] interface gigabitethernet 1/0/1

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

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

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

[DeviceA-GigabitEthernet1/0/1] mvrp enable

[DeviceA-GigabitEthernet1/0/1] quit

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

[DeviceA] interface gigabitethernet 1/0/2

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

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

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

[DeviceA-GigabitEthernet1/0/2] mvrp enable

[DeviceA-GigabitEthernet1/0/2] quit

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

[DeviceA] interface gigabitethernet 1/0/3

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

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

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

[DeviceA-GigabitEthernet1/0/3] mvrp enable

[DeviceA-GigabitEthernet1/0/3] quit

# 创建VLAN 10。

[DeviceA] vlan 10

[DeviceA-vlan10] quit

(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

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

[DeviceB] interface gigabitethernet 1/0/1

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

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

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

[DeviceB-GigabitEthernet1/0/1] mvrp enable

[DeviceB-GigabitEthernet1/0/1] quit

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

[DeviceB] interface gigabitethernet 1/0/2

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

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

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

[DeviceB-GigabitEthernet1/0/2] mvrp enable

[DeviceB-GigabitEthernet1/0/2] quit

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

[DeviceB] interface gigabitethernet 1/0/3

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

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

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

[DeviceB-GigabitEthernet1/0/3] mvrp enable

[DeviceB-GigabitEthernet1/0/3] quit

# 创建VLAN 20。

[DeviceB] vlan 20

[DeviceB-vlan20] quit

(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

# 定义Device C为MSTI 0的根桥。

[DeviceC] stp instance 0 root primary

# 全局使能生成树协议。

[DeviceC] stp enable

# 全局使能MVRP功能。

[DeviceC] mvrp global enable

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

[DeviceC] interface gigabitethernet 1/0/1

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

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

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

[DeviceC-GigabitEthernet1/0/1] mvrp enable

[DeviceC-GigabitEthernet1/0/1] quit

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

[DeviceC] interface gigabitethernet 1/0/2

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

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

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

[DeviceC-GigabitEthernet1/0/2] mvrp enable

[DeviceC-GigabitEthernet1/0/2] quit

(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

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

[DeviceD] interface gigabitethernet 1/0/1

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

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

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

[DeviceD-GigabitEthernet1/0/1] mvrp enable

[DeviceD-GigabitEthernet1/0/1] quit

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

[DeviceD] interface gigabitethernet 1/0/2

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

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

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

[DeviceD-GigabitEthernet1/0/2] mvrp enable

[DeviceD-GigabitEthernet1/0/2] quit

4. 验证配置

(1)     验证Normal注册模式配置

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

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

[DeviceA] display mvrp running-status

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

 Global Status     : Enabled

 Compliance-GVRP   : False

 

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

 Local VLANs :

  1(default),

 

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

 Local VLANs :

  1(default),

 

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

 Local VLANs :

  1(default), 20,

由此可见,在端口GigabitEthernet1/0/1和端口GigabitEthernet1/0/2上通过MVRP学习到的VLAN信息只有VLAN 1。在端口GigabitEthernet1/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

 

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

 Local VLANs :

  1(default),

 

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

 Local VLANs :

  1(default), 10,

 

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

 Local VLANs :

  1(default), 10,

由此可见,在端口GigabitEthernet1/0/1上通过MVRP学习到的VLAN信息只有VLAN 1。在端口GigabitEthernet1/0/2和GigabitEthernet1/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

 

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

 Local VLANs :

  1(default), 10, 20,

 

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

 Local VLANs :

  1(default), 20,

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

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

[DeviceD] display mvrp running-status

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

 Global Status     : Enabled

 Compliance-GVRP   : False

 

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

 Local VLANs :

  1(default), 20,

 

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

 Local VLANs :

  1(default),

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

(2)     更改注册模式并验证

配置Device B上端口GigabitEthernet1/0/3的MVRP注册模式为Fixed模式,使其在MSTI 1中学习到的的动态VLAN不被注销。

# 配置端口GigabitEthernet1/0/3的MVRP注册模式为Fixed模式。

[DeviceB] interface gigabitethernet 1/0/3

[DeviceB-GigabitEthernet1/0/3] mvrp registration fixed

[DeviceB-GigabitEthernet1/0/3] quit

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

[DeviceB] display mvrp running-status interface gigabitethernet 1/0/3

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

 Global Status     : Enabled

 Compliance-GVRP   : False

 

 ----[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                   : Fixed

 Local VLANs :

  1(default), 10,

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

# 在Device A上删除VLAN 10。

[DeviceA] undo vlan 10

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

[DeviceB] display mvrp running-status interface gigabitethernet 1/0/3

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

 Global Status     : Enabled

 Compliance-GVRP   : False

 

 ----[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                   : Fixed

 Local VLANs :

  1(default), 10,

由此可见,端口GigabitEthernet1/0/3配置Fixed模式后,该端口学习的动态VLAN信息不会发生变化。

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

新华三官网
联系我们