GVRP是什么?
GVRP:GARP VLAN注册协议,(GVRP:GARP VLAN Registration Protocol - 802.1P、802.1Q)
GARP VLAN 注册协议(GVRP)是一种 GARP (通用属性注册协议)的应用,提供 802.1Q 兼容的 VLAN 裁剪(VLAN pruning)功能和在 802.1Q 干线端口(trunkport)上建立动态 VLAN。GVRP 定义在 IEEE 802.1P 标准中,允许对 802.1Q VLAN 进行控制。 GVRP 交换机之间能够相互交换 VLAN 配置信息,裁剪不必要的广播和未知单播流量以及在通过 802.1Q 干线连接的交换机上动态创建和管理 VLAN。
上面是理论知识下面我以模拟机进行GVRP配置
首先我要讲讲拓扑,我要将交换机5700配置的vlan,交换3700A,3700b。按思料讲法是VTP,把5700做为VTP server.
首先我要在5700上创建3个valn ,分别是vlan10,vlan20,vlan30.开启gvrp
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
[Huawei-vlan10]q
[Huawei]vlan 20
[Huawei-vlan20]qu
[Huawei]vlan 30
[Huawei-vlan30]q
[Huawei]gvrp
再将GigabitEthernet 24 GigabitEthernet 23口设为trunk 允计所有vlan通过 再开启gvrp
[Huawei]int gig 0/0/24
[Huawei-GigabitEthernet0/0/24]port link-type trunk
[Huawei-GigabitEthernet0/0/24]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/24]gvrp
[Huawei-GigabitEthernet0/0/23]port link-type trunk
[Huawei-GigabitEthernet0/0/23]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/23]gvrp
对3700A进行配置
进入3700A 开启grvp
[3700A]gvrp
进入GigabitEthernet0/0/1 口设为trunk 允计所有vlan通过 再开启gvrp
[3700A]int gig 0/0/1
[3700A-GigabitEthernet0/0/1]port link-type trunk
[3700A-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[3700A-GigabitEthernet0/0/1]gvrp
对3700B进行配置
进入3700B 开启GVRP
[3700B]gvrp
进入GigabitEthernet0/0/1 口设为trunk 允计所有vlan通过 再开启gvrp
[3700B]int gig 0/0/1
[3700B-GigabitEthernet0/0/1]port link-type trunk
[3700B-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[3700B-GigabitEthernet0/0/1]gvrp
以上就是配置方法,下面我验证是一下是否成功
[3700A]dis vla
The total number of vlans is : 4
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/1(D) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(U) GE0/0/2(D)
10 dynamic TG:GE0/0/1(U)
20 dynamic TG:GE0/0/1(U)
30 dynamic TG:GE0/0/1(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
30 enable default enable disable VLAN 0030
<3700B>dis vlan
The total number of vlans is : 4
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/1(D) Eth0/0/2(D) Eth0/0/3(D) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(U) GE0/0/2(D)
10 dynamic TG:GE0/0/1(U)
20 dynamic TG:GE0/0/1(U)
30 dynamic TG:GE0/0/1(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
30 enable default enable disable VLAN 0030