Patent attributes
One embodiment of the present invention provides a switch. The switch includes a link aggregation module and a link management module. The link aggregation module establishes a virtual link aggregation group comprising a plurality of links coupled to the switch and one or more other switches. The plurality of links includes a first and a second sets of links coupling a first and a second end devices, respectively. The link management module determines a current mode which indicates which of the sets of links is currently active, and operates the first and the second sets of links as active and standby links, respectively, for the virtual link aggregation group based on the current mode and a port role for a port participating in the virtual link aggregation group. The port role indicates whether the port is coupled to an active link or a backup link.