03-Layer 2 - LAN Switching Configuration Guide

HomeSupportRoutersH3C SR8800 Router SeriesConfigure & DeployConfiguration GuidesH3C SR8800 Configuration Guide-Release3347-6W10303-Layer 2 - LAN Switching Configuration Guide
08-GVRP Configuration
Title Size Download
08-GVRP Configuration 177.72 KB

Configuring GVRP

The Generic Attribute Registration Protocol (GARP) provides a generic framework whereby network 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.

Figure 1 How GARP works

 

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 wants to register its attributes (including manually configured attributes) on other participants, and when it receives Join messages from other 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 to have its attributes deregistered on other participants. It also sends Leave messages when it deregisters attributes after receiving Leave messages from other GARP participants, and when attributes are manually deregistered on it. 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

Each GARP participant starts a LeaveAll timer upon startup. Upon the expiration of the LeaveAll timer, a GARP participant sends LeaveAll messages to deregister all attributes so that all attributes can be re-registered on the other GARP participants. When a GARP participant receives LeaveAll messages from other GARP participants, it also sends LeaveAll messages and reset the LeaveAll timer.

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 network 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

Upon startup, a GARP participant starts a LeaveAll timer. When this timer expires, the participant sends a LeaveAll message so that other participants can re-register all its attribute information. 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:

·       Do not set the LeaveAll timer too short, because a LeaveAll message deregisters all attributes in the entire network. The LeaveAll timer must be greater than Leave timers on all ports. H3C recommends that you set a LeaveAll timer no less than the default value (1000 centiseconds).

·       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

Figure 2 GARP PDU format

 

As shown in Figure 2, GARP PDUs use the IEEE 802.3 Ethernet frame format.

Table 1 The GARP PDU fields

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 network 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 network 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 creation, registration, and deregistration of VLANs on the trunk port.

·           Fixed—Allows manual creation and registration of VLANs, prevents VLAN deregistration, and registers all known VLANs on other ports on the trunk port.

·           Forbidden—Deregisters all VLANs (except VLAN 1) and prevents any further VLAN creation or registration on the trunk port.

Protocols and standards

·           IEEE 802.1Q, Virtual Bridged Local Area Networks

GVRP configuration task list

Complete these tasks to configure GVRP:

 

Task

Remarks

Configuring GVRP functions

Required

Configuring GARP timers

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

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable GVRP globally.

gvrp

By default, GVRP is disabled globally.

3.     Enter Ethernet interface view, Layer 2 aggregate interface view, or port-group view.

·       Enter Ethernet interface view or Layer 2 aggregate interface view:
interface
interface-type interface-number

·       Enter port-group view:
port-group manual
port-group-name

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 a port.

7.     Configure the GVRP registration mode on the ports.

gvrp registration { fixed | forbidden | normal }

Optional.

The default setting is normal.

 

 

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. 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 the chapter “Configuring the 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 Ethernet interface view, Layer 2 aggregate interface view, or port group view.

·       Enter Ethernet interface view or Layer 2 aggregate interface view:
interface
interface-type interface-number

·       Enter port group view:
port-group manual
port-group-name

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 twice the Hold timer setting

Less than half of the leave timer setting

Leave

Greater than twice 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 GARP statistics 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, Device A and Device B are connected through their GigabitEthernet 4/1/1 ports.

Enable GVRP and configure the normal registration mode on ports to enable the registration of dynamic and static VLAN information between the two routers.

Figure 3 Network diagram

 

Configuration procedure

1.      Configure Device A:

# Enable GVRP globally.

<DeviceA> system-view

[DeviceA] gvrp

# Configure port GigabitEthernet 4/1/1 as a trunk port, and assign it to all VLANs.

[DeviceA] interface GigabitEthernet 4/1/1

[DeviceA-GigabitEthernet4/1/1] port link-type trunk

[DeviceA-GigabitEthernet4/1/1] port trunk permit vlan all

# Enable GVRP on trunk port GigabitEthernet 4/1/1.

[DeviceA-GigabitEthernet4/1/1] gvrp

