GVRP Technology White Paper

Keywords: GARP, GVRP, attributes, registration, VLAN

Abstract: GVRP is used to achieve dynamic VLAN configuration. This document introduces the implementation and typical application of GVRP.

Acronyms:

Acronym

Full spelling

GARP

Generic Attribute Registration Protocol

GMRP

GARP Multicast Registration Protocol

GVRP

GARP VLAN Registration Protocol

MSTP

Multiple Spanning Tree Protocol

 

 



Overview

The Generic Attribute Registration Protocol (GARP) establishes an attribute propagation mechanism, which enables entities of a GARP application to register and deregister certain attributes. You can use GARP to propagate attributes. By mapping different attributes into the GARP protocol data unit (PDU), you can support different upper-layer applications. GMRP and GVRP are two typical applications of GARP, where,

l              GMRP is used to register and deregister multicast attributes.

l              GVRP is used to register and deregister VLAN attributes.

GARP applications are identified by destination MAC address. In IEEE Std 802.1D, the destination MAC address 01-80-C2-00-00-20 is assigned to the multicast application, that is, GMRP. In IEEE Std 802.1Q, the destination MAC address 01-80-C2-00-00-21 is assigned to the VLAN application, that is, GVRP.

This white paper is focused on details relevant to GVRP.

1.1  Background

Without GVRP, to configure a VLAN for each device in a network, you need to manually configure it device by device. As shown in Figure 1 , VLAN 2 is configured on Device A, while only VLAN 1 exists on Device B and Device C; the three devices are interconnected through trunk links. To transmit traffic of VLAN 2 from Device A to Device C, you need to manually create VLAN 2 on Device B and Device C.

Figure 1  GVRP application

In a simple network as shown in Figure 1 , it is easy to create VLANs manually. In a complicated network, however, you can hardly get a complete view of the topology in a short time or have to deal with a lot of VLANs. In either case, configuration errors may result and heavy workload is involved. To address the problem, you can use the automatic VLAN registration function of GVRP to complete VLAN configuration.

1.2  Benefits

Based on GARP, GVRP is used to maintain dynamic VLAN attributes on devices. With GVRP, a switch can exchange its VLAN configuration with other GVRP-aware switches in the whole switched network. GVRP propagates, registers, and deregisters VLAN attributes dynamically, reducing manual configuration workload and guaranteeing VLAN configuration correctness.

GVRP Implementation

2.1  Concepts

2.1.1  GARP Application Participants

On a device, each port participating in a protocol is regarded as a participant of the protocol. On a GVRP-enabled switch, each GVRP-enabled port is a GVRP participant, as shown in Figure 2 .

Figure 2  GVRP participant

2.1.2  VLAN Registration and Deregistration

GVRP can register and deregister VLAN attributes automatically.

l              VLAN registration: assigns a port to a VLAN.

l              VLAN deregistration: removes a port from a VLAN.

GVRP registers and deregisters VLAN attributes automatically by making or withdrawing declarations.

l              When a port receives a VLAN attribute declaration, the port registers the VLAN information contained in the declaration, that is, joins the specified VLAN.

l              When a port receives a VLAN attribute withdrawal declaration, the port deregisters the VLAN information contained in the declaration, that is, exits the specified VLAN.

VLAN attribute registration or deregistration occurs only on ports receiving GVRP PDUs.

Figure 3  VLAN registration and deregistration

2.1.3  Message Types

GARP participants exchange attribute information by sending messages, which fall into three types: join, leave, and LeaveAll.

1. Join message

A GARP participant sends join messages to register with other entities as needed its attributes, the attributes received from other GARP participants, and the attributes manually configured on it.

Join messages fall into JoinEmpty messages and JoinIn messages, as described below:

l              JoinEmpty: Declares an attribute that is not configured on the local participant.

l              JoinIn: Declares an attribute that has already been registered with the local participant.

2. Leave message

A GARP participant sends leave messages to have its attributes deregistered on other devices. It also sends leave messages when it receives leave messages from other GARP participants or when attributes are manually deregistered on it.  

Leave messages fall into LeaveEmpty messages and LeaveIn messages, as described below:

l              LeaveEmpty: Deregisters an attribute that is not registered on the local participant.

l              LeaveIn: Deregisters an attribute that has been registered on the local participant.

3. LeaveAll message

Upon startup, a GARP participant starts the LeaveAll timer. When the timer expires, the GARP participant sends out a LeaveAll message.

