- Table of Contents
-
- 02-Layer 2-LAN Switching Configuration Guide
- 00-Preface
- 01-Ethernet interface configuration
- 02-Loopback and null interface configuration
- 03-Bulk interface configuration
- 04-MAC address table configuration
- 05-Ethernet link aggregation configuration
- 06-Port isolation configuration
- 07-Spanning tree configuration
- 08-BPDU tunneling configuration
- 09-VLAN configuration
- 10-GVRP configuration
- 11-LLDP configuration
- 12-Service loopback group configuration
- 13-MVRP configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
10-GVRP configuration | 142.01 KB |
Configuration restrictions and guidelines
Displaying and maintaining GVRP
GVRP normal registration mode configuration example
GVRP fixed registration mode configuration example
GVRP forbidden registration mode configuration example
This section describes how to configure GVRP.
Overview
The Generic Attribute Registration Protocol (GARP) provides a generic framework for devices in a switched LAN, such as end stations and switches, to register and deregister attribute values. The GARP VLAN Registration Protocol (GVRP) is a GARP application that registers and deregisters VLAN attributes. GVRP uses the operating mechanisms of GARP to maintain and propagate dynamic VLAN registration information for GVRP devices on the network.
GARP
GARP provides a mechanism that allows participants in a GARP application to distribute, propagate, and register—with other participants in a LAN—the attributes specific to the GARP application, such as VLAN or multicast address attributes.
How GARP works
Each port that participates in a GARP application (GVRP, for example) is a GARP participant.
GARP enables GARP participants to propagate attribute values throughout the switched LAN. As shown in Figure 1, a GARP participant registers and deregisters its attribute values with other GARP participants by sending and withdrawing declarations, and registers and deregisters the attribute values of other participants according to the declarations and withdrawals that it has received.
For example, a GVRP-enabled port registers and deregisters VLAN in the following cases.
· When the port receives a VLAN attribute declaration, it registers the VLAN attribute and joins the VLAN.
· When the port receives a VLAN withdrawal, it deregisters the VLAN and leaves the VLAN.
GARP message types
A GARP participant exchanges information with other GARP participants by sending GARP messages. As a GARP application, GVRP also uses GARP messages for information exchange. The GARP messages can be of the following types.
· Join messages
A GARP participant sends Join messages when it wishes to declare its attribute values or receives Join messages from other GARP participants.
Join messages fall into JoinEmpty and JoinIn.
¡ JoinEmpty—A GARP participant sends JoinEmpty messages to declare attribute values that it has not registered.
¡ JoinIn—A GARP participant sends JoinIn messages to declare attribute values that it has registered.
· Leave messages
A GARP participant sends Leave messages when it wishes to withdraw declarations of its attribute values (because, for example, it has deregistered its attribute values), or receives Leave messages from other participants.
Leave messages fall into LeaveEmpty and LeaveIn.
¡ LeaveEmpty—A GARP participant sends LeaveEmpty messages to withdraw declarations of the attribute values that it has not registered.
¡ LeaveIn—A GARP participant sends LeaveIn messages to withdraw declarations of the attribute values that it has registered.
· LeaveAll messages
A GARP participant sends a LeaveAll message when it declares that it is deregistering all attribute values or receives LeaveAll messages from other participants. If any participants want to maintain the registration for a particular attribute value, they must send a Join message.
GARP timers
H3C's implementation of GARP uses the following timers to control GARP message transmission:
· Hold timer
The Hold timer sets the delay, a period of time that a GARP participant waits before sending a Join or Leave message.
When an attribute value changes or a Join or Leave message arrives, the GARP participant does not send the message immediately. Rather, it assembles Join and Leave messages in the least number of GARP PDUs, and sends them out when the Hold timer expires. This timer reduces the number of GARP PDUs that are sent to save bandwidth.
· Join timer
A GARP participant may declare an attribute twice to ensure reliable transmission. The Join timer sets the interval to wait between two declarations.
A GARP participant starts a Join timer when it declares an attribute value or receives a JoinIn message for the attribute value. If the GARP participant does not receive any declaration for the attribute value when the Join timer expires, it re-declares the attribute value.
Because all attributes of a GARP participant share the same Join timer, you must set the Join timer long enough so that all attributes can be sent in one declaration.
· Leave timer
A GARP participant starts a Leave timer when it receives a Leave message for an attribute value. If the GARP participant has not received a Join message for the attribute value before the Leave timer expires, it deregisters the attribute value.
· LeaveAll timer
When a GARP application is enabled, it starts a LeaveAll timer. The GARP participant sends a LeaveAll message when the timer expires. Then, the LeaveAll timer restarts to begin a new cycle. The LeaveAll timer and all other GARP timers also restart when the GARP participant receives a LeaveAll message.
When you set the GARP timers, follow these guidelines:
· The settings of GARP timers apply to all GARP applications, such as GVRP, on a LAN.
· On a GARP-enabled network, each port maintains its own Hold, Join, and Leave timers, but only one LeaveAll timer is maintained on each device. This LeaveAll timer applies to all ports on the device.
· The value ranges for the Hold, Join, Leave, and LeaveAll timers are dependent on one another. See Table 2 for their dependencies.
· Set the LeaveAll timer greater than any Leave timer and not smaller than its default value, 1000 centiseconds. Each time a LeaveAll timer expires, a network-wide re-join occurs.
· A device 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.
GARP PDU format
As shown in Figure 2, GARP PDUs are encapsulated in IEEE 802.3 Ethernet frames.
Table 1 describes the usage and values of fields contained in the GARP PDU portion of the Ethernet frame.
Field |
Description |
Value |
Protocol ID |
Protocol identifier for GARP. |
0x0001. |
Message |
One or multiple messages, each containing an attribute type and an attribute list. |
N/A |
End mark |
Indicates the end of a GARP PDU. |
0x00. |
Attribute type |
Defined by the GARP application. |
0x01 for GVRP, indicating the VLAN ID attribute. |
Attribute list |
Contains one or multiple attributes. |
N/A |
Attribute |
Consists of an Attribute Length, an Attribute Event, and an Attribute Value. |
N/A |
Attribute length |
Length of an attribute, inclusive of the attribute length field. |
2 to 255 bytes. |
Attribute event |
Event described by the attribute. |
· 0x00—LeaveAll event. · 0x01—JoinEmpty event. · 0x02—JoinIn event. · 0x03—LeaveEmpty event. · 0x04—LeaveIn event. · 0x05—Empty event. |
Attribute value |
Attribute value. |
VLAN ID for GVRP. If the value of the Attribute event field is 0x00 (LeaveAll event), the Attribute value field is invalid. |
The destination MAC addresses of GARP messages are multicast MAC addresses, and vary with GARP applications. For example, the destination MAC address of GVRP is 01-80-C2-00-00-21.
GVRP
This section describes GVRP and introduces GVRP registration modes.
Introduction to GVRP
As a GARP application, GVRP uses the operating mechanism of GARP to maintain and propagate dynamic VLAN registrations throughout a switched LAN.
In a switched LAN, each GVRP-enabled switch sends and receives VLAN declarations and withdrawals from other GVRP-enabled switches, and dynamically updates its local database, including active VLAN members and the ports through which each VLAN member can be reached. This makes sure that all GVRP-enabled switches in a LAN maintain the same VLAN information.
The VLAN information propagated by GVRP includes not only manually configured static VLAN information but also dynamic VLAN information from other switches.
GVRP registration modes
GVRP is available on trunk ports. It provides the following registration modes:
· Normal mode—Performs dynamic VLAN registrations and deregistrations on the trunk port, and sends declarations and withdrawals for dynamic and static VLANs. VLANs manually configured are called static VLANs, and VLANs created by GVRP are called dynamic VLANs.
· Fixed mode—Disables the trunk port from registering or withdrawing dynamic VLAN information, but allows the port to send declarations for static VLANs. A trunk port in this mode carries only static VLANs, even if it has been assigned to all VLANs.
· Forbidden mode—Disables the trunk port from registering or withdrawing dynamic VLAN information, and allows the port to send declarations only for VLAN 1. A trunk port in this mode carries only VLAN 1 even if it has been assigned to other VLANs.
Protocols and standards
IEEE 802.1Q, Virtual Bridged Local Area Networks
GVRP configuration task list
GVRP configuration made in Ethernet interface view or Layer 2 aggregate interface view takes effect on the current interface only. GVRP configuration made in port group view takes effect on all the member ports in the group.
GVRP configuration made on a member port in an aggregation group takes effect only after the port is removed from the aggregation group.
Complete these tasks to configure GVRP:
Task |
Remarks |
Required |
|
Optional |
Configuring GVRP functions
This section describes how to configure GVRP functions.
Configuration restrictions and guidelines
· Before enabling GVRP on a port, you must enable GVRP globally. In addition, you can configure GVRP only on trunk ports, and you must assign the involved trunk ports to all dynamic VLANs.
· GVRP is mutually exclusive with service loopback.
· GVRP can work with STP, RSTP, or MSTP CIST. When GVRP runs on the CIST, blocked ports on the CIST cannot receive/send GVRP packets. For more information about STP, RSTP, and MSTP CIST, see "Configuring spanning tree protocols."
· Do not enable both GVRP and remote port mirroring. Otherwise, GVRP may register the remote probe VLAN to unexpected ports, which would cause the monitor port to receive undesired duplicates. For more information about port mirroring, see Network Management and Monitoring Configuration Guide.
· Enabling GVRP on a Layer 2 aggregate interface enables both the aggregate interface and all selected member ports in the corresponding link aggregation group to participate in dynamic VLAN registration and deregistration.
Configuration procedure
To configure GVRP functions on a trunk port:
Step |
Command |
|
1. Enter system view. |
system-view |
N/A |
1. Enable GVRP globally. |
gvrp |
By default, GVRP is globally disabled. |
2. Enter Ethernet interface view. |
·
Enter Ethernet interface view or Layer 2 aggregate
interface view: ·
Enter port group view: |
Use one of the commands. |
3. Configure the link type of the ports as trunk. |
port link-type trunk |
The default setting is access. For more information about the port link-type trunk command, see Layer 2—LAN Switching Command Reference. |
4. Assign the trunk ports to all VLANs. |
port trunk permit vlan all |
By default, a trunk port is assigned to VLAN 1 only. For more information about the port trunk permit vlan all command, see Layer 2—LAN Switching Command Reference. |
5. Enable GVRP on the ports. |
gvrp |
By default, GVRP is disabled. |
6. Configure the GVRP registration mode on the port. |
gvrp registration { fixed | forbidden | normal } |
Optional. The default setting is normal. |
Configuring the GARP timers
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure the GARP LeaveAll timer. |
garp timer leaveall timer-value |
Optional. The default setting is 1000 centiseconds. The LeaveAll timer applies to all ports. To keep the dynamic VLANs learned through GVRP stable, do not set the LeaveAll timer smaller than its default value, 1000 centiseconds. |
3. Enter Ethernet interface view. |
·
Enter Ethernet interface view or Layer 2
aggregate interface view: · Enter port group view: |
Use one of the commands. |
4. Configure the Hold timer. |
garp timer hold timer-value |
Optional. The default setting is 10 centiseconds. |
5. Configure the Join timer. |
garp timer join timer-value |
Optional. The default setting is 20 centiseconds. |
6. Configure the Leave timer. |
garp timer leave timer-value |
Optional. The default setting is 60 centiseconds. |
As shown in Table 2, the value ranges for GARP timers are dependent on one another. Use the following guidelines when you configure GARP times:
· If you want to set a value beyond the value range for a timer, you can change the value range by tuning the value of another related timer.
· If you want to restore the default settings of the timers, restore the Hold timer first, followed by the Join, Leave, and LeaveAll timers.
Table 2 Dependencies of the GARP timers
Timer |
Lower limit |
Upper limit |
Hold |
10 centiseconds |
No greater than half of the Join timer |
Join |
No less than twice the Hold timer |
Less than half of the Leave timer |
Leave |
Greater than twice the Join timer |
Less than the LeaveAll timer |
LeaveAll |
Greater than the Leave timer |
32765 centiseconds |
Displaying and maintaining GVRP
Task |
Command |
Remarks |
Display statistics about GARP on ports. |
display garp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display GARP timers on ports. |
display garp timer [ interface interface-list ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the local VLAN information that GVRP maintains on ports. |
display gvrp local-vlan interface interface-type interface-number [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the current GVRP state in the specified VLANs on ports. |
display gvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display GVRP statistics on ports. |
display gvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the global GVRP state. |
display gvrp status [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the information about dynamic VLAN operations on ports. |
display gvrp vlan-operation interface interface-type interface-number [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Clear the GARP statistics on ports. |
reset garp statistics [ interface interface-list ] |
Available in user view. |
GVRP configuration examples
The following sections give examples of how to configure GVRP in various modes.
GVRP normal registration mode configuration example
Network requirements
As shown in Figure 3, enable GVRP and configure the normal registration mode on ports to enable registration and deregistration of dynamic and static VLAN information between the two devices.
Configuration procedure
1. Configure Device A:
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, and assign it to all VLANs.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on trunk port GigabitEthernet 1/0/1.
[DeviceA-GigabitEthernet1/0/1] gvrp
[DeviceA-GigabitEthernet1/0/1] quit
# Create VLAN 2 (a static VLAN).
[DeviceA] vlan 2
[DeviceA-vlan2] quit
2. Configure Device B:
# Enable GVRP globally.
<DeviceB> system-view
[DeviceB] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, and assign it to all VLANs.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on trunk port GigabitEthernet 1/0/1.
[DeviceB-GigabitEthernet1/0/1] gvrp
[DeviceB-GigabitEthernet1/0/1] quit
# Create VLAN 3 (a static VLAN).
[DeviceB] vlan 3
[DeviceB-vlan3] quit
Verifying the configuration
Use the display gvrp local-vlan command to display the local VLAN information that GVRP maintains on ports. For example:
# Display the local VLAN information that GVRP maintains on port GigabitEthernet 1/0/1 of Device A.
[DeviceA] display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default),2-3
The output shows that information about VLAN 1, static VLAN information about VLAN 2 on the local device, and dynamic VLAN information about VLAN 3 on Device B are all registered through GVRP.
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 1/0/1 of Device B.
[DeviceB] display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default),2-3
The output shows that information about VLAN 1, static VLAN information about VLAN 3 on the local device, and dynamic VLAN information about VLAN 2 on Device A are all registered through GVRP.
GVRP fixed registration mode configuration example
Network requirements
As shown in Figure 4, enable GVRP and configure the fixed registration mode on ports to enable registration and deregistration of static VLAN information between the two devices.
Configuration procedure
1. Configure Device A:
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, and assign it to all VLANs.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 1/0/1 and set the GVRP registration mode to fixed on the port.
[DeviceA-GigabitEthernet1/0/1] gvrp
[DeviceA-GigabitEthernet1/0/1] gvrp registration fixed
[DeviceA-GigabitEthernet1/0/1] quit
# Create VLAN 2 (a static VLAN).
[DeviceA] vlan 2
[DeviceA-vlan2] quit
2. Configure Device B:
# Enable GVRP globally.
<DeviceB> system-view
[DeviceB] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, and assign it to all VLANs.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 1/0/1, and set the GVRP registration mode to fixed on the port.
[DeviceB-GigabitEthernet1/0/1] gvrp
[DeviceB-GigabitEthernet1/0/1] gvrp registration fixed
[DeviceB-GigabitEthernet1/0/1] quit
# Create VLAN 3 (a static VLAN).
[DeviceB] vlan 3
[DeviceB-vlan3] quit
Verifying the configuration
Use the display gvrp local-vlan command to display the local VLAN information that GVRP maintains on ports. For example:
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 1/0/1 of Device A.
[DeviceA] display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default), 2
The output shows that information about VLAN 1 and static VLAN information about VLAN 2 on the local device are registered through GVRP, but dynamic VLAN information about VLAN 3 on Device B is not.
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 1/0/1 of Device B.
[DeviceB] display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default), 3
The output shows that information about VLAN 1 and static VLAN information about VLAN 3 on the local device are registered through GVRP, but dynamic VLAN information about VLAN 2 on Device A is not.
GVRP forbidden registration mode configuration example
Network requirements
As shown in Figure 5, enable GVRP and configure the forbidden registration mode on ports to prevent registration and deregistration of all VLANs but VLAN 1 between the two devices.
Configuration procedure
1. Configure Device A:
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, and assign it to all VLANs.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 1/0/1, and set the GVRP registration mode to forbidden on the port.
[DeviceA-GigabitEthernet1/0/1] gvrp
[DeviceA-GigabitEthernet1/0/1] gvrp registration forbidden
[DeviceA-GigabitEthernet1/0/1] quit
# Create VLAN 2 (a static VLAN).
[DeviceA] vlan 2
[DeviceA-vlan2] quit
2. Configure Device B:
# Enable GVRP globally.
<DeviceB> system-view
[DeviceB] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, and assign it to all VLANs.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 1/0/1, and set the GVRP registration mode to forbidden on the port.
[DeviceB-GigabitEthernet1/0/1] gvrp
[DeviceB-GigabitEthernet1/0/1] gvrp registration forbidden
[DeviceB-GigabitEthernet1/0/1] quit
# Create VLAN 3 (a static VLAN).
[DeviceB] vlan 3
[DeviceB-vlan3] quit
Verifying the configuration
Use the display gvrp local-vlan command to display the local VLAN information that GVRP maintains on ports. For example:
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 1/0/1 of Device A.
[DeviceA] display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default)
The output shows that information about VLAN 1 is registered through GVRP, but static VLAN information about VLAN 2 on the local device and dynamic VLAN information about VLAN 3 on Device B are not.
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 1/0/1 of Device B.
[DeviceB] display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default)
The output shows that information about VLAN 1 is registered through GVRP, but static VLAN information about VLAN 3 on the local device and dynamic VLAN information about VLAN 2 on Device A are not.