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 |
2字节 |
协议ID,取值为1。 |
Message |
不固定 |
消息,每个Message由Attribute Type、Attribute List构成。 |
Attribute Type |
1字节 |
属性类型,由具体的GARP的应用定义。对于GVRP,属性类型为0x01,表示属性取值为VLAN ID。 |
Attribute List |
不固定 |
属性列表,由多个属性构成。 |
Attribute |
不固定 |
属性,每个属性由Attribute Length、Attribute Event、Attribute Value构成。 |
Attribute Length |
1字节 |
属性长度,取值是2~255,单位为字节。 |
Attribute Event |
1字节 |
属性描述的事件,取值如下:
|
Attribute Value |
不固定 |
属性取值,GVRP的属性取值为VLAN ID,但LeaveAll属性的Attribute Value值无效。 |
End Mark |
1字节 |
结束标志、GARP的PDU的结尾标志,以0x00取值表示。 |
三、GVRP帧格式示例
Frame 1: 104 bytes on wire (832 bits), 104 bytes captured (832 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jan 1, 1970 08:00:01.482070000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1.482070000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 104 bytes (832 bits)
Capture Length: 104 bytes (832 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:llc:stp:gvrp]
[Coloring Rule Name: Routing]
[Coloring Rule String: hsrp || eigrp || ospf || bgp || cdp || vrrp || carp || gvrp || igmp || ismp]
IEEE 802.3 Ethernet
Destination: Spanning-tree-(for-bridges)_21 (01:80:c2:00:00:21)
Address: Spanning-tree-(for-bridges)_21 (01:80:c2:00:00:21)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: HuaweiTe_9a:68:51 (04:f9:38:9a:68:51)
Address: HuaweiTe_9a:68:51 (04:f9:38:9a:68:51)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Length: 86
Trailer: 9d243e03
Logical-Link Control
DSAP: Spanning Tree BPDU (0x42)
0100 001. = SAP: Spanning Tree BPDU
.... ...0 = IG Bit: Individual
SSAP: Spanning Tree BPDU (0x42)
0100 001. = SAP: Spanning Tree BPDU
.... ...0 = CR Bit: Command
Control field: U, func=UI (0x03)
000. 00.. = Command: Unnumbered Information (0x00)
.... ..11 = Frame type: Unnumbered frame (0x3)
GARP VLAN Registration Protocol
Protocol Identifier: 0x0001 (GARP VLAN Registration Protocol)
Message 1
Type: VID (0x01)
Attribute 1
Length: 4
Event: Join Empty (1)
Value: 2
Attribute 2
Length: 4
Event: Join Empty (1)
Value: 3
Attribute 3
Length: 4
Event: Join Empty (1)
Value: 4
Attribute 4
Length: 4
Event: Join Empty (1)
Value: 5
Attribute 5
Length: 4
Event: Join Empty (1)
Value: 6
Attribute 6
Length: 4
Event: Join Empty (1)
Value: 7
Attribute 7
Length: 4
Event: Join Empty (1)
Value: 8
Attribute 8
Length: 4
Event: Join Empty (1)
Value: 9
Attribute 9
Length: 4
Event: Join Empty (1)
Value: 10
Attribute 10
Length: 4
Event: Join Empty (1)
Value: 11
Attribute 11
Length: 4
Event: Join Empty (1)
Value: 12
Attribute 12
Length: 4
Event: Join Empty (1)
Value: 13
Attribute 13
Length: 4
Event: Join Empty (1)
Value: 14
Attribute 14
Length: 4
Event: Join Empty (1)
Value: 15
Attribute 15
Length: 4
Event: Join Empty (1)
Value: 16
Attribute 16
Length: 4
Event: Join Empty (1)
Value: 17
Attribute 17
Length: 4
Event: Join Empty (1)
Value: 18
Attribute 18
Length: 4
Event: Join Empty (1)
Value: 19
Attribute 19
Length: 4
Event: Join Empty (1)
Value: 20
End of Mark
End of Mark
发表评论