A GARP participant sends LeaveAll messages to deregister all its attributes from all the other GARP participants. This is a periodical garbage attribute clearing mechanism used to clear attributes no longer useful. A garbage attribute may be created when a device fails to send a leave message, because of power failure for example, to notify other devices to deregister an attribute that it has removed.

2.1.4  Timers

GARP uses four timers to set the interval for sending GARP messages.

1. Join timer

The Join timer specifies the interval for sending join messages (including JoinIn and JoinEmpty messages).

To guarantee join message transmission reliability, a GARP participant may send a join message twice. When sending the first join message, the GARP participant starts the Join timer. If a JoinIn message is received before the Join timer expires, the GARP participant does not send the second join message. If not, the GARP participant re-sends the join message.

The Join timer is configured on a per-port basis.

2. Hold timer

The Hold timer specifies the interval for sending join messages (including JoinIn and JoinEmpty messages) and leave messages (including LeaveIn and LeaveEmpty messages).

When you configure an attribute on a participant or when the participant receives a request message, the participant does not propagate the message to the other devices immediately. Instead, it collects the request messages received within a period of time and sends them in one GARP PDU. This period of time is specified by the Hold timer. By making full use of the data portion of GARP PDUs to send multiple messages in one packet, the mechanism reduces the number of transmitted packets and contributes to network stability.

The Holder timer is configured on a per-port basis. The Holder timer value must be no greater than half the Join timer value.

3. Leave timer

The Leave timer controls attribute deregistration.

Upon receiving a leave or LeaveAll message, a GARP participant starts its Leave timer. If it receives no join message containing the attribute carried in the leave or LeaveAll message when the Leave timer expires, it deregisters the attribute. The Leave timer is used because the leave message from a GARP participant does not mean that the attribute carried in the leave message has been removed from all other GARP participants. Before deregistering the attribute carried in a received leave message, the receiving GARP participant must wait for a while to make sure that the attribute has been removed from all the GARP participants. For example, an attribute is configured on GARP participants A and B in the network, and the other participants have registered the attribute through the GARP application. When the attribute is removed from participant A, participant A sends out a leave message. Upon receiving the leave message, participant B, which still has the source of the attribute, sends out a join message to indicate that it still has the attribute. Receiving the join message from participant B, the other GARP participants keep the attribute instead of deregistering it. Only if no join messages containing the attribute are received when the time twice the Join timer is reached, will they consider that this attribute does not exist in the network. Considering this, you must set the Leave timer to be greater than twice the Join timer value.

The Leave timer is configured on a per-port basis.

4. LeaveAll timer

Upon startup, a GARP participant starts the LeaveAll timer. When the LeaveAll timer expires, the GARP participant sends out a LeaveAll message, and then restarts the LeaveAll timer to start another cycle.

Once receiving a LeaveAll message, a GARP participant re-starts all timers, including the LeaveAll timer. When its own LeaveAll timer expires, the participant sends out a LeaveAll message, thus avoiding sending too many LeaveAll messages within a short time.

If the LeaveAll timers of multiple devices expire at the same time, multiple LeaveAll messages will be sent at the same time, creating unnecessary traffic. To avoid this problem, the actual LeaveAll timer value of a participant is a random value between the LeaveAll timer value and the LeaveAll timer value multiplied by 1.5.

A LeaveAll event is equivalent to deregistering all attributes network wide by sending leave messages. Because the LeaveAll timer affects the whole network, you are recommended to configure the LeaveAll timer value to be at least greater than the Leave timer.

The LeaveAll timer is configured globally on a per-device basis.

2.1.5  Registration Mode

A VLAN configured manually is referred to as a static VLAN, while a VLAN created through GVRP is referred to as a dynamic VLAN. GVRP provides three registration modes, which handle static VLANs and dynamic VLANs differently as follows:

l              Normal: In this mode, a port can dynamically register and deregister VLANs, and propagate both dynamic and static VLAN declarations.

l              Fixed: In this mode, a port cannot dynamically register VLANs, but it can propagate static VLAN declarations.

l              Forbidden: In this mode, a port can neither dynamically register VLANs, nor propagate declarations about any VLAN but VLAN 1.

2.2  Packet Format

As shown in Figure 4 , a GARP protocol data unit (PDU) is encapsulated in an IEEE 802.3 Ethernet frame.

Figure 4  GARP PDU format

Table 1 describes the fields of a GARP PDU.

Table 1  Description on the fields of a GARP PDU

