Patent attributes
An apparatus includes a program instructing hardware and a computer readable storage medium coupled to the hardware and storing programming instructions for execution by the hardware. The programming instructions instruct the hardware to: receive a network device selection message sent by a first network device, where the network device selection message contains a virtual local area network (VLAN) mapping capability identifier of the first network device and a device identifier of the first network device; when determining that both the apparatus and the first network device have VLAN mapping capability according to local VLAN mapping capability and the VLAN mapping capability identifier of the first network device, select a network device for executing VLAN mapping according to sizes or a sequence of a local device identifier and the device identifier of the first network device.