实验11 H3C的MVRP配置 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

实验 11 H3C 的 MVRP 配置

 实验组网图

MVRP 基础知识

 MVRP(Multiple VLAN Registration Protocol,多 VLAN 注册协议)简介


又称为 GVRP(G-Generic Attribute Registration Protocol,V-vlan,R-Registration,P-Protocol,
通用属性注册协议 GARP 在 VLAN 注册协议),H3C 的 MVRP 类似于 cisco 的 VTP 协议,主要用于在以太网结
构中传递 VLAN 的更新信息。
当设备启动了 MVRP 之后,设备将本地的 VLAN 配置信息向其它设备传播,同时还能够接收来自其它设
备的 VLAN 配置信息,并动态更新本地的 VLAN 配置信息,从而使所有设备的 VLAN 信息都达成一致,极大
减轻了网络管理员的 VLAN 配置工作。

 MVRP 的具体配置步骤如下:
(1)全局模式启动 MVRP
(2)设置 trunk 端口,并设定 permit vlan all
(3)端口启动 MVRP
(4)设定端口 MVRP 为下列三种模式之一
 Normal 模式:允许该端口动态注册或注销 VLAN,传播动态 VLAN 以及静态 VLAN 信息(又学
习又传播的模式)
 Fixed 模式:禁止该端口动态注册或注销 VLAN,只传播静态 VLAN,不传播动态 VLAN 信息
(不学习只传播静态 VLAN 的模式)
 Forbidden 模式:禁止该端口动态注册或注销 VLAN,不传播除 VLAN1 以外的任何 VLAN 信息
(不学习不传播的模式)

实验任务一:配置 VLAN 及 TRUNK 端口


步骤 1:建立物理连接,搭建网络拓扑。
按照实验组网图,完成模拟器环境构建。

步骤 2:分别在 SWA、SWB 上全局模式启动 MVRP,并分别在两台交换机上配置配置 TRUNK 端口

[SWA]mvrp global enable [SWB]mvrp global enable

[SWA]interface GigabitEthernet 1/0/1 [SWB]interface GigabitEthernet 1/0/1

[SWA-GigabitEthernet1/0/1]port link-type trunk [SWB-GigabitEthernet1/0/1]port link-type trunk

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

步骤 3:分别在 SWA、SWB 的 G1/0/1 接口模式启动 MVRP,并设置为 normal 模式

[SWA-GigabitEthernet1/0/1]mvrp enable [SWB-GigabitEthernet1/0/1]mvrp enable

[SWA-GigabitEthernet1/0/1]mvrp registration normal [SWB-GigabitEthernet1/0/1]mvrp registration normal

步骤 4:在 SWA 上创建 VLAN10、20,在 SWB 上查看 VLAN 情况。

[SWA]vlan 10 [SWB]display vlan

[SWA-vlan10]vlan 20 Total VLANs: 3

The VLANs include:

1(default), 10, 20

可以看到在 SWA 上创建 VLAN10、20 之后,通过 MVRP,SWB 上自动创建了 VLAN10、20。

在 SWA 上删除 VLAN10、20 之后,通过 MVRP,SWB 上也进行了 VLAN 更新,删除掉了 VLAN10、20。

[SWA]undo vlan 10 [SWB]display vlan

[SWA]undo vlan 20 Total VLANs: 1

The VLANs include:

1(default)

步骤 5:在 SWB 上修改 G1/0/1 的 MVRP 模式为 fixed 固定模式。

[SWB]interface GigabitEthernet 1/0/1

[SWB-GigabitEthernet1/0/1]mvrp registration fixed

步骤 6:在 SWA 上创建 VLAN10,在 SWB 上查看 VLAN。在 SWB 上创建 VLAN30,在 SWA 上查看 VLAN。

[SWA]vlan 10 [SWB]display vlan

[SWA-vlan10] Total VLANs: 1

The VLANs include:

1(default)

可以看到在 SWA 上创建 VLAN10 后,由于 SWB 的 G1/0/1 端口属于 MVRP 的 fixed 模式,没有学习 VLAN 更新。
[SWB]vlan 30 [SWA]display vlan

Total VLANs: 3

The VLANs include:

1(default), 10, 30

可以看到在 SWB 上创建 VLAN30 后,由于 SWA 的 G1/0/1 端口属于 MVRP 的 normal 模式,学习了 VLAN30。

步骤 7:在 SWB 上修改 G1/0/1 的 MVRP 模式为 forbidden 模式,自行进行相应的尝试。

You might also like