Lightweight traffic forwarding path planning method and system
By introducing path planner devices into the existing network and utilizing multi-dimensional decision factors for traffic forwarding path planning, the problems of traffic congestion and low resource utilization are solved, achieving efficient traffic forwarding path planning and improved network stability, with good compatibility and management capabilities.
Patent Information
- Application Number
- CN202610493490.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-15
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies fail to effectively consider path bandwidth and traffic congestion in traffic forwarding path planning, resulting in low network resource utilization, frequent dropping of low-priority traffic during high-priority traffic transmission, and high cost and poor compatibility of SDN technology upgrades.
By introducing path planner devices into the existing network, path scoring and differentiated planning are performed based on multi-dimensional decision factors using a browser topology interface or path planning software. Combined with the shortest path algorithm and the effectiveness flag mechanism, traffic forwarding paths are dynamically adjusted, and hop-by-hop reachability verification and automatic switching are supported before the path takes effect.
It enables flexible traffic planning in existing technologies, improves network stability and reliability, supports the flexibility and controllability of path planning in existing technologies, enhances network stability and automated management capabilities, and has good compatibility with existing networks.
Smart Images

Figure CN122027552A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wired communication technology, and specifically to a lightweight traffic forwarding path planning method and system. Background Technology
[0002] In the field of wired communication networks, scenarios such as enterprise campus networks, school networks, and medium-sized LANs are increasingly demanding higher stability and reliability in traffic transmission. The effectiveness of traffic forwarding path planning directly determines the network's resource utilization and the transmission quality of high-priority services. Current mainstream traffic forwarding path planning schemes generally suffer from the following technical shortcomings: Traditional routing protocols fail to consider path bandwidth and traffic congestion. Unicast routing protocols in wired networks, such as OSPF and RIP, rely on the shortest path algorithm as the core basis for route calculation. These protocols only focus on the hop count between nodes, completely ignoring crucial factors such as actual path bandwidth and real-time traffic load. This design flaw leads to a large influx of traffic onto the same shortest path, causing congestion, increased transmission latency, and higher packet loss rates. Simultaneously, bandwidth resources on other non-shortest paths remain idle for extended periods, resulting in low overall network resource utilization.
[0003] A simple QoS priority scheduling strategy is too crude. To ensure the transmission quality of high-priority traffic, some networks use a QoS priority queue scheduling mechanism. This mechanism assigns priorities to different traffic types, allowing high-priority traffic to occupy network resources first. However, this approach is essentially preemptive scheduling; guaranteeing the transmission of high-priority traffic comes at the cost of sacrificing the transmission opportunities of low-priority traffic. In scenarios where high-priority traffic is continuously transmitting, low-priority traffic will frequently be dropped or its transmission interrupted. This solution is far too crude.
[0004] SDN technology solutions face high transformation costs and poor compatibility. SDN technology employs a control plane and data plane separation architecture, supporting customized forwarding paths based on real-time bandwidth and traffic characteristics, theoretically solving both traffic congestion and priority guarantee problems. However, implementing SDN technology requires a comprehensive upgrade of existing network hardware such as switches and routers, and the procurement of dedicated equipment supporting SDN features. This results in high hardware procurement and deployment costs. Furthermore, interoperability barriers exist between SDN networks and traditional non-SDN networks, making seamless integration difficult. For scenarios where traditional network deployments have already been completed, the transformation costs are too high and implementation is challenging.
[0005] Therefore, there is an urgent need for a technical solution that can achieve fine-grained control of traffic forwarding paths in traditional network architectures without upgrading existing network hardware. Summary of the Invention
[0006] Based on the problems existing in the prior art, this invention designs a lightweight traffic path planning method that improves network transmission quality through minor improvements to application software without upgrading existing network hardware.
[0007] The present invention adopts the following technical solution: This invention protects a lightweight traffic forwarding path planning method, comprising the following steps: Step 1, Role Assignment: Designate one device in the network as the path planner, responsible for path planning, configuration distribution, and status maintenance; other forwarding nodes only execute forwarding rules. Step 2, Path Planning: Manually specify traffic forwarding paths through the browser's network topology interface, or use path planning software to generate forwarding paths based on multi-dimensional decision factors, comprehensive path scoring, and differentiated planning mechanisms; specifically including: (1) Obtain multi-dimensional decision factors and establish a comprehensive path scoring model; (2) Implement differentiated path planning based on the path scoring model, specifically as follows: Identify business types and map them to priorities; The network status is monitored through the network monitoring module; Based on network topology, a set of candidate paths is calculated using the shortest path algorithm; For each path in the candidate set, substitute it into the scoring model to calculate the comprehensive score; The path with the highest overall score is selected as the optimal forwarding path and provided to the path planner. Furthermore, path planning and forwarding also includes: (1) The path planner creates the path planning configuration and forwards the path packets to the forwarding nodes along the route via IP unicast without carrying the effective flag; (2) The forwarding nodes along the route determine the reachability of the directly connected next hop and report the reachability status to the path planner; (3) The path planner collects the next-hop reachability responses of all forwarding nodes, and when it confirms that all nodes are reachable, it sends a rule control message carrying an effective flag to the forwarding nodes along the route. (4) After receiving the rule control message, each forwarding node loads the forwarding rule into the switching chip to make the traffic forwarding path effective; Step 3: Maintain forwarding paths: Forwarding nodes periodically send reachability status messages to the path planner; If a node becomes unreachable by its next hop, the path planner sends a message with a discard or destruction flag, triggering the invalidation or deletion of the forwarding rule. Step 4, Forwarding Path Switching: When the primary path fails, the path planner enables a backup path with an effective flag; if there is no backup path, the primary path is deleted, and traffic is switched to autonomous routing forwarding.
[0008] Furthermore, the planned route and the autonomous route learned by the routing protocol coexist, and their forwarding priority relationship is as follows: the planned primary path is higher than the planned backup path, the backup path is higher than the autonomous route path, and when the planned route is unreachable, it automatically switches to the autonomous route for forwarding.
[0009] Furthermore, each node along the forwarding path periodically sends reachability status messages to the path planner to maintain the validity of the traffic forwarding path.
[0010] Furthermore, if the forwarding path planner discovers that the primary forwarding path is faulty and that a backup forwarding path exists, it sets the activation flag of the backup path to 1 and enables the backup forwarding path. If there is no alternative forwarding path, only the primary forwarding path is deleted, and data packets are forwarded according to the autonomous route.
[0011] Furthermore, the forwarding path message includes data flow matching information, MD5 digest, path planner IP, forwarding node device ID, and next-hop IP address. The data flow matching information includes source IP, source IP mask, destination IP, destination IP mask, protocol type, and port range.
[0012] Furthermore, the reachability status message uses a combination of Digest, Nexthop, and Flags fields to describe the rule status. The Flags field includes a reachability identifier, a subnet configuration error identifier, a next-hop address error identifier, and a rule enable status identifier; Digest represents the MD5 digest of the data stream matching content.
[0013] Furthermore, the rule control message enables, deprecates, and destroys forwarding rules through different flag bits in the Flags field, specifically including three flag bits: STREAM_RULE_CTRL_ACTIVATE, STREAM_RULE_CTRL_DIS_ACTIVATE, and STREAM_RULE_CTRL_DESTROY.
[0014] Furthermore, the forwarding node distributes forwarding table entries for the traffic forwarding path through the policy routing module of the switching chip.
[0015] In another aspect, this invention protects a lightweight traffic forwarding path planning system, including a path planner and forwarding nodes, specifically comprising: The path planner is responsible for path planning, configuration distribution, and status maintenance. The path planner manually specifies traffic forwarding paths through a browser's network topology interface, or generates forwarding paths using path planning software based on multi-dimensional decision factors, comprehensive path scoring, and a differentiated planning mechanism. Specifically, this includes: (1) Obtain multi-dimensional decision factors and establish a comprehensive path scoring model; (2) Implement differentiated path planning based on the path scoring model, specifically as follows: Identify business types and map them to priorities; The network status is monitored through the network monitoring module; Based on network topology, a set of candidate paths is calculated using the shortest path algorithm; For each path in the candidate set, substitute it into the scoring model to calculate the comprehensive score; The path with the highest overall score is selected as the optimal forwarding path and provided to the path planner. Furthermore, path planners are also used for execution: 1) The path planner creates a path planning configuration and forwards the path packets to the forwarding nodes along the route via IP unicast, without carrying an activation flag; 2) The path planner collects the next-hop reachability responses of all nodes, and when it confirms that all nodes are reachable, it sends a rule control message carrying an effective flag to the forwarding nodes along the route. 3) Maintaining forwarding paths: Forwarding nodes periodically send reachability status messages to the path planner; If a node becomes unreachable by its next hop, the path planner sends a message with a discard or destruction flag, triggering the invalidation or deletion of the forwarding rule. 4) Forwarding path switching: When the primary path fails, the path planner enables the backup path with an effective flag; if there is no backup path, the primary path is deleted and traffic is switched to autonomous routing for forwarding. The forwarding node only executes the forwarding rules, determines the reachability of the direct next hop, and reports the reachability status to the path planner; and after receiving the rule control message, it loads the forwarding rules into the switching chip to make the traffic forwarding path effective.
[0016] In another aspect, the present invention protects a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above.
[0017] Technical effects of the present invention Compared with the prior art, the present invention has the following advantages: (1) To achieve flexible planning of service traffic forwarding paths without upgrading existing network hardware; (2) By separating path planning from forwarding execution, the stability and controllability of network operation are improved; (3) By using a hop-by-hop reachability verification mechanism before the path takes effect, invalid paths are prevented from being mistakenly activated; (4) It supports dynamic maintenance and automatic switching of forwarding paths, improves the fault tolerance of the network, can coexist with existing routing protocols, and has good compatibility with the existing network.
[0018] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention.
[0019] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a lightweight traffic forwarding path planning system in an embodiment of the present invention; Figure 2 This is a flowchart of a lightweight traffic forwarding path planning method in an embodiment of the present invention; Figure 3 This is a schematic diagram of a forwarding path packet structure in an embodiment of the present invention; Figure 4 This is a schematic diagram of a reachability status message structure in an embodiment of the present invention; Figure 5 This is a schematic diagram of a rule control message structure in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the operation process of the comprehensive path scoring algorithm in the operation and maintenance software in this embodiment of the invention. Detailed Implementation
[0021] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0022] The lightweight nature of this invention means that the implementation of SDN technology requires a comprehensive upgrade of existing network hardware devices such as switches and routers; however, this invention improves network transmission quality through minor improvements to application software without upgrading existing network hardware.
[0023] This invention assigns transmission paths to different traffic types, preventing all traffic from congesting onto a single forwarding path. This ensures that while high-priority traffic is prioritized for transmission, other low-priority traffic can also be guaranteed a certain level of protection, making fuller use of network transmission resources.
[0024] To achieve the above objectives, the present invention adopts the following technical solution: Example 1
[0025] Network administrators can plan traffic forwarding paths by manually specifying them on the browser's network topology interface, or by using path planning algorithms, where software dynamically adjusts the traffic forwarding paths based on real-time path bandwidth usage.
[0026] Figure 1 The diagram shows a lightweight traffic forwarding path planning system structure according to the present invention, including a path planner and other switch nodes.
[0027] The path planner is responsible for path planning, configuration distribution, and status maintenance. The path planner manually specifies traffic forwarding paths through a browser's network topology interface, or generates forwarding paths using path planning software based on multi-dimensional decision factors, comprehensive path scoring, and a differentiated planning mechanism. Specifically, this includes: (1) Obtain multi-dimensional decision factors and establish a comprehensive path scoring model; (2) Implement differentiated path planning based on the path scoring model, specifically as follows: Identify business types and map them to priorities; The network status is monitored through the network monitoring module; Based on network topology, a set of candidate paths is calculated using the shortest path algorithm; For each path in the candidate set, substitute it into the scoring model to calculate the comprehensive score; The path with the highest overall score is selected as the optimal forwarding path and provided to the path planner.
[0028] The following section will introduce a comprehensive path scoring and differentiated planning mechanism based on multi-dimensional decision factors: A comprehensive path scoring model is constructed based on multi-dimensional decision factors. This model not only considers the static attributes of the link but also focuses on real-time dynamic performance indicators, thereby accurately planning the optimal forwarding path for service flows of different priorities. Figure 6 As shown, an operation and maintenance management device in the network is running operation and maintenance management software, and the comprehensive path scoring algorithm is running in the operation and maintenance management software.
[0029] (1) Definition and acquisition of multi-dimensional decision factors The decision factor set Ω={D,L,B,P} defined in this scheme specifically includes: Link delay (D, Delay): refers to the transmission and processing delay of data packets on the link from the source to the destination. It is measured by timestamps or estimated in real time based on network calculus.
[0030] Packet loss ratio (L): The ratio of packets lost on a link per unit time to the total number of packets lost. It reflects the stability and congestion level of the link and is obtained through continuous performance monitoring.
[0031] Remaining bandwidth (B): The currently available bandwidth of the link, which is the total physical bandwidth minus the traffic already used. It is a key indicator for determining whether a link is congested.
[0032] Priority Weight (P): A weighting coefficient assigned based on service type (e.g., video, storage, control signaling). High-priority services have higher requirements for low latency and low jitter.
[0033] (2) Construction of the comprehensive path scoring model To uniformly quantify the aforementioned heterogeneous factors, this invention proposes a weighted normalized comprehensive scoring algorithm. For a candidate path R (composed of several links), its comprehensive score S(R) is calculated as follows: in: P: Business priority weighting coefficient; f(D) and f(L): Cost functions. The higher the latency and packet loss rate, the greater the cost and the lower the score.
[0034] g(B): The revenue function. The larger the remaining bandwidth, the greater the revenue value and the higher the score.
[0035] w p α, β, γ: Dynamically adjustable weighting coefficients that satisfy α+β+γ=1, used to balance the influence of factors in each dimension.
[0036] Normalization: Since the dimensions of each factor are different (e.g., latency is ms and bandwidth is Gbps), normalization is required before substituting them into the model to map them into the [0,1] interval.
[0037] (3) Differentiated path planning process Based on the above scoring model, this invention proposes the following: Figure 6 The differentiated path planning process is shown below: 1) Business identification and priority mapping When a data stream enters the switch, the packet header (such as VLAN Tag or DSCP field) is parsed to determine its service type and match the corresponding service priority weight (P).
[0038] 2) Network state awareness: Network monitoring modules (such as those based on Telemetry or BFD protocols) collect real-time data on latency (D), packet loss rate (L), and remaining bandwidth (B) across the entire network. Collecting transmission quality information involves forwarding nodes reporting network quality status messages to the operation and maintenance management equipment.
[0039] 3) Calculation of candidate path set: Based on the network topology, the K Shortest Paths (KSP) algorithm is used to calculate all feasible acyclic physical paths between source and destination nodes, forming a candidate path set.
[0040] 4) Calculation of overall score: For each path in the candidate set, the comprehensive path scoring model is used for calculation: a. For high-priority services (such as voice and video): Increase α (latency weight) and β (packet loss rate weight) to force the selection of the path with the highest score (i.e., the lowest latency and the most stable).
[0041] b. For low-priority services (such as file downloads): Increase γ (bandwidth weight) to allow the selection of paths with larger remaining bandwidth but slightly higher latency, thereby achieving load balancing.
[0042] (5) Path decision-making and distribution of forwarding documents: Select the highest overall score (S) max The path selected as the optimal forwarding path is sent to the path planner device via TCP / UDP messages. This means the operation and maintenance management device sends the configuration information for the forwarding path rules.
[0043] Furthermore, path planners are also used for execution: 1) The path planner creates a path planning configuration and forwards the path packets to the forwarding nodes along the route via IP unicast, without carrying an activation flag; 2) The path planner collects the next-hop reachability responses of all nodes. When it confirms that all nodes are reachable, it sends a rule control message carrying an effective flag to the forwarding nodes along the route. The horizontal orange arrows in the figure represent traffic matching rule 1, and the horizontal green arrows represent traffic matching rule 2. 3) Maintaining forwarding paths: Forwarding nodes periodically send reachability status messages to the path planner; If a node becomes unreachable by its next hop, the path planner sends a message with a discard or destruction flag, triggering the invalidation or deletion of the forwarding rule. 4) Forwarding path switching: When the primary path fails, the path planner enables the backup path with an effective flag; if there is no backup path, the primary path is deleted and traffic is switched to autonomous routing forwarding.
[0044] The forwarding node only executes the forwarding rules, determines the reachability of the direct next hop, and reports the reachability status to the path planner; and after receiving the rule control message, it loads the forwarding rules into the switching chip to make the traffic forwarding path effective. Example 2
[0045] like Figure 2 The above is a schematic diagram of a lightweight traffic forwarding path planning method according to the present invention, including: 1. Planning Principles 1.1 Basic Principles of Path Planning 1) Only the switch that acts as the path planner has path planning authority. Other switches are only responsible for executing the path planning results. The path planner can be a switch or a device running operation and maintenance management software. 2) Switches that are not path planners only perform path planning on the forwarding plane and do not perform configuration management; 3) Routes planned by the path and autonomous routes learned by the routing protocol coexist, with the following priority relationship: planned primary path > planned backup path > autonomous route. When the planned route is unreachable, it automatically switches to autonomous route forwarding. 4) The path planner switch uses forwarding path protocol messages to send the planned path information to each switch node along the path.
[0046] 1.2 Path planning process, The path planner manually specifies traffic forwarding paths through a browser's network topology interface, or generates forwarding paths using path planning software based on multi-dimensional decision factors, comprehensive path scoring, and a differentiated planning mechanism; specifically including: (1) Obtain multi-dimensional decision factors and establish a comprehensive path scoring model; (2) Implement differentiated path planning based on the path scoring model, specifically as follows: Identify business types and map them to priorities; The network status is monitored through the network monitoring module; Based on network topology, a set of candidate paths is calculated using the shortest path algorithm; For each path in the candidate set, substitute it into the scoring model to calculate the comprehensive score; The path with the highest overall score is selected as the optimal forwarding path and provided to the path planner.
[0047] The following section will introduce a comprehensive path scoring and differentiated planning mechanism based on multi-dimensional decision factors: A comprehensive path scoring model is constructed based on multi-dimensional decision factors. This model not only considers the static attributes of the link but also focuses on real-time dynamic performance indicators, thereby accurately planning the optimal forwarding path for service flows of different priorities. Figure 6 As shown, an operation and maintenance management device in the network is running operation and maintenance management software, and the comprehensive path scoring algorithm is running in the operation and maintenance management software.
[0048] (1) Definition and acquisition of multi-dimensional decision factors The decision factor set Ω={D,L,B,P} defined in this scheme specifically includes: Link delay (D, Delay): refers to the transmission and processing delay of data packets on the link from the source to the destination. It is measured by timestamps or estimated in real time based on network calculus.
[0049] Packet loss ratio (L): The ratio of packets lost on a link per unit time to the total number of packets lost. It reflects the stability and congestion level of the link and is obtained through continuous performance monitoring.
[0050] Remaining bandwidth (B): The currently available bandwidth of the link, which is the total physical bandwidth minus the traffic already used. It is a key indicator for determining whether a link is congested.
[0051] Priority Weight (P): A weighting coefficient assigned based on service type (e.g., video, storage, control signaling). High-priority services have higher requirements for low latency and low jitter.
[0052] (2) Construction of the comprehensive path scoring model To uniformly quantify the aforementioned heterogeneous factors, this invention proposes a weighted normalized comprehensive scoring algorithm. For a candidate path R (composed of several links), its comprehensive score S(R) is calculated as follows: in: P: Business priority weighting coefficient; f(D) and f(L): Cost functions. The higher the latency and packet loss rate, the greater the cost and the lower the score.
[0053] g(B): The revenue function. The larger the remaining bandwidth, the greater the revenue value and the higher the score.
[0054] w pα, β, γ: Dynamically adjustable weighting coefficients that satisfy α+β+γ=1, used to balance the influence of factors in each dimension.
[0055] Normalization: Since the dimensions of each factor are different (e.g., latency is ms and bandwidth is Gbps), normalization is required before substituting them into the model to map them into the [0,1] interval.
[0056] (3) Differentiated path planning process Based on the above scoring model, this invention proposes the following: Figure 6 The differentiated path planning process is shown below: 1) Business identification and priority mapping When a data stream enters the switch, the packet header (such as VLAN Tag or DSCP field) is parsed to determine its service type and match the corresponding service priority weight (P).
[0057] 2) Network state awareness: The network monitoring module (such as one based on Telemetry or BFD protocol) collects real-time data on latency (D), packet loss rate (L), and remaining bandwidth (B) of the entire network link.
[0058] 3) Calculation of candidate path set: Based on the network topology, the K Shortest Paths (KSP) algorithm is used to calculate all feasible acyclic physical paths between source and destination nodes, forming a candidate path set.
[0059] 4) Calculation of overall score: For each path in the candidate set, the comprehensive path scoring model is used for calculation: b. For high-priority services (such as voice and video): Increase α (latency weight) and β (packet loss rate weight) to force the selection of the path with the highest score (i.e., the lowest latency and the most stable).
[0060] b. For low-priority services (such as file downloads): Increase γ (bandwidth weight) to allow the selection of paths with larger remaining bandwidth but slightly higher latency, thereby achieving load balancing.
[0061] (5) Path decision-making and distribution of forwarding documents: The path with the highest overall score (Smax) is selected as the optimal forwarding path and sent to the path planner device via TCP / UDP messages.
[0062] Furthermore, 1) The path planner switch creates the path planning configuration and transmits it to each node switch along the forwarding path via IP unicast. At this time, the STREAM_RULE_CTRL_ACTIVATE activation flag has not yet been issued and is not effective. 2) Each node switch along the route determines whether its direct next hop is reachable. If it is reachable, it notifies the "path planner" that the next hop is reachable; otherwise, it notifies the path planner that the next hop is unreachable. 3) The "path planner" collects the next-hop reachability responses from all nodes. Only after all nodes announce that the path is reachable will the path be determined to be available. Then, the STREAM_RULE_CTRL_ACTIVATE flag is set to 1 to indicate that the path is effective. The planner sends the path to all nodes along the path. All nodes along the path apply the forwarding rules to the forwarding core and send forwarding table entries to the switching chip.
[0063] 1.3 Maintenance process for forwarding paths 1) Each node switch along the forwarding path periodically sends reachability status messages to the path planner to indicate whether the node is working properly. If a node becomes unreachable at the next hop, the path planner will immediately receive a message and set the STREAM_RULE_CTRL_DIS_ACTIVATE deprecation flag to 1 in the rule control message and send it to each node along the path. The forwarding rules of each node will be set to invalid. 2) If a node device along the route suddenly loses power, the path planner will determine that the node is offline after three cycles of lost reachability status messages. In the rule control message, the STREAM_RULE_CTRL_DIS_ACTIVATE deprecation flag will be set to 1 and sent to each node along the route. The forwarding rules of each node will be set to invalid. 3) After the path planner is reset, the configuration of all forwarding paths is lost and other switch nodes are not notified in time. These nodes send reachability status messages to the path planner. The path planner determines that the forwarding rule associated with the reachability status message does not exist and sends a rule control message to this node with the STREAM_RULE_CTRL_DESTROY flag set to 1, requesting all nodes along the path to delete the forwarding rule. Figure 6 The horizontal orange arrows indicate traffic matching rule 1, and the green arrows indicate traffic matching rule 2; 4) When the switches of the forwarding nodes along the route are reset, all forwarding rules are lost and do not exist. After startup, the reachability status message sent to the path planner has empty rule content. The path planner finds that this node is abnormal and immediately sends a supplementary forwarding path message to this node.
[0064] 1.4 Switching process for forwarding paths 1) When the path planner discovers that the primary forwarding path is faulty and a backup forwarding path exists, it sets the STREAM_RULE_CTRL_ACTIVATE flag of the backup path to 1 and enables the backup forwarding path. 2) If there is no alternative forwarding path, only the primary forwarding path is deleted, and data packets are forwarded according to the autonomous route.
[0065] 2. Control message format 2.1 Forwarding path messages This message is used by the route planner to send to each node along the route when creating the route planning configuration. Figure 3 The diagram shown is a schematic of the forwarding path message of this invention, with each field analyzed: 1) SIP / SIP-Mask / DIP / DIP-Mask / Proto / Sport-start / Sport-end / Dport-Start / Dport-end are matching information for the data stream; it is not required that the matching items be written as 0. 2) Digest: An MD5 digest of the matched content of the data stream, which facilitates network transmission and reduces message size; 3) Flags: Not defined yet, fill in 0; 4) From-SIP: The IP address of the route planner; 5) Datapath-id: Device ID of the forwarding node; 6) NextNop: The next-hop IP address for this data stream.
[0066] 2.2 Reachability Status Message This message is used to forward the reachability status of a specific next hop that nodes along the path periodically report to the path planner. One forwarding rule uses a combination of the fields Digest, Nexthop, and Flags to describe its status. A message can contain descriptions of multiple rules, such as... Figure 4 As shown.
[0067] Parsing of each field in the message rule: 1) Digest: An MD5 digest of the matched content in the data stream; 2) Nexthop: The IP address of the next hop in the data stream; 3) Flags: Flags field, with the following meanings for each value: NH_STATE_REACHABLE 0x01; Clearing it to 0 indicates unreachable, setting it to 1 indicates reachable; NH_STATE_NO_SUBNET 0x02; In the unreachable state, setting it to 1 indicates that the directly connected network segment of this node does not belong to the subnet where the Nexthop address is located, prompting the controller that there may be a configuration error; NH_STATE_NEXTHOP_IS_ME 0x04 ; In the unreachable state, setting it to 1 indicates that the next-hop address is the interface address of this node, prompting the controller that there may be a configuration error.
[0068] NH_STATE_RULE_ACTIVE; 0x08; indicates that this rule is in an enabled state and is notified to the controller. When the controller finds that the enabled state is inconsistent, it will send a rule control message to this node again to correct the enabled or deactivated state.
[0069] 2.3 Rule Control Messages When it is necessary to enable, deprecate, or destroy forwarding rules, the path planner sends the message to the forwarding node switch. Figure 5 The diagram shows the structure of a rule control message, and the fields of the rule control message are parsed as follows: 1) Digest: An MD5 digest of the matched content in the data stream; 2) Flags: Flags field STREAM_RULE_CTRL_ACTIVATE 0x01; Enable this forwarding rule; STREAM_RULE_CTRL_DIS_ACTIVATE 0x02; Deprecate this forwarding rule; STREAM_RULE_CTRL_DESTROY 0x04; Destroy this forwarding rule.
[0070] 2.4 Forwarding plane implementation The forwarding layer is implemented using the policy routing module of the switching chip.
[0071] 2.5 Configuration Implementation 2.5.1 Command Line Configuration Create a forwarding path stream-path create <path-id> Delete a forwarding path stream-path destroy <path-id> Add a forwarding node and its next-hop IP to the forwarding path. stream-path <path-id>add-node<A.B.C.D> nexthop<A.B.C.D> Note: Multiple nodes are added for each forwarding path that passes through multiple nodes, and there is no order requirement for the added nodes.
[0072] Delete a forwarding node from the forwarding path. stream-path <path-id>del-node<A.B.C.D> Apply the forwarding path to a data stream. stream-path <path-id>apply-to <access-list-id> Note: One forwarding path can be used for multiple data streams.
[0073] View forwarding path information: show stream-path 2.5.2 Web Page Configuration On the page, select the data stream, i.e., the ID of the business name (100 below), and click the forwarding link hop by hop. The link will turn green. Click the "Save" button to send it out. The backend will receive it. access-list-id 100 node1-ip 192.168.137.1 node1-nexthop 10.10.5.121 node2-ip 192.168.121.1 node2-nexthop 10.10.4.134 This information is then used by route planners to create route planning configurations.
[0074] 2.5.3 Software-based automatic planning On the operation and maintenance management equipment, powerful path calculation software can be run to collect real-time bandwidth usage information for each forwarding path and dynamically adjust traffic forwarding paths. The calculation results are then distributed to devices along the route according to the aforementioned protocol, enabling automatic path planning.
[0075] 2.5.4 Implementation of Load Balancing Manual configuration allows multiple data streams to be assigned different forwarding paths according to path planning methods, ultimately achieving load balancing.
[0076] Embodiment 3 of the present invention provides a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the method steps provided according to Embodiment 2.
[0077] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method steps provided according to Embodiment 2.
[0078] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A lightweight traffic forwarding path planning method, characterized in that, Includes the following steps: Step 1: Assign roles: Designate one device in the network as the path planner, responsible for path planning, configuration distribution, and status maintenance; The remaining forwarding nodes only execute the forwarding rules; Step 2: Path Planning: Manually specify traffic forwarding paths through the browser's network topology interface, or use path planning software to generate forwarding paths based on multi-dimensional decision factors, comprehensive path scoring, and a differentiated planning mechanism. This includes: (1) Obtain multi-dimensional decision factors and establish a comprehensive path scoring model; (2) Implement differentiated path planning based on the path scoring model, specifically as follows: Identify business types and assign weight coefficients based on business types; The network status is monitored through the network monitoring module; Based on network topology, a set of candidate paths is calculated using the shortest path algorithm; For each path in the candidate path set, the comprehensive path scoring model is used to calculate the comprehensive score; The path with the highest overall score is selected as the optimal traffic forwarding path and provided to the path planner. Step 3: Maintain forwarding paths: Forwarding nodes periodically send reachability status messages to the path planner; If a node becomes unreachable by its next hop, the path planner sends a message with a discard or destruction flag, triggering the invalidation or deletion of the forwarding rule. Step 4 Switch forwarding path: When the primary path fails, the path planner enables the backup path with an effective flag; if there is no backup path, the primary path is deleted and traffic is switched to autonomous routing forwarding.
2. The lightweight traffic forwarding path planning method according to claim 1, characterized in that, The planned path also includes: (1) The path planner creates the path planning configuration and forwards the path packets to the forwarding nodes along the route via IP unicast without carrying the effective flag; (2) The forwarding nodes along the route determine the reachability of the directly connected next hop and report the reachability status to the path planner; (3) The path planner collects the next-hop reachability responses of all forwarding nodes, and when it confirms that all nodes are reachable, it sends a rule control message carrying an effective flag to the forwarding nodes along the route. (4) After receiving the rule control message, each forwarding node loads the forwarding rule into the switching chip to make the traffic forwarding path effective.
3. The lightweight traffic forwarding path planning method according to claim 1, characterized in that, Also includes: The planned route and the autonomous route learned by the routing protocol coexist, and their forwarding priority relationship is as follows: the planned primary path is higher than the planned backup path, the backup path is higher than the autonomous route path, and when the planned route is unreachable, it automatically switches to the autonomous route for forwarding.
4. The lightweight traffic forwarding path planning method according to claim 1, characterized in that, Each node along the forwarding path periodically sends reachability status messages to the path planner to maintain the validity of the traffic forwarding path.
5. The lightweight traffic forwarding path planning method according to claim 1, characterized in that, The forwarding path planner detects a failure in the primary forwarding path and finds a backup forwarding path exists. It then sets the backup forwarding path's activation flag to 1 and enables the backup forwarding path. If there is no alternative forwarding path, only the primary forwarding path is deleted, and data packets are forwarded according to the autonomous route.
6. The lightweight traffic forwarding path planning method according to claim 1, characterized in that, The forwarding path message includes data flow matching information, MD5 digest, path planner IP, forwarding node device ID, and next-hop IP address. The data flow matching information includes source IP, source IP mask, destination IP, destination IP mask, protocol type, and port range.
7. The lightweight traffic forwarding path planning method according to claim 1 or 3, characterized in that, The reachability status message uses a combination of Digest, Nexthop, and Flags fields to describe the rule status. The Flags field includes reachability identifier, subnet configuration error identifier, next-hop address error identifier, and rule enabled status identifier; Digest represents the MD5 digest of the data stream matching content.
8. The lightweight traffic forwarding path planning method according to claim 2, characterized in that, The rule control message enables, deprecates, and destroys forwarding rules through different flag bits in the Flags field, specifically including three flag bits: STREAM_RULE_CTRL_ACTIVATE, STREAM_RULE_CTRL_DIS_ACTIVATE, and STREAM_RULE_CTRL_DESTROY.
9. The lightweight traffic forwarding path planning method according to claim 1, characterized in that, The forwarding node distributes forwarding table entries for the traffic forwarding path through the policy routing module of the switching chip.
10. A lightweight traffic forwarding path planning system, comprising a path planner and forwarding nodes, characterized in that, The system includes: The path planner is responsible for path planning, configuration distribution, and status maintenance. The path planner manually specifies traffic forwarding paths through a browser's network topology interface, or uses path planning software to generate forwarding paths based on multi-dimensional decision factors, comprehensive path scoring, and a differentiated planning mechanism. Specifically, this includes: (1) Obtain multi-dimensional decision factors and establish a comprehensive path scoring model; (2) Implement differentiated path planning based on the path scoring model, specifically as follows: Identify business types and assign weight coefficients based on business types; The network status is monitored through the network monitoring module; Based on network topology, a set of candidate paths is calculated using the shortest path algorithm; For each path in the candidate path set, the comprehensive path scoring model is used to calculate the comprehensive score; The path with the highest overall score is selected as the optimal traffic forwarding path and provided to the path planner. The forwarding node only executes the forwarding rules, determines the reachability of the direct next hop, and reports the reachability status to the path planner; and after receiving the rule control message, it loads the forwarding rules into the switching chip to make the traffic forwarding path effective.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-9.