Field

Description

Value

Protocol ID

Protocol identifier for GARP

1

Message

One or multiple messages, each containing an attribute type and attribute list

Attribute Type

Defined by the specific GARP application

0x01 for GVRP, indicating the VLAN ID attribute.

Attribute List

A list of one or multiple attributes

Attribute

Consisting of an Attribute Length, an Attribute Event, and an Attribute Value

Attribute Length

Number of bytes occupied by the attribute, including the Attribute Length field

2 bytes to 255 bytes

Attribute Event

Event described by the attribute

0: LeaveAll Event

1: JoinEmpty Event

2: JoinIn Event

3: LeaveEmpty Event

4: LeaveIn Event

Attribute Value

Value of the attribute

VLAN ID for GVRP. If the Attribute Event is LeaveAll, the Attribute Value field is invalid.

End Mark

Mark indicating the end of a GARP PDU.

0x00

 

2.3  Working Procedures

This section describes how GVRP works using a simplified example. This example describes how GVRP registers and deregisters VLAN attributes in four sub-sections.

1. Unidirectional VLAN attribute registration

Figure 5  Unidirectional VLAN attribute registration

Manually create static VLAN 2 on Device A. In response to this action, GVRP automatically assigns the GVRP-enabled ports on Device B and Device C to VLAN 2 through unidirectional VLAN attribute registration as follows:

l              Upon manual creation of static VLAN 2 on Device A, Port 1 starts its Join timer and Hold timer. When the Hold timer expires, Port 1 sends out the first JoinEmpty message to Device B. When the Join timer expires, the Hold timer restarts. When the Hold timer expires, Port 1 sends out the second JoinEmpty message.

l              Upon receiving the first JoinEmpty message, Device B dynamically creates VLAN 2, assigns the receiving port Port 2 to VLAN 2, and instructs Port 3 to start its Join timer and Hold timer at the same time. When the Hold timer expires, Port 3 sends out the first JoinEmpty message to Device C. When the Join timer expires, the Hold timer restarts. When the Hold timer expires, Port 3 sends out the second JoinEmpty message. Upon receiving the second JoinEmpty message from Device A, Device B does not perform any processing, because Port 2 has already been assigned to VLAN 2.

l              Upon receiving the first JoinEmpty message, Device C dynamically creates VLAN 2, and assigns the receiving port Port 4 to VLAN 2. Upon receiving the second JoinEmpty message, Device C does not perform any processing, because Port 4 has already been assigned to VLAN 2.

l              Thereafter, when the LeaveAll timer expires on a device or a LeaveAll message is received on a device, the device restarts the LeaveAll timer, Join timers, Hold timers, and Leave timers on it. Port 1 on Device A sends the first JoinEmpty message when the Hold timer expires and sends the second JoinEmpty message when the period of the Join timer value plus the Hold timer value is reached. This process is true for Device B to send JoinEmpty messages to Device C.

2. Bidirectional VLAN attribute registration

Figure 6  Bidirectional VLAN attribute registration

The process described in Unidirectional VLAN attribute registration assigns to VLAN 2 Port 1, Port 2, and Port 4 but not Port 3, because only the port receiving a JoinEmpty or JoinIn message can be dynamically assigned to a VLAN. To transmit traffic of VLAN 2 in both directions, VLAN attribute registration must be performed from Device C to Device A as follows:

l              After VLAN attribute registration is completed in the direction from Device A to Device C, manually create VLAN 2 on Device C, changing its attribute from dynamic to static. Upon the creation, Port 4 starts its Join timer and Hold timer at the same time. When the Hold timer expires, Port 4 sends out the first JoinIn message (a JoinIn message is sent because VLAN 2 has been registered on Port 4) to Device B. When the Join timer expires, Port 4 restarts the Hold timer. When the Hold timer expires, Port 4 sends out the second JoinIn message.

l              Upon receiving the first JoinIn message, Device B dynamically assigns the receiving port Port 3 to VLAN 2, and instructs Port 2 to start its Join timer and Hold timer at the same time. When the Hold timer expires, Port 2 sends out the first JoinIn message to Device A. When the Join timer expires, Port 2 restarts the Hold timer. When the Hold timer expires, Port 2 sends out the second JoinIn message. Upon receiving the second JoinIn message, Device B does not perform any processing, because Port 3 has been assigned to dynamic VLAN 2.

