GVRP (GARP VLAN registration
protocol) is an implementation of GARP (generic attribute registration protocol).
It maintains dynamic VLAN registration information and propagates the
information to other switches by adopting the same mechanism as that of GARP.
GARP provides a mechanism for the switching members in a switched
network to register, distribute and propagate information about VLANs,
multicast addresses, and so on between each other.
After the GVRP feature is enabled on a
switch, the switch receives the VLAN registration information from other
switches to dynamically update the local VLAN registration information
(including VLAN members, ports through which the VLAN members can be reached, and
so on).The switch also propagates the local VLAN registration information to
other switches so that all the switching devices in the same switched network
can have the same VLAN information. The VLAN registration information includes not
only the static registration information configured locally, but also the
dynamic registration information, which is received from other switches.
I. GARP Timers
The information exchange between GARP
members is completed by messages. The messages performing important functions
for GARP fall into three types: Join, Leave and LeaveAll.
l
When a GARP entity expects other switches to
register certain attribute information of its own, it sends out a Join message.
l
When a GARP entity expects other switches to
unregister certain attribute information of its own, it sends out a Leave
message.
l
Once a GARP entity starts up, it starts the
LeaveAll timer. After the timer times out, the GARP entity sends out a LeaveAll
message.
The Join message and the Leave message are
used together to complete the unregistration and re-registration of
information. Through message exchange, all the attribute information to be
registered can be propagated to all the switches in the same switched network.
GARP uses the following timers:
l
Hold: When a GARP entity receives a piece of
registration information, it does not send out a Join message immediately.
Instead, to save the bandwidth resources, it starts the Hold timer, puts all
registration information it receives before the timer times out into one Join
message and sends out the message after the timer times out.
l
Join: To transmit the Join messages reliably to
other entities, a GARP entity sends each Join message two times. The Join timer
is used to define the interval between the two sending operations of each Join
message.
l
Leave: When a GARP entity expects to unregister
a piece of attribute information, it sends out a Leave message. Any GARP entity
receiving this message starts its Leave timer, and unregisters the attribute
information if it does not receives a Join message again before the timer times
out.
l
LeaveAll: Once a GARP entity starts up, it
starts the LeaveAll timer, and sends out a LeaveALL message after the timer
times out, so that other GARP entities can re-register all the attribute
information on this entity. After that, the entity restarts the LeaveAll timer
to begin a new cycle.
II. GVRP port registration mode
GVRP has the following three port
registration modes: Normal, Fixed, and Forbidden.
l
Normal: In this mode, a port can dynamically
register/deregister a VLAN and propagate the dynamic/static VLAN information.
l
Fixed: In this mode, a port cannot register/deregister
a VLAN dynamically. It only propagates static VLAN information. That is, a trunk
port only permits the packets of manually configured VLANs in this mode even if
you configure the port to permit the packets of all the VLANs.
l
Forbidden: In this mode, a port cannot register/deregister
VLANs. It only propagates VLAN 1 information. That is, a trunk port only
permits the packets of the default VLAN (namely VLAN 1) in this mode even if
you configure the port to permit the packets of all the VLANs.
III. GARP operation procedure
Through the mechanism
of GARP, the configuration information on a GARP member will be propagated to
the entire switched network. A GARP can be a terminal workstation or a bridge;
it instructs other GARP member to register/unregister its attribute information
by declaration/recant, and register/unregister other GARP member's attribute
information according to other member's declaration/recant.
The protocol packets of GARP entity use
specific multicast MAC addresses as their destination MAC addresses. When
receiving these packets, the switch distinguishes them by their destination MAC
addresses and delivers them to different GARP application (for example, GVRP)
for further processing.
The GVRP packets are in the following
format:




