Figure 1 shows the networking of HVRP. The working mechanism of HVRP is described based on this networking.
STP is enabled on the entire network, and the HVRP root interface and HVRP designated interfaces are calculated through STP.
The Switches are connected through trunk interfaces. The trunk interfaces are all enabled with HVRP and can forward packets of VLAN 101 to VLAN 500.
HVRP is disabled on the interfaces outside the STP network, that is, edge interfaces.
Figure 1 Networking diagram of HVRP

The HVRP application involves the following operations:
1. Registering VLANs
Each Switch periodically sends the local VLAN information through the HVRP root interface.
Each Switch forwards the received local VLAN information through the HVRP root interface. In addition, each Switch registers local VLANs on the HVRP designated interface according to the local VLAN information received from the HVRP designated interface.
VLAN registration and aging can be performed only on HVRP designated interfaces.
A VLAN can be registered on an interface only after the interface is added to the VLAN statically. For example, if an HVRP designated interface does not belong to VLAN 999, VLAN 999 cannot be registered on the HVRP designated interface even if the interface receives an HVRP packet with local VLAN 999.
2. Aging VLANs
If an HVRP designated interface does not receive any VLAN registration packet within the aging time, the VLANs on the HVRP designated interface are aged.
By default, only local VLANs are aged. You can configure the S9300&S9300E to age all the VLANs.
3. Sending and maintaining local VLAN information
The HVRP root interface periodically sends local VLAN registration packets according to the VLAN registration timer.
When the role of a local VLAN changes, for example, the VLAN is not a local VLAN any more because the configuration is changed, the Switch sends the local VLAN information through the HVRP root interface immediately.
4. Re-registering VLANs when the status of an HVRP interface changes to Up or Down
When the status of an HVRP interface changes to Up or Down, the aged VLANs may interrupt forwarding of Layer 2 packets on the entire network. Therefore, when a Switch detects that the status of an HVRP interface changes, the Switch immediately sends a restore packet to notify all the other Switches on the network. Then the Switches re-register the aged VLANs on the original interfaces.
5. Re-registering VLANs when the STP role of an HVRP interface changes
When the STP role of an HVRP interface changes, the aged VLANs on this interface are re-registered on the interface.
6. Counting interfaces in a VLAN
A Switch updates the number of interfaces in a VLAN every time an interface is added to or deleted from the VLAN, the VLAN is registered, or the VLAN is aged.
A trunk interface is counted as one interface.
7. MAC address learning mode in a VLAN
When a VLAN contains more than two non-aged interfaces, the interfaces learn MAC addresses.
When a VLAN contains two or less than two non-aged interfaces, the interfaces do not learn MAC addresses. In addition, the dynamic MAC addresses learned before are deleted.



