Skip to main content

GVRP帧格式

GVRP(Generic VLAN Registration Protocol)基于GARP机制,主要用于维护设备动态VLAN属性。通过GVRP协议,一台设备上的VLAN信息会迅速传播到整个交换网。GVRP实现动态分发、注册和传播VLAN属性,从而达到减少网络管理员的手工配置量及保证VLAN配置正确的目的。

GVRP帧格式
+------------------------------------------------------------------------------+
|   DMAC   |   SMAC   | Length | DSAP | SSAP | Ctrl |       PDU       |
+------------------------------------------------------------------------------+
                                                            |                 |
|                                                               |
+----------------------------------------------------------------+
| Protocol ID | Message 1 | ... | Message N | End Mark |
+----------------------------------------------------------------+
              |             |
|                                         |
+-----------------------------------------+
|   Attribute Type   |   Attribute List   |
+-----------------------------------------+
                    |                   |
|                                                         |
+-----------------------------------------                 +
|   Attribute 1   | ... |   Attribute N   |   End Mark   |
+----------------------------------------------------------+
                        |                 |
|                                                             |
+----------------------------------------------------------   +
| Attribute Length | Attribute Event   | Attribute Value |
+-------------------------------------------------------------+
GVRP帧字段含义
字段 长度 含义
Protocol ID 2B 协议ID,取值为1。
Message 不固定 消息,每个Message由Attribute Type、Attribute List构成。
Attribute Type 1B 属性类型,由具体的GARP的应用定义。对于GVRP,属性类型为0x01,表示属性取值为VLAN ID。
Attribute List 不固定 属性列表,由多个属性构成。
Attribute 不固定 属性,每个属性由Attribute Length、Attribute Event、Attribute Value构成。
Attribute Length 1B 属性长度,取值是2~255,单位为字节。
Attribute Event 1B 属性描述的事件,取值如下:0:LeaveAll Event1:JoinEmpty Event2:JoinIn Event3:LeaveEmpty Event4:LeaveIn Event5:Empty Event
Attribute Value 不固定 属性取值,GVRP的属性取值为VLAN ID,但LeaveAll属性的Attribute Value值无效。
End Mark 1B 结束标志、GARP的PDU的结尾标志,以0x00取值表示。