Figure 1-1 Format of GVRP packets
The following table describes the fields of
a GVRP packet.
Table 1-1 Description
of GVRP packet fields
|
Field
|
Description
|
Value
|
|
Protocol ID
|
Protocol ID
|
1
|
|
Message
|
Each message consists of two parts:
Attribute Type and Attribute List.
|
—
|
|
Attribute Type
|
Defined by the specific GARP application
|
The attribute type of GVRP is 0x01.
|
|
Attribute List
|
It contains multiple attributes.
|
—
|
|
Attribute
|
Each general attribute consists of three
parts: Attribute Length, Attribute Event and Attribute Value.
Each LeaveAll attribute consists of two
parts: Attribute Length and LeaveAll Event.
|
—
|
|
Attribute Length
|
The length of the attribute
|
2 to 255
|
|
Attribute Event
|
The event described by the attribute
|
0: LeaveAll Event
1: JoinEmpty
2: JoinIn
3: LeaveEmpty
4: LeaveIn
5: Empty
|
|
Attribute Value
|
The value of the attribute
|
The attribute value of GVRP is the VID.
|
|
End Mark
|
End mark of the GVRP PDU.
|
—
|
GVRP is defined in IEEE 802.1Q standard.
The GVRP configuration tasks include
configuring the timers, enabling GVRP, and configuring the GVRP port
registration mode.
The port on which GVRP will be enabled must
be set to a trunk port.
Table 1-2 Configuration
procedure
|
Operation
|
Command
|
Description
|
|
Enter system view
|
system-view
|
—
|
|
Configure the LeaveAll timer
|
garp timer leaveall timer-value
|
Optional
By default, the LeaveAll timer is set to
1,000 centiseconds.
|
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Configure the Hold, Join, and Leave
timers
|
garp timer { hold | join | leave } timer-value
|
Optional
By default, the Hold, Join, and Leave
timers are set to 10, 20, and 60 centiseconds respectively.
|
|
Exit and return to system view
|
quit
|
—
|
|
Enable GVRP globally
|
gvrp
|
Required
By default, GVRP is disabled globally.
|
|
Enter Ethernet port view
|
interface interface-type interface-number
|
—
|
|
Enable GVRP on the port
|
gvrp
|
Required
By default, GVRP is disabled on the port.
After you enable GVRP on a trunk port,
you cannot change the port to a different type.
|
|
Configure GVRP port registration mode
|
gvrp registration { fixed | forbidden | normal }
|
Optional
You can choose one of the three modes.
By default, GVRP port registration mode
is normal.
|
The timeout ranges of the timers vary
depending on the timeout values you set for other timers. If you want to set the
timeout time of a timer to a value out of the current range, you can set the timeout
time of the associated timer to another value to change the timeout range of
this timer.
The following table describes the relations
between the timers:
Table 1-3 Relations
between the timers
|
Timer
|
Lower threshold
|
Upper threshold
|
|
Hold
|
10 centiseconds
|
This upper threshold is less than or
equal to one-half of the timeout time of the Join timer. You can change the
threshold by changing the timeout time of the Join timer.
|
|
Join
|
This lower threshold is greater than or
equal to twice the timeout time of the Hold timer. You can change the
threshold by changing the timeout time of the Hold timer.
|
This upper threshold is less than
one-half of the timeout time of the Leave timer. You can change the threshold
by changing the timeout time of the Leave timer.
|
|
Leave
|
This lower threshold is greater than
twice the timeout time of the Join timer. You can change the threshold by
changing the timeout time of the Join timer.
|
This upper threshold is less than the timeout
time of the LeaveAll timer. You can change the threshold by changing the timeout
time of the LeaveAll timer.
|
|
LeaveAll
|
This lower threshold is greater than the timeout
time of the Leave timer. You can change threshold by changing the timeout time
of the Leave timer.
|
32,765 centiseconds
|
1.3 Displaying
and Maintaining GVRP
After the above configuration, you can use
the display commands in any view to display the configuration information
and operating status of GVRP/GARP, and thus verify your configuration. You can
use the reset command in user view to clear GARP statistics.
Table 1-4 Display and maintain GVRP
|
Operation
|
Command
|
Description
|
|
Display GARP statistics
|
display garp
statistics [ interface interface-list ]
|
The display commands can be
executed in any view.
|
|
Display the settings of the GARP timers
|
display garp
timer [ interface interface-list ]
|
|
Display GVRP statistics
|
display gvrp statistics [ interface interface-list ]
|
|
Display the global GVRP status
|
display gvrp status
|
|
Clear GARP statistics
|
reset garp statistics [ interface interface-list ]
|
The reset command can be executed
in user view.
|
You need to enable GVRP on the switches to enable
dynamic VLAN information registration and update between the switches.

Figure 1-2 Network diagram for GVRP
configuration
l
Configure switch A.
# Enable GVRP globally.
<H3C> system-view
[H3C] gvrp
GVRP is enabled globally.
# Configure port GigabitEthernet1/0/1 to be
a trunk port and to permit the packets of all the VLANs.
[H3C] interface GigabitEthernet1/0/1
[H3C-GigabitEthernet1/0/1] port
link-type trunk
[H3C-GigabitEthernet1/0/1] port trunk
permit vlan all
# Enable GVRP on the trunk port.
[H3C-GigabitEthernet1/0/1] gvrp
GVRP is enabled on port GigabitEthernet1/0/1.
l
Configure switch B.
# Enable GVRP globally.
<H3C> system-view
[H3C] gvrp
GVRP is enabled globally.
# Configure port GigabitEthernet1/0/2 to be
a trunk port and to permit the packets of all the VLANs.
[H3C] interface GigabitEthernet1/0/2
[H3C-GigabitEthernet1/0/2] port
link-type trunk
[H3C-GigabitEthernet1/0/2] port trunk
permit vlan all
# Enable GVRP on the trunk port.
[H3C-GigabitEthernet1/0/2] gvrp
GVRP is
enabled on port GigabitEthernet1/0/2.