Table of Contents
1 GVRP Configuration ··································································································································1-1
Introduction to GVRP ······························································································································1-1
GARP···············································································································································1-1
GVRP···············································································································································1-4
Protocol Specifications ····················································································································1-4
GVRP Configuration································································································································1-4
GVRP Configuration Tasks ·············································································································1-4
Enabling GVRP ·······························································································································1-4
Configuring GVRP Timers ···············································································································1-5
Configuring GVRP Port Registration Mode ·····················································································1-6
Displaying and Maintaining GVRP··········································································································1-7
GVRP Configuration Example ················································································································1-7
GVRP Configuration Example·········································································································1-7
i
1
GVRP Configuration
z z z z
When configuring GVRP, go to these sections for information you are interested in:
Introduction to GVRP
GVRP Configuration
Displaying and Maintaining GVRP
GVRP Configuration Example
Introduction to GVRP
GARP VLAN registration protocol (GVRP) is an implementation of generic attribute registration protocol
(GARP). GARP is introduced as follows.
GARP
The generic attribute registration protocol (GARP), provides a mechanism that allows participants in a
GARP application to distribute, propagate, and register with other participants in a bridged LAN the attributes specific to the GARP application, such as the VLAN or multicast attribute.
GARP itself does not exist on a device as an entity. GARP-compliant application entities are called
GARP applications. One example is GVRP. When a GARP application entity is present on a port on your device, this port is regarded a GARP application entity.
GARP messages and timers
GARP members communicate with each other through the messages exchanged between them. The messages performing important functions for GARP fall into three types: Join, Leave and LeaveAll. z z z
When a GARP entity wants its attribute information to be registered on other devices, it sends Join messages to these devices. A GARP entity also sends Join messages when it receives Join messages from other entities or it wants some of its statically configured attributes to be registered on other GARP entities.
When a GARP entity wants some of its attributes to be deregistered on other devices, it sends
Leave messages to these devices. A GARP entity also sends Leave messages when it receives
Leave messages from other entities for deregistering some attributes or it has some attributes statically deregistered.
Once a GARP entity is launched, the LeaveAll timer is triggered at the same time. The GARP entity sends out LeaveAll messages after the timer times out. LeaveAll messages deregister all the attributes, through which the attribute information of the entity can be registered again on the other
GARP entities.
Leave messages, LeaveAll messages, together with Join messages ensure attribute information can be deregistered and re-registered.
Through message exchange, all the attribute information to be registered can be propagated to all the
GARP-enabled switches in the same LAN.
1-1
Timers determine the intervals of sending different types of GARP messages. GARP defines four timers to control the period of sending GARP messages. z z z z
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 and puts all received registration information before the timer times out into one Join message and sends out the message after the timer times out.
Join: To make sure the devices can receive Join messages, each Join message is sent twice. If the first Join message sent is not responded for a specific period, a second one is sent. The period is determined by this timer.
Leave: When a GARP entity expects to deregister a piece of attribute information, it sends out a
Leave message. Any GARP entity receiving this message starts its Leave timer, and deregisters the attribute information if it does not receives a Join message again before the timer times out.
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. z z z
The settings of GARP timers apply to all GARP applications, such as GVRP, on a LAN.
Unlike other three timers, which are set on a port basis, the LeaveAll timer is set in system view and takes effect globally.
A GARP application entity may send LeaveAll messages at the interval set by its LeaveAll timer or the LeaveAll timer on another device on the network, whichever is smaller. This is because each time a device on the network receives a LeaveAll message it resets its LeaveAll timer.
Operating mechanism of GARP
Through the mechanism of GARP, the configuration information on a GARP member will be propagated within the whole LAN. A GARP member can be a terminal workstation or a bridge; it instructs other
GARP members to register/deregister its attribute information by declaration/recant, and register/deregister other GARP member's attribute information according to other member's declaration/recant. When a port receives an attribute declaration, the port will register this attribute.
When a port receives an attribute recant, the port will deregister this attribute.
The protocol packets of GARP entities 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.
GARP message format
The GARP packets are in the following format:
1-2
Figure 1-1
Format of GARP packets
The following table describes the fields of a GARP packet.
Table 1-1
Description of GARP packet fields
Field
Protocol ID
Message
Attribute Type
Attribute List
Attribute
Attribute Length
Attribute Event
Attribute Value
End Mark
Description
Protocol ID 1
Value
Each message consists of two parts: Attribute Type and
Attribute List.
Defined by the specific GARP application
—
The attribute type of GVRP is
0x01.
It contains multiple attributes. —
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.
—
The length of the attribute
The event described by the attribute
2 to 255 (in bytes)
0: LeaveAll Event
1: JoinEmpty
2: JoinIn
3: LeaveEmpty
4: LeaveIn
5: Empty
The value of the attribute
End mark of an GARP PDU
For GVRP packets, the value of this field is the VLAN ID; however, for LeaveAll messages, this field is invalid.
The value of this field is fixed to
0x00.
1-3
GVRP
As an implementation of GARP, GARP VLAN registration protocol (GVRP) maintains dynamic VLAN registration information and propagates the information to the other switches through GARP.
With GVRP enabled on a device, the VLAN registration information received by the device from other devices is used to dynamically update the local VLAN registration information, including the information about the VLAN members, the ports through which the VLAN members can be reached, and so on. The device also propagates the local VLAN registration information to other devices so that all the devices in the same LAN can have the same VLAN information. VLAN registration information propagated by
GVRP includes static VLAN registration information, which is manually configured locally on each device, and dynamic VLAN registration information, which is received from other devices.
GVRP has the following three port registration modes: Normal, Fixed, and Forbidden, as described in the following. z z z
Normal. A port in this mode can dynamically register/deregister VLANs and propagate dynamic/static VLAN information.
Fixed. A port in this mode cannot register/deregister VLANs dynamically. It only propagates static
VLAN information. Besides, the port permits only static VLANs, that is, it propagates only static
VLAN information to the other GARP members.
Forbidden. A port in this mode cannot register/deregister VLANs dynamically. It permits only the default VLAN (namely, VLAN 1), that is, the port propagates only the information about VLAN 1 to the other GARP members.
Protocol Specifications
GVRP is defined in IEEE 802.1Q standard.
GVRP Configuration
GVRP Configuration Tasks
Complete the following tasks to configure GVRP:
Task
Enabling GVRP
Configuring GVRP Timers
Configuring GVRP Port Registration Mode
Required
Optional
Optional
Enabling GVRP
Configuration Prerequisite
The port on which GVRP will be enabled must be set to a trunk port.
Configuration procedure
Follow these steps to enable GVRP:
Remarks
1-4
To do ...
Enter system view
Enable GVRP globally
Enter Ethernet port view
Use the command ... system-view gvrp
interface interface-type
interface-number
gvrp
Remarks
—
Required
By default, GVRP is disabled globally.
—
Required
By default, GVRP is disabled on the port.
Enable GVRP on the port z z
s
After you enable GVRP on a trunk port, you cannot change the port to a different type.
Use the
port trunk permit all
command to permit the traffic of all dynamically registered VLANs to pass through a trunk port with GVRP enabled.
Configuring GVRP Timers
Follow these steps to configure GVRP timers:
To do ...
Enter system view
Configure the LeaveAll timer
Use the command ... system-view garp timer leaveall
timer-value
Remarks
—
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 leave
}
{
hold
timer-value
|
join
|
Optional
By default, the Hold, Join, and
Leave timers are set to 10, 20, and 60 centiseconds respectively. z z
Note that:
The setting of each timer must be a multiple of 5 (in centiseconds).
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:
1-5
Table 1-2
Relations between the timers
Timer
Join
Leave
LeaveAll
Lower threshold Upper threshold
This upper threshold is less than or equal to one-half of the centiseconds
You can change the threshold by changing the timeout time of the Join timer.
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.
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.
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
The following are recommended GVRP timer settings: z z
GARP hold timer: 100 centiseconds (1 second)
GARP Join timer: 600 centiseconds (6 seconds) z z
GARP Leave timer: 3000 centiseconds (30 seconds)
GARP LeaveAll timer: 120000 centiseconds (2 minutes)
Configuring GVRP Port Registration Mode
Follow these steps to configure GVRP port registration mode:
To do ...
Enter system view
Enter Ethernet port view
Use the command ... system-view
interface interface-type
interface-number
Configure GVRP port registration mode
gvrp registration
{
fixed
|
forbidden
|
normal
}
Remarks
—
—
Optional
By default, GVRP port registration mode is normal.
1-6
Displaying and Maintaining GVRP
To do …
Display GARP statistics
Clear GARP statistics
Use the command … display garp statistics
[ interface interface-list ]
Display the settings of the
GARP timers
Display GVRP statistics
display garp timer
[ interface
interface-list
]
display gvrp statistics
[ interface
interface-list
]
Display the global GVRP status
display gvrp status reset garp statistics
[ interface interface-list ]
Remarks
Available in any view
GVRP Configuration Example
GVRP Configuration Example
Network requirements
z z
Enable GVRP on all the switches in the network so that the VLAN configurations on Switch C and
Switch E can be applied to all switches in the network, thus implementing dynamic VLAN information registration and refresh.
By configuring the GVRP registration modes of specific Ethernet ports, you can enable the corresponding VLANs in the switched network to communicate with each other.
Network diagram
Figure 1-2
Network diagram for GVRP configuration
Configuration procedure
1) Configure Switch A
# Enable GVRP globally.
<SwitchA> system-view
[SwitchA] gvrp
# Configure GigabitEthernet1/0/1 to be a trunk port and to permit the packets of all the VLANs.
[SwitchA] interface GigabitEthernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type trunk
1-7
[SwitchA-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet1/0/1.
[SwitchA-GigabitEthernet1/0/1] gvrp
[SwitchA-GigabitEthernet1/0/1] quit
# Configure GigabitEthernet1/0/2 to be a trunk port and to permit the packets of all the VLANs.
[SwitchA] interface GigabitEthernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] port trunk permit vlan all
# Enable GVRP on GigabitEthernet1/0/2.
[SwitchA-GigabitEthernet1/0/2] gvrp
[SwitchA-GigabitEthernet1/0/2] quit
# Configure GigabitEthernet1/0/3 to be a trunk port and to permit the packets of all the VLANs.
[SwitchA] interface GigabitEthernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port link-type trunk
[SwitchA-GigabitEthernet1/0/3] port trunk permit vlan all
# Enable GVRP on GigabitEthernet1/0/3.
[SwitchA-GigabitEthernet1/0/3] gvrp
[SwitchA-GigabitEthernet1/0/3] quit
2) Configure Switch B
# The configuration procedure of Switch B is similar to that of Switch A and is thus omitted.
3) Configure Switch C
# Enable GVRP on Switch C, which is similar to that of Switch A and is thus omitted.
# Create VLAN 5.
[SwitchC] vlan 5
[SwitchC-vlan5] quit
4) Configure Switch D
# Enable GVRP on Switch D, which is similar to that of Switch A and is thus omitted.
# Create VLAN 8.
[SwitchD] vlan 8
[SwitchD-vlan8] quit
5) Configure Switch E
# Enable GVRP on Switch E, which is similar to that of Switch A and is thus omitted.
# Create VLAN 5 and VLAN 7.
[SwitchE] vlan 5
[SwitchE-vlan5] quit
[SwitchE] vlan 7
[SwitchE-vlan7] quit
6) Display the VLAN information dynamically registered on Switch A, Switch B, and Switch E.
# Display the VLAN information dynamically registered on Switch A.
[SwitchA] display vlan dynamic
Total 3 dynamic VLAN exist(s).
The following dynamic VLANs exist:
1-8
5, 7, 8,
# Display the VLAN information dynamically registered on Switch B.
[SwitchB] display vlan dynamic
Total 3 dynamic VLAN exist(s).
The following dynamic VLANs exist:
5, 7, 8,
# Display the VLAN information dynamically registered on Switch E.
[SwitchE] display vlan dynamic
Total 1 dynamic VLAN exist(s).
The following dynamic VLANs exist:
8 display the VLAN information dynamically registered on Switch A, Switch B, and Switch E.
# Configure GigabitEthernet1/0/1 on Switch E to operate in fixed GVRP registration mode.
[SwitchE] interface GigabitEthernet 1/0/1
[SwitchE-GigabitEthernet1/0/1] gvrp registration fixed
# Display the VLAN information dynamically registered on Switch A.
[SwitchA] display vlan dynamic
Total 3 dynamic VLAN exist(s).
The following dynamic VLANs exist:
5, 7, 8,
# Display the VLAN information dynamically registered on Switch B.
[SwitchB] display vlan dynamic
Total 3 dynamic VLAN exist(s).
The following dynamic VLANs exist:
5, 7, 8,
# Display the VLAN information dynamically registered on Switch E.
[SwitchE-GigabitEthernet1/0/1] display vlan dynamic
No dynamic vlans exist! display the VLAN registration information dynamically registered on Switch A, Switch B, and Switch
E.
# Configure GigabitEthernet1/0/1 on Switch E to operate in forbidden GVRP registration mode.
[SwitchE-GigabitEthernet1/0/1] gvrp registration forbidden
# Display the VLAN information dynamically registered on Switch A.
[SwitchA] display vlan dynamic
Total 2 dynamic VLAN exist(s).
The following dynamic VLANs exist:
5, 8,
# Display the VLAN information dynamically registered on Switch B.
[SwitchB] display vlan dynamic
Total 2 dynamic VLAN exist(s).
The following dynamic VLANs exist:
1-9
5, 8,
# Display the VLAN information dynamically registered on Switch E.
[SwitchE] display vlan dynamic
No dynamic vlans exist!
1-10