A method for realizing Open vSwitch that supports 802.1p, which is characterized by comprising the following steps: a) a priority mode configuration stage: the switch receiving a priority configuration statement of a user and parsing the priority configuration statement to obtain configuration information; wherein the priority mode configuration stage uses an Open vSwitch ovs-vsctl configuration tool to add a priority traffic control mode, the Open vSwitch ovs-vsctl configuration tool being modified to perform a configuration method that supports identification and parsing of the priority configuration statement in the priority traffic control mode; wherein the priority configuration statement has the format: command + object + attribute = value, and wherein the configuration method comprises the steps of: setting a qos name of a port, establishing a qos mode of said qos name and a subqueue name, and establishing a subqueue; and wherein the obtained configuration information comprises: ID, Type, Other-config and Queues; wherein said ID is the qos name, and wherein Type indicates a priority mode and sets at least one priority queue; b) a configuration storage stage: storing said configuration information into a switch database of the Open vSwitch; and c) a priority-based data forwarding stage: the switch receiving a data packet, parsing the data packet to extract key information, wherein said key information comprises the data packet tuple of at least one layer of the data packet, matching the extracted key information with a header field of a flow table and, if matching is successful, executing according to an action in the flow table and putting the data packet into a corresponding priority queue so as to forward the data packet according to the priority of the corresponding priority queue. a) a priority mode configuration stage: the switch receiving a priority configuration statement of a user and parsing the priority configuration statement to obtain configuration information; wherein the priority mode configuration stage uses an Open vSwitch ovs-vsctl configuration tool to add a priority traffic control mode, the Open vSwitch ovs-vsctl configuration tool being modified to perform a configuration method that supports identification and parsing of the priority configuration statement in the priority traffic control mode; wherein the priority configuration statement has the format: command + object + attribute = value, and wherein the configuration method comprises the steps of: setting a qos name of a port, establishing a qos mode of said qos name and a subqueue name, and establishing a subqueue; and wherein the obtained configuration information comprises: ID, Type, Other-config and Queues; wherein said ID is the qos name, and wherein Type indicates a priority mode and sets at least one priority queue; wherein the priority mode configuration stage uses an Open vSwitch ovs-vsctl configuration tool to add a priority traffic control mode, the Open vSwitch ovs-vsctl configuration tool being modified to perform a configuration method that supports identification and parsing of the priority configuration statement in the priority traffic control mode; wherein the priority configuration statement has the format: command + object + attribute = value, and wherein the configuration method comprises the steps of: setting a qos name of a port, establishing a qos mode of said qos name and a subqueue name, and establishing a subqueue; and setting a qos name of a port, establishing a qos mode of said qos name and a subqueue name, and establishing a subqueue; and wherein the obtained configuration information comprises: ID, Type, Other-config and Queues; wherein said ID is the qos name, and wherein Type indicates a priority mode and sets at least one priority queue; wherein said ID is the qos name, and wherein Type indicates a priority mode and sets at least one priority queue; b) a configuration storage stage: storing said configuration information into a switch database of the Open vSwitch; and c) a priority-based data forwarding stage: the switch receiving a data packet, parsing the data packet to extract key information, wherein said key information comprises the data packet tuple of at least one layer of the data packet, matching the extracted key information with a header field of a flow table and, if matching is successful, executing according to an action in the flow table and putting the data packet into a corresponding priority queue so as to forward the data packet according to the priority of the corresponding priority queue.