- Table of Contents
-
- 04-Layer 2 - LAN Switching Configuration Guide
- 00-Preface
- 01-VLAN Configuration
- 02-MAC Address Table Configuration
- 03-Spanning Tree Configuration
- 04-Ethernet Link Aggregation Configuration
- 05-Port Isolation Configuration
- 06-QinQ Configuration
- 07-VLAN Mapping Configuration
- 08-BPDU Tunneling Configuration
- 09-GVRP Configuration
- 10-Loopback Detection Configuration
- 11-MAC-in-MAC Configuration
- 12-LLDP Configuration
- 13-MVRP Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
09-GVRP Configuration | 192.38 KB |
Displaying and maintaining GVRP
GVRP normal registration mode configuration example
GVRP fixed registration mode configuration example
GVRP forbidden registration mode configuration example
The Generic Attribute Registration Protocol (GARP) provides a generic framework whereby devices in a bridged LAN, such as end stations and switches, can 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 mechanism of GARP to maintain and propagate dynamic VLAN registration information for the GVRP devices on the network.
Introduction to GVRP
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 the VLAN or multicast address attributes.
How GARP works
Each port that participates in a GARP application (GVRP for example) is a GARP participant.
Through the GARP mechanism, the attribute information of GARP participants is rapidly propagated across the entire LAN. As shown in Figure 1, a GARP participant registers and deregisters its attribute information with other GARP participants by sending and withdrawing declarations, and registers and deregisters the attribute information of other participants according to the declarations and withdrawals it receives.
For example, GVRP registers and deregisters VLAN attributes as follows:
· When a port receives a declaration for a VLAN attribute, it registers the VLAN attribute carried in the declaration, and joins the VLAN.
· When a port receives a withdrawal for a VLAN attribute, it deregisters the VLAN attribute carried in the withdrawal, and leaves the VLAN.
GARP messages
A GARP participant exchanges information with other GARP participants by sending GARP messages, including Join, Leave, and LeaveAll. These messages work together to ensure the registration and de-registration of attribute information. As a GARP application, GVRP also uses GARP messages for information exchange.
1. Join messages
A GARP participant sends Join messages when it wishes to declare its attribute values or receives Join messages from other GARP participants. There are two types of Join messages: JoinEmpty and JoinIn.
¡ A GARP participant sends a JoinEmpty message to declare an attribute not registered on it.
¡ A GARP participant sends a JoinIn message to declare an attribute registered on it.
2. Leave messages
A GARP participant sends Leave messages when it wishes to withdraw declarations of its attribute values, or receives Leave messages from other participants. There are two types of Leave messages: LeaveEmpty and LeaveIn.
¡ A GARP participant sends a LeaveEmpty message to deregister an attribute not registered on it.
¡ A GARP participant sends a LeaveIn message to deregister an attribute registered on it.
3. 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
|
NOTE: · The settings of GARP timers apply to all GARP applications, such as GVRP, on a LAN. · On a GARP-enabled network, each port of a device maintains its own Hold, Join, and Leave timers, but only one LeaveAll timer is maintained on each device globally. · The value ranges for the Hold, Join, Leave, and LeaveAll timers are dependent on one another. For more information, see Table 2. |
GARP defines the following timers to control the sending of GARP messages:
1. Hold timer
The Hold timer sets the delay 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 sends 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 and saves bandwidth.
2. Join timer
A GARP participant may declare an attribute twice to ensure reliable transmission. The Join timer sets the interval between the 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.
|
NOTE: 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 out in one declaration. |
3. 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 timer expires, it deregisters the attribute value.
4. LeaveAll timer
When a GARP application is enabled, a LeaveAll timer starts. 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.
|
NOTE: · 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. · On a GARP-enabled network, a device may send LeaveAll messages at the interval set by its LeaveAll timer or the LeaveAll timer of 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 use the IEEE 802.3 Ethernet frame format.
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 (in 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. A device distributes GARP messages to different GARP applications according to the destination MAC addresses carried in GARP messages.
GVRP
GVRP overview
As a GARP application, GVRP enables a device to propagate local VLAN registration information to other participant devices, and to dynamically update the VLAN registration information from other devices to its local database, including active VLAN members and through which port they can be reached. This makes sure that all GVRP participants on a bridged LAN maintain the same VLAN registration information. The VLAN registration information propagated by GVRP includes both manually configured local static entries and dynamic entries from other devices.
GVRP registration modes
VLANs manually created are called static VLANs, and VLANs created by GVRP are called dynamic VLANs. GVRP provides three registration modes on a port, including Normal, Fixed, and Forbidden. In different registration modes, a port handles static and dynamic VLANs differently:
· Normal—Allows dynamic VLAN registration and deregistration on the trunk port, and allows the declarations for dynamic and static VLANs to be sent.
· Fixed—Prevents dynamic VLAN registration and deregistration on the trunk port, and allows only the declarations for static VLANs to be sent. In this mode, the trunk port, even if it is assigned to all VLANs, allows only packets of static VLANs to pass through.
· Forbidden—Prevents dynamic VLAN registration and deregistration on the trunk port, and allows only the declarations for VLAN 1 to be sent. In this mode, the trunk port, even if it is assigned to all VLANs, allows only packets of VLAN 1 to pass through.
Protocols and standards
· IEEE 802.1Q, Virtual Bridged Local Area Networks
GVRP configuration task list
Complete these tasks to configure GVRP:
Task |
Remarks |
Required |
|
Optional |
|
NOTE: · 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. |
Configuring GVRP functions
Before enabling GVRP on a port, you must enable GVRP globally. In addition, GVRP can be configured only on trunk ports, and you must assign the involved trunk ports to all dynamic VLANs.
To configure GVRP functions on a trunk port:
Step |
Command |
|
1. Enter system view. |
system-view |
N/A |
2. Enable GVRP globally. |
gvrp |
By default, GVRP is globally disabled. |
3. Enter interface view or port group view. |
·
Enter Ethernet interface view or Layer 2
aggregate interface view: ·
Enter port-group view: |
Use either command. |
4. Configure the link type of the ports as trunk. |
port link-type trunk |
The default setting is access. |
5. Assign the trunk ports to all VLANs. |
port trunk permit vlan all |
By default, a trunk port is assigned to VLAN 1 only. |
6. Enable GVRP on the ports. |
gvrp |
By default, GVRP is disabled on ports. |
7. Configure the GVRP registration mode on the ports. |
gvrp registration { fixed | forbidden | normal } |
Optional. The default setting is normal. When you set the GVRP registration mode to forbidden, H3C recommends that you make sure that the port allows packets from VLAN 1 to pass through. |
|
NOTE: · For more information about the port link-type trunk and port trunk permit vlan all commands, see Layer 2—LAN Switching Command Reference. · GVRP is mutually exclusive with service loopback. · GVRP can work with STP, RSTP, or MSTP CIST but not PVST. When GVRP runs on the CIST, blocked ports on the CIST cannot receive/send GVRP packets. For more information about STP, RSTP, MSTP CIST, and PVST, see the chapter “Configuring spanning tree.” · Do not enable both GVRP and remote port mirroring. Otherwise, GVRP may register the remote probe VLAN to unexpected ports, resulting in undesired duplicates to be received by the monitor port. 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. |
Configuring GARP timers
Among the four GARP timers, the LeaveAll timer is configured in system view and takes effect on all ports, while the other three are configured on a port basis.
To configure 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. |
3. Enter interface view or port group view. |
·
Enter Ethernet interface view or Layer 2
aggregate interface view: ·
Enter port-group view: |
Use either command. Depending on the view you accessed, the subsequent configuration takes effect on a port or all ports in a port-group. |
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:
· If you want to set a value beyond the value range for a timer, you may 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, and then the Join, Leave, and LeaveAll timers.
Table 2 Dependencies of GARP timers
Timer |
Lower limit |
Upper limit |
Hold |
10 centiseconds |
No greater than half of the Join timer setting |
Join |
No less than two times the Hold timer setting |
Less than half of the leave timer setting |
Leave |
Greater than two times the Join timer setting |
Less than the LeaveAll timer setting |
LeaveAll |
Greater than the Leave timer setting |
32765 centiseconds |
|
NOTE: To keep the dynamic VLANs learned through GVRP stable, do not set the LeaveAll timer smaller than its default value, 1000 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 maintained by GVRP 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
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 the registration of dynamic and static VLAN information between the two switches.
Configuration procedure
1. Configure Device A
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 3/0/1 as a trunk port, and assign it to all VLANs.
[DeviceA] interface GigabitEthernet 3/0/1
[DeviceA-GigabitEthernet3/0/1] port link-type trunk
[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all
# Enable GVRP on trunk port GigabitEthernet 3/0/1.
[DeviceA-GigabitEthernet3/0/1] gvrp
[DeviceA-GigabitEthernet3/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 3/0/1 as a trunk port, and assign it to all VLANs.
[DeviceB] interface GigabitEthernet 3/0/1
[DeviceB-GigabitEthernet3/0/1] port link-type trunk
[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all
# Enable GVRP on trunk port GigabitEthernet 3/0/1.
[DeviceB-GigabitEthernet3/0/1] gvrp
[DeviceB-GigabitEthernet3/0/1] quit
# Create VLAN 3 (a static VLAN).
[DeviceB] vlan 3
[DeviceB-vlan3] quit
3. Verify the configuration
Use the display gvrp local-vlan command to display the local VLAN information maintained by GVRP on ports. For example:
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 3/0/1 of Device A.
[DeviceA] display gvrp local-vlan interface GigabitEthernet 3/0/1
Following VLANs exist in GVRP local database:
1(default),2-3
According to the output above, information about VLAN 1, static VLAN information of VLAN 2 on the local device, and dynamic VLAN information of VLAN 3 on Device B are all registered through GVRP.
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 3/0/1 of Device B.
[DeviceB] display gvrp local-vlan interface GigabitEthernet 3/0/1
Following VLANs exist in GVRP local database:
1(default),2-3
According to the output above, information about VLAN 1, static VLAN information of VLAN 3 on the local device, and dynamic VLAN information of 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 the registration of static VLAN information between the two switches.
Configuration procedure
1. Configure Device A
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 3/0/1 as a trunk port, and assign it to all VLANs.
[DeviceA] interface GigabitEthernet 3/0/1
[DeviceA-GigabitEthernet3/0/1] port link-type trunk
[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 3/0/1 and set the GVRP registration mode to fixed on the port.
[DeviceA-GigabitEthernet3/0/1] gvrp
[DeviceA-GigabitEthernet3/0/1] gvrp registration fixed
[DeviceA-GigabitEthernet3/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 3/0/1 as a trunk port, and assign it to all VLANs.
[DeviceB] interface GigabitEthernet 3/0/1
[DeviceB-GigabitEthernet3/0/1] port link-type trunk
[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 3/0/1, and set the GVRP registration mode to fixed on the port.
[DeviceB-GigabitEthernet3/0/1] gvrp
[DeviceB-GigabitEthernet3/0/1] gvrp registration fixed
[DeviceB-GigabitEthernet3/0/1] quit
# Create VLAN 3 (a static VLAN).
[DeviceB] vlan 3
[DeviceB-vlan3] quit
3. Verify the configuration
Use the display gvrp local-vlan command to display the local VLAN information maintained by GVRP on ports. For example:
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 3/0/1 of Device A.
[DeviceA] display gvrp local-vlan interface GigabitEthernet 3/0/1
Following VLANs exist in GVRP local database:
1(default), 2
According to the output above, information about VLAN 1 and static VLAN information of VLAN 2 on the local device are registered through GVRP, but dynamic VLAN information of VLAN 3 on Device B is not.
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 3/0/1 of Device B.
[DeviceB] display gvrp local-vlan interface GigabitEthernet 3/0/1
Following VLANs exist in GVRP local database:
1(default), 3
According to the output above, information about VLAN 1 and static VLAN information of VLAN 3 on the local device are registered through GVRP, but dynamic VLAN information of 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 the registration of all VLANs but VLAN 1 between the two switches.
Configuration procedure
1. Configure Device A
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 3/0/1 as a trunk port, and assign it to all VLANs.
[DeviceA] interface GigabitEthernet 3/0/1
[DeviceA-GigabitEthernet3/0/1] port link-type trunk
[DeviceA-GigabitEthernet3/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 3/0/1, and set the GVRP registration mode to forbidden on the port.
[DeviceA-GigabitEthernet3/0/1] gvrp
[DeviceA-GigabitEthernet3/0/1] gvrp registration forbidden
[DeviceA-GigabitEthernet3/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 3/0/1 as a trunk port, and assign it to all VLANs.
[DeviceB] interface GigabitEthernet 3/0/1
[DeviceB-GigabitEthernet3/0/1] port link-type trunk
[DeviceB-GigabitEthernet3/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 3/0/1, and set the GVRP registration mode to forbidden on the port.
[DeviceB-GigabitEthernet3/0/1] gvrp
[DeviceB-GigabitEthernet3/0/1] gvrp registration forbidden
[DeviceB-GigabitEthernet3/0/1] quit
# Create VLAN 3 (a static VLAN).
[DeviceB] vlan 3
[DeviceB-vlan3] quit
3. Verify the configuration
Use the display gvrp local-vlan command to display the local VLAN information maintained by GVRP on ports. For example:
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 3/0/1 of Device A.
[DeviceA] display gvrp local-vlan interface GigabitEthernet 3/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 of VLAN 2 on the local device and dynamic VLAN information of VLAN 3 on Device B are not.
# Display the local VLAN information maintained by GVRP on port GigabitEthernet 3/0/1 of Device B.
[DeviceB] display gvrp local-vlan interface GigabitEthernet 3/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 of VLAN 3 on the local device and dynamic VLAN information of VLAN 2 on Device A are not.