Traffic control method, switch, and communication system based on PVST+ protocol
By mapping independent spanning tree instances for traffic of different priorities in the PVST+ protocol and rewriting the ID of low-priority traffic to a pseudo-label when the primary link is congested, the traffic is transmitted through the backup link. This solves the problem of high-priority traffic occupying all the bandwidth, preventing low-priority traffic from being sent. This ensures balanced network service quality and effective utilization of redundant links.
Patent Information
- Application Number
- CN202510912087.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-03
AI Technical Summary
When high-priority traffic occupies all the bandwidth, the existing PVST+ protocol prevents low-priority traffic from obtaining transmission time slots, resulting in an imbalance in network service quality and blocking redundant links, making them ineffective.
By mapping independent spanning tree instances for traffic of different priorities in the PVST+ protocol, and rewriting low-priority traffic data frames to temporary IDs with pseudo labels when the primary link is congested, the frames are transmitted over a backup link and then restored to their original IDs before being transmitted on the primary link, achieving dynamic traffic control.
It effectively avoids the starvation phenomenon of low-priority traffic, ensures the continuous transmission of low-priority traffic, makes full use of redundant link resources, and improves network bandwidth utilization and service quality.
Smart Images

Figure CN120416173B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technologies, and in particular to a traffic control method, a switch, and a communication system based on the PVST+ protocol. Background Art
[0002] The Spanning Tree Protocol (STP, IEEE 802.1D) eliminates loops by blocking redundant ports on a Layer 2 network. However, only one tree is generated for the entire network, forcing all VLANs to share the same path. As a result, many backup links are idle, link utilization is low, and port fault convergence takes tens of seconds.
[0003] To address this shortcoming, the industry has proposed the "separate instance per VLAN" approach. This approach improves bandwidth utilization and service isolation while preventing loops. Based on this, Per-VLAN Spanning Tree Plus (PVST+) runs a separate spanning tree instance for each VLAN on the same physical network, independently elects a root bridge, and calculates port roles. This allows different VLANs to be forwarded along different physical links, achieving load balancing and fault tolerance. It is compatible with 802.1Q tags and separates VLAN BPDUs on trunks. Combined with technologies such as Rapid-PVST+ and Port Fast, it can shorten convergence time to seconds or even milliseconds.
[0004] However, while the current PVST solution can map different services to strict-priority and weighted queues (WFQ / WDRR) based on 802.1p priorities, all priorities still share the same physical spanning tree path. When high-priority services (such as voice and alarms) continuously occupy all bandwidth, the scheduler permanently preempts the port's sending rights, causing low-priority services (such as file synchronization and backup flows) to be dequeued or even discarded, resulting in a "starvation" phenomenon. If high-priority traffic surges, low-priority traffic frames will have little chance of obtaining transmission slots, severely impacting network service quality.
[0005] The disclosure of the above background technology content is only used to assist in understanding the concept and technical solution of this application. It does not necessarily belong to the prior art of this application, nor does it necessarily provide technical guidance. In the absence of clear evidence that the above content has been disclosed before the filing date of this application, the above background technology should not be used to evaluate the novelty and creativity of this application. Summary of the Invention
[0006] The purpose of the present invention is to provide a control method for automatically moving low-priority traffic data frames from a congested primary spanning tree to a backup spanning tree, thereby avoiding packet loss or timeout, and requiring no additional configuration because no external VLAN is added and no frame format is modified.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A traffic control method based on the PVST+ protocol controls the transmission path of VLAN traffic data input from an input port of a network device without adding an additional external virtual local area network. The control method includes the following steps:
[0009] The network device input port receives a VLAN traffic data frame, parses the VLAN tag information thereof, and extracts a VLAN ID and a priority field from the VLAN tag information;
[0010] Identify a priority category of the data frame according to the priority field, wherein the priority category includes a first priority and a lower second priority;
[0011] Forwarding data frames of the first priority to the outside of the network device through a pre-configured primary link, and monitoring the congestion level of the primary link; wherein the primary link is a link in a first spanning tree instance maintained independently for the current VLAN by the PVST+ protocol;
[0012] If it is detected that the primary link reaches a preset congestion index, the following steps are performed:
[0013] According to a preset rule, the VLAN ID of a data frame belonging to the second priority is rewritten into a temporary ID carrying a pseudo tag to obtain a rewritten virtual VLAN traffic data frame; the virtual VLAN traffic data frame is transmitted to the output port of the network device through a backup link different from the main link, wherein the backup link is a link in a second spanning tree instance that is independently maintained by the PVST+ protocol for the rewritten virtual VLAN, and the backup link and the first spanning tree instance are located in the same physical topology and are isolated from each other, and the pseudo tag is a basis for determining whether a virtual VLAN traffic data frame automatically belongs to the backup link; before forwarding the data frame from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewrite.
[0014] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, if there are multiple virtual VLAN traffic data frames belonging to the backup link at a certain moment, they are queued at the entrance of the backup link in a preset order;
[0015] If it is monitored that the main link is converted from a preset congestion index to a preset decongestion index, the temporary ID of the data frame in the waiting state at the entrance of the backup link is restored to the VLAN ID before the rewriting, so that the restored VLAN traffic data frame belongs to the main link, and then the restored VLAN traffic data frame is forwarded to the outside of the network device through the main link, wherein the congestion level represented by the decongestion index is lighter than the congestion level represented by the congestion index.
[0016] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, the order of multiple virtual VLAN traffic data frames in the waiting queue is determined according to the order of reception time or priority;
[0017] If it is detected that the main link reaches a preset congestion index and is converted to a preset decongestion index, the temporary ID of the data frame in the waiting queue is restored to the VLAN ID before the rewriting, and the data frame is removed from the waiting queue;
[0018] Monitor the main link at a preset interval frequency to see if it reaches the decongestion indicator. If so, restore the temporary ID of the preceding data frame in the current waiting queue to the VLAN ID before rewriting; otherwise, the virtual VLAN traffic data frames in the current waiting queue continue to queue and wait.
[0019] Furthermore, based on any one of the technical solutions or a combination of multiple technical solutions described above, if it is monitored that the main link has reached the decongestion index, and the network device input port newly receives a VLAN traffic data frame of the second priority, the newly received VLAN traffic data frame of the second priority will be forwarded to the outside of the network device through the main link, taking precedence over the virtual VLAN traffic data frame waiting in queue at the entrance of the backup link.
[0020] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, the first spanning tree instance and the second spanning tree instance located in the same physical topology are connected to the same output port or different output ports of the network device;
[0021] When the virtual VLAN traffic data frame is transmitted to the end of the standby link or the output port of the network device, its temporary ID is restored to the VLAN ID before rewriting, and the restored VLAN traffic data frame is forwarded from the output port to the outside of the network device.
[0022] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the network device parses the 802.1Q tag of the VLAN traffic data frame and extracts the VLAN ID field and the priority field value from the 802.1Q tag;
[0023] If the extracted priority field value reaches a preset priority threshold, the priority category of the corresponding data frame is marked as the first priority; otherwise, the priority category of the corresponding data frame is marked as the second priority.
[0024] Furthermore, based on any one of the technical solutions or a combination of multiple technical solutions described above, if the current VLAN traffic data frame belongs to the second priority and the current main link has not reached the preset congestion index, the VLAN traffic data frame belonging to the second priority will be forwarded to the outside of the network device through the main link.
[0025] Furthermore, based on any one of the above technical solutions or a combination of multiple technical solutions, the congestion level of the primary link is monitored by one or more of the following methods:
[0026] Method 1 is to monitor the instantaneous utilization of the primary link port in real time. If the utilization rate continuously reaches a preset utilization threshold within a preset time period, and / or if the average value within the preset time period reaches a preset average utilization threshold, then it is determined that the primary link has reached the congestion indicator.
[0027] Method 2 is to monitor in real time the length of the data frame queue waiting in the queue at the main link port. If it reaches a preset length threshold, it is determined that the main link has reached the congestion index, wherein the data frame queue waiting in the queue at the main link port is a queue composed of data frames of the first priority, or a queue composed of data frames of the second priority, or a queue composed of all data frames in the waiting queue at the main link port.
[0028] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, if it is monitored that the main link changes from not meeting the preset congestion index to reaching the congestion index or maintaining congestion, and there are data frames of the second priority queued at the main link port or the network device input port newly receives VLAN traffic data frames of the second priority, the following steps are performed:
[0029] Rewriting the VLAN ID of the data frame belonging to the second priority into a temporary ID carrying the pseudo tag;
[0030] Transmitting the corresponding virtual VLAN traffic data frame obtained after rewriting to the output port of the network device through the standby link;
[0031] Before forwarding the data frame from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before being rewritten.
[0032] Furthermore, based on any one of the above technical solutions or a combination of multiple technical solutions, the VLAN ID is rewritten into a temporary ID carrying a pseudo tag in the following manner:
[0033] Set the most significant bit of the VLAN ID from 0 to 1, and keep the other bits unchanged.
[0034] The network device determines whether the VLAN ID carries a pseudo tag by identifying the most significant bit of the ID.
[0035] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, the PVST+ protocol maintains an independent first spanning tree instance for the current VLAN, which includes a primary link and a redundant link that is designated to be blocked;
[0036] The PVST+ protocol maintains an independent second spanning tree instance for the virtual VLAN, selects the redundant link in the first spanning tree instance as the backup link, and selects the primary link in the first spanning tree instance as the redundant link in the second spanning tree instance.
[0037] Furthermore, based on any one of the aforementioned technical solutions or a combination of multiple technical solutions, the backup link is pre-configured by the PVST+ protocol, and the number of the backup links is one or more.
[0038] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, the number of the backup links is multiple;
[0039] The network device distributes the plurality of virtual VLAN traffic data frames alternately to the two standby links based on a load balancing mechanism;
[0040] Alternatively, the network device allocates the plurality of virtual VLAN traffic data frames to the standby link in the following manner: if there is an idle standby link, the virtual VLAN traffic data frame currently to be allocated is allocated to the idle standby link; otherwise, searching whether there is a standby link that meets the following conditions:
[0041] The priority field value of the data frame in the waiting queue at the entrance of the backup link is smaller than the priority field value of the data frame currently to be allocated. If it exists, the data frame currently to be allocated will be inserted into the corresponding queue and precede the data frame with a lower priority field value; if it does not exist, it will be allocated to the end of the waiting queue at one of the entrances of the backup link.
[0042] According to another aspect of the present invention, a traffic control method based on the PVST+ protocol is provided. This method controls the transmission path of VLAN traffic data input from an input port of a network device without adding an additional external virtual local area network. The method includes the following steps:
[0043] The PVST+ protocol maintains an independent first spanning tree instance for the first type of VLAN and an independent second spanning tree instance for the second type of VLAN. The primary link in the first spanning tree instance and the backup link in the second spanning tree instance are located in the same physical topology and are isolated from each other.
[0044] monitoring the congestion level of the main link, and if it does not reach a preset congestion index, forwarding the first class VLAN traffic data frame received by the input port of the network device to the outside of the network device through the main link;
[0045] If the main link reaches a preset congestion index, determining a transmission path according to the priority of the first-class VLAN traffic data frame: if the first-class VLAN traffic data frame belongs to a preset first priority, forwarding it to the outside of the network device through the main link;
[0046] If the first-class VLAN traffic data frame belongs to a second priority lower than the first priority, the VLAN ID of the data frame belonging to the second priority is rewritten into a temporary ID carrying a pseudo tag according to a preset rule, and a virtual VLAN traffic data frame belonging to the second-class VLAN is obtained after the rewriting. The virtual VLAN traffic data frame is then transmitted to the output port of the network device through the backup link; and before the data frame is forwarded from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewriting.
[0047] According to another aspect of the present invention, the present invention provides a switch, comprising:
[0048] An input port configured to receive VLAN traffic data frames sent by an external upstream device;
[0049] a parsing module configured to parse the VLAN tag information and extract the VLAN ID field and the priority field;
[0050] a priority identification module configured to identify, based on the extracted priority field, whether the priority category of the data frame is the first priority or the second priority;
[0051] A primary link and a backup link that are isolated from each other in the same physical topology, wherein the primary link is a link in a first spanning tree instance maintained independently by the PVST+ protocol for the current VLAN; and the backup link is a link in a second spanning tree instance maintained independently by the PVST+ protocol for another VLAN.
[0052] A congestion monitoring module is configured to monitor whether the congestion level of the primary link reaches a preset congestion index;
[0053] An ID rewriting module is configured to, after the congestion monitoring module detects that the primary link has reached a preset congestion indicator, rewrite the VLAN ID of the data frame belonging to the second priority into a temporary ID carrying a pseudo tag according to a preset rule, so that the rewritten virtual VLAN traffic data frame automatically belongs to the backup link and is then transmitted to the output port of the switch through the backup link;
[0054] An ID recovery module is configured to restore the temporary ID to the VLAN ID before the rewriting before the virtual VLAN traffic data frame is forwarded from the output port to the outside;
[0055] The data frames of the first priority and the data frames of the second priority that have not been rewritten by the ID rewriting module are both transmitted to the output port of the switch through the main link;
[0056] The output port is configured to receive data transmitted by the primary link and / or the backup link and forward the data to an external downstream device.
[0057] Furthermore, based on any one of the technical solutions or a combination of multiple technical solutions described above, the switch is configured to execute the steps of the traffic control method described above.
[0058] According to yet another aspect of the present invention, the present invention provides a communication system based on the PVST+ protocol, including the switch described above.
[0059] The beneficial effects brought about by the technical solution provided by the present invention are as follows:
[0060] a. Preventing starvation of low-priority services: When high-priority traffic occupies the primary link for a long period of time, the system automatically moves low-priority traffic data frames to the backup spanning tree, allowing for continuous forwarding, avoiding queues, packet loss, or timeouts.
[0061] b. No external VLANs are added, and the 802.1Q frame format is not modified (i.e., the number of frame bits is neither increased nor decreased). Rewriting the VID only affects the switch's internal table lookup, and the original VID is restored upon egress. All logic remains internal to the switch, making it transparent to terminals and upper-layer networks. No configuration changes are required, facilitating gradual deployment.
[0062] c. Compatible with PVST+ loop protection: Each logical instance with bit 11 = 0 / 1 independently elects a root and has an independent port role. Even if two trees are on the same line, loops will not occur, and network stability will not be affected. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0064] Figure 1 A flowchart of a first traffic control method based on the PVST+ protocol provided by an exemplary embodiment of the present invention;
[0065] Figure 2 A flowchart of switching virtual VLAN traffic data frames queued at a standby link inlet back to a primary link is provided as a result of an exemplary embodiment of the present invention;
[0066] Figure 3 A schematic diagram of distributing virtual VLAN traffic data frames on multiple backup links is provided as an exemplary embodiment of the present invention;
[0067] Figure 4 A schematic structural diagram of a switch in a communication system provided by an exemplary embodiment of the present invention;
[0068] Figure 5 A flowchart of a second traffic control method based on the PVST+ protocol is provided as an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0070] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0071] Currently, PVST+ natively selects only VLAN-based trees and cannot plan independent physical links for different services based on priority. Redundant links are blocked, making it difficult to offload low-priority traffic frames. This wastes bandwidth resources and fails to provide minimum bandwidth guarantees for secondary services.
[0072] In the existing Strict-Priority queue, when high-priority services occupy the link for a long time, low-priority traffic data frames have almost no chance to be sent; one of the invention purposes of this application is to ensure that secondary services always obtain a predictable minimum bandwidth by mapping independent generation trees and queue weights for different priorities.
[0073] Traditional PVST+ only enables one physical primary link in the same VLAN, leaving the backup link blocked and idle. A second objective of this invention is to distribute high- and low-priority traffic to different sub-spanning trees, allowing the previously blocked link to carry low-priority / high-volume traffic again, achieving bidirectional full utilization of the link.
[0074] In one embodiment of the present invention, a traffic control method based on the PVST+ protocol is provided, which controls the transmission path of VLAN traffic data input from the input port of a network device without adding an additional external virtual local area network. Figure 1 As shown, the control method comprises the following steps:
[0075] S1: The network device input port receives a VLAN traffic data frame, parses its VLAN tag information, and extracts the VLAN ID and priority field from the VLAN tag information;
[0076] Specifically, the network device parses the 802.1Q tag of the VLAN traffic data frame. The 802.1Q tag (VLAN Tag) is a 4-byte field inserted into the Ethernet frame to support virtual local area network (VLAN) division and priority marking. The VLAN ID field and priority field value can be extracted from the 802.1Q tag;
[0077] S2: Identify a priority category of the data frame according to the priority field, where the priority category includes a first priority and a lower second priority;
[0078] Specifically, the priority field (PCP) is a 3-bit field in the 802.1Q tag that marks the priority of an Ethernet frame. Following the IEEE 802.1Q standard, it can represent eight priority levels, from 0 to 7, with higher values indicating higher priority. If the extracted priority field value reaches the preset priority threshold, the corresponding data frame is marked as the first priority class; otherwise, the corresponding data frame is marked as the second priority class.
[0079] In a specific embodiment, the priority threshold is set to 5, that is, when the priority field value corresponding to the extracted frame data is between 5 and 7, corresponding to the scenarios of voice traffic, video traffic, and network control traffic, respectively, the frame data is determined to belong to a higher priority, otherwise it belongs to a lower second priority.
[0080] S3-1: If the current VLAN traffic data frame has a first priority, forward the current data frame to the outside of the network device through a pre-configured primary link; wherein the primary link is a link in the first spanning tree instance maintained independently for the current VLAN by the PVST+ protocol;
[0081] S3-2: If the current VLAN traffic data frame belongs to the second priority, and the congestion level of the main link is monitored to see if it reaches a preset congestion index, if it does not reach the congestion index, the data frame belonging to the second priority is also forwarded to the outside of the network device through the main link; if it reaches the congestion index, the following steps S4 to S7 are executed; if the current VLAN traffic data frame belongs to the second priority, and the current main link does not reach the preset congestion index, the VLAN traffic data frame belonging to the second priority is forwarded to the outside of the network device through the main link.
[0082] Specifically, the congestion level of the primary link is monitored by one or more of the following methods:
[0083] Method 1 is to monitor the instantaneous utilization of the primary link port in real time. If the utilization rate continuously reaches a preset utilization threshold within a preset time period, and / or if the average value within the preset time period reaches a preset average utilization threshold, then it is determined that the primary link has reached the congestion indicator.
[0084] Method 2 is to monitor in real time the length of the data frame queue waiting in the queue at the main link port. If it reaches a preset length threshold, it is determined that the main link has reached the congestion index, wherein the data frame queue waiting in the queue at the main link port is a queue composed of data frames of the first priority, or a queue composed of data frames of the second priority, or a queue composed of all data frames in the waiting queue at the main link port.
[0085] In a specific embodiment, a network device (such as a switch) monitors the utilization and queue length of each port over a long period of time. Once it is found that the primary link port is continuously occupied by services and the utilization exceeds 80%, it is considered that the primary link is congested, and the path for the second-priority data frames needs to be switched to the backup link for transmission.
[0086] S4: rewriting the VLAN ID of the data frame belonging to the second priority into a temporary ID carrying a pseudo tag according to a preset rule to obtain a rewritten virtual VLAN traffic data frame;
[0087] S5: Transmitting the virtual VLAN traffic data frame to the output port of the network device via a backup link different from the primary link, wherein the backup link is a link in a second spanning tree instance maintained independently by the PVST+ protocol for the rewritten virtual VLAN, and the backup link and the first spanning tree instance are located in the same physical topology and are isolated from each other. The first spanning tree instance and the second spanning tree instance located in the same physical topology can be connected to the same output port or different output ports of the network device; the pseudo tag is a basis for determining whether a virtual VLAN traffic data frame automatically belongs to the backup link;
[0088] S6: Before forwarding the data frame from the output port of the network device to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewrite; specifically, when the virtual VLAN traffic data frame is transmitted to the end of the standby link or the output port of the network device, its temporary ID is restored to the VLAN ID before the rewrite, and the restored VLAN traffic data frame is forwarded from the output port to the outside of the network device.
[0089] S7: Forwarding the restored VLAN traffic data frame from the output port to the outside of the network device.
[0090] From the above, it can be seen that the conditions for executing steps S4 to S7 are that the current data frame belongs to the second priority and the current main link is congested, which is referred to as the diversion condition below.
[0091] In one embodiment, if there are multiple virtual VLAN traffic data frames belonging to the backup link at a certain moment, they are queued at the entrance of the backup link in a preset order, such as Figure 2 As shown, virtual VLAN traffic data frame 1 is occupying the standby link, and subsequent data frames such as virtual VLAN traffic data frame 2 form a waiting queue; virtual VLAN traffic data frame 1, virtual VLAN traffic data frame 2 to virtual VLAN traffic data frame N determine the order of multiple virtual VLAN traffic data frames in the waiting queue according to the order of reception time or priority.
[0092] If it is monitored that the main link is converted from a preset congestion index to a preset decongestion index, the temporary ID of the data frame waiting at the entrance of the backup link will be restored to the VLAN ID before the rewrite, so that the restored VLAN traffic data frame belongs to the main link, and then the restored VLAN traffic data frame is forwarded to the outside of the network device through the main link, wherein the congestion level represented by the decongestion index is lighter than the congestion level represented by the congestion index to avoid frequent switching of paths. The entire process is automatically executed by the switch without manual intervention. For example, the above-mentioned utilization rate exceeding 80% is considered to be congested in the main link, and the utilization rate below 60% is considered to have reached the decongestion index. For example, the waiting queue length in the congestion index is greater than the waiting queue length in the decongestion index.
[0093] Specific as Figure 2 , the virtual VLAN traffic data frame 2 at the first position in the waiting queue is first restored to VLAN traffic data frame 2. The switch runs the spanning tree algorithm to maintain the roles of each port under the VLAN (root port, designated port, blocked port, etc.), and then automatically belongs to the main link and changes the transmission path.
[0094] Then, the virtual VLAN traffic data frame 2 is removed from the waiting queue, and the virtual VLAN traffic data frame 3 becomes the first data frame in the waiting queue. The main link is monitored at a preset interval frequency to see whether it reaches the decongestion index. If so, the temporary ID of the virtual VLAN traffic data frame 3 is restored to the VLAN ID before the rewrite. The restored VLAN traffic data frame 3 automatically belongs to the main link and changes the transmission path.
[0095] Alternatively, before the next monitoring is performed at a preset interval frequency, the virtual VLAN traffic data frame 3 has occupied the backup link and is also removed from the waiting queue. If the result of the next monitoring is that the decongestion index is reached, the temporary ID of the virtual VLAN traffic data frame 4 is restored to the VLAN ID before the rewrite, and the restored VLAN traffic data frame 4 automatically belongs to the main link and changes the transmission path.
[0096] When the main link reaches the decongestion index, in addition to the above-mentioned embodiment of giving priority to restoring the virtual VLAN traffic data frames in the waiting queue to VLAN traffic data frames to return to the main link for transmission, in another embodiment, if it is monitored that the main link reaches the decongestion index, the network device input port newly receives a VLAN traffic data frame of the second priority, then the newly received VLAN traffic data frame of the second priority is forwarded to the outside of the network device through the main link in priority to the virtual VLAN traffic data frames waiting in queue at the entrance of the backup link. This is also a technical solution that can achieve the inventive purpose of this application.
[0097] In one embodiment, any of the following four situations may occur:
[0098] Case 1: The primary link remains congested, and there are data frames of the second priority waiting in queue at the primary link port.
[0099] Case 2: The primary link remains congested, and the network device input port receives a new VLAN traffic data frame with the second priority.
[0100] Case 3: The primary link transitions from not meeting the preset congestion index to meeting the congestion index, and there are data frames of the second priority waiting in queue at the primary link port;
[0101] Case 4: the main link changes from not meeting the preset congestion index to meeting the congestion index, and the network device input port newly receives a VLAN traffic data frame belonging to the second priority;
[0102] If any of the above conditions is met, the VLAN ID of the data frame belonging to the second priority is rewritten into a temporary ID carrying the pseudo tag; the corresponding virtual VLAN traffic data frame obtained after the rewriting is transmitted to the output port of the network device through the backup link; before forwarding the data frame from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewriting.
[0103] In a specific embodiment, the VLAN ID is rewritten into a temporary ID carrying a pseudo tag in the following manner: the most significant bit of the VLAN ID is set from 0 to 1, and the other bit data except the most significant bit remains unchanged; the network device determines whether the ID carries the pseudo tag by identifying the most significant bit of the VLAN ID: when the most significant bit of the VLAN ID is set to 1, the frame is regarded as belonging to another VLAN within the switching network, and can be forwarded along a path different from the original VLAN.
[0104] On the contrary, when recovery is needed, the most significant bit of the VLAN ID is set from 1 to 0, that is, before the frame data leaves the diversion path (the end of the backup path) or leaves the switch output port, the most significant bit previously rewritten is cleared to zero, that is, restored to the original VLAN ID. This ensures that the outside of the switch will not notice that the internal layer of the switch has been rewritten: the terminal still receives the message of the original VLAN, and the network layer cannot perceive the path change.
[0105] When PVST+ maintains independent spanning tree instances for two different VLANs, if the most significant bit of a frame's ID is 1, indicating that the primary link is congested and the current frame's priority does not meet the standard, the switch runs the spanning tree algorithm based on the ID's most significant bit being 1, maintains the port's role (root port, designated port, blocked port, etc.) in this virtual VLAN, and automatically assigns the port to the backup link, changing the transmission path. If the most significant bit of a frame's ID is 0, indicating that the ID has not been rewritten, the frame either has a higher priority or is not congested on the primary link, then the frame is automatically assigned to the primary link.
[0106] In a specific embodiment, the PVST+ protocol maintains an independent first spanning tree instance for the current VLAN, which includes a primary link and a redundant link that is designated to be blocked;
[0107] The PVST+ protocol maintains an independent second spanning tree instance for the virtual VLAN, selecting the redundant link in the first spanning tree instance as the backup link and the primary link in the first spanning tree instance as the redundant link in the second spanning tree instance. Specifically, during configuration, the virtual VLAN's spanning tree root bridge position can be manually specified or the link cost adjusted so that the selected path uses the redundant physical link previously blocked in the primary VLAN as the forwarding path. In other words, if the primary VLAN spanning tree uses link A for forwarding and links B for blocking, the virtual VLAN spanning tree can reverse this and select link B for forwarding and link A for blocking. Through this redistribution of port roles, the two spanning trees in the same physical topology each block different redundant links, achieving service path separation: high-priority traffic frames continue to use the primary VLAN spanning tree and are forwarded normally over link A; low-priority traffic frames, due to the VID tag, are directed to the virtual VLAN spanning tree and reach their destination over link B. This utilizes redundant network paths, effectively improving overall link throughput while preventing interference between high- and low-priority traffic frames.
[0108] In a specific embodiment, to achieve path switching without adding external VLANs, this solution utilizes the most significant bit (bit 11) of the 12-bit VLAN ID (VID) as the "Layer 2 topology selection identifier." By default, bit 11 is 0, and the frame is forwarded along the first spanning tree (primary link). When congestion is detected on the primary link and the current frame is prioritized second, the switch internally rewrites only the most significant bit of the VID to 1, changing the VID from 0xxx_xxxx_xxxx to 1xxx_xxxx_xxxx. When the frame leaves the private network and arrives at an egress port marked as the network edge, recovery logic clears the VID's high bit, restoring the frame to its original VLAN ID. The remaining tags and payload remain unchanged, ensuring transparency to the terminal and upper-layer routers. This rewrite does not change the frame length or become visible externally; it only affects the switch's subsequent table lookup process. In this embodiment, bit 11 is 0, corresponding to a Class I VLAN. When bit 11 is rewritten to 1, the corresponding data frame is considered a Class II VLAN. The PVST+ protocol maintains an independent first spanning tree instance for the Class I VLAN and an independent second spanning tree instance for the Class II VLAN. By leveraging the three-step collaboration of "real-time congestion detection + VID high-bit rewriting + independent spanning tree tables," this technology implements dynamic path splitting within a single VLAN: high-priority frames remain on the primary link, while low-priority traffic frames are immediately migrated to the backup link when the primary link is congested. This eliminates low-priority service starvation and fully utilizes redundant link resources.
[0109] Specific implementation example: The rewriting process occurs within the switch's internal forwarding engine. When a low-priority traffic frame is determined to require a backup link, the switch does not directly forward the frame using the original VLAN. Instead, during the forwarding decision phase, the switch modifies its VLAN ID by changing bit 11 of the original VID from 0 to 1 (equivalent to adding 2048 to the original VLAN number). For example, VLAN 10 (binary representation 00001010), used for external services, becomes VLAN 2058 (binary representation 100000001010, with the most significant bit 11 = 1). This new VID is used only within the switching network and has no external meaning. Since IEEE 802.1Q specifies 12-bit VLAN IDs with a range of 1 to 4094 (0 and 4095 are reserved), this solution, by using the most significant bit as an internal identifier, remains within the standard VLAN range and prevents conflicts with normal VLAN frames not involved in traffic diversion. The rewritten frame carries a "virtual VLAN" tag. Its priority field (PCP) remains unchanged during network transmission, thus maintaining the traffic's quality of service (QoS) marking. Only the VID (Very Important Detection) used for routing is changed. By rewriting the tag at ingress and restoring it at egress, low-priority traffic frames are temporarily "renamed" to a different VLAN within the internal network, returning to their original VLAN upon exit. The VID recovery module is typically deployed at edge ports connecting to endpoints or upper-layer networks. For frames destined for endpoints, the rewritten VID is replaced with the actual VID before delivery to the endpoint port. For upstream connections to routers / aggregation switches, the VID is intercepted and inspected before the frame is output to the traffic distribution system. If the highest bit is 1 (belonging to the virtual VLAN), the frame is restored and then forwarded through a normal port. This ensures that external devices always receive traffic with the correct VLAN identifier, unaware of the internal rewrite.
[0110] In this embodiment, the backup link may be configured immediately when the offloading condition is met, or one or more backup links may be pre-configured by the PVST+ protocol.
[0111] like Figure 3 As shown, the number of the backup links is multiple. Taking two as an example, including backup link 1 and backup link 2, there are two ways to allocate virtual VLAN traffic data frames on the backup links:
[0112] Mode I: The network device distributes multiple virtual VLAN traffic data frames alternately to two backup links based on a load balancing mechanism; Figure 3For example, in chronological order, virtual VLAN traffic data frame 11 is received first and assigned to backup link 1, then virtual VLAN traffic data frame 21 is received and assigned to backup link 2, then virtual VLAN traffic data frame 12 is received and assigned to backup link 1, and the next virtual VLAN traffic data frame is assigned to backup link 2, and so on, alternating to achieve load balancing.
[0113] Method II: If there is an idle standby link, the virtual VLAN traffic data frame to be allocated is allocated to the idle standby link. Otherwise, a check is performed to see if there is a standby link that meets the following conditions:
[0114] If the priority field value of the data frame in the waiting queue at the backup link entrance is smaller than the priority field value of the data frame currently to be allocated, then the data frame currently to be allocated will be inserted into the corresponding queue and precede the data frame with a lower priority field value; if it does not exist, then it will be allocated to the end of the waiting queue at one of the backup link entrances. Figure 3 If the priority field value of the virtual VLAN traffic data frame K shown is between the virtual VLAN traffic data frame 12 and the virtual VLAN traffic data frame 13, it will be inserted into the position between the virtual VLAN traffic data frame 12 and the virtual VLAN traffic data frame 13 in the queue.
[0115] In the second embodiment of the traffic control method based on the PVST+ protocol of the present invention, the transmission path of the VLAN traffic data input by the input port of the network device is controlled without adding an additional external virtual local area network. The control method is as follows: Figure 5 As shown:
[0116] The PVST+ protocol maintains an independent first spanning tree instance for the first type of VLAN and an independent second spanning tree instance for the second type of VLAN. The primary link in the first spanning tree instance and the backup link in the second spanning tree instance are located in the same physical topology and are isolated from each other.
[0117] monitoring the congestion level of the main link, and if it does not reach a preset congestion index, forwarding the first class VLAN traffic data frame received by the input port of the network device to the outside of the network device through the main link;
[0118] If the main link reaches a preset congestion index, determining a transmission path according to the priority of the first-class VLAN traffic data frame: if the first-class VLAN traffic data frame belongs to a preset first priority, forwarding it to the outside of the network device through the main link;
[0119] If the first-class VLAN traffic data frame belongs to a second priority lower than the first priority, the VLAN ID of the data frame belonging to the second priority is rewritten into a temporary ID carrying a pseudo tag according to a preset rule, and a virtual VLAN traffic data frame belonging to the second-class VLAN is obtained after the rewriting. The virtual VLAN traffic data frame is then transmitted to the output port of the network device through the backup link; and before the data frame is forwarded from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewriting.
[0120] contrast Figure 1 and Figure 5 It can be seen that the flow control method provided by this embodiment is similar to Figure 1 The corresponding traffic control methods differ primarily in the order of identifying traffic priority and monitoring traffic congestion. However, they share the same specific technical feature: when both low priority and traffic congestion conditions are met, the low-priority traffic data frames are diverted to a backup link. Based on the same inventive concept, the content of the first traffic control method embodiment is incorporated herein by reference into the second traffic control method embodiment.
[0121] The embodiment of the present invention provides a communication system based on the PVST+ protocol, such as Figure 4 As shown, the communication system includes an upstream device, a switch and a downstream device, and the switch includes:
[0122] An input port configured to receive VLAN traffic data frames sent by an external upstream device;
[0123] A parsing module configured to parse the VLAN tag information and extract the VLAN ID field and the priority field;
[0124] a priority identification module configured to identify, based on the extracted priority field, whether the priority category of the data frame is the first priority or the second priority;
[0125] A primary link and a backup link that are isolated from each other in the same physical topology, wherein the primary link is a link in a first spanning tree instance maintained independently by the PVST+ protocol for the current VLAN; and the backup link is a link in a second spanning tree instance maintained independently by the PVST+ protocol for another VLAN.
[0126] A congestion monitoring module is configured to monitor whether the congestion level of the primary link reaches a preset congestion index;
[0127] An ID rewriting module is configured to, after the congestion monitoring module detects that the primary link has reached a preset congestion indicator, rewrite the VLAN ID of the data frame belonging to the second priority into a temporary ID carrying a pseudo tag according to a preset rule, so that the rewritten virtual VLAN traffic data frame automatically belongs to the backup link and is then transmitted to the output port of the switch through the backup link;
[0128] An ID recovery module is configured to restore the temporary ID to the VLAN ID before the rewriting before the virtual VLAN traffic data frame is forwarded from the output port to the outside;
[0129] The data frames of the first priority and the data frames of the second priority that have not been rewritten by the ID rewriting module are both transmitted to the output port of the switch through the main link;
[0130] The output port is configured to receive data transmitted by the main link and / or the backup link and forward it to an external downstream device. It should be noted that a switch can have multiple input ports and multiple output ports. In an embodiment with multiple output ports, the main link and the backup link are not necessarily the same. Figure 4 The same output port is connected as shown, which requires determining the specific port position according to the communication protocol.
[0131] The inventive concept of the switch provided in this embodiment is the same as the inventive concept of the flow regulation method embodiment provided in the above embodiment, that is, the switch of this embodiment is configured to execute the steps of the flow regulation method as described above, and the content of the flow regulation method embodiment is incorporated into this switch embodiment by reference.
[0132] This invention proposes a method that utilizes the most significant bit (the 11th bit) of the 802.1Q VLAN ID to dynamically route high- and low-priority traffic in a switching network, achieving physical link separation. By dividing the transmission paths into primary and backup within a single VLAN architecture, high-priority traffic always flows along the primary link, while low-priority traffic frames are automatically diverted to the backup link when the primary link is congested, preventing starvation. The entire process is transparent to terminal devices and upper-layer network equipment, and is still viewed as a single VLAN. This effectively enhances traditional PVST+ by balancing link utilization, service fairness, and implementation costs. Within the same VLAN, the most significant bit of the VID is automatically rewritten: if the primary link becomes congested, low-priority traffic frames are immediately redirected to the backup link. Once the congestion subsides, the frames are automatically switched back, while high-priority traffic always flows along the primary link. Externally, only a single VLAN is seen, requiring no additional configuration. As a result, high-priority services maintain low latency and high reliability, while low-priority services can utilize redundant links. This results in higher overall bandwidth and more stable performance. All of this is based on existing 802.1Q and spanning tree protocols, making implementation simple.
[0133] The technical solution of the present invention has great application prospects in the following aspects:
[0134] 1. Cloud Data Center / Large-Scale Computing Platform
[0135] In data center networks with Leaf-Spine or Clos topologies, the east-west traffic generated by massive servers often causes transient congestion on primary links. This is particularly true in scenarios like AI training and distributed storage replication, where high-priority control traffic and low-priority high-volume traffic compete for bandwidth over a long period of time. This technology rewrites low-priority traffic to backup links in real time, while maintaining a single service VLAN structure. This frees up deterministic channels for high-priority RPC, heartbeat, and control frames, achieving "link-level QoS" without relying on ECMP or reconfiguring VLAN planning, making it suitable for gradual software upgrade deployments.
[0136] (2) 5G fronthaul / backhaul and edge cloud bearer network
[0137] The 5G O-RAN architecture requires microsecond-level latency jitter for eCPRI and TSN control plane messages, yet the same link still needs to carry high-bandwidth video backhaul and log collection. This solution ensures that high-priority synchronization / control frames always flow through the primary link, ensuring determinism. Low-priority, high-volume traffic is automatically diverted to the backup link when the primary link is busy, avoiding control plane timeslot congestion. This solution does not require additional VLANs, making it easy to integrate with existing fronthaul and aggregation switch firmware, meeting operators' differentiated transport requirements for multi-tier SLAs.
[0138] (3) Industrial Ethernet and Intelligent Manufacturing Control Network
[0139] In OT scenarios such as production automation lines, rail transit signaling, and power secondary dispatch, real-time control loops (such as Profinet RT and TSN CQF) are extremely latency-sensitive, while batch telemetry and video surveillance traffic occupies the same physical redundant ring network. This technology leverages the existing ring network backup chain to separate control frames from regular data frames at the physical layer, avoiding sudden increases in control loop latency or frame loss. It also fully leverages existing 802.1Q and spanning tree configurations, eliminating the need for reconfiguration of VLANs and IP addresses and reducing the risk of on-site retrofits.
[0140] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0141] The above is only a specific implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A traffic control method based on the PVST+ protocol, characterized in that: In the absence of adding an additional external virtual local area network, the transmission path of VLAN traffic data inputted from an input port of a network device is regulated, and the regulation method comprises the following steps: The network device input port receives a VLAN traffic data frame, parses the VLAN tag information thereof, and extracts a VLAN ID and a priority field from the VLAN tag information; Identify a priority category of the data frame according to the priority field, wherein the priority category includes a first priority and a lower second priority; Forwarding data frames of the first priority to the outside of the network device through a pre-configured primary link, and monitoring the congestion level of the primary link; wherein the primary link is a link in a first spanning tree instance maintained independently for the current VLAN by the PVST+ protocol; If it is detected that the primary link reaches a preset congestion index, the following steps are performed: According to a preset rule, the VLAN ID of a data frame belonging to the second priority is rewritten into a temporary ID carrying a pseudo tag to obtain a rewritten virtual VLAN traffic data frame; the virtual VLAN traffic data frame is transmitted to the output port of the network device through a backup link different from the main link, wherein the backup link is a link in a second spanning tree instance that is independently maintained by the PVST+ protocol for the rewritten virtual VLAN, and the backup link and the first spanning tree instance are located in the same physical topology and are isolated from each other, and the pseudo tag is a basis for determining whether a virtual VLAN traffic data frame automatically belongs to the backup link; before forwarding the data frame from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewrite.
2. The traffic control method based on the PVST+ protocol according to claim 1, characterized in that: If there are multiple virtual VLAN traffic data frames belonging to the standby link at a certain moment, they will queue up at the entrance of the standby link in a preset order; If it is monitored that the main link is converted from a preset congestion index to a preset decongestion index, the temporary ID of the data frame in the waiting state at the entrance of the backup link is restored to the VLAN ID before the rewriting, so that the restored VLAN traffic data frame belongs to the main link, and then the restored VLAN traffic data frame is forwarded to the outside of the network device through the main link, wherein the congestion level represented by the decongestion index is lighter than the congestion level represented by the congestion index.
3. The traffic control method based on the PVST+ protocol according to claim 2, characterized in that: Determine the order of multiple virtual VLAN traffic data frames in the waiting queue according to the order of reception time or priority; If it is detected that the main link reaches a preset congestion index and is converted to a preset decongestion index, the temporary ID of the data frame in the waiting queue is restored to the VLAN ID before the rewriting, and the data frame is removed from the waiting queue; Monitor the main link at a preset interval frequency to see if it reaches the decongestion indicator. If so, restore the temporary ID of the preceding data frame in the current waiting queue to the VLAN ID before rewriting; otherwise, the virtual VLAN traffic data frames in the current waiting queue continue to queue and wait.
4. The traffic control method based on the PVST+ protocol according to claim 2, characterized in that: If it is monitored that the main link reaches the decongestion index, and the network device input port newly receives a VLAN traffic data frame of the second priority, the newly received VLAN traffic data frame of the second priority will be forwarded to the outside of the network device through the main link over the virtual VLAN traffic data frame waiting in queue at the entrance of the backup link.
5. The traffic control method based on the PVST+ protocol according to claim 1, characterized in that: The first spanning tree instance and the second spanning tree instance located in the same physical topology are connected to the same output port or different output ports of the network device; When the virtual VLAN traffic data frame is transmitted to the end of the standby link or the output port of the network device, its temporary ID is restored to the VLAN ID before rewriting, and the restored VLAN traffic data frame is forwarded from the output port to the outside of the network device.
6. The traffic control method based on the PVST+ protocol according to claim 1, characterized in that: The network device parses the 802.1Q tag of the VLAN traffic data frame and extracts the VLAN ID field and the priority field value from the 802.1Q tag; If the extracted priority field value reaches the preset priority threshold, the priority category of the corresponding data frame is marked as the first priority; Otherwise, the corresponding data frame is marked with the second priority level.
7. The traffic control method based on the PVST+ protocol according to claim 1, characterized in that: If the current VLAN traffic data frame belongs to the second priority and the current main link does not reach the preset congestion index, the VLAN traffic data frame belonging to the second priority is forwarded to the outside of the network device through the main link.
8. The traffic control method based on the PVST+ protocol according to claim 1, characterized in that: The congestion level of the primary link is monitored by one or more of the following methods: Method 1 is to monitor the instantaneous utilization of the primary link port in real time. If the utilization rate continuously reaches a preset utilization threshold within a preset time period, and / or if the average value within the preset time period reaches a preset average utilization threshold, then it is determined that the primary link has reached the congestion indicator. Method 2 is to monitor in real time the length of the data frame queue waiting in the queue at the main link port. If it reaches a preset length threshold, it is determined that the main link has reached the congestion index, wherein the data frame queue waiting in the queue at the main link port is a queue composed of data frames of the first priority, or a queue composed of data frames of the second priority, or a queue composed of all data frames in the waiting queue at the main link port.
9. The traffic control method based on the PVST+ protocol according to claim 1, characterized in that: If it is monitored that the main link is converted from not meeting the preset congestion index to reaching the congestion index or maintaining the congestion state, and there are data frames of the second priority waiting in a queue at the main link port or the network device input port newly receives a VLAN traffic data frame of the second priority, the following steps are performed: Rewriting the VLAN ID of the data frame belonging to the second priority into a temporary ID carrying the pseudo tag; Transmitting the corresponding virtual VLAN traffic data frame obtained after rewriting to the output port of the network device through the standby link; Before forwarding the data frame from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before being rewritten.
10. The traffic control method based on the PVST+ protocol according to any one of claims 1 to 9, characterized in that: Use the following method to rewrite the VLAN ID into a temporary ID that carries a pseudo tag: Set the most significant bit of the VLAN ID from 0 to 1, and keep the other bits unchanged. The network device determines whether the VLAN ID carries a pseudo tag by identifying the most significant bit of the ID.
11. The traffic control method based on the PVST+ protocol according to claim 10, characterized in that: The PVST+ protocol maintains an independent first spanning tree instance for the current VLAN, which includes the primary link and a redundant link that is designated to be blocked. The PVST+ protocol maintains an independent second spanning tree instance for the virtual VLAN, selects the redundant link in the first spanning tree instance as the backup link, and selects the primary link in the first spanning tree instance as the redundant link in the second spanning tree instance.
12. The traffic control method based on the PVST+ protocol according to any one of claims 1 to 9, characterized in that: The backup link is pre-configured by the PVST+ protocol, and the number of the backup link is one or more.
13. The traffic control method based on the PVST+ protocol according to claim 12, characterized in that: The number of the backup links is multiple; The network device distributes the plurality of virtual VLAN traffic data frames alternately to the two standby links based on a load balancing mechanism; Alternatively, the network device allocates the plurality of virtual VLAN traffic data frames to the standby link in the following manner: if there is an idle standby link, the virtual VLAN traffic data frame currently to be allocated is allocated to the idle standby link; otherwise, searching whether there is a standby link that meets the following conditions: The priority field value of the data frame in the waiting queue at the entrance of the backup link is smaller than the priority field value of the data frame currently to be allocated. If it exists, the data frame currently to be allocated will be inserted into the corresponding queue and precede the data frame with a lower priority field value; if it does not exist, it will be allocated to the end of the waiting queue at one of the entrances of the backup link.
14. A traffic control method based on the PVST+ protocol, characterized in that: In the absence of adding an additional external virtual local area network, the transmission path of VLAN traffic data inputted from an input port of a network device is regulated, and the regulation method includes the following steps: The PVST+ protocol maintains an independent first spanning tree instance for the first type of VLAN and an independent second spanning tree instance for the second type of VLAN. The primary link in the first spanning tree instance and the backup link in the second spanning tree instance are located in the same physical topology and are isolated from each other. monitoring the congestion level of the main link, and if it does not reach a preset congestion index, forwarding the first class VLAN traffic data frame received by the input port of the network device to the outside of the network device through the main link; If the main link reaches a preset congestion index, determining a transmission path according to the priority of the first-class VLAN traffic data frame: if the first-class VLAN traffic data frame belongs to a preset first priority, forwarding it to the outside of the network device through the main link; If the first-class VLAN traffic data frame belongs to a second priority lower than the first priority, the VLAN ID of the data frame belonging to the second priority is rewritten into a temporary ID carrying a pseudo tag according to a preset rule, and a virtual VLAN traffic data frame belonging to the second-class VLAN is obtained after the rewriting. The virtual VLAN traffic data frame is then transmitted to the output port of the network device through the backup link; and before the data frame is forwarded from the output port to the outside of the network device, the temporary ID is restored to the VLAN ID before the rewriting.
15. A switch, characterized in that: include: An input port configured to receive VLAN traffic data frames sent by an external upstream device; A parsing module configured to parse the VLAN tag information and extract the VLAN ID field and the priority field; a priority identification module configured to identify, based on the extracted priority field, whether the priority category of the data frame is the first priority or the second priority; A primary link and a backup link that are isolated from each other in the same physical topology, wherein the primary link is a link in a first spanning tree instance maintained independently by the PVST+ protocol for the current VLAN; and the backup link is a link in a second spanning tree instance maintained independently by the PVST+ protocol for another VLAN. A congestion monitoring module is configured to monitor whether the congestion level of the primary link reaches a preset congestion index; An ID rewriting module is configured to, after the congestion monitoring module detects that the primary link has reached a preset congestion indicator, rewrite the VLAN ID of the data frame belonging to the second priority into a temporary ID carrying a pseudo tag according to a preset rule, so that the rewritten virtual VLAN traffic data frame automatically belongs to the backup link and is then transmitted to the output port of the switch through the backup link; An ID recovery module is configured to restore the temporary ID to the VLAN ID before the rewriting before the virtual VLAN traffic data frame is forwarded from the output port to the outside; The data frames of the first priority and the data frames of the second priority that have not been rewritten by the ID rewriting module are both transmitted to the output port of the switch through the main link; The output port is configured to receive data transmitted by the primary link and / or the backup link and forward the data to an external downstream device.
16. The switch according to claim 15, wherein: The switch is configured to execute the steps of the traffic regulation method according to any one of claims 1 to 14.
17. A communication system based on the PVST+ protocol, characterized in that: Comprising a switch as claimed in claim 15 or 16.
Citation Information
Patent Citations
Method and device for realizing load sharing in multiple spanning tree protocol (MSTP) networking environment
CN102055676A
Method and system for dynamic link failover management
US20090249115A1