Connexite

Connexite

Did You Know?

Hierarchical approvals let your manager know what people are trying to transfer

Configuring GVRP

Estimated reading: 9 minutes 2 views

Summary: Networking › Switching › Edge › Synapse

Overview of GVRP

Introduction to GVRP

GVRP (GARP VLAN Registration Protocol) is a protocol for dynamically propagate VLAN attributes, and is an application of GARP (Generic Attribute Registration Protocol). It registers and propagates VLAN attributes through the GARP protocol, and implements dynamic creation and deletion of VLANs on the 802.1Q Trunk port.

Introduction to GARP

GARP provides a mechanism to assist members in the same switching network to distribute, propagate and register information such as VLANs and multicast addresses. The application entities following the GARP protocol are called GARP applications. Currently the main GARP applications are GVRP and GMRP. GVRP is a GARP application. It can dynamically configure and diffuse VLAN attributes, and realize dynamic automatic registration, log out of VLANs on 802.1Q Trunk ports. GMRP (GARP Multicast Registration Protocol) is another GARP application. It mainly provides a restricted multicast diffusion function similar to the IGMP detection technology. The GARP protocol is defined in 802.1D.

Port Registration Mode

There are three port registration modes of GVRP: Normal, Fixed and Forbidden: Normal mode: Allow the port to dynamically register and log out of VLAN, and propagate dynamic VLAN and static VLAN information. Fixed mode: Port is prohibited from dynamically registering and deregistering VLANs, and only transmits static VLAN information, not dynamic VLAN information. That is to say, the Trunk port set to Fixed mode, even if all VLANs are allowed to pass, the VLANs actually passed only those manually configured. Forbidden mode: Port is prohibited from dynamically registering and deregistering VLAN, and does not propagate any VLAN information except VLAN1.

Messages and Timers

GARP message The information exchange between GARP members is accomplished by means of message transmission. There are three main types of messages that work: Join messages, Leave messages, and LeaveAll messages. When a GARP application entity wants other devices to register its own attribute information, it will send a Join message to the outside; when it receives a Join message from other entities or the device has statically configured some attributes and needs other GARP application entities to register, The Join message will also be sent out. When a GARP application entity wants other devices to log out its own attribute information, it will send a Leave message to the outside; when it receives a Leave message from other entities to log off some attributes or statically log off some attributes, it will also send a Leave message to the outside information. After each GARP application entity is started, it will start the LeaveAll timer at the same time. When the timer expires, the GARP application entity will send a LeaveAll message to the outside. The LeaveAll message is used to cancel all attributes, so that other GARP application entities can re-register with this entity. The Join message, Leave message and LeaveAll message cooperate to ensure the re-registration or cancellation of information. Through message exchange, all attribute information to be registered can be propagated to all devices configured with GARP in the same LAN. GARP Timer The time interval for sending GARP messages is implemented through timers. GARP defines four timers for controlling the sending period of GARP messages. Hold timer: When the GARP application entity receives the registration information sent by other devices, it will not immediately send the registration information as a Join message, but start the Hold timer. When the timer expires, the GARP application entity will All registration information received during this period is sent out in the same Join message, thereby saving bandwidth resources. Join timer: The GARP application entity can send each Join message twice to ensure the reliable transmission of the message. When the Join message sent for the first time is not answered, the GARP application entity will send the Join message for the second time . The time interval between sending two Join messages is controlled by the Join timer. Leave timer: When a GARP application entity wishes to cancel certain attribute information, it will send a Leave message to the outside world, and the GARP application entity that receives the message starts the Leave timer, and if it does not receive the Join message before the timer expires, it will log out The attribute information. LeaveAll timer: After each GARP application entity starts, it will start the LeaveAll timer at the same time. When the timer expires, the GARP application entity will send a LeaveAll message to the outside, so that other GARP application entities can re-register all attribute information on this entity . Then start the LeaveAll timer again to start a new cycle.

Packet Format

GVRP protocol packets are encapsulated in Ethernet frames, and the packet format is shown in the figure below. Table GVRP Ethernet packet field meaning: Packet field Bytes Field meaning

Protocol ID

Protocol ID, Fixed 0x0001

Message

Message content, support N messages

Attribute type

Attribute type, GVRP fixed bit 0x01

Attribute list

Attribute list, consisting of multiple attributes and end mask

Attribute

attribute content

Attribute length

attribute content length

Attribute event

Events: 0x0:LeaveAll Event 0x1:JoinEmpty Event 0x2:JoinIn Event 0x3:LeaveEmpty Event 0x4:LeaveIn Event 0x5:Empty Event

Attribute value

Attribute value

End mask

End mask, fixed 0x00

Configuring

GVRP Enable Control

  • Global Enable GVRP
SWITCH(config)#gvrp enable
SWITCH(config)#no gvrp enable

Globally enable the GVRP function

By default, the global GVRP function is disabled

  • Port Enable GVRP
SWITCH(config-if)#gvrp enable
SWITCH(config-if)#no gvrp enable

Enable the GVRP function on the interface

By default, GVRP is disabled on an interface The GVRP function on the interface takes effect only when GVRP is enabled both on the interface and globally. Set registration Mode

SWITCH(config-if)#gvrp registration (fixed | forbidden | normal)
SWITCH(config-if)#no gvrp registration

