华为三层交换机配置GVRP示例手册

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

配置GVRP示例
组网需求
如图1所示,公司A的分公司与总部通过SwitchA和SwitchB互通,公司A的所有交换机配置GVRP功能并配置接口注册模式为Normal,以简化配置。

公司B通过SwitchB和SwitchC与公司A互通,公司B的所有交换机配置GVRP功能并将与公司A相连的接口的注册模式配置为Fixed,以控制只允许公司B配置的VLAN通过。

图1 配置GVRP的组网图
配置思路
采用如下的思路配置GVRP:
1.全局使能GVRP功能。

2.配置接口类型为Trunk类型。

3.使能接口的GVRP功能。

4.配置接口注册模式。

5.
数据准备
为完成此配置例,需准备如下的数据:
在SwitchA、SwitchB和SwitchC上配置接口允许所有VLAN通过。

∙在SwitchA和SwitchB上配置接口的注册模式为Normal。

∙在SwitchC上配置接口GE1/0/1的注册模式为Fixed,配置接口GE1/0/2的注册模式为Normal。

∙在SwitchC上创建属于公司B的VLAN101~VLAN200。

操作步骤
1.配置交换机SwitchA
# 全局使能GVRP功能。

<SwitchA>system-view
[SwitchA] gvrp
# 配置接口为Trunk类型,并允许所有VLAN通过。

[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type trunk
[SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan all
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan all
[SwitchA-GigabitEthernet1/0/2] quit
# 使能接口的GVRP功能,并配置接口注册模式。

[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] gvrp
[SwitchA-GigabitEthernet1/0/1] gvrp registration normal
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] gvrp
[SwitchA-GigabitEthernet1/0/2] gvrp registration normal
[SwitchA-GigabitEthernet1/0/2] quit
SwitchB配置与SwitchA配置类似,这里不再赘述。

2.配置交换机SwitchC
# 创建VLAN101~VLAN200。

<SwitchC>system-view
[SwitchC] vlan batch 101 to 200
# 全局使能GVRP功能。

[SwitchC] gvrp
# 配置接口为Trunk类型,并允许所有VLAN通过。

[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-GigabitEthernet1/0/1] port trunk allow-pass vlan all [SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] port link-type trunk
[SwitchC-GigabitEthernet1/0/2] port trunk allow-pass vlan all [SwitchC-GigabitEthernet1/0/2] quit
# 使能接口的GVRP功能,并配置接口注册模式。

[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] gvrp
[SwitchC-GigabitEthernet1/0/1] gvrp registration fixed
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] gvrp
[SwitchC-GigabitEthernet1/0/2] gvrp registration normal
[SwitchC-GigabitEthernet1/0/2] quit
3.验证配置结果
配置完成后,公司A的分公司用户可以与总部互通,公司A属于VLAN101~VLAN200的用户可以与公司B用户互通。

在SwitchA上使用命令display gvrp status,查看全局GVRP的使能情况,结果如下:<SwitchA>display gvrp status
GVRP is enabled
在SwitchA上使用命令display gvrp statistics,查看接口的GVRP统计信息,其中包括:GVRP状态、GVRP注册失败次数、上一个GVRP数据单元源MAC地址和接口GVRP注册类型,结果如下:
<Quidway>display gvrp statistics
GVRP statistics on port GigabitEthernet1/0/1
GVRP status : Enabled
GVRP registrations failed : 0
GVRP last PDU origin : 0000-0000-0000
GVRP registration type : Normal
SwitchB和SwitchC的查看方法与SwitchA类似,这里不再赘述。

配置文件
SwitchA的配置文件
#
sysnameSwitchA
#
gvrp
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094 gvrp
#
return
∙SwitchB的配置文件
#
sysnameSwitchB
#
gvrp
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094 gvrp
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094 gvrp
#
return
∙SwitchC的配置文件
#
sysnameSwitchC
#
vlan batch 101 to 200
#
gvrp
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094 gvrp
gvrp registration fixed
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094 gvrp
#
Return。

相关文档
最新文档