l              Upon receiving a JoinIn message, Device A stops sending JoinEmpty messages to Device B. Thereafter, when the LeaveAll timer expires on a device or a LeaveAll message is received on a device, the device re-starts the LeaveAll timer, Join timers, Hold timers, and Leave timers on it. When the Hold timer on Port 1 expires, Port 1 sends a JoinIn message.

l              Device B sends a JoinIn message to Device C.

l              Upon receiving the JoinIn message, Device C does not dynamically create VLAN 2, because static VLAN 2 already exists on it.

3. Unidirectional VLAN attribute deregistration

Figure 7  Unidirectional VLAN attribute deregistration

If none of the devices in the network needs VLAN 2 any more, GVRP can help you remove VLAN 2 from these devices through VLAN attribute deregistration as follows.

l              Remove static VLAN 2 from Device A. Upon the removal action, Port 1 starts its Hold timer. When the Hold timer expires, Port 1 sends a LeaveEmpty message to Device B. Note that the LeaveEmpty message is sent only once.

l              Upon receiving the LeaveEmpty message, Port 2 on Device B starts its Leave timer. When the Leave timer expires, Port 2 deregisters VLAN 2 on it to leave VLAN 2. (In this case, as Port 3 is still in VLAN 2, Device B does not remove VLAN 2.) At the same time, Port 2 instructs Port 3 to start its Hold timer and Leave timer. When the Hold timer expires, Port 3 sends a LeaveIn message to Device C. Because static VLAN 2 has not been removed from Device C yet, Port 3 can still receive JoinIn messages from Port 4 before its Leave timer expires. As a result, Device A and Device B can still learn dynamic VLAN 2.

l              Upon receiving the LeaveIn message, Device C does not remove Port 4 from VLAN 2, because static VLAN 2 still exists on it.

4. Bidirectional VLAN attribute deregistration

Figure 8  Bidirectional VLAN attribute deregistration

To remove VLAN 2 from all devices in the network, you must trigger bidirectional VLAN attribute deregistration in the reverse direction as follows:

l              Remove static VLAN 2 from Device C. Immediately, Port 4 starts its Hold timer. When the Hold timer expires, Device C sends a LeaveEmpty message to Device B.

l              Upon receiving the LeaveEmpty message, Port 3 on Device B starts its Leave timer. When the Leave timer expires, Port 3 deregisters VLAN 2 on it, that is, Port 3 exits VLAN 2, and dynamic VLAN 2 is removed as a result. At the same time, Port 2 is instructed to start the Hold timer. When the Hold timer expires, Port 2 sends a LeaveEmpty message to Device A.

l              Upon receiving the LeaveEmpty message, Port 1 on Device A starts its Leave timer. When the Leave timer expires, Port 1 deregisters VLAN 2 on it, that is, Port 1 exits dynamic VLAN 2, and dynamic VLAN 2 is removed as a result.

2.4  Restrictions

l              GVRP is mutually exclusive with the service loopback feature. A service loopback-enabled port cannot send out GVRP protocol packets.

l              GVRP can run only on common and internal spanning trees (CISTs) of MSTP. Additionally, a CIST port blocked by MSTP cannot receive or transmit GVRP protocol packets.

Application Scenarios

GVRP maintains and updates VLAN information on different devices dynamically. With GVRP, you just need to perform VLAN configuration on few devices and the VLAN configuration will be applied to the whole switched network, thus saving the time of topology analysis and configuration management.

As shown in Figure 9 , all devices are GVRP-enabled and connected with trunk ports permitting traffic of all VLANs to pass through. Manually configure static VLANs 100 through 1000 on Device A and Device G. Then, Device B through Device F can learn these VLANs with GVRP. At last, VLAN 100 through VLAN 1000 are created on each device in the network.

Figure 9  Application scenarios

Prospect

As a dynamic VLAN configuration technology, GVRP simplifies VLAN configuration management in a complicated network and reduce network intercommunication problems caused by inconsistent configurations. Additionally, because GVRP does not assign a port receiving no VLAN registration message to dynamic VLANs, you can configure GVRP appropriately to control the size of a VLAN, suppressing unnecessary traffic. As GVRP has supported multiple MSTIs in MSTP, it is believed that GVRP can gain wider application.

References

l              IEEE Std 802.1D

l              IEEE Std 802.1Q

 

 

Copyright ©2008 Hangzhou H3C Technologies Co., Ltd. All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of Hangzhou H3C Technologies Co., Ltd.

The information in this document is subject to change without notice.