Normal mode: Allow the interface to dynamically register and deregister VLANs, and propagate dynamic and static VLAN information. Fixed mode: This interface is prohibited from dynamically registering and deregistering VLANs, and only propagates static VLAN information, not dynamic VLAN information. That is to say, the Trunk interface set to the fixed mode, even if all VLANs are allowed to pass, the VLANs that actually pass can only be those manually configured. Forbidden mode: This interface is prohibited from dynamically registering and deregistering VLANs, and does not propagate any VLAN information to the outside world.

SWITCH(config)#gvrp timer (join | leave | leaveall) CENTISEC
SWITCH(config)#no gvrp timer

Set the value of the GARP timer

Join: range <20 32765>, default 20, unit centisecond, required to be less than or equal to 1/3 Leave timer value Leave: range <20 32765>, default 60, unit centiseconds, required to be greater than or equal to 3 times the value of the join timer, less than the value of the leaveall timer Leaveall: range <20 32765>, default 1000, unit centisecond, required to be greater than Leave timer value

Note

✦ In the case of multiple devices on the entire network, the value of the LeaveAll timer of each device may be different, but each device will send the LeaveAll message based on the smallest LeaveAll timer on the entire network. Because the LeaveAll message is sent every time the LeaveAll timer expires, other devices will clear the LeaveAll timer after receiving it, so even if there are many different LeaveAll timers on the entire network, only the smallest LeaveAll timer takes effect. Clear Statistics

SWITCH#clear gvrp statistics (| interface IFNAME)

Clear port event statistics

Without interface parameter, clear all ports With interface parameter, clear a specific port

Examples

Typical Cases Case requirements: SW1, SW2, SW3, and SW4 are connected through trunk ports. There are static VLANs 10-20 on SW1 and SW4, and SW2 and SW3 are required to learn these VLANs automatically without manual configuration. Enable GVRP globally and on the interfaces of each SW to realize dynamic registration and update of VLAN information between devices. Steps: SW1 configuration:

SWITCH(config)#Vlan 10-20
SWITCH(config)#gvrp enable
SWITCH(config)#interface gigabitEthernet 0/9
SWITCH(config-if)switchport mode trunk
SWITCH(config-if)gvrp enable

SW2 configuration:

SWITCH(config)#gvrp enable
SWITCH(config)#interface gigabitEthernet 0/9-10
SWITCH(config-if)switchport mode trunk
SWITCH(config-if)gvrp enable

SW3 configuration:

SWITCH(config)#gvrp enable
SWITCH(config)#interface gigabitEthernet 0/9-10
SWITCH(config-if)switchport mode trunk
SWITCH(config-if)gvrp enable

SW4 configuration:

SWITCH(config)#Vlan 10-20
SWITCH(config)#gvrp enable
SWITCH(config)#interface gigabitEthernet 0/9
SWITCH(config-if)switchport mode trunk
SWITCH(config-if)gvrp enable

Verify configuration results: Execute show gvrp vlan command on SW2 and SW3, and it shows that gi0/9 and gi0/10 have dynamically learned vlan 10-20. Execute show vlan all conmand on SW2 and SW3, and it shows that gi0/9 and gi0/10 belong to vlan 10-20.

Display Information

Display GVRP Status Information

SWITCH#show gvrp status

GVRP Global Information: Global State : Enabled Join Timer : 20 centisec Leave Timer : 60 centisec LeaveAll Timer : 1000 centisec GVRP Port Based Information:

Interface State Registration Mode

——————– ——– ——————– gigabitEthernet0/3 Enabled normal po1 Enabled normal Displayed message definition: GVRP Global Information: Global Configuration Status Information

Global State

Global state, Enabled or Disabled Join Timer Join timer value Leave Timer Leave timer value LeaveAll Timer

Leaveall timer value

GVRP Port Based Information: Port configuration status information, the default status port is ignored and not displayed Interface Interface name

State

Port status, Enabled or Disabled

Registration Mode

Port registration mode, Normal, Fixed, Forbidden

Display GVRP VLAN Information

SWITCH#show gvrp vlan

Interface gigabitEthernet0/3: Static Vlan List : 1 Dynamic Vlan List : 15-21 Allow Vlan List : all Interface po1: Static Vlan List : 1 Dynamic Vlan List : 1000-2000 Allow Vlan List : all

SWITCH#show gvrp vlan interface gigabitEthernet 0/3

Interface gigabitEthernet0/3: Static Vlan List : 1 Dynamic Vlan List : 15-21 Allow Vlan List : all Displayed message definition:

Allow Vlan List

port allow vlan list

Display GVRP Statistics

SWITCH#show gvrp statistics

Interface Received Transmitted Drop

——————– ———— ———— ——– gigabitEthernet0/3 1462120 7202490 0 po1 7181418 1790511 0 Displayed message definition: Interface Interface name Received Receive GVRP attribute number Transmitted Send GVRP attribute number Drop Number of discarded GVRP attributes

SWITCH#show gvrp statistics interface gigabitEthernet 0/3

Interface gigabitEthernet0/3: Received Valid Attributes : 1017 Transmitted Attributes : 1 Drop Invalid Attributes : 0 Received JoinEmpty Attributes : 14 Received JoinIn Attributes : 2 Received Empty Attributes : 1001 Received LeaveEmpty Attributes : 0 Received LeaveIn Attributes : 0 Received LeaveAll Attributes : 0 Transmitted JoinEmpty Attributes : 1 Transmitted JoinIn Attributes : 0 Transmitted Empty Attributes : 0 Transmitted LeaveEmpty Attributes : 0 Transmitted LeaveIn Attributes : 0 Transmitted LeaveAll Attributes : 0 Displayed message definition:

Share this Doc

Configuring GVRP

Or copy link