Patent ID: 8045461

Claim:
A method for implementing a Virtual-Switch (V-Switch), comprising: setting up a V-Switch correlation with respect to at least two Virtual Local Area Network (VLAN) tags; receiving a data frame; and performing, by a Data Retransmission Entity (DRE), a V-Switch transmission on the data frame according to the V-Switch correlation with respect to the at least two VLAN tags; wherein the at least two VLAN tags comprise an outer VLAN tag and an inner VLAN tag, and the inner VLAN tag comprises at least a one-layer VLAN tag, and the V-Switch correlation is a correlation: between a first port with a first port VLAN tag and a second port with a second port outer VLAN tag and a second port inner VLAN tag, or between the first port with a first port outer VLAN tag and a first port inner VLAN tag and the second port with the second port outer VLAN tag with the second port inner VLAN tag, wherein, the correlation is set in a VLAN switching table and wherein: an inner VLAN tag field comprising a first inner VLAN tag and a second inner VLAN tag is configured in the VLAN switching table; when the first inner VLAN tag corresponding to one port in a record of the VLAN switching table is invalid and the second inner VLAN tag corresponding to the other port is valid, information stored in the record is the V-Switch correlation between the first port, the first port outer VLAN tag and the second port the second port outer VLAN tag. the second port inner VLAN tag; when the first inner VLAN tag and the second inner VLAN tag corresponding to the two ports in the record of the VLAN switching table are both valid, the information stored in the record is the V-Switch correlation between the first port, the first port outer VLAN tag, the first port inner VLAN tag and the second port, the second port outer VLAN tag, the second port inner VLAN tag; and when the first inner VLAN tag and the second inner VLAN tag corresponding to the two ports in the record of the VLAN switching table are both invalid, the information stored in the record is the V-Switch correlation between the first port, the first port outer VLAN tag and the second port, the second port outer VLAN tag.