[DeviceA-GigabitEthernet4/1/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 4/1/1 as a trunk port, and assign it to all VLANs.

[DeviceB] interface GigabitEthernet 4/1/1

[DeviceB-GigabitEthernet4/1/1] port link-type trunk

[DeviceB-GigabitEthernet4/1/1] port trunk permit vlan all

# Enable GVRP on trunk port GigabitEthernet 4/1/1.

[DeviceB-GigabitEthernet4/1/1] gvrp

[DeviceB-GigabitEthernet4/1/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 4/1/1 of Device A.

[DeviceA] display gvrp local-vlan interface GigabitEthernet 4/1/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 router, 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 4/1/1 of Device B.

[DeviceB] display gvrp local-vlan interface GigabitEthernet 4/1/1

 Following VLANs exist in GVRP local database:

  1(default),2-3

The output shows that information about VLAN 1, static VLAN information of VLAN 3 on the local router, 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, Device A and Device B are connected through their GigabitEthernet 4/1/1 ports.

Enable GVRP and configure the fixed registration mode on ports to enable the registration of static VLAN information between the two routers.

Figure 4 Network diagram

 

Configuration procedure

1.      Configure Device A:

# Enable GVRP globally.

<DeviceA> system-view

[DeviceA] gvrp

# Configure port GigabitEthernet 4/1/1 as a trunk port, and assign it to all VLANs.

[DeviceA] interface GigabitEthernet 4/1/1

[DeviceA-GigabitEthernet4/1/1] port link-type trunk

[DeviceA-GigabitEthernet4/1/1] port trunk permit vlan all

# Enable GVRP on GigabitEthernet 4/1/1 and set the GVRP registration mode to fixed on the port.

[DeviceA-GigabitEthernet4/1/1] gvrp

[DeviceA-GigabitEthernet4/1/1] gvrp registration fixed

[DeviceA-GigabitEthernet4/1/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 4/1/1 as a trunk port, and assign it to all VLANs.

[DeviceB] interface GigabitEthernet 4/1/1

[DeviceB-GigabitEthernet4/1/1] port link-type trunk

[DeviceB-GigabitEthernet4/1/1] port trunk permit vlan all

# Enable GVRP on GigabitEthernet 4/1/1, and set the GVRP registration mode to fixed on the port.

[DeviceB-GigabitEthernet4/1/1] gvrp

[DeviceB-GigabitEthernet4/1/1] gvrp registration fixed

[DeviceB-GigabitEthernet4/1/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 4/1/1 of Device A.

[DeviceA] display gvrp local-vlan interface GigabitEthernet 4/1/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 router 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 4/1/1 of Device B.

[DeviceB] display gvrp local-vlan interface GigabitEthernet 4/1/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 router 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, Device A and Device B are connected through their GigabitEthernet 4/1/1 ports.

Enable GVRP and configure the forbidden registration mode on ports to prevent the registration of all VLANs but VLAN 1 between the two routers.

Figure 5 Network diagram

 

Configuration procedure

1.      Configure Device A:

# Enable GVRP globally.

<DeviceA> system-view

[DeviceA] gvrp

# Configure port GigabitEthernet 4/1/1 as a trunk port, and assign it to all VLANs.

[DeviceA] interface GigabitEthernet 4/1/1

[DeviceA-GigabitEthernet4/1/1] port link-type trunk

[DeviceA-GigabitEthernet4/1/1] port trunk permit vlan all

# Enable GVRP on GigabitEthernet 4/1/1, and set the GVRP registration mode to forbidden on the port.

[DeviceA-GigabitEthernet4/1/1] gvrp

[DeviceA-GigabitEthernet4/1/1] gvrp registration forbidden

[DeviceA-GigabitEthernet4/1/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 4/1/1 as a trunk port, and assign it to all VLANs.

[DeviceB] interface GigabitEthernet 4/1/1

[DeviceB-GigabitEthernet4/1/1] port link-type trunk

[DeviceB-GigabitEthernet4/1/1] port trunk permit vlan all

# Enable GVRP on GigabitEthernet 4/1/1, and set the GVRP registration mode to forbidden on the port.

[DeviceB-GigabitEthernet4/1/1] gvrp

[DeviceB-GigabitEthernet4/1/1] gvrp registration forbidden

[DeviceB-GigabitEthernet4/1/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 4/1/1 of Device A.

[DeviceA] display gvrp local-vlan interface GigabitEthernet 4/1/1

 Following VLANs exist in GVRP local database:

  1(default)

According to the output above, information about VLAN 1 is registered through GVRP, but static VLAN information of VLAN 2 on the local router and dynamic VLAN information of VLAN 3 on Device B are not.

# Display the local VLAN information maintained by GVRP on port GigabitEthernet 4/1/1 of Device B.

[DeviceB] display gvrp local-vlan interface GigabitEthernet 4/1/1

 Following VLANs exist in GVRP local database:

  1(default)

According to the output above, information about VLAN 1 is registered through GVRP, but static VLAN information of VLAN 3 on the local router and dynamic VLAN information of VLAN 2 on Device A are not.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网